
<!--


//·Î±×ÀÎ°ü·Ã ½ºÅ©¸³Æ®
function entercheck_form(i)
{
	if(event.keyCode ==13 && i==1) 
	{ 
		if(document.f_login.u_id.value == '')
		{
			alert('¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä');
			document.f_login.u_id.focus();
			return;
		}
		document.f_login.u_pwd.focus(); 
	}
	if(event.keyCode ==13 && i==2) 
	{ 
		loginOn();
	} 
}



function loginOn(){
	if(document.f_login.u_id.value == "")  {
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä.");
		document.f_login.u_id.focus();
		return;
	}
	if(document.f_login.u_pwd.value == "")  {
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä.");
		document.f_login.u_pwd.focus();
		return;
	}

	save();
	document.f_login.submit();
}		



function loginOn2(){
	if(document.f_login.u_id.value == "")  {
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä.");
		document.f_login.u_id.focus();
		return;
	}
	if(document.f_login.u_pwd.value == "")  {
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä.");
		document.f_login.u_pwd.focus();
		return;
	}
	document.f_login.submit();
}	
			

function save() {
	f_form  = eval("document.f_login");
	if (f_login.id_chk.checked) {
	  setCookie("u_id", f_login.u_id.value, 60);
	}
	return true;
}




	// ÇÁ¸°Æ®
	function printit(){
		print();
	}




function setCookie(name, value, expiredays) {
	var todayDate = new Date();
	todayDate.setDate(todayDate.getDate() + expiredays);
	document.cookie = name + "=" + escape(value) + "; path=\; expires=" + todayDate.toGMTString() + ";";
}


