
	function loadcatcookie(iperr)
	{
		var catcookie = document.cookie.indexOf("CAT=N")==-1 ? true : false;	//º¸¾ÈÁ¢¼ÓÄíÅ° 
		if(iperr != "error.login.ip" && catcookie)
			document.forms[0].ssl.checked = true;	
	}	
	function getBrowser5UnderVersion() {
		var win = navigator.appVersion.charAt(0);
		if(win >= 2 && win <= 3) 	return true;
		else if(win == 4 && navigator.appVersion.indexOf("MSIE 5.0") != -1) return true;
		else	return false;
	}

	function enterSubmit() {
		var fm = document.forms[0];
		var sslgbn = fm.ssl.checked;	
		fm.hanilogin.value = fm.hani.checked ? "Y" : "N";
		fm.force.value = sslgbn ? "Y" : "N";
	//	fm.secukey.value = secureKeyStatus();
		if(bJumin == "true") fm.strjumin.value = fm.strjumin1.value + "" + fm.strjumin2.value;
		fm.action = ((getBrowser5UnderVersion()) ? sIdURL : (sslgbn) ? sPubIdsSSLURL : sPubIdURL) + '/login.nhn';
		if (fm.turtle.value.length==0 || fm.earthworm.value.length==0) {
			alert("ÇÑ°ÔÀÓ¾ÆÀÌµð ¶Ç´Â ºñ¹Ð¹øÈ£°¡ ÀÔ·ÂµÇÁö ¾Ê¾Ò½À´Ï´Ù.");
			fm.turtle.focus();
		} else if((bJumin == "true")) {
			if((bJumin == "true") && (fm.strjumin.value.length != 13)) {
				alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ ¿Ã¹Ù¸£°Ô ÀÔ·ÂÇÏ½Ã±â ¹Ù¶ø´Ï´Ù.");
				fm.strjumin1.focus();
			} else if ((bJumin == "true") && (fm.strname.value.length==0)) {
				alert("ÀÌ¸§À» ÀÔ·ÂÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");
				fm.strname.focus();	
			} else 	fm.submit();
		} else {
			//loginSubmit();
			fm.submit();
		}
	}

	function enterSubmit_key(n) {
		if (event.keyCode==13) {
			if (n==0) {	document.forms[0].earthworm.focus();
			} else {	enterSubmit(); }
		}
	}
	function next(num){
		var fm = document.forms[0];
		var socialid1 = fm.strjumin1.value.length;
		var socialid2 = fm.strjumin2.value.length;
		if(num == socialid1)		fm.strjumin2.focus();
		else if(num == socialid2)	fm.strname.focus();
	}
	function nextInput(n) {
		fm = document.forms[0];
		if ( bJumin )
			if (event.keyCode==9)		event.keyCode = 0;
		else {
			if (event.keyCode==13) {
				if (n==nIndex)		enterSubmit();
				else if (n==0)		fm.earthworm.focus();
				else if (n==1)		fm.strjumin1.focus();
				else if (n==2)		fm.strjumin2.focus();
				else if (n==3)		fm.strname.focus();
			}
		}
	}	
	function goRegist() {
		if(typeof(opener) == "object")
		{
			opener.top.location.href = url_member + "/register/index.nhn";
			window.close();
		} else {
			top.location.href = url_member + "/register/index.nhn"
		}
	}
	function pwd(){
		openWin(url_member + '/identity/index.nhn?m=lostid','hangame',420,520);
	}
	function ssl(){
		openWin(url_event + "/event/login/041025_ssl/hangameSSL.html", "ssl", 385, 390);
	}
	function makeBanner() {
		document.writeln("<iframe src=http://ad.hangame.com/adshow?unit=334A width=350 height=300 border=0 frameborder=0 scrolling=no marginheight=0 marginwidth=0 align=center></iframe>");
	/*
		if ( navigator.userAgent.indexOf("MSIE") != -1 ) {
			document.writeln("<iframe src=http://hangamead.naver.com/ad?loc=hangame.350300big&showme=html&page=hangame width=350 height=300 border=0 frameborder=0 scrolling=no marginheight=0 marginwidth=0 align=center></iframe>");
		} else {
			document.writeln("<iframe src=http://hangamead.naver.com/ad?loc=hangame.350300big&showme=js&page=hangame></iframe>");
		}
	*/
	}
	function go_hancoin(){
		var form ;
		form = document.form1 ;
		window.open("","coin","height=350, width=500,toolbar=no,directories=no,status=no,scrollbars=yes,resizable=no,menubar=no,location=no") ;
		form.target = "coin" ;
		form.submit();
	}
	function goMain() {
		top.location.href = url_hangame ;
	}	
	function boanError(pagegbn){
		var pageURL = pagegbn.substring(12) + "Error.html";
		openWin(url_event + "/popup/login/041125_boanerr/" + pageURL, "ssl", 385, 360);
	}
	
	function auth(){
		openWin(url_member + '/identity/index.nhn?m=setSMS','hangame',420,520);
	}
	