<!----------------------------------------------------------------------------!> 
<!-- <copyright from='1987' to='2005' company='LG CNS Co.,Ltd.'>     		--!> 	     
<!--    Copyright (c) LG CNS. All Rights Reserved.                			--!> 	
<!--    º» ÇÁ·Î±×·¥ÀÇ ÀúÀÛ±ÇÀº LG CNS ISÆÀ(È¨ÆäÀÌÁö ¸®´º¾ó ÇÁ·ÎÁ§Æ®)¿¡ ÀÖ½À´Ï´Ù.--!> 	
<!-- </copyright															--!> 	
<!-- -------------------------------------------------------------------------!> 
<!-- ¼Ò½º¸í		: Common.js													--!> 	
<!-- ÀÛ¼ºÀÚ		: ¹ÎÁ¤Èñ													--!> 	
<!-- ¼³  ¸í		: °øÅë Script 												--!> 	
<!-- ÀÛ¼ºÀÏ		: 2005-03-10												--!> 	
<!-- º¯°æ»çÇ×	: 															--!> 	
<!-- Who (When) : Description												--!> 	
<!----------------------------------------------------------------------------!> 

<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: ufMouseOn()												--!> 									
<!-- ¼³ ¸í		: ImageÀÇ onmouseover ÀÌº¥Æ® ¼³Á¤  							--!> 
<!-- Àü´ÞÀÎ¼ö	: obj		- Control 										--!> 
<!--			: sImageUrl - image src 									--!> 
<!-- ¹Ý È¯ °ª	: None 														--!> 
<!----------------------------------------------------------------------------!> 
function ufMouseOn(obj, sImageUrl)
{
	window.document.body.style.cursor = "hand";
	obj.src = sImageUrl;
}

<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: ufMouseOff()  											--!> 
<!-- ¼³ ¸í		: ImageÀÇ onmouseout ÀÌº¥Æ® ¼³Á¤							--!> 
<!-- Àü´ÞÀÎ¼ö	: obj		- Control  										--!> 
<!--			: sImageUrl - image src										--!> 
<!-- ¹Ý È¯ °ª	: None 														--!> 
<!----------------------------------------------------------------------------!> 
function ufMouseOff(obj, sImageUrl)
{
	window.document.body.style.cursor = "default";
	obj.src = sImageUrl;
}

<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: ufFiledown()  											--!> 
<!-- ¼³ ¸í		: file Down load ÀÌº¥Æ® ¼³Á¤								--!> 
<!-- Àü´ÞÀÎ¼ö	: obj		- Control  										--!> 
<!--			: sImageUrl - image src										--!> 
<!-- ¹Ý È¯ °ª	: None 														--!> 
<!----------------------------------------------------------------------------!> 
function ufFiledown(sFileName)
{	
	var sPageURL = "/LGCNS.ENT.UI.MAIN/UCM/Download.aspx";
	location.href = sPageURL +"?FILENAME=" + sFileName
	
}

