<!--
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];}}
}

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;
}

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_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];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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; }
}

// ·Ñ¿À¹ö ½ºÅ©¸³Æ®
var g_PreImgUrl = null;
var g_PrevImg = null; 

function gf_ImgMouseOver(obj, strUrl, prevImg)
{
  if(g_PrevImg)
  {
    g_PrevImg.src =  g_PreImgUrl;
  }
  obj.src = strUrl;
  g_PrevImg = obj;
  g_PreImgUrl =  prevImg;
}

function gf_ImgMouseOut()
{
  if(g_PrevImg)
  {
    g_PrevImg.src = g_PreImgUrl;
  }
}

//¸Þ´º FadeIn FadeOut
function fadeOut(obj) {
    obj.style.filter="blendTrans(duration=1)";
    // ÇÊÅÍ°¡ ÀÛµ¿ÇÏ°í ÀÖÁö ¾ÊÀ½À» È®ÀÎ
    if ((obj.visibility != "hidden") && (obj.filters.blendTrans.status != 0.1)) {
        obj.filters.blendTrans.Apply();
        obj.style.visibility="hidden";
        obj.filters.blendTrans.Play();
    }
}
function fadeIn(obj) {
    obj.style.filter="blendTrans(duration=1)";
    // ÇÊÅÍ°¡ ÀÛµ¿ÇÏ°í ÀÖÁö ¾ÊÀ½À» È®ÀÎ
    if ((obj.visibility != "visible") && (obj.filters.blendTrans.status != 0.1)) {
        obj.filters.blendTrans.Apply();
        obj.style.visibility="visible";
	obj.filters.blendTrans.Play();
    }
}

//Å¾ ¸Þ´º ÀÌµ¿
function gf_GoMenu(){
	var i=select_Top.selectedIndex;
	if (select_Top.options[i].value != '-1')
	{
		XecureNavigate (select_Top.options[i].value, "_self", "" );
	}
	//document.location=select_Top.options[i].value;
  //      document.TEST.action=document.form_Top.select_Top.options[i].value;
  //      document.TEST.submit();
}

//Á¾¸ñ/Áö¼ö Ã£±â ÆË¾÷
/*function GoLookup(strParam){
	var strUrl;
	strUrl = "/COM/COM_Lookup.asp?"+strParam;	
	hwin = window.open(strUrl,"mwin","statusbar=yes,scrollbars=yes,resizable=yes,width=376,height=500,top=10000,left=10000");
//	hwin = window.open(strUrl,"mwin","statusbar=yes,scrollbars=yes,resizable=yes,width=410,height=500,top=1,left=1");
	self.focus();
//	hwin.focus();
}*/

//Á¾¸ñ/Áö¼ö Ã£±â ÆË¾÷
function GoLookup_Old(strParam){
	var strUrl;
	strParam = gf_CompareSearchKey(strParam);
	strUrl = "/COM/COM_Lookup.asp?"+strParam;	
	hwin = window.open(strUrl,"mwin","statusbar=yes,scrollbars=yes,resizable=yes,width=376,height=515,top=10000,left=10000");
	self.focus();
//	hwin.focus();
}

//Á¾¸ñ/Áö¼ö Ã£±â ÆË¾÷
function GoLookup(strParam){
	var strUrl;
	strParam = gf_CompareSearchKey(strParam);
	strUrl = "/COM/COM_Lookup.asp?"+strParam;	
	hwin = window.open(strUrl,"mwin","statusbar=yes,scrollbars=yes,resizable=yes,width=376,height=515,top=10000,left=10000");
	self.focus();
//	hwin.focus();
}

//Á¾¸ñ/Áö¼ö Ã£±â ÆË¾÷ ¿ì¸®ÅõÀÚÁõ±ÇÀÇ Cross-Browsing ¿äÃ»À¸·Î »õ·Î ¸¸µë. by kdw 2011-02-10
function GoLookup_New(strParam, giname){

	var strUrl;
	strParam = gf_CompareSearchKey(strParam);
	strUrl = "/COM/COM_Lookup_New.asp?"+strParam;	
	
	hwin = window.open(strUrl,"mwin","statusbar=yes,scrollbars=no,resizable=yes,width=360,height=564,top=10000,left=10000");
	self.focus();
}

function gf_CompareSearchKey(strParam){
	var i, j;
	var searchKey;
	i = strParam.indexOf("SearchKey1=");
	if (i > -1) {
		j = strParam.indexOf("&", i);
		if (j < 0) { //SearchKey1=ttt·Î strParamÀÌ ³¡³­´Ù.
			j = strParam.length;
		}
		searchKey =strParam.substring(i+"SearchKey1=".length,j);
		if (gv_GinameByLookup == searchKey) { //±âÁ¸¿¡ Ã£¾Ò´ø Á¾¸ñ°ú °°À¸¸é °Ë»öÅ°¸¦ ³Î½ºÆ®¸µÀ¸·Î ¼¼ÆÃÇØÁØ´Ù.
			strParam = strParam.substring(0,i) + "SearchKey1=";
		}
	}
	return strParam;
}


