	function checkIt(){
		f=document.regform;
		if(!f.id.value){
			alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			f.id.focus();
			return false;
		}
		if(!f.passwd.value){
			alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			f.passwd.focus();
			return false;
		}
		return true;
	}

function getCookie(name)
{
	var cookie_name = name + '=';
	var i = 0;
	while(i <= document.cookie.length)
	{
		var k = (i + cookie_name.length);
		if(document.cookie.substring(i,k) == cookie_name){
			if((cookie_end = document.cookie.indexOf(';',k)) == -1)
				cookie_end = document.cookie.length;
				return unescape(document.cookie.substring(k,cookie_end));
				//return document.cookie.substring(k,cookie_end);
		}
		i = document.cookie.indexOf(' ',i) + 1;
		if(i == 0) break;
	}
	return null;
}



if(getCookie('_userid') == null){
		document.writeln("<table width='95%'  border='0' cellspacing='0' cellpadding='0'  align='center'>");
		document.writeln("<form name=tmpform action='/chnet2/member/login_ok.php' method='post' onsubmit='return checkIt();'>");
		document.writeln("<INPUT TYPE='hidden' name='method' value='in'>");
		
		document.writeln("<tr>");
		document.writeln("<td height='10'></td>");
		document.writeln("</tr>");
		document.writeln("<tr>");
		document.writeln("<td><table width='163' border='0' cellspacing='0' cellpadding='0'>");
		document.writeln("<tr>");
		document.writeln("<td width='20' height='17'><img src='/images/home/hom_09.gif' width='14' height='7'></td>");
		document.writeln("<td><img src='/images/main/id.jpg' width='24' height='18' valign='middle'><input name='id' type='text' tabindex='1' class='input1' style='width:60px;height:17;'>&nbsp<br></td>");
		document.writeln("<td width='46' rowspan='3' align='right'><input type='image' src='/images/main/login.jpg' align='absmiddle'  width='55' height='42'border='0' tabindex='3'></td>");
		document.writeln("</tr>");
		document.writeln("<tr>");
		document.writeln("<td height='3'></td>");
		document.writeln("<td></td>");
		document.writeln("</tr>");
		document.writeln("<tr>");
		document.writeln("<td height='17'><img src='/images/main/hom_10.gif' width='14' height='7'></td>");
		document.writeln("<td><img src='/images/main/pw.jpg' width='24' height='18' align='absmiddle' ><input name='passwd' type='password' tabindex='2' class='input1' style='width:60px;height:17;'>&nbsp;</td>");
		document.writeln("</tr>");
		document.writeln("</table></td>");
		document.writeln("</tr>");
		document.writeln("<tr>");
		document.writeln("<td height='21' valign='bottom'><table border='0' cellpadding='0' cellspacing='0' align='center'>");
		document.writeln("<tr>");
		document.writeln("<td width='68' ><img src='/images/main/join.jpg' width='66' height='20' align='absmiddle'  onClick=\"MM_openBrWindow('/chnet2/member/join_2.htm?mode=pop&url=reload','','scrollbars=yes,left=0,top=0,width=580,height=550')\" style='cursor:hand;'></td>");
		document.writeln("<td  width='68' ><img src='/images/main/idpw.jpg'  align='absmiddle' width='66' height='20' onClick=\"MM_openBrWindow('/chnet2/member/auth_search.php','','scrollbars=yes,left=0,top=0,width=580,height=300')\" style='cursor:hand;'></td>");
		document.writeln("</tr>");
		document.writeln("</table></td>");
		document.writeln("</tr>");
		document.writeln("</form>");
		document.writeln("</table>");

}else{
		document.writeln("<table width='95%'  border='0' cellspacing='0' cellpadding='0' align='center'>");
		document.writeln("<form name=tmpform action='/chnet2/member/login_ok.php' method='post' onsubmit='return checkIt();'>");
		document.writeln("<INPUT TYPE='hidden' name='method2' value='in'>");
		
		document.writeln("<tr>");
		document.writeln("<td height='10'></td>");
		document.writeln("</tr>");
		document.writeln("<tr>");
		document.writeln("<td><table width='180'  ' border='0' cellspacing='0' cellpadding='0'>");
		document.writeln("<tr>");
	if(getCookie('level')!='1'){
		document.writeln("<td height='37' background='/images/home/hom_46.gif' class='organ' style='padding-left:10px'><span class='bb'>"+getCookie('_userid')+" </span>´Ô<br>È¯¿µÇÕ´Ï´Ù. </td>");
	}else{
		document.writeln("<td height='37' background='/images/home/hom_46.gif' class='organ' style='padding-left:10px'>°ü¸®ÀÚ´Ô È¯¿µÇÕ´Ï´Ù.<br><a href='/chnet2/admin' target='_blank'>[°ü¸®ÀÚ¸ðµå°¡±â¢º]</a></td>");
	}
		document.writeln("</tr>");
		document.writeln("</table></td>");
		document.writeln("</tr>");
		document.writeln("<tr>");
		document.writeln("<td height='21' valign='bottom'><table border='0' cellpadding='0' cellspacing='0'  align='center'>");
		document.writeln("<tr>");
		document.writeln("<td width='68'><a href='/chnet2/member/login_ok.php?method=out'><img src='/images/main/logout.jpg' width='66' height='20' border='0'></a></td>");
		document.writeln("<td><img src='/images/main/member.jpg' width='66' height='20' onClick=\"MM_openBrWindow('/chnet2/member/edit.php','','scrollbars=yes,left=0,top=0,width=580,height=550')\" style='cursor:hand;'></td>");
		document.writeln("</tr>");
		document.writeln("</table></td>");
		document.writeln("</tr>");
		document.writeln("</form>");
		document.writeln("</table>");

}