<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: gfCheckDateFormat()										--!> 
<!-- ¼³ ¸í		: ÀÔ·ÂµÈ ÀÏÀÚ¸¦ Ã¼Å©ÇÑ ÈÄ "YYYY-MM-DD" ÇüÅÂ·Î ÆíÁýÇÑ´Ù.		--!> 
<!-- Àü´ÞÀÎ¼ö	: oElement	- °Ë»çÇÒ Control								--!> 
<!-- ¹Ý È¯ °ª	: bool 														--!> 
<!----------------------------------------------------------------------------!>
function gfCheckDateFormat(oControl) 
{ 
	var lsRTV; 

	if(oControl.type != "text" || oControl.value == oControl.defaultValue) 
		return true; 

	if((lsRTV = gfEditDate(oControl.value)) == null) 
	{ 
		alert("ÇØ´çÀÏÀÚ¸¦ Á¤È®È÷ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À!"); 
		oControl.value = oControl.defaultValue; 

		return false; 
	} 
	oControl.value = lsRTV; 
	oControl.defaultValue = lsRTV; 
} 
<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: gfEditDate()  											--!> 
<!-- ¼³ ¸í		: ÀÏÀÚ¸¦ CHeckÇÑ ÈÄ Á¤»óÀÎ °æ¿ì Æ¯Á¤¾ç½ÄÀ¸·Î ÆíÁýÇÏ¿© ¸®ÅÏ	--!> 
<!-- Àü´ÞÀÎ¼ö	: psDate - Check´ë»ó ¹®ÀÚ¿­  								--!> 
<!-- ¹Ý È¯ °ª	: Á¤»ó - ÆíÁýµÈ ÀÏÀÚ 										--!> 
<!--			  ¿À·ù - null												--!> 
<!----------------------------------------------------------------------------!>
function gfEditDate(psDate) 
{ 
	var liDay = [31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; 
	var lsBUFF = ["0", "0", "0"]; 
	var lsRTV = ""; 
	var ii, jj, lsChar, lbFlag = true; 
	var liYY, liMM, liDD; 
	var liLEN = psDate.length == 6 ? 2 : 4; 

	if(gfIsBlank(psDate)) 
		return lsRTV; 

	for(ii = 0, jj = 0; ii < psDate.length; ii++) 
	{ 
		lsChar = psDate.charAt(ii); 
		if(lsChar < '0' || lsChar > '9') 
		{ 
			jj += lbFlag ? 0 : 1; 
			if(jj > 2) 
			break; 
			lbFlag = true; 
		} 
		else 
		{ 
			jj += ((jj == 0 && lsBUFF[jj].length > liLEN) || (jj != 0 && lsBUFF[jj].length > 2)) ? 1 : 0; 
			if(jj > 2) 
			return null; 

			lsBUFF[jj] += lsChar; 
			lbFlag = false; 
		} 
	}
	
	liYY = parseInt(lsBUFF[0], 10); 
	liYY += (liYY < 100 ? 2000 : 0); 
	liMM = parseInt(lsBUFF[1], 10); 
	liDD = parseInt(lsBUFF[2], 10); 

	if(liYY > 10000) 
		return null; 

	liDay[1] = 28; 
	if(liYY % 4 == 0 && ((liYY % 100 != 0) || (liYY % 100 == 0 && liYY % 400 == 0))) 
		liDay[1] = 29; 

	if(liMM < 1 || liMM > 12 || liDD < 1 || liDD > liDay[liMM - 1]) 
		return null; 

	//lsRTV = liYY + "-" + (liMM < 10 ? "0" : "") + liMM + "-" + (liDD < 10 ? "0" : "") + liDD; 
	lsRTV = liYY + "" + (liMM < 10 ? "0" : "") + liMM + "" + (liDD < 10 ? "0" : "") + liDD; 

	return lsRTV; 
}
<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: gfIsBlank()												--!> 
<!-- ¼³ ¸í		: Æ¯Á¤¹®ÀÚ¿­ÀÌ °ø¹é ¹®ÀÚ¿­ÀÎ°¡¸¦ Ã¼Å©ÇÑ´Ù					--!> 
<!-- Àü´ÞÀÎ¼ö	: psString - Ä¡È¯´ë»ó ¹®ÀÚ¿­ 								--!> 
<!-- ¹Ý È¯ °ª	: null or °ø¹é¹®ÀÚ¿­ÀÎ °æ¿ì - true							--!> 
<!--			  °ø¹é¹®ÀÚ¿­ÀÌ ¾Æ´Ñ °æ¿ì - false							--!> 
<!----------------------------------------------------------------------------!>
function gfIsBlank(psString) 
{ 
	var ii; 

	for(ii = 0; ii < psString.length; ii++) 
	if(psString.charAt(ii) != ' ') 
		return false; 

	return true; 
}
<!----------------------------------------------------------------------------!>

<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: ufOnload()  
<!-- ¼³ ¸í		: main PageÀÇ Onload  
<!-- Àü´ÞÀÎ¼ö	:   
<!-- ¹Ý È¯ °ª	: None 
<!----------------------------------------------------------------------------!> 
function ufOnload() 
{ 
	//º¯°æ:2005.04.22ÀÏÀÚ PopupÈ­¸é Á¦¿Ü¿äÃ»
	/*
	if(ufgetCookie("Notice") !="done") 
	{
		noticeWindow  = window.open('/LGCNS.HP.UI.MAIN/Popup/popup_0406.html','notice','left=500,top=0,width=390,height=410');
		noticeWindow.opener = self;
	}
	*/
	//Ãß°¡:2005.04.29ÀÏÀÚ PopupÈ­¸é Ãß°¡¿äÃ»
		
	//º¯°æ:2005.05.16ÀÏÀÚ PopupÈ­¸é Á¦¿Ü¿äÃ»
	/*
	if(ufgetCookie("Notice") !="done") 
	{
		noticeWindow  = window.open('/LGCNS.HP.UI.MAIN/Popup/popup_0502.html','notice','left=500,top=0,width=390,height=560');
		noticeWindow.opener = self;
	}
	*/




}
<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: ufPopOnload()  
<!-- ¼³ ¸í		: Popup PageÀÇ Onload  
<!-- Àü´ÞÀÎ¼ö	:   
<!-- ¹Ý È¯ °ª	: None 
<!----------------------------------------------------------------------------!> 
function ufclosePop(ochkClose) 
{ 
	var chkClose = document.getElementById(ochkClose);

	if(chkClose != null)
	{
		if(chkClose.checked)
		{
			ufsetCookie("Notice","done",1);
		}
	}
	self.close();
}
<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: ufsetCookie()  
<!-- ¼³ ¸í		: Cookie »ý¼º
<!-- Àü´ÞÀÎ¼ö	:   
<!-- ¹Ý È¯ °ª	: None 
<!----------------------------------------------------------------------------!> 
function ufsetCookie( name, value, expiredays )
{ 
	var todayDate = new Date(); 
	
	todayDate.setDate( todayDate.getDate() + expiredays ); 
	document.cookie = name +"="+escape(value)+"; path=/; expires=" + todayDate.toGMTString()+";";
}
<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: ufsetCookie()  
<!-- ¼³ ¸í		: Cookie Search 
<!-- Àü´ÞÀÎ¼ö	:   
<!-- ¹Ý È¯ °ª	: None 
<!----------------------------------------------------------------------------!> 
function ufgetCookie( 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;
	}//while ( x <= document.cookie.length )_End
	
	return "";
}
<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: ufPopupNotice()  
<!-- ¼³ ¸í		: Popup Page È£Ãâ  
<!-- Àü´ÞÀÎ¼ö	: sUrl		- È£ÃâÇÒ È­¸é URL(Parameter Æ÷ÇÔ)  
<!--			: sPageName - È£ÃâÇÒ È­¸é¸í 
<!--			: height	- È­¸é height
<!--			: width		- È­¸é width
<!--			: sScroll	- scrollbars À¯¹«
<!-- ¹Ý È¯ °ª	: None 
<!----------------------------------------------------------------------------!> 
function ufPopupNotice(sUrl,sPageName,height,width,sScroll) 
{ 
	sScroll		= (sScroll =='no')? 'no': 'yes';
	
	var left	= 500;	//(window.screen.width - width) / 2; 
	var top		= 0;	//(window.screen.height - height) / 2; 
	var winpos = "top="+top+",left="+left+",width="+width+",height="+height; 
	var winstyle = winpos + ",status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars="+sScroll+",copyhistory=no"; 

	window.open(sUrl, sPageName, winstyle); 
}
<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: gfPrint()													--!>
<!-- ¼³ ¸í		: ÇØ´ç Div¿µ¿ª¸¸À» PrintÇÑ´Ù.								--!>
<!-- Àü´ÞÀÎ¼ö	: psLayerAID- divTitle Control¸í (Print°ü·Ã)				--!>
<!-- Àü´ÞÀÎ¼ö	: psLayerBID- divPrint Control¸í (Print°ü·Ã)				--!>
<!-- Àü´ÞÀÎ¼ö	: psLayerCID- divPrint Control¸í (Print°ü·Ã)				--!>
<!-- ¹Ý È¯ °ª	: None														--!>
<!----------------------------------------------------------------------------!> 
function gfPrint(psLayerAID,psLayerBID,psLayerCID)
{	
	var divA;	
	var divB;
	var divC;
	var sPrintA	= "";
	var sPrintB	= "";	
	var sPrintC	= "";	
			
	if(document.all && window.print)
	{
		divA = document.all[psLayerAID];
		divB = document.all[psLayerBID];	
		divC = document.all[psLayerCID];								
	}
	else if(document.layers)
	{
		divA = document[psLayerAID];
		divB = document[psLayerBID];
		divC = document[psLayerCID];
	}
	
	//Title ¿µ¿ª
	if(divA !=null)
	{	sPrintA =  divA.innerHTML;		}	
	
	//³»¿ë¿µ¿ª
	if(divB !=null)
	{	sPrintB = divB.innerHTML;		}	
	
	//±âÅ¸¿µ¿ª
	if(divC !=null)
	{	sPrintC = divC.innerHTML;		}	
			
	var winpos		= "top=100,left=200,width=600,height=500"; 
	var winstyle	= winpos + ",status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes,copyhistory=no"; 
	//var omyPrint	= window.open('/LGCNS.HP.UI.MAIN/Popup/popup_Print.html','myPrint',winstyle);
	
	var sContent = "";
	sContent	+= "<html>";
	sContent	+= " <head><title>Print</title>";
	sContent	+= "  <META http-equiv='Content-Type' content='text/html; charset=euc-kr'>";
	sContent	+= "  <LINK href='/LGCNS.HP.UI.MAIN/css/Style.css' type='text/css' rel='stylesheet'>";
	sContent	+= "  <SCRIPT language='Javascript' src='/LGCNS.HP.UI.MAIN/scripts/Common.js'></SCRIPT>";
	sContent	+= " </head>";
	//sContent	+= "<body bgcolor=white onload='gfPrintDisplay('"+psTableID+"'); self.focus(); window.print()'>";
	sContent	+= "<body bgcolor=white onload='self.focus(); window.print()'>";
	sContent	+= sPrintA;
	sContent	+= sPrintB;
	sContent	+= sPrintC;
	sContent	+= "</body></html>";
	
	//omyPrint.document.writeln(sContent);
	//omyPrint.document.close();
	
}

