//=============================================================================
// JSLibrary.js
// ÀÔ·Â°ª Ã¼Å©¿ë ÀÚ¹Ù ½ºÅ©¸³Æ® ¹× ÇÔ¼ö ¶óÀÌºê·¯¸® 
//=============================================================================
function firmsearch()
{
	if(document.all.searchValue.value == "")
	{
		return;
	}
	else
	{
		document.location.href="/bbs/board.php?bo_table=04customer_findstore&sca=&sfl=wr_subject||wr_content&sop=and&stx=" + searchValue.value;
	}
}
function EnterChecktop()
{
	if(event.keyCode ==13)
	{
		if(document.all.searchValue.value == "")
		{
			return;
		}
		else
		{
			document.location.href="/bbs/board.php?bo_table=04customer_findstore&sca=&sfl=wr_subject||wr_content&sop=and&stx=" + searchValue.value;
		}
	}
}

//=============================================================================
// ÇÔ¼ö¸í: ValidateData                                                        
// ¼³  ¸í: validateForm¿¡ ÀÇÇØ »ç¿ëµÈ´Ù
// ÀÛ¾÷ÀÏ:                                                                     
// ÀÛ¾÷ÀÚ:                                                                     
//=============================================================================
function validateData(objValue, strValidateStr, strError) 
{
    var epos = strValidateStr.search("="); 
    var command  = ""; 
    var cmdvalue = ""; 
    
    if(epos >= 0) 
    { 
		command  = strValidateStr.substring(0,epos); 
		cmdvalue = strValidateStr.substr(epos+1); 
    } 
    else 
    { 
		command = strValidateStr;
    } 
    switch(command) 
    { 
		case "req": 
        case "required": 
		{
		   var tp = objValue.value.replace(/\s/g,'');
           if(eval(tp.length) == 0) 
           { 
              alert(strError);
              return false; 
           } 
           break;             
        }
        case "maxlen": 
        case "maxlength": 
        { 
             if(eval(objValue.value.length) >  eval(cmdvalue)) 
             { 
				alert(strError);
				return false; 
             }
             break; 
        }
        case "minlen": 
        case "minlength": 
        { 
             if(eval(objValue.value.length) <  eval(cmdvalue) && eval(objValue.value.length) != eval(0)) 
             { 
				alert(strError);
				return false;                 
             }
             break; 
        }        
        case "eng":
        case "english": 
        { 
              var charpos = objValue.value.search("[^A-Za-z]"); 
              if(objValue.value.length > 0 &&  charpos >= 0) 
              { 
				alert(strError);
				return false; 
              } 
              break; 
        }
        case "engnum": 
        case "engnumeric": 
        { 
              var charpos = objValue.value.search("[^A-Za-z0-9]"); 
              if(objValue.value.length > 0 &&  charpos >= 0) 
              { 
                alert(strError);
                return false; 
              }
              break; 
        }
        case "engnumhyphen":
		{
              var charpos = objValue.value.search("[^A-Za-z0-9\-_]"); 
              if(objValue.value.length > 0 &&  charpos >= 0) 
              { 
                alert(strError);
                return false; 
              }
              break;
		} 
        case "num": 
        case "numeric": 
        { 
              var charpos = objValue.value.search("[^0-9\]"); 
              if(objValue.value.length > 0 &&  charpos >= 0) 
              { 
				alert(strError);
				return false; 
              } 
              break;               
        }
        case "float": 
        { 
			if(objValue != undefined)
			{				
              var charpos = objValue.value.search("[^0-9\-.]"); 
              if(objValue.value.length > 0 &&  charpos >= 0) 
              { 
				alert(strError);
				return false; 
              } 
            }  
            break;           
                
        }
        case "numhyphen": 
        { 
              var charpos = objValue.value.search("[^0-9\-_]"); 
              if(objValue.value.length > 0 &&  charpos >= 0) 
              { 
				alert(strError);
				return false; 
              } 
              break;               
        }
        
        case "han" :
		case "hangul":
		{
              var charpos = objValue.value.search("[^°¡-ÆR]"); 
              if(objValue.value.length > 0 &&  charpos >= 0) 
              { 
                alert(strError);
                return false; 
              }
              break;
		}
		case "hannum" :
		case "hangulnumeric":
		{
              var charpos = objValue.value.search("[^¤¡-¤¾°¡-ÆR0-9]");
              alert(charpos);
              if(objValue.value.length > 0 &&  charpos >= 0) 
              { 
                alert(strError);
                objValue.select();
				objValue.focus();
                return false; 
              } 			
				break;
		}
		case "hanalpha" :
		case "hangulalphabetic":
		{
              var charpos = objValue.value.search("[^¤¡-¤¾°¡-ÆRA-Za-z]"); 
              if(objValue.value.length > 0 &&  charpos >= 0) 
              { 
                alert(strError);
                return false;
              } 			
				break;
		}
		case "hanengnum" :
		case "hangulenglishnumeric":
		{
              var charpos = objValue.value.search("[^¤¡-¤¾°¡-ÆRA-Za-z0-9]"); 
              if(objValue.value.length > 0 &&  charpos >= 0) 
              { 
                alert(strError);
                return false; 
              } 			
				break;
		}
        case "email": 
        { 
               if(!CheckEmail(objValue.value)) 
               { 
                 alert(strError);
                 return false; 
               } 
           break; 
        } 
        case "lt": 
        case "lessthan": 
        { 
            if(isNaN(objValue.value)) 
            { 
              return false; 
            }
            if(eval(objValue.value) >=  eval(cmdvalue)) 
            { 
              alert(strError);
              return false;                 
             }             
            break; 
        } 
        case "gt": 
        case "greaterthan": 
        { 
            if(isNaN(objValue.value)) 
            { 
              return false; 
            }
            if(eval(objValue.value) <=  eval(cmdvalue)) 
            { 
               alert(strError); 
               return false;                 
            }             
            break; 
        }        
        case "regexp": 
        { 
		 	if(objValue.value.length > 0)
			{
	            if(!objValue.value.match(cmdvalue)) 
	            { 
	              alert(strError);
	              return false;                   
	            } 
			}
           break; 
        } 
        case "dontselect": 
        { 
            if(objValue.selectedIndex == null) 
            { 
              return false;
            } 
            if(objValue.selectedIndex == eval(cmdvalue)) 
            { 
              alert(strError);
              return false;                                   
            } 
            break; 
        }
        case "dategreaterthan":
        {
			var startSplit = objValue.value.split("-");
			var endSplit;
			var startDate = new Date(startSplit[0], parseInt(startSplit[1])-1, startSplit[2]);
			var tempDate = new Date();
			var endDate;
			
			if(cmdvalue != "")
			{
				endSplit = document.all[cmdvalue].value.split("-");
				endDate = new Date(endSplit[0], parseInt(endSplit[1])-1, endSplit[2]);
			}
			else
			{
				endDate = new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate());
			}
			
			if(startDate <= endDate)
			{
				alert(strError);
				return false;
			}
			break;
        }
    }

    return true; 
}



//=============================================================================
// ÇÔ¼ö¸í: validateForm
// ¼³  ¸í: ÄÁÆ®·ÑÀÇ À¯È¿¼ºÀ» °Ë»ç validateData()¸¦ È£ÃâÇÏ¿© °Ë»çÇÑ´Ù.
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function validateForm(arrObjDesc) 
{ 

	for(var i=0; i < arrObjDesc.length; i++) 
	{
		for(var j=0; j < arrObjDesc[i].length ;j++) 
		{
			var objForm = document.all[arrObjDesc[i][j][0]];
			
			if(validateData(objForm, arrObjDesc[i][j][1], arrObjDesc[i][j][2]) == false) 
			{
				objForm.focus();
				event.returnValue = false;
				return false;				 
			}
		} 
	}
	return true;
}

//=============================================================================
// ÇÔ¼ö¸í: Popup 
// ¼³  ¸í: PopUp Ã¢ È£Ãâ
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================