//Á¾¸ñ/Áö¼ö Ã£±â ÆË¾÷¿¡¼­ Æ¯Á¤ Á¾¸ñ ¼±ÅÃµÈ ÈÄ¿¡ Ç×»ó ½ÇÇàµÉ ÇÔ¼ö
//¼±ÅÃµÈ Á¾¸ñ/Áö¼öÀÇ ÀÌ¸§À» ±â¾ïÇß´Ù°¡ ÀÌÈÄ lookup½Ã¿¡ ÆË¾÷Ã¢À» ¶ç¿ïÁö ¿©ºÎ¸¦ °áÁ¤ÇÏ±â À§ÇØ
//gv_GinameByLookup¿¡ °Ë»öµÈ Á¾¸ñÀ» ÀúÀåÇß´Ù°¡ ´ÙÀ½ ÆË¾÷½Ã¿¡ °Ë»öÅ°¸¦ gv_GinameByLookup°ú ºñ±³
// - °°À¸¸é ¹«Á¶°Ç ÆË¾÷ Ã¢À» ¶ç¿î´Ù. (°Ë»öÅ°¸¦ ³Î½ºÆ®¸µÀ¸·Î Ã³¸®)
// - Á¤»óÀûÀÎ ÆË¾÷ ÇÁ·Î¼¼½º¸¦ µû¸¥´Ù.(°Ë»ö °á°ú°¡ ÇÏ³ª¸é ÆË¾÷À» ´Ý°í ¾Æ´Ï¸é ÆË¾÷À» ¶ç¿î´Ù.
var gv_GinameByLookup;
function gf_LookupClose(strGiName){
	gv_GinameByLookup = strGiName;
}

//Á¾¸ñ/Áö¼ö Ã£±â ÆË¾÷(°ü½É±â¾÷ Àç¹«ÀçÇ¥¿¡¼­¸¸ ¾²´Â ÆË¾÷)
function GoLookup_CE_Old(strParam){

	var strUrl;	
	
	strParam = gf_CompareSearchKey(strParam);
	strUrl = "/SVD/popup/SVD_finSangjangLookup.asp?"+strParam;	
	hwin = window.open(strUrl,"mwin","statusbar=yes,scrollbars=yes,resizable=yes,width=376,height=500,top=10000,left=10000");
	self.focus();
//	hwin.focus();
}

//Á¾¸ñ/Áö¼ö Ã£±â ÆË¾÷(°ü½É±â¾÷ Àç¹«ÀçÇ¥¿¡¼­¸¸ ¾²´Â ÆË¾÷)
function GoLookup_CE(strParam){

	var strUrl;	
	
	strParam = gf_CompareSearchKey(strParam);
	strUrl = "/SVD/popup/SVD_finSangjangLookup.asp?"+strParam;	
	hwin = window.open(strUrl,"mwin","statusbar=yes,scrollbars=no,resizable=yes,width=360,height=540,top=10000,left=10000");
	self.focus();
//	hwin.focus();
}

//Ã¤±Ç Á¾¸ñ/¹ßÇàÁÖÃ¼/±×·ì Ã£±â ÆË¾÷
function GoSVFLookup_Old(strParam){
	var strUrl;

	strParam = gf_CompareSearchKey(strParam);
	strUrl = "/SVO/saelec/popup/SVF_Lookup.asp?"+strParam;	
	hwin = window.open(strUrl,"mwin","statusbar=yes,scrollbars=yes,resizable=yes,width=376,height=500,top=10000,left=10000");
	self.focus();
}

//Ã¤±Ç Á¾¸ñ/¹ßÇàÁÖÃ¼/±×·ì Ã£±â ÆË¾÷
function GoSVFLookup(strParam){
	var strUrl;

	strParam = gf_CompareSearchKey(strParam);
	strUrl = "/SVO/saelec/popup/SVF_Lookup.asp?"+strParam;	
	hwin = window.open(strUrl,"mwin","statusbar=yes,scrollbars=no,resizable=yes,width=360,height=550,top=10000,left=10000");
	self.focus();
}