<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: gfIndexPage()												--!>
<!-- ¼³ ¸í		: ÃÊ±âÈ­¸éÀ¸·Î LoadÇÑ´Ù.									--!> 
<!-- Àü´ÞÀÎ¼ö	: pLeftPage - Left Page										--!> 
<!--			: pMainPage - Main Page										--!> 
<!-- ¹Ý È¯ °ª	: true,false												--!> 
<!----------------------------------------------------------------------------!> 
function gfIndexPage(pLeftPage,pMainPage) 
{ 
	//ºóÆäÀÌÁö: "/LGCNS.HP.UI.MAIN/admin_index.htm";

	if(parent.frames['TOP'] !=null)
	{	
		parent.frames['TOP'].location.href	= "/LGCNS.HP.UI.MAIN/admin_top.aspx";	
	}
	
	if(pLeftPage != "")
	{	
		if(parent.frames['LEFT'] !=null)
		{	parent.frames['LEFT'].location.href	= pLeftPage;	}	
	}
	
	if(pMainPage != "")
	{	
		if(parent.frames['MAIN'] !=null)
		{	parent.frames['MAIN'].location.href	= pMainPage;	}
	}
	
}
<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: gfIsNumberChk()											--!>
<!-- ¼³ ¸í		: ControlÀÇ Number Check, MessageÃâ·Â, focusÀÌµ¿.			--!> 
<!-- Àü´ÞÀÎ¼ö	: chkOpt - ControlÀÔ·ÂÇü½ÄÀÌ ÇÊ¼öÀÔ·Â(true) ÀÎÁö »ç¿ëÀÚÁ¤ÀÇÀÔ·Â(false)ÀÎÁö ¿©ºÎ--!> 
<!--			: poControlName - Control¸í									--!> 
<!--			: pMessage  - ¿¡·¯½Ã Ãâ·Â¸Þ¼¼Áö								--!> 
<!-- ¹Ý È¯ °ª	: true,false												--!> 
<!----------------------------------------------------------------------------!> 
function gfIsNumberChk(ChkOpt, poControlName, pMessage) 
{
	if (ChkOpt == false && gfIsBlank(poControlName) == true)
		return true;
		
	if (gfOnlyNumber2(poControlName.value) != true) 
	{
		alert(pMessage);
		poControlName.focus();
		poControlName.value ="";
		return false;
	}
	return true;
}
<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: gfOnlyNumber2()											--!> 
<!-- ¼³ ¸í		: Á¤¼ö ¿©ºÎ Ã¼Å© 											--!> 
<!-- Àü´ÞÀÎ¼ö	: iNum - Ã¼Å© ´ë»ó µ¥ÀÌÅÍ 									--!> 
<!-- ¹Ý È¯ °ª	: true, false 												--!> 
<!----------------------------------------------------------------------------!> 
function gfOnlyNumber2(iNum)
{ 
	for(var i=0;i<iNum.length;i++)
	{ 
		var chr = iNum.substr(i,1); 
		if(chr<'0' || chr>'9')
		{ 
			return false; 
		} 
	} 
	return true; 
} 
<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: CheckEmail()		 										--!> 
<!-- ¼³ ¸í		: ÀÌ¸ÞÀÏ À¯È¿¼º Ã¼Å©										--!> 
<!-- Àü´ÞÀÎ¼ö	: poControlName - Control¸í									--!> 
<!--			: pMessage  - ¿¡·¯½Ã Ãâ·Â¸Þ¼¼Áö								--!> 
<!-- ¹Ý È¯ °ª	: true, false 												--!> 
<!----------------------------------------------------------------------------!> 
function CheckEmail(poControlName,pMessage) 
{ 
	var flag = false;
	emailEx1 = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/; 
	if(emailEx1.test(poControlName.value) == true || poControlName.value=='')
	{		
		return true;
	}
	if( emailEx1.test(poControlName.value) != true)
	{
		alert(pMessage);
		poControlName.focus();
		poControlName.value ="";
		return false;
	}
} 


