//¸µÅ© ÁÖ¼Ò ¾Èº¸ÀÌ°Ô ÇÏ±â
function hidestatus() 
{ 
	window.status="" 
	return true 
} 
	if (document.layers) 
	document.captureEvents(Event.mouseover | Event.mouseout) 
	document.onmouseover=hidestatus 
	document.onmouseout=hidestatus 

// °ø¹é °Ë»ç	
	function IsEmptyChk(strTmp)
	{
		var len,i;

		len = strTmp.length;
		
		for(i=0; i<len; i++)
		{
			if(strTmp.charAt(i)!=" ") return false;
		}

		return true;
	}

// Á¤¼ö °Ë»ç	
	function IsIntChk(strTmp)
	{
		var len, i, imsi;

		strTmp = "" + strTmp;

		if(IsEmptyChk(strTmp))
			return false;

		len = strTmp.length;
		
		for(i=0; i<len; i++)
		{
			imsi = strTmp.charAt(i);
			
			if(imsi<"0" || imsi>"9")
			{
				return false;
			}
		}

		return true;
	}

// ÀÌ¸ÞÀÏ°Ë»ç	
	function IsEmailChk(str) 
	{
		var filter=(/^\s*[\w\~\-\.]+\@[\w\~\-]+(\.[\w\~\-]+)+\s*$/g);

    if (filter.test(str)) { 
    	return true; 
    } else { 
    	return false; 
    }

	}
	
// ÁÖ¹Î¹øÈ£ °Ë»ç	
	function IsJuminChk(P_Jumin) 
	{
		var IDtot, IDAdd, i; 

		IDtot = 0;
		IDAdd="234567892345";
		
		if(IsEmptyChk(P_Jumin)) return false;

		for(i=0;i<12;i++) 
		{
			IDtot=IDtot+parseInt(P_Jumin.substring(i,i+1))*parseInt(IDAdd.substring(i,i+1));
		}

		IDtot=11-(IDtot%11);
		if(IDtot==10) 
		{
			IDtot=0;
		}
		else if(IDtot==11)
			 {
				IDtot=1;
			 }

		if(parseInt(P_Jumin.substring(12,13))!=IDtot) return false;

		return true;
	}
	
// ³¯Â¥ °Ë»ç
function IsDateChk(strDate)
{
	var imsi, tempDate, temp, temp1;
	
	//°ø¹é°Ë»ç
	if(IsEmptyChk(strDate)) return false;
	
	// Á¤¼ö°Ë»ç
	if(!IsIntChk(strDate)) return false;
	
	if(strDate.length!=8) return false;
	
	imsi = "" + strDate.substring(0,4);
	imsi = imsi + "/" + strDate.substring(4,6);
	imsi = imsi + "/" + strDate.substring(6,8);
	
	tempDate = new Date(imsi);

	
	if(tempDate.getYear()==100)
		temp = "2000"
	else
	{
		if(tempDate.getYear()<2000)
			temp = "19" + tempDate.getYear();
		else
			temp = tempDate.getYear();
	}

	temp1 = tempDate.getMonth()+1;
	if(temp1<10)
		temp = temp + "/" + "0" + temp1;
	else
		temp = temp + "/" + temp1;
	
	if(tempDate.getDate()<10)
		temp = temp + "/" + "0" + tempDate.getDate();
	else
		temp = temp + "/" + tempDate.getDate();

	if(imsi!=temp) return false;
	
	return true;
}