//'---- ÀÔ·ÂµÈ ÀÏÀÚ°¡ ³¯Â¥Çü½Ä¿¡ ¸Â´ÂÁö È®ÀÎÈÄ ³¯Â¥Çü½ÄÀÌ ¾Æ´Ï¸é ¸Þ½ÃÁö¹Ú½º ¶ç¿ì°í Æ÷Ä¿½º¸¦ ÀÌµ¿ --------
function gf_CheckDate(objDate){
	var strDate
	var bReturn
	var re = /\d{8}/gi
	
	strDate = objDate.value
	
	if (re.test(strDate)){
		window.alert("hi")
	}else{
		//window.alert("³¯Â¥Çü½ÄÀÌ Àß¸øµÇ¾ú°Å³ª ÀÔ·ÂµÇÁö ¾Ê¾Ò½À´Ï´Ù.")
		objDate.focus()
		return false;
	}
}

//'---- Á¾¸ñ/Áö¼ö¼±ÅÃÀÌ µÇ¾ú´ÂÁö È®ÀÎÈÄ ¸Þ½ÃÁö¹Ú½º ¶ç¿ì°í Æ÷Ä¿½º¸¦ ÀÌµ¿ --------
function gf_CheckItemSelection(objItemcd, objItemText){
	var re = / /gi
	var strValue = objItemcd.value
	strValue = strValue.replace(re, "");
	if (strValue == ""){
		window.alert("¼±ÅÃµÈ Á¾¸ñ/Áö¼ö°¡ ¾ø½À´Ï´Ù.")
		if (!(objItemText.tagName.toUpperCase() == "INPUT" && objItemText.type.toUpperCase() == "HIDDEN"))
			objItemText.focus();
		return false;
	}else{
		return true;
	}
}

 function gf_MainMouseOut(obj)
 {
 	var y1, top, height;
 	y1 = event.y + document.body.scrollTop;
 	top = obj.style.top;
 	height = obj.style.height;
 	bottom = Number(top.substr(0,top.length-2)) + Number(height.substr(0,height.length-2));
 	if (y1+5 < bottom)
 	{
 		gf_ResotreSelMenu();
 	}
 }
 function gf_SubMouseOut(obj)
 {
 	var x1, y1, top, height, left, width, bottom, right;
 	y1 = event.y + document.body.scrollTop;
 	x1 = event.x + document.body.scrollLeft;
 	
 	top = obj.style.top;
 	height = obj.style.height;
 	left = obj.style.left;
 	width = obj.style.width;
 	left = Number(left.substr(0,left.length-2)); //px Àß¶ó³»±â
 	width = Number(width.substr(0,width.length-2));

 	right = left + width;
 	bottom = Number(top.substr(0,top.length-2)) + Number(height.substr(0,height.length-2));
 	
 	if ((y1+5 >= bottom) || (x1-5 <= left) || (x1+5 >= right))
 	{
 		gf_ResotreSelMenu();
 	}
 }
 
 //BottomÀÇ ÀÌ¿ë¾à°ü
function gf_GoSvcCont()
{
    window.open("http://www.fnguide.com/upload1/download/billSvcCont.pdf","win","scrollbars=no,width=800,height=600,top=0,left=200,resizable=yes");
}
 //BottomÀÇ °³ÀÎº¸È£Á¤Ã¥
function gf_GoProtectPriv()
{
    window.open("http://www.fnguide.com/upload1/download/protectPriv.pdf","win","scrollbars=no,width=800,height=600,top=0,left=200,resizable=yes");
}

/*
'******************************************************************************'
'	ÀÛ¼ºÀÚ 	:	Ãµ¼®ÅÂ
'	ÀÛ¼ºÀÏ 	:	2006.05.29
'	¼öÁ¤ÀÏ	:	2006.05.29
'	³»¿ë		:	Eolas»çÀÇ Æ¯Çã±Ç ÀÎÁ¤À¸·Î ÀÎÇÑ ActiveX È°¼ºÈ­ ÆÐÄ¡
'	¼³¸í		:	³×ÀÌ¹Ö·ê¿¡ ÀÇ°ÅÇÏ¿© ÆÐÅÏÈ­½ÃÅ°´Â ¹æ¹ý
'******************************************************************************'
	'1. Á¢µÎ¾î :  pct
	'2. °¢ ¼½¼Ç¸¶´Ù °íÀ¯ÀÇ Á¢µÎ¾î : ¿¹) pctSVI, pctSVD µîµî
	'3. _ ·Î ±¸ºÐÇÏ¸ç ÇÏÀ§Æú´õ°¡ ÀÖÀ»°æ¿ì(¿¹:INC)¿¡´Â ÇÏÀ§Æú´õ Ãß°¡.
	'4. _ ·Î ±¸ºÐÇÏ¸ç TChart ÀÎ °æ¿ì¿¡´Â TCT, VsFlexGrid ÀÎ °æ¿ì¿¡´Â VSFG
	'5. 01~99 ±îÁö ÀÏ·Ã¹øÈ£ (°¢ ÆäÀÌÁöº°·Î À¯ÀÏÇÏ°Ô.)
	'ÀüÃ¼ÀÇ ¿¹ : pctSVI_TCT01
*/
function gf_EolasPatch(obj)
{
	document.write(document.getElementById(obj).value);
}


