/*
°³ÆíÇÑ »çÀÌÆ®ÀÇ ¸ÞÀÎ ÀÚ¹Ù½ºÅ©¸³Æ®

function check(form)
function ListView(Div)
function GoPoll(div)
function ChangeTheme(u)
function GoModule(p, d)
function GoModuleII(p, d)
function ChangeModule(u, d, p)
function onlyDigit(el)
function CheckAlpha2(s)
function m_view_store(counterpc_ip,product)
function makeCenterValue (fullLength, length)
function handleEnter (field, event)
function openWindow(szhref, name, s, w, h)
function GlobalchechSearch(f)
function warning(table, div, no)
function warning_reset(id)
*/
/**********************************
**  ¼³¹®Á¶»ç Å¬¸¯½Ã          *
***********************************/
// ¼±ÅÃÇ×¸ñÀÌ ÀÖ´ÂÁö¸¦ °Ë»çÇØ¼­ ÆË¾÷À» ¶ç¿î´Ù.
function check(form,islogin)
{

	if(islogin=="")
	{
		location.href= "http://www.netimo.net/login/index_login.html";
		return;
	}

	var j;
	for(var i = 0 ; i < form.recommend.length; i++ )
	{
		if(form.recommend[i].checked == true){
			form.submit();
			j=1;
		}
	}
	if(j!=1) alert("¼±ÅÃÇÏ½Å Ç×¸ñÀÌ ¾øÀ¾´Ï´Ù!!");
}

function ListView(Div)
{
	GoPoll(Div);
}

function GoPoll(div)
{
	var div;
	url = "http://pcbang.netimo.net/poll/index.php?Div="+div+"&poll=1&currentMenu=2";
	location.href=url;
}


function ChangeTheme(u)
{
	var u;
	if( u =="netimo")
	{
		location.href = "http://www.netimo.net/index.php";
	}
	else if( u =="greenware")
	{
		location.href = "http://greenware.netimo.net/index.php";
	}
	else if( u =="ongreen")
	{
		location.href = "http://www.ongreen.net";
	}
	else if( u =="anyware")
	{
		location.href = "http://anyware.netimo.net";
	}
	else if( u =="service")
	{
		location.href = "http://service.netimo.net";
	}
	else if( u =="pcservice")
	{
		location.href = "http://pcservice.netimo.net";
	}
	else if( u =="search")
	{
		location.href = "http://search.netimo.net/";
	}
	else if( u =="cafe")
	{
		location.href = "http://cafe.netimo.net/";
	}
	else if( u =="pcbang")
	{
		location.href = "http://pcbang.netimo.net/";
	}
	else if( u =="line")
	{
		location.href = "http://line.netimo.net/";
	}
	else if( u =="product")
	{
		location.href = "http://product.netimo.net/";
	}
	else if( u =="pcproduct")
	{
		location.href = "http://pcproduct.netimo.net/";
	}
	else if( u =="notice")
	{
		location.href = "http://notice.netimo.net/";
	}
	else if( u =="job")
	{
		location.href = "http://job.netimo.net/";
	}
	else if( u =="mart")
	{
		location.href = "http://mart.netimo.net/";
	}
	else if( u =="shop")
	{
		location.href = "http://shop.netimo.net/";
	}
	else if( u =="pnn")
	{
		location.href = "http://www.ipnn.co.kr/";
	}
	else if( u =="gamereport")
	{
		location.href = "http://gamereport.netimo.net/";
	}
	else if( u =="sigong")
	{
		location.href = "http://sigong.netimo.net/";
	}
	else if( u =="lastchaos")
	{
		location.href = "http://lastchaos.netimo.net/";
	}
	else if( u =="elan")
	{
		location.href = "http://elan.netimo.net/";
	}
	else if( u =="pcproduct")
	{
		location.href = "http://pcproduct.netimo.net/";
	}
	else if( u =="anycure")
	{
		location.href = "http://www.anycure.co.kr/";
	}
	else if( u =="anyset")
	{
		location.href = "http://anyset.netimo.net/";
	}
	else if( u =="mypage")
	{
		location.href = "http://my.netimo.net/modules/public205/index.php";
	}
	else if( u =="mypage2")
	{
		//PC¹æ¾÷ÁÖ
		location.href = "http://www.netimo.net/webmanager/manager_my.html";
	}
	else
	{
		location.href = "/modules/"+u+"/"+u+"/index.php";
	}
}