function check_write(){

		obj =  document.theForm;

		if(obj.strTitle.value == ""){
			alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
			obj.strTitle.focus();
			return false;
		}
		if(obj.strName.value == ""){
			alert("ÀÛ¼ºÀÚ¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			obj.strName.focus();
			return false;
		}
		
		if(obj.strPass.value == ""){
			alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			obj.strPass.focus();
			return false;
		}

	sendHTML(obj.ms_desc, false);

	if(obj.ms_desc.value.length < 1) {
		alert("¸ÞÀÏ ³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
		return false ;
	} 


}

// °Ô½ÃÆÇ
//---------------------------------------- check_modify
function check_modify(){

	obj =  document.theForm;

	if(obj.strTitle.value == ""){
		alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
		obj.strTitle.focus();
		return false;
	}
		
	sendHTML(obj.ms_desc, false);

	if(obj.ms_desc.value.length < 1) {
		alert("¸ÞÀÏ ³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
		return false ;
	} 	
		
	if(obj.strPass.value == ""){
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		obj.strPass.focus();
		return false;
	}

}
//---------------------------------------- check_search
function check_search(obj){
	if(obj.searchValue.value == ""){
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		obj.searchValue.focus();
		return false;
	}
}

//°Ô½ÃÆÇ ³»¿ë ÇÁ¸°Æ®ÇÏ±â
function printArea() 
{ 
	var initBody;
	var printBody;
	
	initBody = document.body.innerHTML; 
	printBody = document.getElementById('idPrint');
	document.body.innerHTML = printBody.innerHTML

	window.print(); 
	document.body.innerHTML = initBody; 
}

//È®´ëÀÌ¹ÌÁö º¸±â
function viewPicture(imgPath, imgW, imgH) {
	
	var opt = 'leftmargin=0, toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,resicopyhistory=0,width='+imgW+',height='+imgH; 	

	openWin = window.open ('', 'viewP', opt);
	openWin.document.write ("<html>");
	openWin.document.write ("<head>");
	openWin.document.write ("<title>È®´ë ÀÌ¹ÌÁö º¸±â</title>");
	openWin.document.write ("<body leftmargin=0 topmargin=0>");
	openWin.document.write ("<table width="+imgW+" height='"+imgH+"' border='0' cellpadding='0' cellspacing='0'>");
	openWin.document.write ("  <tr>");
	openWin.document.write ("    <td><img src='"+imgPath+"' width='"+imgW+"' height='"+imgH+"' onClick='self.close()'></td>");
	openWin.document.write ("  </tr>");
	openWin.document.write ("</table>");
	openWin.document.write ("</body>");
	openWin.document.write ("</html>");
}

///////// ¸ÞÀÎ »ó´Ü ¸Þ´º ¸¶ÀÌ½º¿À¹ö½Ã ¸Þ´º º¸ÀÌ±â ////////////
function submenu_on(i)
{
		var obj, j

		for (j=1; j < 9; j++) {
			obj = eval("submenu_"+j);
			if ( j == i ) {
				obj.style.display='';
			} else {
				obj.style.display='none';
			}
		}


}


//////////////// ¾ÆÀÌµð Áßº¹Ã¼Å© ////////////////////
function checkID()
{
	var imsi;
	
	imsi = document.sfm.f_id.value;
	if(imsi!="")
	{
		if(imsi.length<5)
		{
			alert("¾ÆÀÌµð´Â 5ÀÚ¸® ÀÌ»ó ÀÔ·ÂÇÏ½Ê½Ã¿À!");
			document.sfm.f_id.focus();
			return;
		}
	}
	window.open('./id_check.asp?f_id=' + imsi ,'checkID','scrollbars=no,width=400,height=220');
}

function SetID(strID, strFlag)
{
	imsi = document.sfm.f_id;
	imsi.value = strID;
	//ÁÖÀÇ : readonly ·Î ¾²¸é ¾ÈµÊ readOnly ·Î ½á¾ßÇÔ
	imsi.readOnly = true;
	document.sfm.f_id_flag.value = strFlag;
	document.sfm.f_pwd1.focus();
}

//////////////// ¿ìÆí¹øÈ£ °Ë»ö ////////////////////
function zipcode_search()
{
window.open('/include/address_check.asp','', 'width=400, height=430,left=400,top=400, toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=no, scrollbars=no, copyhistory=no')
}


//////////////// Æ÷Ä¿½º ³Ñ±â±â ////////////////////
function fnSizeCheck(obj,nextobj)
{
	if (obj.value.length == obj.maxLength ) {
		nextobj.focus();
	}

}

////////////// ÅØ½ºÆ®¹Ú½º °ª ¿©·¯°³ ¹Þ±â ////////////////
function Iprice(val)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
{                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
	if(val != "")                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
	{                         
	
		n   = val.indexOf("-"); 
		m   = val.indexOf("@");  
		len = val.length;  
		
		Ipr    = val.substring(0, n);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
		Iidx   = val.substring(n + 1, m); 
		Ipoint = val.substring(m + 1, len);
		
		document.pForm.optionIdx.value=Iidx;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
		document.pForm.price.value=Ipr; 
		document.pForm.p_point.value=Ipoint;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
	}	                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
}
//-->