/*
'******************************************************************************'
'	ÀÛ¼ºÀÚ 	:	Ãµ¼®ÅÂ
'	ÀÛ¼ºÀÏ 	:	2008.11.13
'	¼öÁ¤ÀÏ	:	2008.11.13
'	³»¿ë		:	¼ýÀÚÇü Æ÷¸ËÆÃ
'	¼³¸í		:	
'******************************************************************************'
*/
//°ø¹éÁ¦°Å
String.prototype.trim = function() {return this.replace(/(^\s*)|(\s*$)|($\s*)/g, "");} 
// 3ÀÚ¸® ¸¶´Ù ÄÞ¸¶Âï±â
String.prototype.numberFormat=function() {
 return this.replace(/(\d)(?=(?:\d{3})+(?!\d))/g,'$1,');
}


function JF_FormatNum(inputData, DigitNumber) {

	inputData = inputData.toString();
	DigitNumber = DigitNumber.toString();

	if  (inputData.trim() == "" || isNaN(inputData)) {  // °ø¹éÀÌ°Å³ª ¼ýÀÚ°¡ ¾Æ´Ï¸é °ø¹éÀ» µ¹·ÁÁØ´Ù.
		return "";
	}

	if (DigitNumber.trim() == "" || isNaN(DigitNumber)) {  // °ø¹éÀÌ°Å³ª ¼ýÀÚ°¡ ¾Æ´Ï¸é ¹ÞÀº ¼ýÀÚ¸¦ µ¹·ÁÁØ´Ù.
		if (isNaN(inputData)) {  // ¹ÞÀº °ÍÀÌ ¼ýÀÚ°¡ ¾Æ´Ï¸é ±×´ë·Î µ¹·ÁÁØ´Ù.
			return inputData;
		}
		else {      // ¹ÞÀº °ÍÀÌ ¼ýÀÚÀÌ¸é ÄÄ¸¶¸¦ Âï¾î¼­ µ¹·ÁÁØ´Ù.
			if (inputData.toString().indexOf(".") < 0) {    // Á¤¼ö°¡ ³ª¿ÔÀ¸¸é..
				return inputData.toString().numberFormat();
			}
			else {             // ¼Ò¼öÁ¡ÀÌ ÀÖÀ¸¸é . Àº ºÙÀÌÁö ¾Ê´Â´Ù
				return inputData.substring(0, inputData.indexOf(".")).numberFormat() + inputData.substring(inputData.indexOf("."));
			}
		}
	}

	var retValue;


	var p = Math.pow(10, DigitNumber);        // ¼Ò¼ö µÑÂ°ÀÚ¸®±îÁö...

	retValue = Math.round(inputData * p) / p;

	if (retValue.toString().indexOf(".") < 0) {    // Á¤¼ö°¡ ³ª¿ÔÀ¸¸é..
		retValue = retValue.toString() + "." + "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
	}
	else {             // ¼Ò¼öÁ¡ÀÌ ÀÖÀ¸¸é . Àº ºÙÀÌÁö ¾Ê´Â´Ù
		retValue = retValue.toString()       + "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
	}

	// DigitNumber ¸¸Å­ Àß¶ó³½´Ù.
	retValue = retValue.substring(0, eval(eval(retValue.indexOf(".") + eval(DigitNumber) + 1)));

	// ¼Ò¼ýÁ¡ ÀÌ»óÀº ¼¼ÀÚ¸®¸¶´Ù ÄÄ¸¶¸¦ Âï°í, ¼Ò¼ýÁ¡ ÀÌÇÏ´Â ÂïÁö ¾Ê´Â´Ù
	retValue = retValue.substring(0, retValue.indexOf(".")).numberFormat() + retValue.substring(retValue.indexOf("."));

	return retValue;
}


/*
'******************************************************************************'
'	ÀÛ¼ºÀÚ 	:	
'	ÀÛ¼ºÀÏ 	:	2008.12.01
'	¼öÁ¤ÀÏ	:	2008.12.01
'	³»¿ë	:	¼ýÀÚ °Ë»ö
'	¼³¸í	:	
'******************************************************************************'
*/
    function isNumeric( intVal ) {  
        
		intVal = intVal.replace(",", "");
        if ( intVal == null ) return false ;
           
        for(var i=0;i<intVal.length;i++){          
            var c=intVal.charCodeAt(i);       
        
            if( !(  0x30 <= c && c <= 0x39 ) ) {         
                return false ;       
            }
        }      
        
        return true ;        
    }

//-->