function GoModule(p, d)
{
	var p;
	var d;
	var f	= d+p;
	location.href = "/modules/"+d+"/"+f+"/index.php";
}


function GoModuleII(p, d)
{
	var p;
	var d;
	var f	= d+p;
	location.href = "/modules/"+f+"/index.php";
}

function GoModuleIII(p, d)
{
	var p;
	var d;
	var f	= d+p;
	location.href = "/modules/"+f+"/index.php?div=partner_QnA";
}

function GoModuleIIII(p, d)
{
	var p;
	var d;
	var f	= d+p;
	location.href = "/modules/"+f+"/index.php?set="+p;
}

function ChangeModule(u, d, p)
{
	var u;
	var d;
	var p;
	proc.location.href = "/modules/public/m_cookie.php?user_theme="+u+"&dir="+d+"&name="+p;
}

function onlyDigit(el)
{
	el.value = el.value.replace(/\D/g,'');
}

function CheckAlpha2(s)
{
	var err_cnt=0
	if(s =="")
	{
		return false;
	}
	else
	{
			for (var i = 0; i < s.length; i++) {
					var val = s.charAt(i);
					if (!( (val >= "0" && val <= "9") ) )
							err_cnt ++
			}
			if (err_cnt == 0 ) {
					return true;
			} else {
					alert(' Æ¯¼ö¹®ÀÚ ¹× ¿µ¹®  ÀÔ·ÂÀº ºÒ°¡´ÉÇÕ´Ï´Ù.');
					return false;
			}
	}
}


function m_view_store(counterpc_ip,product)
{
	window.open("/admin/pcbang/confirmpw.html?Product="+product+"&LocalIP="+counterpc_ip,"m_view_store","width=1000,height=800,top=50,left=50,toolbar=no,scrollbars=yes,resizable=yes,status=yes");
}


this.windowWidth		= window.screen.width;
this.windowHeight		= window.screen.height;
//	½ºÅ©¸°ÀÇ Áß¾Ó°ªÀ» »êÃâÇÑ´Ù
function makeCenterValue (fullLength, length)
{
	return (fullLength - length) / 2;
}


function handleEnter (field, event)
{
	var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	if (keyCode == 13)
	{
		var i;
		for (i = 0; i < field.form.elements.length; i++)
			if (field == field.form.elements[i])
			break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
	}
	else
		return true;
}

function openWindow(szhref, name, s, w, h) {
	openwin = window.open(szhref,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+s+",resizable=no,width="+w+",height="+h);
}


function GlobalchechSearch(f)
{
	if(f.query.value=="")
	{
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		f.query.focus();
		return false;
	}
}

function GlobalchechSearchQ(f)
{
	if(f.q.value=="")
	{
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		f.q.focus();
		return false;
	}
}



//ºÒ·® °Ô½Ã¹° °æ°í
function warning(table, div, no){
	var newWin = window.open('http://www.netimo.net/board/warning.html?table='+table+'&div='+div+'&no='+no,'warning','Top=100,Left=100,Width=420,Height=200,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0');
	newWin.focus();
}

//ºÒ·® °Ô½Ã¹° °æ°í ÃÊ±âÈ­
function warning_reset(id){
	var newWin = window.open('http://www.netimo.net/board/warning_act.html?id='+id,'warning_reset','Top=100,Left=100,Width=400,Height=200,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
}

function flash_movie(src, ids, width, height, wmode) {
	var wh = "";
	if (parseInt(width) && parseInt(height))
		wh = " width='"+width+"' height='"+height+"' ";
	return "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' "+wh+" id="+ids+"><param name=wmode value="+wmode+"><param name=movie value="+src+"><param name=quality value=high><embed src="+src+" quality=high wmode="+wmode+" type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' "+wh+"></embed></object>";
}

function doc_write(cont){
	document.write(cont);
}