function getCookie(name) {
	var nameOfCookie = name + "=";
	var x = 0;
	while (x <= document.cookie.length)
	{
	 var y = (x + nameOfCookie.length);
	 if (document.cookie.substring(x, y) == nameOfCookie) {
	  if ((endOfCookie = document.cookie.indexOf(";", y)) == -1)
		  endOfCookie = document.cookie.length;
	  return unescape(document.cookie.substring(y, endOfCookie));
	 }
	 
	 x = document.cookie.indexOf(" ", x) + 1;
	 if (x == 0) break;
	}
	return "";
}



	
	//°ªÀÌ ¼ýÀÚÀÎÁö Ã¼Å©(¼ýÀÚ true ¹®ÀÚ false)
	function isnumeric(intVal)
	{
		if(intVal !== "")
		{
			for(i=0;i<intVal.length;i++)
			{
				if(intVal.charAt(i) >= 0 && intVal.charAt(i) <= 9){}
				else return false;	
			}
			return true;
		}
	}
	
	
	//Æ¯¼ö¹®ÀÚÇÊÅÍ¸µ
	function CheckChar(strVal)
		 {
		  var nochar = "~`!@#$%^&*()_-+=\|'";
		  for(i=0;i<strVal.length;i++)
		  {
		   for(j=0;j<nochar.length;j++)
		   {
		    if(strVal.charAt(i)==nochar.charAt(j))
		    {
		     return false;
		    }
		   }
		  }
		  return true;
 }

	 //»ç¾÷ÀÚµî·Ï¹øÈ£ À¯È¿¼º °Ë»ç Å×½ºÆ®
	 function bnCheck(bs1,bs2,bs3)
	 {
	  ComNo = new Array(9);
	  var bs = bs1+bs2+bs3;
	  for(i=0;i<10;i++) ComNo[i] = parseInt(bs.charAt(i));
	
	  Sum1 = (ComNo[0] * 1) + (ComNo[1] * 3) + (ComNo[2] * 7);
	  Sum2 = (ComNo[3] * 1) + (ComNo[4] * 3);
	     Sum3 = (ComNo[5] * 7) + (ComNo[6] * 1) + (ComNo[7] * 3);
	  SS = ComNo[8] * 5;
	  ssint = eval(parseInt(SS / 10));
	  ssint = Math.floor(SS / 10);   file://Math.floor ÇÔ¼ö´Â µÎ¼ö¸¦ ³ª´«ÈÄ Á¤¼ö¸òÀ» ¹ÝÈ­ÇÏ´Â ÇÔ¼ö(¿¹ : 10 / 3 = 3À» ¹ÝÈ¯)
	  Sum3 = Sum3 + (ssint + (SS % 10));
	  TotSum = eval(Sum1) + eval(Sum2) + eval(Sum3);
	  if((ComNo[9]-((10-(TotSum%10)) % 10))==0) return true;
	  else return false;
	 }

	 //ÁÖ¹Îµî·Ï ¹øÈ£ À¯È¿¼º Ã¼Å© ·çÆ¾
	 function jnCheck(resident1,resident2) {
	
	 var residentNum=resident1+resident2;
	 a = new Array(13);
	
	 for (var i=0; i < 13; i++) {
	
	  a[i] = parseInt(residentNum.charAt(i));
	
	 }
	
	 var j = a[0]*2 + a[1]*3 + a[2]*4 + a[3]*5 + a[4]*6 + a[5]*7 + a[6]*8 + a[7]*9 + a[8]*2 + a[9]*3 + a[10]*4 + a[11]*5;
	 var j = j % 11;
	 var k = 11 - j;
	 if (k > 9) {
	      k = k % 10
	 }
	
	    if (k != a[12])
	
	  return false;
	
	    else {
	  return true;
	    }
	 
	 }
	 
		 function Left(str, n){
			if (n <= 0)
			    return "";
			else if (n > String(str).length)
			    return str;
			else
			    return String(str).substring(0,n);
			}
		
		
		function Right(str, n){
		    if (n <= 0)
		       return "";
		    else if (n > String(str).length)
		       return str;
		    else {
		       var iLen = String(str).length;
		       return String(str).substring(iLen, iLen - n);
		    }
		}
		
		//°Ë»öÃ¢
		function searchv(f)
		{
			if(f.svalue.value=="")
			{
					alert("°Ë»ö¾î¸¦ ¹Ýµå½Ã ÀÔ·ÂÇÏ¼¼¿ä");
					f.svalue.focus();
					return;
			}
			form.submit();
		}
		
		function reset()
		{
			form.reset();
		}
	
	//ÆäÀÌÁö µÚ·Î ÀÌµ¿
	function goback(intPage)
	{
		history.go(intPage);
	}
	
	//»õÃ¢¿­±âÇÔ¼ö
	function winopen(u,n,o)
	{
		window.open(u,n,o);
	}
	
	//ÀÚ¹Ù½ºÅ©¸³Æ®Trim ÇÔ¼ö(¾ÕµÚ °ø¹é Á¦°Å)
	function trim(tmpStr)
	{
		  var atChar;
	
		  if (tmpStr.length > 0)
		  {
				  atChar = tmpStr.charAt(0);
		  }
	
		  while (isSpace(atChar))
		  {
				  tmpStr = tmpStr.substring(1, tmpStr.length);
				  atChar = tmpStr.charAt(0);
		  }
	
		  if (tmpStr.length > 0)
		  {
				  atChar = tmpStr.charAt(tmpStr.length-1);
		  }
	
		  while (isSpace(atChar))
		  {
				  tmpStr = tmpStr.substring(0,( tmpStr.length-1));
				  atChar = tmpStr.charAt(tmpStr.length-1);
		  }
	
		  return tmpStr;
	} 
	
	function msg_delete()
	{
		m = window.confirm("Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n\n»èÁ¦ÇÏ½Ã¸é º¹±¸°¡ ºÒ°¡´ÉÇÕ´Ï´Ù.\n\n°è¼ÓÁøÇàÇÏ½Ã·Á¸é ¿¹¸¦ Å¬¸¯ÇÏ¼¼¿ä!!");
		return m;
	}
	
	function refreshForm()
	{
		location.reload();
	}
	
	function windowopen(a,b,c)
	{
		window.open(a,b,c);
	}




	// ÀúÀÚ/¿ªÀÚ
	function p_author(code){
		var url1 = "/product/popup_author.asp?code=" + code;
		window.open(url1,'au_popup','left=1,top=1,width=450,height=500,scrollbars=yes');
	}



	// ÂòÀúÀå
	function getWish(cate,code){
		var url1 = "/product/wish.asp?cate="+ cate + "&code=" + code;
		window.open(url1,'wish','left=1,top=1,width=1,height=1,scrollbars=no');
	}



-->