function PopUp(intStyle, intWidth, intHeight, strUrl) {
   var intLeft = 0, intTop = 0;
   var winstyle;            

   //Áß¾ÓÁ¤·Ä (½ºÅ©·Ñ¹Ù ¹«, »óÅÂÇ¥½ÃÁÙ ¹«)
   if (intStyle == 0) {      
      intLeft = screen.width/2-intWidth/2;
      intTop = screen.height/2-intHeight/2;
      
      return window.open(strUrl, null, 'menubar =0,resizable=0,scrollbars=0,status=no,titlebar=0,toolbar=no,width='+intWidth+',height='+intHeight+',left='+intLeft+',top='+intTop);      
   }    
   //showModelessDialog
   else if (intStyle == 1) {
      winstyle = "dialogWidth=" + intWidth + "px; dialogHeight=" + intHeight + "px; center:yes; status=no; help:no; ";      
      return window.showModelessDialog(strUrl, window, winstyle); 
   }
   //showModalDialog
   else if (intStyle == 2) {
      winstyle = "dialogWidth=" + intWidth + "px; dialogHeight=" + intHeight + "px; center:yes; status=no; help:no; ";      
      return window.showModalDialog(strUrl, window, winstyle); 
   }
   //excel
   else if (intStyle == 3) {      
      intLeft = screen.width/2-intWidth/2;
      intTop = screen.height/2-intHeight/2;
      
      return window.open(strUrl, null, 'menubar =1,resizable=1,scrollbars=0,status=no,titlebar=0,toolbar=no,width='+intWidth+',height='+intHeight+',left='+intLeft+',top='+intTop);      
   }
   //Áß¾ÓÁ¤·Ä (½ºÅ©·Ñ¹Ù À¯, »óÅÂÇ¥½ÃÁÙ ¹«)
   else if (intStyle == 4) {      
      intLeft = screen.width/2-intWidth/2;
      intTop = screen.height/2-intHeight/2;
      
      return window.open(strUrl, null, 'menubar =0,resizable=0,scrollbars=1,status=no,titlebar=0,toolbar=no,width='+intWidth+',height='+intHeight+',left='+intLeft+',top='+intTop);      
   }
   //ÁÂÃø»ó´ÜÁ¤·Ä (½ºÅ©·Ñ¹Ù ¹«, »óÅÂÇ¥½ÃÁÙ ¹«)
   else if (intStyle == 5) {      
      
      return window.open(strUrl, null, 'menubar =0,resizable=0,scrollbars=0,status=no,titlebar=0,toolbar=no,width='+intWidth+',height='+intHeight+',left='+intLeft+',top='+intTop);      
   }   
   //Å×½ºÆ®¿ë (½ºÅ©·Ñ¹Ù À¯, »óÅÂÇ¥½ÃÁÙ À¯)   
   else if (intStyle == 99) {      
      intLeft = screen.width/2-intWidth/2;
      intTop = screen.height/2-intHeight/2;
      
      return window.open(strUrl, null, 'menubar =0,resizable=0,scrollbars=1,status=yes,titlebar=0,toolbar=no,width='+intWidth+',height='+intHeight+',left='+intLeft+',top='+intTop);      
   }      
   
}  


//=============================================================================
// ÇÔ¼ö¸í: EnterProcOnKeyDown
// ¼³  ¸í: Enter Key Event¸¦ Tab Key Event·Î ÀüÈ¯
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function EnterProcOnKeyDown() { 
   if (event.keyCode == 13) {
      event.keyCode = 9;
   } 
}


//=============================================================================
// ÇÔ¼ö¸í: MM_preloadImages
// ¼³  ¸í: Mouse Over¿¡ ÀÇÇÑ ÀÌ¹ÌÁö ÀüÈ¯
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


//=============================================================================
// ÇÔ¼ö¸í: MM_swapImgRestore
// ¼³  ¸í: Mouse Over¿¡ ÀÇÇÑ ÀÌ¹ÌÁö ÀüÈ¯
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}


//=============================================================================
// ÇÔ¼ö¸í: MM_findObj
// ¼³  ¸í: Mouse Over¿¡ ÀÇÇÑ ÀÌ¹ÌÁö ÀüÈ¯
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


//=============================================================================
// ÇÔ¼ö¸í: MM_swapImage
// ¼³  ¸í: Mouse Over¿¡ ÀÇÇÑ ÀÌ¹ÌÁö ÀüÈ¯
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


//=============================================================================
// ÇÔ¼ö¸í: CheckSumIdnNo
// ¼³  ¸í: ÁÖ¹Î¹øÈ£ CheckSum È®ÀÎ
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function CheckSumIdnNo(pStrIdnNo){
	var tmp = 0 
	var pStrIdnNo1 = pStrIdnNo.substring(0,6);
	var pStrIdnNo2 = pStrIdnNo.substring(6,13);
	
	if (pStrIdnNo2.substring(0, 1) == 5 || pStrIdnNo2.substring(0, 1) == 6)
	{
		return true;  
	}
	else
	{
		for (i = 0; i <=5 ; i++) { 
			tmp = tmp + ((i%8+2) * parseInt(pStrIdnNo1.substring(i,i+1))) 
		}     
		
		for (i = 6; i <=11 ; i++) { 
			tmp = tmp + ((i%8+2) * parseInt(pStrIdnNo2.substring(i-6,i-5))) 
		}     
		
		tmp = 11 - (tmp %11) 
		tmp = tmp % 10 	
		
		if (tmp != pStrIdnNo2.substring(6,7)) { 
			return false;  
		}else{
			return true;  
		}
	}	
}


/**
* ¿Ü±¹ÀÎµî·Ï¹øÈ£ À¯È¿¼º Ã¼Å©
*/
function checkFgnNumber(fgnno)
{
	var sum=0;
	var odd=0;
	buf = new Array(13);
	try
	{
		for(i=0; i<13; i++)
		{
			buf[i]=parseInt(fgnno.charAt(i));  
		}

		odd = buf[7]*10 + buf[8];

		if(odd%2 != 0)
		{
			return  false;
		}

		if( (buf[11]!=6) && (buf[11]!=7) && (buf[11]!=8) && (buf[11]!=9) )
		{
			return false;
		}
		multipliers = [2,3,4,5,6,7,8,9,2,3,4,5];
		for(i=0, sum=0; i<12; i++)
		{
			sum +=  (buf[i] *= multipliers[i]);
		}
		sum = 11 - (sum%11);

		if(sum >= 10)
		{  
			sum -= 10;
		}
		sum += 2;
		if(sum >= 10)
		{
			sum -= 10;
		}
		if(sum != buf[12])
		{
			return  false
		}  
		return true;
	}
	catch(e)
	{
	return false;
	}
}

//=============================================================================
// ÇÔ¼ö¸í: CheckIdnNo
// ¼³  ¸í: ÁÖ¹Î¹øÈ£ È®ÀÎ
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function CheckIdnNo(pStrIdnNoObj1, pStrIdnNoObj2, pStrIdnNo1, pStrIdnNo2) {

	var arrFormValidationIdnNo =
	[
		[
			[pStrIdnNoObj1, "req", "ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®¸¦ ÀÔ·ÂÇÏ¼¼¿ä."],
			[pStrIdnNoObj1, "num", "ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®¸¦ È®ÀÎÇÏ¼¼¿ä."],
			[pStrIdnNoObj1, "maxlen=6", "ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®´Â 6ÀÚ¸® ÀÔ´Ï´Ù."],
			[pStrIdnNoObj1, "minlen=6", "ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®´Â 6ÀÚ¸® ÀÔ´Ï´Ù."],
			[pStrIdnNoObj2, "req", "ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®¸¦ ÀÔ·ÂÇÏ¼¼¿ä."],
			[pStrIdnNoObj2, "num", "ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®¸¦ È®ÀÎÇÏ¼¼¿ä."],										
			[pStrIdnNoObj2, "maxlen=7", "ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®´Â 7ÀÚ¸® ÀÔ´Ï´Ù."],
			[pStrIdnNoObj2, "minlen=7", "ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®´Â 7ÀÚ¸® ÀÔ´Ï´Ù."]

		]
	];
	
	if (validateForm(arrFormValidationIdnNo) == false)
	{
		return false;
	}
	if (CheckSumIdnNo(pStrIdnNo1+pStrIdnNo2) == false)
	{
		alert("ÁÖ¹Î¹øÈ£°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù.");
		return false;
	}
	return true;
}


//=============================================================================
// ÇÔ¼ö¸í: ScrapFood
// ¼³  ¸í: ¸Þ´º ½ºÅ©·¦
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function ScrapFood(pstrFoodCd) {                               
	var url;

	if ((pstrFoodCd != "")) {
		url = "Food0000DetailPopupScrap.aspx?FOOD_CD=" + pstrFoodCd ;

		var temp;
		temp = PopUp(0, 350, 150, url);
		temp.focus();
	} 			   
}		


//=============================================================================
// ÇÔ¼ö¸í: SendMailFood
// ¼³  ¸í: ¸Þ´º ¸ÞÀÏ
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function SendMailFood(pstrFoodCd, pstrGb) {                               
	if ((pstrFoodCd != "")) {
	
		if (pstrGb == "0") {	
			url = "../food/Food0000DetailPopupSendMailL.aspx?FOOD_CD=" + pstrFoodCd ;
		}
		if (pstrGb == "1") {	
			url = "../food/Food0000DetailPopupSendMailS.aspx?FOOD_CD=" + pstrFoodCd ;
		}

		var temp;
		temp = PopUp(4, 705, 600, url);
		temp.focus();
	} 			   
}