<!----------------------------------------------------------------------------!> 
<!-- ÇÔ ¼ö ¸í	: __ShowEmbedObject()		 				     			--!> 
<!-- ¼³ ¸í		: ME ÆÐÄ¡°ü·Ã       										--!> 
<!-- Àü´ÞÀÎ¼ö	:                       									--!> 
<!--			:                           								--!> 
<!-- ¹Ý È¯ °ª	: true, false 												--!> 
<!----------------------------------------------------------------------------!> 

function __ShowEmbedObject (id) {
document.write(id.innerHTML); id.id="";
}


document.attachEvent ("onreadystatechange", function() {
   if (document.readyState=="complete")   {
      if (window.objectPatch) window.objectPatch();
   }
})

function objectPatch() 
{
  //bodyÀÇ ¸ðµç object ÅÂ±×°´Ã¼¸¦ °¡Á®¿Â´Ù.
  //applet ¹× embed ÅÂ±×ÀÇ °æ¿ìµµ µ¿ÀÏÇÑ ¹æ½ÄÀ¸·Î Ãß°¡ °¡´É
	var os = document.getElementsByTagName("object");
	for (var idx=0; idx < os.length; idx++) 
	{
		var peer = os[idx];
		var clsid = peer.getAttribute("classid");
		if (!clsid) continue;
		
    //ÀÚµ¿ È°¼ºÈ­°¡ ÇÊ¿äÇÑ activexÀÇ clsid¸¦ ¾Æ·¡ ÄÚµå¿¡ Ãß°¡ÇÒ °Í(¼Ò¹®ÀÚ·Î ÀÔ·Â)
	    if (peer.id != "main")
	    {
		    switch (clsid.toLowerCase()) 
			{
				case "clsid:cf362bdb-4ea2-11d5-ab47-000102913414" :  // LG CC °ü·Ã
				case "clsid:7a5e8dfc-a002-495c-8982-4fe56bc5540f" :  // ¿¢Æ¼ºê ½ºÄù¾î5
				case "clsid:5220cb21-c88d-11cf-b347-00aa00a28331" :  // ¿¢Æ¼ºê ½ºÄù¾î5
				case "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" :  // ¹Ìµð¾î ÇÃ·¹ÀÌ¾î
		    	case "clsid:bb4533a0-85e0-4657-9bf2-e8e7b100d47e" :  // combo
		    	case "clsid:71e7aca0-ef63-4055-9894-229b056e9c31" :  // grid
		    	case "clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" :  // media player
		    	case "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" :  // flash
		    				var html = peer.outerHTML;
	  		    		peer.outerHTML = html;
	  		    		break;
	  	    default:
	  		    		break;

	       }				
	   }
	}
}