//=============================================================================
// ÇÔ¼ö¸í: ViewMailFood
// ¼³  ¸í: ¸Þ´º ¸ÞÀÏ
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function ViewMailFood(pstrMailNo, pstrGb) {                               
	if ((pstrMailNo != "")) {
	
		if (pstrGb == "0") {	
			url = "../food/Food0000DetailPopupViewMailL.aspx?MAIL_NO=" + pstrMailNo ;
		}
		if (pstrGb == "1") {	
			url = "../food/Food0000DetailPopupViewMailS.aspx?MAIL_NO=" + pstrMailNo ;
		}

		var temp;
		temp = PopUp(4, 705, 600, url);
		temp.focus();
	} 			   
}

//=============================================================================
// ÇÔ¼ö¸í: PopupAgreement
// ¼³  ¸í: ÀÌ¿ë¾à°ü Popup
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function PopupAgreement() {

	var strAgreement;
	
	strAgreement = window.open("../common/PopupAgreement.aspx","popupApplTip","width=490,height=710,scrollbars=no,resizable=no,top=0,left=0");	        	
	strAgreement.focus();

}

//=============================================================================
// ÇÔ¼ö¸í: PopupPersonal
// ¼³  ¸í: °³ÀÎº¸È£Á¤Ã¥ Popup
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function PopupPersonal() {

	var strPersonal;
	
	strPersonal = window.open("../common/PopupPersonal.aspx","popupApplTip","width=490,height=710,scrollbars=no,resizable=no,top=0,left=0");	        	
	strPersonal.focus();

}

//=============================================================================
// ÇÔ¼ö¸í: PopupViewApplTip
// ¼³  ¸í: Áö¿ø¼­ÀÛ¼º¿ä·É Popup
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function PopupViewApplTip() {

	var strApplTip;
	
	strApplTip = window.open("","popupApplTip","width=604,height=407,scrollbars=no,resizable=no,top=0,left=0");	        
	strApplTip.document.write("<title>T.G.I. FRiDAY'S!</title><body leftmargin=0 topmargin=0><img src='../../image/company_4050_popup_010.gif' border=0 style=cursor:hand; onClick=self.close();></body>");		
	
	strApplTip.focus();

}


//=============================================================================
// ÇÔ¼ö¸í: 
// ¼³  ¸í: ·¹ÀÌ¾î ÀÛ¾÷
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


//=============================================================================
// ÇÔ¼ö¸í: PopupEvent
// ¼³  ¸í: ÀÌº¥Æ®, °øÁö Popup
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function PopupEvent(pstrUrl, pstrNm, pstrWindowType, pstrPublicYn) {
	var objWindow;	
	
	if (pstrPublicYn == "0")
	{
		if (document.all.txtLoginYn.value != "1")
		{
			alert("·Î±×ÀÎÀ» ÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
			return;						
		}
	}			
	
	objWindow = window.open(pstrUrl + "?CD=" + pstrNm, pstrNm, pstrWindowType);	        	
	objWindow.focus();
}


//=============================================================================
// ÇÔ¼ö¸í: CheckEmail
// ¼³  ¸í: ÀÌ¸ÞÀÏ ÁÖ¼Ò °Ë»ç
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function CheckEmail(strValue) 
{ 
	var flag = false;
	emailEx1 = /^([\.\,\-A-Za-z0-9_]{1,15})(@{1})([\.\,\-A-Za-z0-9_]{1,15})(\.{1})([\.\,\-A-Za-z0-9_]{2,10})(\.{1}[\.\,\-A-Za-z]{2,10})?(\.{1}[\.\,\-A-Za-z]{2,10})?$/; 
	if (emailEx1.test(strValue)) 
	{
		flag = false; 
	}
	else 
	{
		flag = true; 
	}
	return flag;
} 


//=============================================================================
// ÇÔ¼ö¸í: Trim
// ¼³  ¸í: ³Ñ¾î¿Â ¹®ÀÚ¿­µéÁß¿¡ Æ÷ÇÔµÈ °ø¹éÀ» ¸ðµÎ ¾ø¾Ø ¹®ÀÚ¿­À» ¸®ÅÏ
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function Trim(strings)
{
    var retString = "";
    var c;
    var i;
    for(i=0;i<strings.length;i++) {
        c = strings.charAt(i);
        if(c != ' '){
           retString += c;
        }
    }
    return(retString);
}

//=============================================================================
// ÇÔ¼ö¸í: ReplaceStr
// ¼³  ¸í: ¹®ÀÚ¿­ Ä¡È¯ Popup
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================

function ReplaceStr(strOriginal, strFind, strChange)
{
  return strOriginal.split(strFind).join(strChange);
}


//=============================================================================
// ÇÔ¼ö¸í: isDate
// ¼³  ¸í: ³¯Â¥ À¯È¿¼º
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function isDate(yyyy,mm,dd)
{
   if (yyyy.length != 4)
      return false;
   else {   
      yyyy=parseInt(yyyy,10);
      mm=parseInt(mm,10);
      dd=parseInt(dd,10);
      d = new Date(yyyy,mm-1,dd);
      if (d=="NaN") return false;
      if (yyyy == d.getFullYear() &&
         mm == d.getMonth()+1 &&
         dd == d.getDate() ) return true;
      return false;
   }   
}


//=============================================================================
// ÇÔ¼ö¸í: isDate_yyyy_m_d
// ¼³  ¸í: yyyy-mm-dd ÇüÅÂ À¯È¿¼º
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function isDate_yyyy_m_d(s)// yyyy-mm-dd ÇüÅÂ
{
   s=s.replace(/\s/g,""); // °ø¹éÁ¦°Å
   if (s.match(/\d+\-\d+\-\d+/g)!=s) 
      return false; // 1111-11-11 Æ÷¸ËÀÌ ¾Æ´Ô
   var d = s.split(/\-/g);
   return isDate(d[0],d[1],d[2]);
}


//=============================================================================
// ÇÔ¼ö¸í: checkDate
// ¼³  ¸í: yyyy-mm-dd ÇüÅÂ ³¯Â¥ À¯È¿¼º
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function checkDate(s)
{
   var isD

   isD=isDate_yyyy_m_d(s);
   if (isD) 
      return true;
   else
      return false;
}


//=============================================================================
// ÇÔ¼ö¸í: correctDate
// ¼³  ¸í: yyyy-mm-dd ÇüÅÂ ³¯Â¥
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function correctDate(s)// yyyy-mm-dd ÇüÅÂ
{
   s=s.replace(/\s/g,""); // °ø¹éÁ¦°Å
   var d = s.split(/\-/g);
   if (d[1].length == 1)
      d[1] = "0" + d[1];
   if (d[2].length == 1)
      d[2] = "0" + d[2];  
   return d[0] + "-"  + d[1] + "-" + d[2];
}



//=============================================================================
// ÇÔ¼ö¸í: PopupViewCompanyLink
// ¼³  ¸í: °ü°è»ç¸µÅ© ÆË¾÷
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function PopupViewCompanyLink() {

	var strUrl;
	var temp;
					
	strUrl = "../common/PopupCompanyLink.aspx";
	temp = PopUp(0, 530, 422, strUrl);
	temp.focus();
	
}


//=============================================================================
// ÇÔ¼ö¸í: GoHome
// ¼³  ¸í: È¨ÆäÀÌÁö ÃÊ±âÈ­¸éÀ¸·Î ÀÌµ¿
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function GoHome() {
	
	parent.location = "../common/index.aspx" ;
	
}

//=============================================================================
// ÇÔ¼ö¸í: GoStart
// ¼³  ¸í: ÁÂÃø¸Þ´ºÀÇ ÃÊ±âÈ­¸éÀ¸·Î ÀÌµ¿
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function GoStart(pStrGroup, pStrNo) {
	
	var strUrl;
	
	// COMPANY : È¸»ç¼Ò°³
	if (pStrGroup == "COMPANY")
	{
		if  (pStrNo == "1")
			strUrl = "../company/Company1010.aspx" ;
		else if (pStrNo == "2")
			strUrl = "../company/Company2000.aspx" ;
		else if (pStrNo == "3")
			strUrl = "../company/Company3000.aspx" ;
		else if (pStrNo == "4")
			strUrl = "../company/Company4010.aspx" ;
	
	}
	
	// FOOD : ¸Þ´º
	else if (pStrGroup == "FOOD")
	{
		if  (pStrNo == "1")
			strUrl = "../food/Food1000.aspx" ;
		else if (pStrNo == "2")
			strUrl = "../food/Food1000.aspx" ;
		else if (pStrNo == "3")
			strUrl = "../food/Food1000.aspx" ;
		
	}
	
	// STORE : ¸ÅÀå
	else if (pStrGroup == "STORE")
	{
		if  (pStrNo == "1")
			strUrl = "../store/Store1010.aspx" ;	
	}
	
	// MEMBERSHIP : ¸â¹ö½±
	else if (pStrGroup == "MEMBERSHIP")
	{
		if  (pStrNo == "1")
			strUrl = "../membership/Membership1000.aspx" ;
		else if (pStrNo == "2")
			strUrl = "../need_login/Membership2010.aspx" ;
		else if (pStrNo == "3")
			strUrl = "../membership/Membership3010.aspx" ;
		else if (pStrNo == "4")
			strUrl = "../membership/Membership4010.aspx" ;	
		else if (pStrNo == "5")
			strUrl = "../membership/Membership5010.aspx" ;	
	}
	
	// EVENTS : ÀÌº¥Æ®
	else if (pStrGroup == "EVENTS")
	{
		if  (pStrNo == "1")
			strUrl = "../events/Events1000.aspx" ;
		else if (pStrNo == "2")
			strUrl = "../events/Events2000.aspx" ;
		else if (pStrNo == "3")
			strUrl = "../events/Events3000.aspx" ;
		else if (pStrNo == "4")
			strUrl = "../events/Events4000.aspx" ;	
		else if (pStrNo == "5")
			strUrl = "../events/Events5010.aspx" ;	
		else if (pStrNo == "6")
			strUrl = "../customer/Customer4000.aspx" ;	
	
	}
	
	// CUSTOMER : °í°´ÀÇ¼Ò¸®
	else if (pStrGroup == "CUSTOMER")
	{
		if  (pStrNo == "1")
			strUrl = "../customer/Customer1000.aspx" ;
		else if (pStrNo == "2")
			strUrl = "../customer/Customer2000.aspx" ;
		else if (pStrNo == "3")
			strUrl = "../customer/Customer3000.aspx" ;
		else if (pStrNo == "4")
			strUrl = "../customer/Customer6000.aspx" ;			
	}
	
	
	else if (pStrGroup == "COMMON")
	{
	
	
	}
	
	else 
	{
		strUrl = "about:blank";
	}	
	
	parent.location = strUrl ;
	
}

//=============================================================================
// ÇÔ¼ö¸í: GoPage
// ¼³  ¸í: Page ÀÌµ¿
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function GoPage(pStrPageNm) {
	
	parent.location = pStrPageNm ;
	
}

//=============================================================================
// ÇÔ¼ö¸í: SetIframeHeight
// ¼³  ¸í: Iframe ³ôÀÌ ¼³Á¤
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function SetIframeHeight() {
		
	parent.document.all.Iframe1.height = document.body.scrollHeight; 
	
}

//=============================================================================
// ÇÔ¼ö¸í: cmbSubCompanyLink_Onchange
// ¼³  ¸í: Sub Page ÇÏ´ÜÀÇ ·Ôµ¥ °è¿­»ç ¸µÅ© 
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================

function cmbSubCompanyLink_Onchange() {	
	window.open(document.all.BottomCopyright1_cmbCompanyLink.value);
}			 						

//=============================================================================
// ÇÔ¼ö¸í: CheckLogin
// ¼³  ¸í: ·Î±×ÀÎ Ã¼Å©
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function CheckLogin() {
	if (document.all.txtLoginYn.value != "1")
	{
		alert("·Î±×ÀÎÀ» ÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		return false;						
	}
	else
	{
		return true;
	}	
}


//=============================================================================
// ÇÔ¼ö¸í: getCookie
// ¼³  ¸í: ÄíÅ°°ªÀ» °¡Á®¿À´Â ÇÔ¼ö 
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function getCookie(name) { 
   var from_idx = document.cookie.indexOf(name+'='); 
   if (from_idx != -1) { 
      from_idx += name.length + 1 
      to_idx = document.cookie.indexOf(';', from_idx) 

      if (to_idx == -1) { 
            to_idx = document.cookie.length 
      } 
      return unescape(document.cookie.substring(from_idx, to_idx)) 
   } 
} 


//=============================================================================
// ÇÔ¼ö¸í: setCookie
// ¼³  ¸í: ÄíÅ° »ý¼º ÇÔ¼ö
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function setCookie(name, value, expire) { 
    var expire_date = new Date(expire) 
    document.cookie = name + "=" + escape(value) + "; expires=" + expire_date.toGMTString(); 
} 


//=============================================================================
// ÇÔ¼ö¸í: clearCookie
// ¼³  ¸í: ÄíÅ° ¼Ò¸ê ÇÔ¼ö
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function clearCookie(name) { 
    var today = new Date() 
    //¾îÁ¦ ³¯Â¥¸¦ ÄíÅ° ¼Ò¸ê ³¯Â¥·Î ¼³Á¤ÇÑ´Ù. 
    var expire_date = new Date(today.getTime() - 60*60*24*1000) 
    document.cookie = name + "= " + "; expires=" + expire_date.toGMTString() 
} 


//=============================================================================
// ÇÔ¼ö¸í: controlCookie
// ¼³  ¸í: Ã¼Å© »óÅÂ¿¡ µû¶ó ÄíÅ° »ý¼º°ú ¼Ò¸êÀ» Á¦¾îÇÏ´Â ÇÔ¼ö 
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function controlCookie(elemnt, name) { 
        if (elemnt.checked) { 
            var today = new Date() 
    		var expire_date = new Date(today.getTime() + 60*60*24*1000) 
            
            //Ã¼Å© ¹Ú½º¸¦ ¼±ÅÃÇßÀ» °æ¿ì ÄíÅ° »ý¼º ÇÔ¼ö È£Ãâ 
        	setCookie(name, "true", expire_date) 
        } 
        else { 
        	//Ã¼Å© ¹Ú½º¸¦ ÇØÁ¦ÇßÀ» °æ¿ì ÄíÅ° ¼Ò¸ê ÇÔ¼ö È£Ãâ 
            clearCookie(name) 
        } 
        return 
} 


//=============================================================================
// ÇÔ¼ö¸í: PopupViewPlaceStore
// ¼³  ¸í: Á¡Æ÷¼Ò°³ ¾È³» ÆË¾÷
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function PopupViewPlaceStore() {

	var strUrl;
	var temp;
					
	strUrl = "../common/PopupPlaceStore.aspx";
	temp = PopUp(0, 641, 505, strUrl);
	temp.focus();
	
}

//=============================================================================
// ÇÔ¼ö¸í: PopupViewFridaysCardForm
// ¼³  ¸í: ÇÁ¶óÀÌµ¥ÀÌÁîÄ«µå½ÅÃ»¼­ ÆË¾÷
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================

function PopupViewFridaysCardForm() {

	var strUrl;
	var temp;
					
	strUrl = "../common/PopupContract.aspx";
	temp = PopUp(0, 560, 680, strUrl);
	temp.focus();
	
}


//=============================================================================
// ÇÔ¼ö¸í: PopupViewFridaysCardForm
// ¼³  ¸í: È¸¿øÃ¼Å© Æ÷Ä¿½º ÀÌµ¿
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function moveFocus(num,fromform,toform){
	var str = fromform.value.length;
	if(str == num)
		toform.focus();
}



//=============================================================================
// ÇÔ¼ö¸í: GetFormatDate(strDate)
// ¼³  ¸í: ³¯ÀÚÇü½ÄÆ÷¸ä
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function GetFormatDate(strDate) { 
   var strFormatDt;

   if (strDate)
      strFormatDt = strDate.substring(0, 4) + '-' + strDate.substring(4, 6) + '-' + strDate.substring(6, 8);
   else   
      strFormatDt = "";
   return strFormatDt;
}


//=============================================================================
// ÇÔ¼ö¸í: DeleteSpace(string)
// ¼³  ¸í: °ø¹éÁ¦°Å
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function DeleteSpace(source) {
   var i = 0;
   var str_temp = "";

   for (i = 0; i < source.length; i++)
      if (source.substring(i, i + 1) != " ")
         str_temp += source.substring(i , i + 1) 
   return str_temp ;
}




/* a function for MS IE ActiveX Rollup Patch */
function __ws__(id)
{
    document.write(id.innerHTML);
    id.id="";
}

//=============================================================================
// ÇÔ¼ö¸í: openflash
// ¼³  ¸í: ÇÃ·¡½Ã ¹Ú½º¿µ¿ª »èÁ¦
// ÀÛ¾÷ÀÏ: 
// ÀÛ¾÷ÀÚ: 
//=============================================================================
function openflash(width,height,src){ 
    return "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width="+width+" height="+height+"><param name=movie value="+src+"><param name=quality value=high ><param name=wmode value=transparent></object>"; 
} 

function writeflash(src){ 
    document.write(src); 
} 

function openflash_transparent(width,height,src){ 
    return "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width="+width+" height="+height+"><param name=movie value="+src+"><param name=quality value=high ><param name=wmode value=transparent><param name=background value=#FFFFFF><param name=windows value=opaque></object>"; 
} 						
							
// gnuboard Æ÷ÇÔ script
if (typeof(COMMON_JS) == 'undefined') { // ÇÑ¹ø¸¸ ½ÇÇà
    var COMMON_JS = true;

    // Àü¿ª º¯¼ö
    var errmsg = "";
    var errfld;

    // ÇÊµå °Ë»ç
    function check_field(fld, msg) 
    {
        if ((fld.value = trim(fld.value)) == "") 			   
            error_field(fld, msg);
        else
            clear_field(fld);
        return;
    }

    // ÇÊµå ¿À·ù Ç¥½Ã
    function error_field(fld, msg) 
    {
        if (msg != "")
            errmsg += msg + "\n";
        if (!errfld) errfld = fld;
        fld.style.background = "#BDDEF7";
    }

    // ÇÊµå¸¦ ±ú²ýÇÏ°Ô
    function clear_field(fld) 
    {
        fld.style.background = "#FFFFFF";
    }

    function trim(s)
    {
        var t = "";
        var from_pos = to_pos = 0;

        for (i=0; i<s.length; i++)
        {
            if (s.charAt(i) == ' ')
                continue;
            else 
            {
                from_pos = i;
                break;
            }
        }

        for (i=s.length; i>=0; i--)
        {
            if (s.charAt(i-1) == ' ')
                continue;
            else 
            {
                to_pos = i;
                break;
            }
        }	

        t = s.substring(from_pos, to_pos);
        //				alert(from_pos + ',' + to_pos + ',' + t+'.');
        return t;
    }

    // ÀÚ¹Ù½ºÅ©¸³Æ®·Î PHPÀÇ number_format Èä³»¸¦ ³¿
    // ¼ýÀÚ¿¡ , ¸¦ Ãâ·Â
    function number_format(data) 
    {
        
        var tmp = '';
        var number = '';
        var cutlen = 3;
        var comma = ',';
        var i;
       
        len = data.length;
        mod = (len % cutlen);
        k = cutlen - mod;
        for (i=0; i<data.length; i++) 
        {
            number = number + data.charAt(i);
            
            if (i < data.length - 1) 
            {
                k++;
                if ((k % cutlen) == 0) 
                {
                    number = number + comma;
                    k = 0;
                }
            }
        }

        return number;
    }

    // »õ Ã¢
    function popup_window(url, winname, opt)
    {
        window.open(url, winname, opt);
    }


    // Æû¸ÞÀÏ Ã¢
    function popup_formmail(url)
    {
        opt = 'scrollbars=yes,width=417,height=385,top=10,left=20';
        popup_window(url, "wformmail", opt);
    }

    // , ¸¦ ¾ø¾Ø´Ù.
    function no_comma(data)
    {
        var tmp = '';
        var comma = ',';
        var i;

        for (i=0; i<data.length; i++)
        {
            if (data.charAt(i) != comma)
                tmp += data.charAt(i);
        }
        return tmp;
    }

    // »èÁ¦ °Ë»ç È®ÀÎ
    function del(href) 
    {
        if(confirm("ÇÑ¹ø »èÁ¦ÇÑ ÀÚ·á´Â º¹±¸ÇÒ ¹æ¹ýÀÌ ¾ø½À´Ï´Ù.\n\nÁ¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?")) 
            document.location.href = href;
    }

    // ÄíÅ° ÀÔ·Â
    function set_cookie(name, value, expirehours) 
    {
        var today = new Date();
        today.setTime(today.getTime() + (60*60*1000*expirehours));
        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";";
    }

    // ÄíÅ° ¾òÀ½
    function get_cookie(name) 
    {
        var find_sw = false;
        var start, end;
        var i = 0;

        for (i=0; i<= document.cookie.length; i++)
        {
            start = i;
            end = start + name.length;

            if(document.cookie.substring(start, end) == name) 
            {
                find_sw = true
                break
            }
        }

        if (find_sw == true) 
        {
            start = end + 1;
            end = document.cookie.indexOf(";", start);

            if(end < start)
                end = document.cookie.length;

            return document.cookie.substring(start, end);
        }
        return "";
    }

    // ÄíÅ° Áö¿ò
    function delete_cookie(name) 
    {
        var today = new Date();

        today.setTime(today.getTime() - 1);
        var value = getCookie(name);
        if(value != "")
            document.cookie = name + "=" + value + "; path=/; expires=" + today.toGMTString();
    }

    // ÀÌ¹ÌÁöÀÇ Å©±â¿¡ µû¶ó »õÃ¢ÀÇ Å©±â°¡ º¯°æµË´Ï´Ù.
    // zzzz´Ô²²¼­ ¾Ë·ÁÁÖ¼Ì½À´Ï´Ù. 2005/04/12
    function image_window(img)
    {
        var w = img.width; 
        var h = img.height; 
        var winl = (screen.width-w)/2; 
        var wint = (screen.height-h)/3; 

        if (w >= screen.width) { 
            winl = 0; 
            h = (parseInt)(w * (h / w)); 
        } 

        if (h >= screen.height) { 
            wint = 0; 
            w = (parseInt)(h * (w / h)); 
        } 

        var js_url = "<script language='JavaScript1.2'> \n"; 
            js_url += "<!-- \n"; 
            js_url += "var ie=document.all; \n"; 
            js_url += "var nn6=document.getElementById&&!document.all; \n"; 
            js_url += "var isdrag=false; \n"; 
            js_url += "var x,y; \n"; 
            js_url += "var dobj; \n"; 
            js_url += "function movemouse(e) \n"; 
            js_url += "{ \n"; 
            js_url += "  if (isdrag) \n"; 
            js_url += "  { \n"; 
            js_url += "    dobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x; \n"; 
            js_url += "    dobj.style.top  = nn6 ? ty + e.clientY - y : ty + event.clientY - y; \n"; 
            js_url += "    return false; \n"; 
            js_url += "  } \n"; 
            js_url += "} \n"; 
            js_url += "function selectmouse(e) \n"; 
            js_url += "{ \n"; 
            js_url += "  var fobj      = nn6 ? e.target : event.srcElement; \n"; 
            js_url += "  var topelement = nn6 ? 'HTML' : 'BODY'; \n"; 
            js_url += "  while (fobj.tagName != topelement && fobj.className != 'dragme') \n"; 
            js_url += "  { \n"; 
            js_url += "    fobj = nn6 ? fobj.parentNode : fobj.parentElement; \n"; 
            js_url += "  } \n"; 
            js_url += "  if (fobj.className=='dragme') \n"; 
            js_url += "  { \n"; 
            js_url += "    isdrag = true; \n"; 
            js_url += "    dobj = fobj; \n"; 
            js_url += "    tx = parseInt(dobj.style.left+0); \n"; 
            js_url += "    ty = parseInt(dobj.style.top+0); \n"; 
            js_url += "    x = nn6 ? e.clientX : event.clientX; \n"; 
            js_url += "    y = nn6 ? e.clientY : event.clientY; \n"; 
            js_url += "    document.onmousemove=movemouse; \n"; 
            js_url += "    return false; \n"; 
            js_url += "  } \n"; 
            js_url += "} \n"; 
            js_url += "document.onmousedown=selectmouse; \n"; 
            js_url += "document.onmouseup=new Function('isdrag=false'); \n"; 
            js_url += "//--> \n"; 
            js_url += "</"+"script> \n"; 

        var settings;

        if (g4_is_gecko) {
            settings  ='width='+(w+10)+','; 
            settings +='height='+(h+10)+','; 
        } else {
            settings  ='width='+w+','; 
            settings +='height='+h+','; 
        }
        settings +='top='+wint+','; 
        settings +='left='+winl+','; 
        settings +='scrollbars=no,'; 
        settings +='resizable=yes,'; 
        settings +='status=no'; 


        win=window.open("","image_window",settings); 
        win.document.open(); 
        win.document.write ("<html><head> \n<meta http-equiv='imagetoolbar' CONTENT='no'> \n<meta http-equiv='content-type' content='text/html; charset="+g4_charset+"'>\n"); 
        var size = "ÀÌ¹ÌÁö »çÀÌÁî : "+w+" x "+h;
        win.document.write ("<title>"+size+"</title> \n"); 
        if(w >= screen.width || h >= screen.height) { 
            win.document.write (js_url); 
            var click = "ondblclick='window.close();' style='cursor:move' title=' "+size+" \n\n ÀÌ¹ÌÁö »çÀÌÁî°¡ È­¸éº¸´Ù Å®´Ï´Ù. \n ¿ÞÂÊ ¹öÆ°À» Å¬¸¯ÇÑ ÈÄ ¸¶¿ì½º¸¦ ¿òÁ÷¿©¼­ º¸¼¼¿ä. \n\n ´õºí Å¬¸¯ÇÏ¸é ´ÝÇô¿ä. '"; 
        } 
        else 
            var click = "onclick='window.close();' style='cursor:pointer' title=' "+size+" \n\n Å¬¸¯ÇÏ¸é ´ÝÇô¿ä. '"; 
        win.document.write ("<style>.dragme{position:relative;}</style> \n"); 
        win.document.write ("</head> \n\n"); 
        win.document.write ("<body leftmargin=0 topmargin=0 bgcolor=#dddddd style='cursor:arrow;'> \n"); 
        win.document.write ("<table width=100% height=100% cellpadding=0 cellspacing=0><tr><td align=center valign=middle><img src='"+img.src+"' width='"+w+"' height='"+h+"' border=0 class='dragme' "+click+"></td></tr></table>");
        win.document.write ("</body></html>"); 
        win.document.close(); 

        if(parseInt(navigator.appVersion) >= 4){win.window.focus();} 
    }

    // a ÅÂ±×¿¡¼­ onclick ÀÌº¥Æ®¸¦ »ç¿ëÇÏÁö ¾Ê±â À§ÇØ
    function win_open(url, name, option)
    {
        var popup = window.open(url, name, option);
        popup.focus();
    }

    // ¿ìÆí¹øÈ£ Ã¢
    //function win_zip(frm_name, frm_zip1, frm_zip2, frm_addr1, frm_addr2)
    //{
    //    url = g4_path + "/" + g4_bbs + "/zip.php?frm_name="+frm_name+"&frm_zip1="+frm_zip1+"&frm_zip2="+frm_zip2+"&frm_addr1="+frm_addr1+"&frm_addr2="+frm_addr2;
    //    win_open(url, "winZip", "left=50,top=50,width=616,height=460,scrollbars=1");
    //}

    // ÂÊÁö Ã¢
    function win_memo(url)
    {
        if (!url)
            url = g4_path + "/" + g4_bbs + "/memo.php";
        win_open(url, "winMemo", "left=50,top=50,width=616,height=460,scrollbars=1");
    }

    // Æ÷ÀÎÆ® Ã¢
    function win_point(url)
    {
        win_open(g4_path + "/" + g4_bbs + "/point.php", "winPoint", "left=20, top=20, width=616, height=635, scrollbars=1");
    }

    // ½ºÅ©·¦ Ã¢
    function win_scrap(url)
    {
        if (!url)
            url = g4_path + "/" + g4_bbs + "/scrap.php";
        win_open(url, "scrap", "left=20, top=20, width=616, height=500, scrollbars=1");
    }

    // ÆÐ½º¿öµå ºÐ½Ç Ã¢
    function win_password_forget()
    {
        win_open(g4_path + "/" + g4_bbs + "/password_forget.php", 'winPasswordForget', 'left=50, top=50, width=616, height=500, scrollbars=1');
    }

    // ÄÚ¸àÆ® Ã¢
    function win_comment(url)
    {
        win_open(url, "winComment", "left=50, top=50, width=800, height=600, scrollbars=1");
    }

    // Æû¸ÞÀÏ Ã¢
    function win_formmail(mb_id, name, email)
    {
        win_open(g4_path+"/" + g4_bbs + "/formmail.php?mb_id="+mb_id+"&name="+name+"&email="+email, "winFormmail", "left=50, top=50, width=600, height=480, scrollbars=0");
    }

    // ´Þ·Â Ã¢
    function win_calendar(fld, cur_date, delimiter, opt)
    {
        if (!opt)
            opt = "left=50, top=50, width=240, height=230, scrollbars=0,status=0,resizable=0";
        win_open(g4_path+"/" + g4_bbs + "/calendar.php?fld="+fld+"&cur_date="+cur_date+"&delimiter="+delimiter, "winCalendar", opt);
    }

    // ¼³¹®Á¶»ç Ã¢
    function win_poll(url)
    {
        if (!url)
            url = "";
        win_open(url, "winPoll", "left=50, top=50, width=616, height=500, scrollbars=1");
    }

    // ÀÚ±â¼Ò°³ Ã¢
    function win_profile(mb_id)
    {
        win_open(g4_path+"/" + g4_bbs + "/profile.php?mb_id="+mb_id, 'winProfile', 'left=50,top=50,width=616,height=500,scrollbars=1');
    }

    var last_id = null;
    function menu(id)
    {
        if (id != last_id)
        {
            if (last_id != null)
                document.getElementById(last_id).style.display = "none";
            document.getElementById(id).style.display = "block";
            last_id = id;
        }
        else
        {
            document.getElementById(id).style.display = "none";
            last_id = null;
        }
    }

    function textarea_decrease(id, row)
    {
        if (document.getElementById(id).rows - row > 0)
            document.getElementById(id).rows -= row;
    }

    function textarea_original(id, row)
    {
        document.getElementById(id).rows = row;
    }

    function textarea_increase(id, row)
    {
        document.getElementById(id).rows += row;
    }

    // ±Û¼ýÀÚ °Ë»ç
    function check_byte(content, target)
    {
        var i = 0;
        var cnt = 0;
        var ch = '';
        var cont = document.getElementById(content).value;

        for (i=0; i<cont.length; i++) {
            ch = cont.charAt(i);
            if (escape(ch).length > 4) {
                cnt += 2;
            } else {
                cnt += 1;
            }
        }
        // ¼ýÀÚ¸¦ Ãâ·Â
        document.getElementById(target).innerHTML = cnt;

        return cnt;
    }

    // ºê¶ó¿ìÀú¿¡¼­ ¿ÀºêÁ§Æ®ÀÇ ¿ÞÂÊ ÁÂÇ¥
    function get_left_pos(obj)
    {
        var parentObj = null;
        var clientObj = obj;
        //var left = obj.offsetLeft + document.body.clientLeft;
        var left = obj.offsetLeft;

        while((parentObj=clientObj.offsetParent) != null)
        {
            left = left + parentObj.offsetLeft;
            clientObj = parentObj;
        }

        return left;
    }

    // ºê¶ó¿ìÀú¿¡¼­ ¿ÀºêÁ§Æ®ÀÇ »ó´Ü ÁÂÇ¥
    function get_top_pos(obj)
    {
        var parentObj = null;
        var clientObj = obj;
        //var top = obj.offsetTop + document.body.clientTop;
        var top = obj.offsetTop;

        while((parentObj=clientObj.offsetParent) != null)
        {
            top = top + parentObj.offsetTop;
            clientObj = parentObj;
        }

        return top;
    }

    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=6,0,0,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 obj_movie(src, ids, width, height, autostart)
    {
        var wh = "";
        if (parseInt(width) && parseInt(height)) 
            wh = " width='"+width+"' height='"+height+"' ";
        if (!autostart) autostart = false;
        return "<embed src='"+src+"' "+wh+" autostart='"+autostart+"'></embed>";
    }

    function doc_write(cont)
    {
        document.write(cont);
    }
	function onlyNumeric()
	{
		if(event.keyCode==8||event.keyCode==46||event.keyCode==9)
		{	//¹é½ºÆäÀÌ½º,DELETE,TAB Çã¿ë
		}
		else if((event.keyCode >= 48) && (event.keyCode <= 57))
		{
		}
		else if((event.keyCode >= 96) && (event.keyCode <= 105))
		{
		}
		else
		{
			event.returnValue=false;
		}
	}
	//maxlength ¸¸Å­ ¿Å±â¸é ´ÙÀ½À¸·Î ÀÌµ¿ÇÏ±â....
	function nextFocus(sFormName, sNow, sNext) {
		var sForm = "document." + sFormName + ".";
		var oNow = eval(sForm + sNow);
		if (typeof oNow == "object") {
			if (oNow.value.length == oNow.maxLength) {
				var oNext = eval(sForm + sNext);
				if ((typeof oNext) == "object") {
					oNext.focus();
				}
			}
		}
	}
	function isValidFormat(value,format) {
		if (value.search(format) != -1) {
		   return true; //¿Ã¹Ù¸¥ Æ÷¸Ë Çü½Ä
		}
		return false;
	}

	function isValidEmail(value) {
		var format = /^((\w|[\-\.])+)@((\w|[\-\.])+)\.([A-Za-z]+)$/;
		return isValidFormat(value, format);
	}

}



/**
 * use homepage menu flash
 *
 * @param 1depth menu
 * @param 2depth menu
 * @return nothing
 */
function home_flash_url(depth_1, depth_2, depth_3)
{
	var depth_url;
	//alert(depth_1 + ":" + depth_2 + ":" + depth_3);
	if(depth_1 == "1")
	{
		if(depth_2 == "1")
		{
			depth_url = "/html/malling/malling_list.php";
		}
		else if(depth_2 == "2")
		{
			depth_url = "/html/malling/malling_list02.php";
		}
		else if(depth_2 == "3")
		{
			depth_url = "/html/malling/malling_list03.php";
		}
		else if(depth_2 == "4")
		{
			depth_url = "/html/malling/malling_list04.php";
		}
		else if(depth_2 == "5")
		{
			depth_url = "/html/malling/malling_list05.php";
		}
		else if(depth_2 == "6")
		{
			depth_url = "/bbs/board.php?bo_table=02malling_story";
		}
		else if(depth_2 == "7")
		{
			depth_url = "/html/malling/malldirectory.php";
		}
		else if(depth_2 == "8")
		{
			depth_url = "/html/malling/tour.php";
		}

	}


	else if(depth_1 == "2")
	{
		if(depth_2 == "1")
		{
			depth_url = "/html/ipark/iparkmall_1000.php";
		}
		else if(depth_2 == "2")
		{
			depth_url = "/html/mallmap/4f_view.php";
		}
		else if(depth_2 == "3")
		{
			depth_url = "/bbs/board.php?bo_table=04customer_findstore";
		}
		else if(depth_2 == "4")
		{
			depth_url = "/html/mallmap/fashion01.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/mallmap/fashion01.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/mallmap/living03.php";
			}
			else if(depth_3 == "3")
			{
				depth_url = "/html/mallmap/culture03.php";
			}
		}
		else if(depth_2 == "5")
		{
			depth_url = "/html/mallmap/digital03.php";
		}
		else if(depth_2 == "6")
		{
			depth_url = "/html/mallmap/ewestreet04.php";
		}
		else if(depth_2 == "7")
		{
			depth_url = "/html/mallmap/intro.php";
		}
		else if(depth_2 == "8")
		{
			depth_url = "/html/mallmap/emart02.php";
		}
		else if(depth_2 == "9")
		{
			depth_url = "/html/mallmap/cgv.php";
		}
	}


	else if(depth_1 == "3")
	{
		if(depth_2 == "1")
		{
			depth_url = "/bbs/board.php?bo_table=board_shopguide";
		}
		else if(depth_2 == "2")
		{
			depth_url = "/html/eBook/index_ipark100906.html";
		}
		else if(depth_2 == "3")
		{
			depth_url = "/html/service/card_500.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/service/card_500.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/service/card_1000.php";
			}
			else if(depth_3 == "3")
			{
				depth_url = "/html/service/card_1500.php";
			}
			else if(depth_3 == "4")
			{
				depth_url = "/html/service/card_2000.php";
			}
		}
		else if(depth_2 == "4")
		{
			depth_url = "/html/shopping/e_cupon/list.php";
		}
		else if(depth_2 == "5")
		{
			depth_url = "http://iparkmall.dnshop.com";
		}
		else if(depth_2 == "6")
		{
			depth_url = "/html/shopping/brand/brand_blog.php";
		}
		else if(depth_2 == "7")
		{
			depth_url = "/bbs/board.php?bo_table=board_new_shop";
		}
		else if(depth_2 == "8")
		{
			depth_url = "/html/fashion/fashion_500.php";
		}
		else if(depth_2 == "6")
		{
			depth_url = "/html/shopping/brand/brand_blog.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/shopping/gift/gift01.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/shopping/gift/gift02.php";
			}
			else if(depth_3 == "3")
			{
				depth_url = "/html/shopping/gift/gift03.php";
			}
			else
			{
				depth_url = "/html/shopping/gift/gift01.php";
			}
		}

	}


	else if(depth_1 == "4")
	{
		if(depth_2 == "1")
		{
			depth_url = "/bbs/board.php?bo_table=02sne_info";
		}
		else if(depth_2 == "2")
		{
			depth_url = "/html/event/community.php";
		}
		else if(depth_2 == "3")
		{
			depth_url = "http://www.cgv.co.kr/Theater/Theater/T_theater_area.aspx?theaterCode=13";
		}
		else if(depth_2 == "4")
		{
			depth_url = "/html/entertainment/blog/list.php";
		}
		else if(depth_2 == "5")
		{
			depth_url = "/bbs/board.php?bo_table=02sne_winner";
		}
		else if(depth_2 == "6")
		{
			depth_url = "/html/enter/enter_500.php";
		}
		else if(depth_2 == "7")
		{
			depth_url = "/html/enter/enter_2000.php";
		}
		else if(depth_2 == "8")
		{
			depth_url = "/bbs/board.php?bo_table=board_e_stadium";
		}
		
	}


	else if(depth_1 == "5")
	{
		if(depth_2 == "1")
		{
			depth_url = "/html/food/food_500.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/food/food_500.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/restaurant/food/korean.php";
			}
			else if(depth_3 == "3")
			{
				depth_url = "/html/restaurant/food/fusion.php";
			}
			else if(depth_3 == "4")
			{
				depth_url = "/html/restaurant/food/cbi.php";
			}
			else if(depth_3 == "5")
			{
				depth_url = "/html/restaurant/food/japan.php";
			}
			else if(depth_3 == "6")
			{
				depth_url = "/html/restaurant/food/fast.php";
			}
			else if(depth_3 == "7")
			{
				depth_url = "/html/restaurant/food/coffeenice.php";
			}
			else if(depth_3 == "8")
			{
				depth_url = "/html/restaurant/food/beer.php";
			}
			else
			{
				depth_url = "/html/food/food_500.php";
			}
		}
		else if(depth_2 == "2")
		{
			depth_url = "/bbs/board.php?bo_table=board_restaurant";
		}

		else if(depth_2 == "3")
		{
			depth_url = "/html/restaurant/parkdeli/index.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/restaurant/parkdeli/info.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/restaurant/parkdeli/menu.php";
			}
			else if(depth_3 == "3")
			{
				//depth_url = "/html/restaurant/parkdeli/pr.php";
				depth_url = "/bbs/board.php?bo_table=board_promotion&page=";
			}
		}

		else if(depth_2 == "4")
		{
			depth_url = "/html/restaurant/leistoria/index.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/restaurant/leistoria/info.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/restaurant/leistoria/menu.php";
			}
		}

		else if(depth_2 == "5")
		{
			depth_url = "/html/restaurant/ilovewine/index.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/restaurant/ilovewine/info.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/restaurant/ilovewine/pr.php";
			}
		}
	}

	else if(depth_1 == "6")

	{
		if(depth_2 == "1")
		{
			depth_url = "/html/wedding/wedding_500.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/wedding/wedding_500.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/wedding/wedding_500_2.php";
			}
			else if(depth_3 == "3")
			{
				depth_url = "/html/wedding/wedding_1500_1.php";
			}
			else if(depth_3 == "4")
			{
				depth_url = "/bbs/board.php?bo_table=wedding_event";
			}

		}
		else if(depth_2 == "2")
		{
			depth_url = "/html/wedding/wedding_1500.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/wedding/wedding_1500.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "#";
			}
			else if(depth_3 == "3")
			{
				depth_url = "/html/wedding/wedding_1500_2.php";
			}
			else if(depth_3 == "4")
			{
				depth_url = "/html/wedding/wedding_1500_3.php";
			}

		}
		else if(depth_2 == "3")
		{
			depth_url = "/html/wedding/wedding_2000_2.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/wedding/wedding_2000_2.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/wedding/wedding_2000_3.php";
			}
			else if(depth_3 == "3")
			{
				depth_url = "/html/wedding/wedding_2000_4.php";
			}
			else if(depth_3 == "4")
			{
				depth_url = "/html/wedding/wedding_2000_5.php";
			}
			else if(depth_3 == "5")
			{
				depth_url = "/html/wedding/wedding_2000_6.php";
			}
		}
		else if(depth_2 == "4")
		{
			depth_url = "/html/wedding/wedding_2500.php";
		}
		else if(depth_2 == "5")
		{
			depth_url = "/bbs/board.php?bo_table=wedding_feedback";
		}
	}


	else if(depth_1 == "7")
	{
		if(depth_2 == "1")
		{
			depth_url = "/bbs/board.php?bo_table=01ipark_notice";
		}
		else if(depth_2 == "2")
		{
			depth_url = "/html/helpdesk/point.php";
		}
		else if(depth_2 == "3")
		{
			depth_url = "/bbs/board.php?bo_table=04customer_feedback";
		}
		else if(depth_2 == "4")
		{
			depth_url = "/html/customer/customer_500.php";
		}
		else if(depth_2 == "5")
		{
			depth_url = "/html/ipark/iparkmall_3500.php";
		}
		else if(depth_2 == "6")
		{
			depth_url = "/html/customer/customer_1500.php";
		}
		else if(depth_2 == "7")
		{
			depth_url = "/html/ipark/iparkmall_3000.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/ipark/iparkmall_3000.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/helpdesk/parking.php";
			}
		}
		else if(depth_2 == "8")
		{
			depth_url = "/html/customer/customer_1000.php";
		}
		else if(depth_2 == "9")
		{
			depth_url = "/html/helpdesk/rss.php";
		}
	}


	else if(depth_1 == "8")
	{
		if(depth_2 == "1")
		{
			depth_url = "/html/fashion/fashion_500.php";
		}
		else if(depth_2 == "2")
		{
			depth_url = "/html/fashion/fashion_1000.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/fashion/fashion_1000.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/iparkdept/fashion/info_f01.php";
			}
		}
		else if(depth_2 == "3")
		{
			depth_url = "/html/digital/ld_500.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/digital/ld_500.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/iparkdept/living/info_f03.php";
			}
		}
		else if(depth_2 == "4")
		{
			depth_url = "/html/digital/ld_1500.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/digital/ld_1500.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/iparkdept/culture/info_f03.php";
			}
		}
		else if(depth_2 == "5")
		{
			depth_url = "http://iparkculture.com/";
		}
	}



	else if(depth_1 == "9")
	{
		if(depth_2 == "1")
		{
			depth_url = "/bbs/login.php";
		}
		else if(depth_2 == "2")
		{
			depth_url = "/html/member/member_1000.php";
		}
		else if(depth_2 == "4")
		{
			depth_url = "/bbs/password_forget.php?find=id";
		}
		else if(depth_2 == "5")
		{
			depth_url = "/bbs/password_forget.php?find=pw";
		}
		else if(depth_2 == "6")
		{
			depth_url = "/html/member/member_4000.php";
		}
		else if(depth_2 == "7")
		{
			depth_url = "/html/member/member_3500.php";
		}
	}


	else if(depth_1 == "10")
	{
		if(depth_2 == "1")
		{
			depth_url = "/html/corp/iparkmall/iparkinfo.php";
		}
		else if(depth_2 == "2")
		{
			depth_url = "/bbs/board.php?bo_table=01ipark_news";
		}
		else if(depth_2 == "3")
		{
			depth_url = "/html/company/company_2500.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/company/company_2500.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/company/company_2500_2.php";
			}
			else if(depth_3 == "3")
			{
				depth_url = "/html/company/company_2500_3.php";
			}
		}
		else if(depth_2 == "4")
		{
			depth_url = "/html/company/company_4000.php";
		}
	}

	else if(depth_1 == "11")
	{
		if(depth_2 == "1")
		{
			depth_url = "/html/corp/hyundai/ceomessage.php";
		}
		else if(depth_2 == "2")
		{
			depth_url = "/html/company/company_1000.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/company/company_1000.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/company/company_1500.php";
			}
			else if(depth_3 == "3")
			{
				depth_url = "/html/company/company_2001.php";
			}
		}
		else if(depth_2 == "3")
		{
			depth_url = "/html/company/company_7000.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/company/company_7000.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/company/company_7020.php";
			}
			else if(depth_3 == "3")
			{
				depth_url = "/html/company/company_7030.php";
			}
			else if(depth_3 == "4")
			{
				depth_url = "/html/company/company_7040.php";
			}
			else if(depth_3 == "5")
			{
				depth_url = "/html/company/company_7050.php";
			}
		}
		else if(depth_2 == "4")
		{
			depth_url = "/html/company/company_5000.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/company/company_5000.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/company/company_5001.php";
			}
			else if(depth_3 == "3")
			{
				depth_url = "/html/company/company_5002.php";
			}
			else if(depth_3 == "4")
			{
				depth_url = "/html/company/company_5003.php";
			}
		}
		else if(depth_2 == "5")
		{
			depth_url = "/html/company/company_5004.php";
		}


		else if(depth_2 == "6")
		{
			depth_url = "/html/corp/hyundai/sleader01.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/corp/hyundai/sleader01.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/corp/hyundai/sleader02.php";
			}
			else if(depth_3 == "3")
			{
				depth_url = "/html/corp/hyundai/sleader03.php";
			}
		}
	}



	else if(depth_1 == "12")
	{
		if(depth_2 == "1")
		{
			depth_url = "/html/corp/area/eventpark.php";
		}
		else if(depth_2 == "2")
		{
			depth_url = "/html/corp/area/education.php";
		}
	}

	else if(depth_1 == "13")
	{
		if(depth_2 == "1")
		{
			depth_url = "/html/company/company_3001.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/company/company_3001.php";
			}
			//else if(depth_3 == "2")
			//{
			//	depth_url = "/html/company/company_3100.php";
			//}
		}
		else if(depth_2 == "2")
		{
			depth_url = "/html/company/company_3020.php";
		}
		else if(depth_2 == "3")
		{
			depth_url = "/html/company/company_3030.php";
		}
		else if(depth_2 == "4")
		{
			depth_url = "/html/company/company_3040.php";
		}
		else if(depth_2 == "5")
		{
			depth_url = "/html/company/company_3050.php";
		}
		else if(depth_2 == "6")
		{
			depth_url = "/html/company/company_3060.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/company/company_3060.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/company/company_3061.php";
			}
			else if(depth_3 == "3")
			{
				depth_url = "/html/company/company_3060.php";
			}
		}
	}

	else if(depth_1 == "14")
	{
		if(depth_2 == "1")
		{
			depth_url = "/html/corp/intranet/contractor/list.php";
		}
		else if(depth_2 == "2")
		{
			depth_url = "/html/corp/intranet/seller/list.php";
		}
		else if(depth_2 == "3")
		{
			depth_url = "/html/corp/intranet/staff/list.php";
		}
	}

	else if(depth_1 == "15")
	{
		if(depth_2 == "1")
		{
			depth_url = "/html/mypage/mypage_0500.php";
			if(depth_3 == "1")
			{
				depth_url = "/html/mypage/mypage_0500.php";
			}
			else if(depth_3 == "2")
			{
				depth_url = "/html/mypage/myinfo/password.php";
			}
			else if(depth_3 == "3")
			{
				depth_url = "/html/mypage/myinfo/escape.php";
			}
		}
		else if(depth_2 == "2")
		{
			depth_url = "/html/mypage/mypage_1000.php";
		}
		else if(depth_2 == "3")
		{
			depth_url = "/html/mypage/mypage_1500.php";
		}
		else if(depth_2 == "4")
		{
			depth_url = "/html/mypage/epoint.php";
		}
	}


	if(depth_url != "" && depth_url != "undefined")
	{
		self.location = depth_url;
	}
}




		var cpc_protocol = document.location.protocol || "http:";
		var cpc_script_host = ["//nsc1.cpcguard.com","//vsc1.cpcguard.com"];
		var cpc_script_image = cpc_protocol + cpc_script_host[0] + "/cpcguard.gif?cache=" + (new Date()).getTime();

		function cpcguard_script_bind(i){
			try{
				var _head = document.getElementsByTagName("head")[0] || document.documentElement;
				if(_head){
					var _script = document.createElement("script"); 
					_script.id = "include_cpc_script"; 
					_script.type = "text/javascript"; 
					_script.charset = "utf-8"; 
					_script.async = true; 
					_script.src = (cpc_protocol + cpc_script_host[i] + "/v6/customer/kisa/cpc_script.js"); 
					_head.appendChild(_script);
				}else{window.setTimeout(arguments.callee(i),500);}
			}catch(e){}
		}

		if(!document.getElementById("include_cpc_script")){
			document.write("<img src='" + cpc_script_image + "' style='width:1px;height:1px;position:absolute;' onload='cpcguard_script_bind(0)' onerror='cpcguard_script_bind(1)' />");
		}
	
	