(window.Event) // ³Ý½ºÄÉÀÌÇÁ¿¡¼­¸¸ ´ë¹®ÀÚ E.
{
	try{
		document.captureEvents(Event.MOUSEUP) ; // mouse up ÀÌº¥Æ®¸¦ ÀâÀ½
	}catch(e){
		// alert(window.Event);
	}
}

function nocontextmenu() // IE4¿¡¼­¸¸ Àû¿ë, ´Ù¸¥ ºê¶ó¿ìÀú´Â ¹«½Ã
{
   event.cancelBubble = true ;
   event.returnValue = false ;
   return false ;
}

function norightclick(e)   // ´Ù¸¥ ¸ðµç ºê¶ó¿ìÀú¿¡¼­ ÀÛµ¿
{
	try{
	   if (window.Event)   // ´Ù½Ã, IE ¶Ç´Â NAV ?
	   {
	      if (e.which == 2 || e.which == 3)
				{
	         return false ;
				}
	   }
	   else
	      if (event.button == 2 || event.button == 3)
	      {
	         event.cancelBubble = true ;
	         event.returnValue = false ;
	         return false ;
	      }
	}catch(x){
       //
	}
}

document.oncontextmenu = nocontextmenu ;      // IE5+ ¿ë
document.onmousedown = norightclick ;      // ´Ù¸¥ ºê¶ó¿ìÀú ¿ë

var sWin1 = null;
var sWin2 = null;
var sWin3 = null;
var sWin4 = null;
var sWin5 = null;
var sWin6 = null;
var sWin7 = null;
var sWin8 = null;
var sWin9 = null;
var sWin10 = null;
var sWin11 = null;
var sWin12 = null;
var sWin13 = null;
var sWin14 = null;
var sWin15 = null;
var sWin16 = null;

var beforewin1 = null;
var beforewin2 = null;
var beforewin3 = null;
var beforewin4 = null;
var beforewin5 = null;
var beforewin6 = null;
var beforewin7 = null;
var beforewin8 = null;
var beforewin9 = null;
var beforewin10 = null;
var beforewin11 = null;
var beforewin12 = null;
var beforewin13 = null;
var beforewin14 = null;
var beforewin15 = null;
var beforewin16 = null;

var winclosed1 = 0;
var winclosed2 = 0;
var winclosed3 = 0;
var winclosed4 = 0;
var winclosed5 = 0;
var winclosed6 = 0;
var winclosed7 = 0;
var winclosed8 = 0;
var winclosed9 = 0;
var winclosed10 = 0;
var winclosed11 = 0;
var winclosed12 = 0;
var winclosed13 = 0;
var winclosed14 = 0;
var winclosed15 = 0;
var winclosed16 = 0;

var sWinPrc = null;
var beforewinPrc = null;
var winclosedPrc = 0;

function doNothing() {
}







function noAccount() {
	alert("°èÁÂÁ¤º¸°¡ ÀÖÀ¸½Å ºÐµé¸¸ ÀÛ¾÷ÀÌ °¡´ÉÇÕ´Ï´Ù.") ;
}

function clickItemSrch(str) {

	var w_width = 200;
	var w_height = 285;

	if (navigator.appName == "Netscape") {
		w_width = 190;
		w_height = 255;
	}

	// Á¦3½ÃÀåÀÇ Á¾¸ñÃ¢À» ³ªÅ¸³»±â À§ÇØ Ãß°¡
	if ((str != null) && (str.length > 0)) {
		var targetHTML = "/Korean/Wts/Include/SearchItem_s01.jsp?rdoListType=" + str ;
	} else {
		var targetHTML = "/Korean/Wts/Include/SearchItem_s01.jsp" ;
	}

	var xpos = ( screen.width - ( w_width + 9 ) ) / 1.2;
	var ypos = ( screen.height - (w_height + 55) ) / 2;

	if (beforewin1 == null) {
		sWin1 = window.open(targetHTML, "ItemSrch", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + event.screenY + ", left=" + event.screenX) ;
		beforewin1 = targetHTML;
		winclosed1 = 0;
	} else if (beforewin1 == targetHTML) {
		if (winclosed1) {
			sWin1 = null;
			sWin1 = window.open(targetHTML, "ItemSrch", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + event.screenY + ", left=" + event.screenX) ;
			beforewin1 = targetHTML;
			winclosed1 = 0;
		}
	} else {
		if (!winclosed1) {
			sWin1.close() ;
		}
		sWin1 = null;
		sWin1 = window.open(targetHTML, "ItemSrch", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + event.screenY + ", left=" + event.screenX) ;
		beforewin1 = targetHTML;
		winclosed1 = 0;
	}

	if (sWin1 != null) {
		sWin1.focus() ;
	}

	return;
}

//**********************************************************************************
// Function		: zipCodeFind()
// Comment		: ¿ìÆí¹øÈ£ °Ë»öÃ¢
// ÇÔ¼ö Ãß°¡		:(ÁÖ)³Ø½ºÆ®¿þ¾î ÀÌ»ó¹Ì
//**********************************************************************************
function zipCodeFind() {
	var w_width = 460 ;
	var w_height = 500 ;
	//var targetHTML = "/web/finance/info/jsp/fnin_acntreal01_pop-up03.jsp" ;
	var targetHTML = "/web/Common/pop/jsp/pop_zipcode.jsp";
	openWindow(targetHTML, w_width, w_height, "yes", "no", "zipCodeFind") ;
}

//**********************************************************************************
// Function		: clickItemSrch2(gubun)
// Comment		: Á¾¸ñ°Ë»öÆË¾÷..(Á¾¸ñ°Ë»ö¾î°¡ ¾ø´Â °æ¿ì)
// para gubun	: Á¶È¸ºÐ¾ß
// ÇÔ¼ö Ãß°¡		:(ÁÖ)³Ø½ºÆ®¿þ¾î ÀÌ»ó¹Ì
//**********************************************************************************
function clickItemSrch2(gubun) {
	var w_width = 310 ;
	var w_height = 420 ;
	var targetHTML = "/web/trading/power/jsp/trpw_st_code_popup.jsp?gubun=" + gubun ;
	openWindow(targetHTML, w_width, w_height, "no", "no", "FindJongMok") ;
}

function clickItemSrch0(gubun) {
	var w_width = 310 ;
	var w_height = 420 ;
	var targetHTML = "/web/trading/power/jsp/trpw_st_code_popup.jsp?gubun=" + gubun ;
	var w_openWindow2 = openWindow2(targetHTML, w_width, w_height, "no", "no", "FindJongMok") ;
	if (w_openWindow2 != null) {
		w_openWindow2.focus() ;
	}
}

//**********************************************************************************
// Function		: clickItemSrch4(gubun, keyword)
// Comment		: Á¾¸ñ°Ë»öÆË¾÷..(Á¾¸ñ°Ë»ö¾î°¡ ÀÖ´Â °æ¿ì)
// para gubun	: Á¶È¸ºÐ¾ß
// para keyword	: °Ë»öµÉ ´Ü¾î
// ÇÔ¼ö Ãß°¡		:(ÁÖ)³Ø½ºÆ®¿þ¾î ÀÌ»ó¹Ì
//**********************************************************************************
function clickItemSrch4(gubun, keyword) {
	var w_width = 310 ;
	var w_height = 420 ;
	var targetHTML = "/web/trading/power/jsp/trpw_st_code_popup.jsp" + "?gubun=" + gubun + "&findKeyword=" + keyword ;
	openWindow(targetHTML, w_width, w_height, "no", "no", "FindJongMok") ;
}

//**********************************************************************************
// Function : openWindow(uri,w,h,sc,rs, windowname)
// Comment	: ÆäÀÌÁö URL
// para uri : È­¸éÀÌ¸§
// para w	: ³ÐÀÌ
// para h	: ³ôÀÌ
// para sc	: Ã¢ ½ºÅ©·Ñ¿©ºÎ(no or yes)
// para rs	: resize¿©ºÎ(no or yes)
// para		: windowname Ã¢ÀÌ¸§
// ÇÔ¼ö Ãß°¡		:(ÁÖ)³Ø½ºÆ®¿þ¾î ÀÌ»ó¹Ì
//**********************************************************************************
function openWindow(uri, w, h, sc, rs, windowname) {
	var wct = (screen.width - w) / 2;
	var hct = (screen.height - h) / 2;
	window.open(uri, windowname, ('scrollbars=' + sc + ',resizable=' + rs + ', width=' + w + ',height=' + h + ',top=' + hct + ',left=' + wct)) ;
}

function openWindow2(uri, w, h, sc, rs, windowname) {
	var wct = (screen.width - w + 570) / 2;
	var hct = (screen.height - h) / 2;
	window.open(uri, windowname, ('scrollbars=' + sc + ',resizable=' + rs + ', width=' + w + ',height=' + h + ',top=' + hct + ',left=' + wct)) ;
}

function clickItemSrch3() {
	var w_width = 500 ;
	var w_height = 575 ;

	if (navigator.appName == "Netscape") {
		w_width = 506;
		w_height = 571;
	}

	var targetHTML = "/web/trading/power/jsp/trpw_st_fav_popup.jsp" ;

	var xpos = ( screen.width - ( w_width + 9 ) ) / 1.2 ;
	var ypos = ( screen.height - (w_height + 55) ) / 2 ;


	if (beforewin11 == null) {
		sWin11 = window.open(targetHTML, "ItemSrch2", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + event.screenY + ", left=" + event.screenX) ;
		beforewin11 = targetHTML;
		winclosed11 = 0;
	} else if (beforewin11 == targetHTML) {
		if (winclosed11) {
			sWin11 = null;
			sWin11 = window.open(targetHTML, "ItemSrch2", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + event.screenY + ", left=" + event.screenX) ;
			beforewin11 = targetHTML;
			winclosed11 = 0;
		}
	} else {
		if (!winclosed11) {
			sWin11.close() ;
		}
		sWin11 = null;
		sWin11 = window.open(targetHTML, "ItemSrch2", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + event.screenY + ", left=" + event.screenX) ;
		beforewin11 = targetHTML;
		winclosed11 = 0;
	}

	if (sWin11 != null) {
		sWin11.focus() ;
	}

	return;
}

function clickFuOptSrch(str) {
	var w_width = 283 ;
	var w_height = 312 ;

	if (navigator.appName == "Netscape") {
		w_width = 295;
		w_height = 250;
	}

	// ¿É¼ÇÀÇ Á¾¸ñÃ¢À» ³ªÅ¸³»±â À§ÇØ Ãß°¡
	if ((str != null) && (str.length > 0)) {
		var targetHTML = "/web/trading/power/jsp/trpw_fu_code_popup.jsp"
	} else {
		var targetHTML = "/web/trading/power/jsp/trpw_fu_code_popup.jsp" ;
	}

	var xpos = ( screen.width - ( w_width + 9 ) ) / 1.2 ;
	var ypos = ( screen.height - (w_height + 55) ) / 2 ;

	if (beforewin2 == null) {
		sWin2 = window.open(targetHTML, "FuOptSrch", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + event.screenY + ", left=" + event.screenX) ;
		beforewin2 = targetHTML;
		winclosed2 = 0;
	} else if (beforewin2 == targetHTML) {
		if (winclosed2) {
			sWin2 = null;
			sWin2 = window.open(targetHTML, "FuOptSrch", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + event.screenY + ", left=" + event.screenX) ;
			beforewin2 = targetHTML;
			winclosed2 = 0;
		}
	} else {
		if (!winclosed2) {
			sWin2.close() ;
		}
		sWin2 = null;
		sWin2 = window.open(targetHTML, "FuOptSrch", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + event.screenY + ", left=" + event.screenX) ;
		beforewin2 = targetHTML;
		winclosed2 = 0;
	}

	if (sWin2 != null) {
		sWin2.focus() ;
	}

	return;
}

function clickFuOptSrch2() {
	var w_width = 283 ;
	var w_height = 312 ;

	if (navigator.appName == "Netscape") {
		w_width = 295;
		w_height = 250;
	}

	var targetHTML = "/Korean/Wts/Include/SearchOpt_s01.jsp?isDblPopUp=Y" ;

	var xpos = ( screen.width - ( w_width + 9 ) ) / 1.2 ;
	var ypos = ( screen.height - (w_height + 55) ) / 2 ;

	if (beforewin12 == null) {
		sWin12 = window.open(targetHTML, "FuOptSrch2", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + event.screenY + ", left=" + event.screenX) ;
		beforewin12 = targetHTML;
		winclosed12 = 0;
	} else if (beforewin12 == targetHTML) {
		if (winclosed12) {
			sWin12 = null;
			sWin12 = window.open(targetHTML, "FuOptSrch2", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + event.screenY + ", left=" + event.screenX) ;
			beforewin12 = targetHTML;
			winclosed12 = 0;
		}
	} else {
		if (!winclosed12) {
			sWin12.close() ;
		}
		sWin12 = null;
		sWin12 = window.open(targetHTML, "FuOptSrch2", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + event.screenY + ", left=" + event.screenX) ;
		beforewin12 = targetHTML;
		winclosed12 = 0;
	}

	if (sWin12 != null) {
		sWin12.focus() ;
	}

	return;
}

function clickActPrice(strCode) {
	var targetHTML = "/Korean/Wts/Stocks/OrdCcld/jsp/STOCActPrcSrch_s01.jsp?txtItmCd=" + strCode ;

	var w_width = 300 ;
	var w_height = 590 ;

	var xpos = ( screen.width - w_width ) / 2 ;
	var ypos = ( screen.height - w_height ) / 3 ;

	if (beforewin3 == null) {
		sWin3 = window.open(targetHTML, "ActPrice", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin3 = targetHTML;
		winclosed3 = 0;
	} else if (beforewin3 == targetHTML) {
		if (winclosed3) {
			sWin3 = null;
			sWin3 = window.open(targetHTML, "ActPrice", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
			beforewin3 = targetHTML;
			winclosed3 = 0;
		}
	} else {
		if (!winclosed3) {
			sWin3.close() ;
		}

		sWin3 = null;
		sWin3 = window.open(targetHTML, "ActPrice", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin3 = targetHTML;
		winclosed3 = 0;
	}

	if (sWin3 != null) {
		sWin3.focus() ;
	}

	return;
}

function clickRsvActPrice(strCode) {

	var w_width = 300 ;
	var w_height = 450 ;
	var targetHTML = "/Korean/Wts/Stocks/OrdCcld/jsp/STOCRsvActPrc_s01.jsp?txtItmCd=" + strCode ;

	var xpos = ( screen.width - w_width ) / 2 ;
	var ypos = ( screen.height - w_height ) / 2 ;

	if (beforewin4 == null) {
		sWin4 = window.open(targetHTML, "RsvActPrice", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin4 = targetHTML;
		winclosed4 = 0;
	}
	else if (beforewin4 == targetHTML) {
		if (winclosed4) {
			sWin4 = null;
			sWin4 = window.open(targetHTML, "RsvActPrice", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
			beforewin4 = targetHTML;
			winclosed4 = 0;
		}
	} else {
		if (!winclosed4) {
			sWin4.close() ;
		}

		sWin4 = null;
		sWin4 = window.open(targetHTML, "RsvActPrice", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin4 = targetHTML;
		winclosed4 = 0;
	}

	if (sWin4 != null) {
		sWin4.focus() ;
	}
	return;

}

function clickThirdPrice(strCode) {
	var w_width = 640 ;
	var w_height = 430 ;
	var targetHTML = "/Korean/Wts/Stocks/ItmCurt/jsp/STICTMkDtlQtt_s01.jsp?txtItmCd=" + strCode + "&isPopUp=Y" ;

	var xpos = ( screen.width - w_width ) / 2 ;
	var ypos = ( screen.height - w_height ) / 2 ;

	if (beforewin5 == null) {
		sWin5 = window.open(targetHTML, "ThirdPrice", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin5 = targetHTML;
		winclosed5 = 0;
	} else if (beforewin5 == targetHTML) {
		if (winclosed5) {
			sWin5 = null;
			sWin5 = window.open(targetHTML, "ThirdPrice", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
			beforewin5 = targetHTML;
			winclosed5 = 0;
		}
	} else {
		if (!winclosed5) {
			sWin5.close() ;
		}
		sWin5 = null;
		sWin5 = window.open(targetHTML, "ThirdPrice", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin5 = targetHTML;
		winclosed5 = 0;
	}

	if (sWin5 != null) {
		sWin5.focus() ;
	}

	return;
}

function clickNewsInfo(strCode) {
	var w_width = 640 ;
	var w_height = 400 ;
	var targetHTML = "/Korean/Wts/Stocks/MkEnvDiscl/jsp/STMEMkQckNews_s02.jsp?txtData=" + strCode + "&isPopUp=Y" ;

	var xpos = ( screen.width - w_width ) / 2 ;
	var ypos = ( screen.height - w_height ) / 2 ;

	if (beforewin6 == null) {// start
		sWin6 = window.open(targetHTML, "NewsInfo", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin6 = targetHTML;
		winclosed6 = 0;
	} else if (beforewin6 == targetHTML) {
		if (winclosed6) {
			sWin6 = null;
			sWin6 = window.open(targetHTML, "NewsInfo", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
			beforewin6 = targetHTML;
			winclosed6 = 0;
		}
	} else {
		if (!winclosed6) {
			sWin6.close() ;
		}
		sWin6 = null;
		sWin6 = window.open(targetHTML, "NewsInfo", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin6 = targetHTML;
		winclosed6 = 0;
	}

	if (sWin6 != null) {
		sWin6.focus() ;
	}
	return;
}

function clickFopInfo(strCode) {
	var w_width = 640 ;
	var w_height = 400 ;
	var targetHTML = "/Korean/Wts/Stocks/MkEnvDiscl/jsp/STMEFoFnInf_s02.jsp?txtData=" + strCode + "&isPopUp=Y" ;

	var xpos = ( screen.width - w_width ) / 2 ;
	var ypos = ( screen.height - w_height ) / 2 ;

	if (beforewin7 == null) {
		sWin7 = window.open(targetHTML, "FopInfo", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin7 = targetHTML;
		winclosed7 = 0;
	} else if (beforewin7 == targetHTML) {
		if (winclosed7) {
			sWin7 = null;
			sWin7 = window.open(targetHTML, "FopInfo", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
			beforewin7 = targetHTML;
			winclosed7 = 0;
		}
	} else {
		if (!winclosed7) {
			sWin7.close() ;
		}
		sWin7 = null;
		sWin7 = window.open(targetHTML, "FopInfo", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin7 = targetHTML;
		winclosed7 = 0;
	}

	if (sWin7 != null) {
		sWin7.focus() ;
	}
	return;
}

function OpenPopupWindow(targetHTML) {
	var w_width = 640 ;
	var w_height = 500 ;

	var xpos = ( screen.width - w_width ) / 2 ;
	var ypos = ( screen.height - w_height ) / 2 ;

	if (beforewin8 == null) {
		sWin8 = window.open(targetHTML, "popup", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin8 = targetHTML;
		winclosed8 = 0;
	} else if (beforewin8 == targetHTML) {
		if (winclosed8) {
			sWin8 = null;
			sWin8 = window.open(targetHTML, "popup", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
			beforewin8 = targetHTML;
			winclosed8 = 0;
		}
	} else {
		if (!winclosed8) {
			sWin8.close() ;
		}
		sWin8 = null;
		sWin8 = window.open(targetHTML, "popup", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin8 = targetHTML;
		winclosed8 = 0;
	}

	if (sWin8 != null) {
		sWin8.focus() ;
	}

	return;
}

function OpenPopupWindow02(targetHTML) {

	var w_width = 640 ;
	var w_height = 500 ;

	var xpos = ( screen.width - w_width ) / 2 ;
	var ypos = ( screen.height - w_height ) / 2 ;

	if (beforewin8 == null) {
		sWin8 = window.open(targetHTML, "popup", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=yes,location=no,resizable=yes,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin8 = targetHTML;
		winclosed8 = 0;
	} else if (beforewin8 == targetHTML) {
		if (winclosed8) {
			sWin8 = null;
			sWin8 = window.open(targetHTML, "popup", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=yes,location=no,resizable=yes,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
			beforewin8 = targetHTML;
			winclosed8 = 0;
		}
	} else {
		if (!winclosed8) {
			sWin8.close() ;
		}
		sWin8 = null;
		sWin8 = window.open(targetHTML, "popup", "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=yes,location=no,resizable=yes,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin8 = targetHTML;
		winclosed8 = 0;
	}

	if (sWin8 != null) {
		sWin8.focus() ;
	}

	return;
}

function OpenPopupWindowSize(targetHTML, strName, strWidth, strHeight) {

	var w_name = strName ;
	var w_width = strWidth ;
	var w_height = strHeight ;

	if ((w_name == null) || (w_name.length == 0)) {
		w_name = "popup14";
	}

	if ((w_width == null) || (w_width.length == 0) || (w_width == 0)) {
		w_width = 640;
	}

	if ((w_height == null) || (w_height.length == 0) || (w_height == 0)) {
		w_height = 500;
	}

	var xpos = ( screen.width - w_width ) / 2 ;
	var ypos = ( screen.height - w_height ) / 2 ;

	if (beforewin14 == null) {
		sWin14 = window.open(targetHTML, w_name, "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=auto,location=no,resizable=yes,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin14 = targetHTML;
		winclosed14 = 0;
	} else if (beforewin14 == targetHTML) {
		if (winclosed14) {
			sWin14 = null;
			sWin14 = window.open(targetHTML, w_name, "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=auto,location=no,resizable=yes,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
			beforewin14 = targetHTML;
			winclosed14 = 0;
		}
	} else {
		if (!winclosed14) {
			sWin14.close() ;
		}
		sWin14 = null;
		sWin14 = window.open(targetHTML, w_name, "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=auto,location=no,resizable=yes,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin14 = targetHTML;
		winclosed14 = 0;
	}

	if (sWin14 != null) {
		sWin14.focus() ;
	}

	return;
}

function OpenPopupWindowScroll(targetHTML, strName, strWidth, strHeight) {

	var w_name = strName ;
	var w_width = strWidth ;
	var w_height = strHeight ;

	if ((w_name == null) || (w_name.length == 0)) {
		w_name = "popup14";
	}

	if ((w_width == null) || (w_width.length == 0) || (w_width == 0)) {
		w_width = 640;
	}

	if ((w_height == null) || (w_height.length == 0) || (w_height == 0)) {
		w_height = 500;
	}

	var xpos = ( screen.width - w_width ) / 2 ;
	var ypos = ( screen.height - w_height ) / 2 ;

	if (beforewin15 == null) {
		sWin15 = window.open(targetHTML, w_name, "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=yes,location=no,resizable=yes,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin15 = targetHTML;
		winclosed15 = 0;
	} else if (beforewin15 == targetHTML) {
		if (winclosed15) {
			sWin15 = null;
			sWin15 = window.open(targetHTML, w_name, "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=yes,location=no,resizable=yes,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
			beforewin15 = targetHTML;
			winclosed15 = 0;
		}
	} else {
		if (!winclosed15) {
			sWin15.close() ;
		}
		sWin15 = null;
		sWin15 = window.open(targetHTML, w_name, "toolbar=no,status=no,width=" + w_width + ",height=" + w_height + ",directories=no,scrollbars=yes,location=no,resizable=yes,border=0,menubar=no, top=" + ypos + ", left=" + xpos) ;
		beforewin15 = targetHTML;
		winclosed15 = 0;
	}

	if (sWin15 != null) {
		sWin15.focus() ;
	}

	return;
}

function OpenAppletWindow(targetHTML) {
	var w_width = 800 ;
	var w_height = 600 ;

	var xpos = ( screen.width - w_width ) / 2 ;
	var ypos = ( screen.height - w_height ) / 2 ;

	if (beforewin9 == null) {
		sWin9 = window.open(targetHTML, 'Applet', 'toolbar=no,status=no,top=' + ypos + ',left=' + xpos + ',width=' + w_width + ',height=' + w_height + ',directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no') ;
		beforewin9 = targetHTML;
		winclosed9 = 0;
	}
	else if (beforewin9 == targetHTML) {
		if (winclosed9) {
			sWin9 = null;
			sWin9 = window.open(targetHTML, 'Applet', 'toolbar=no,status=no,top=' + ypos + ',left=' + xpos + ',width=' + w_width + ',height=' + w_height + ',directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no') ;
			beforewin9 = targetHTML;
			winclosed9 = 0;
		}
	} else {
		if (!winclosed9) {
			sWin9.close() ;
		}
		sWin9 = null;
		sWin9 = window.open(targetHTML, 'Applet', 'toolbar=no,status=no,top=' + ypos + ',left=' + xpos + ',width=' + w_width + ',height=' + w_height + ',directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no') ;
		beforewin9 = targetHTML;
		winclosed9 = 0;
	}

	if (sWin9 != null) {
		sWin9.focus() ;
	}

	return;
}

function OpenGraphWindow(targetHTML) {

	var w_width = 751 ;
	var w_height = 551 ;

	var xpos = ( screen.width - w_width ) / 2 ;
	var ypos = ( screen.height - w_height ) / 2 ;

	if (beforewin10 == null) {
		sWin10 = window.open(targetHTML, 'Graph', 'toolbar=no,status=no,top=' + ypos + ',left=' + xpos + ',width=' + w_width + ',height=' + w_height + ',directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no') ;
		beforewin10 = targetHTML;
		winclosed10 = 0;
	} else if (beforewin10 == targetHTML) {
		if (winclosed10) {
			sWin10 = null;
			sWin10 = window.open(targetHTML, 'Graph', 'toolbar=no,status=no,top=' + ypos + ',left=' + xpos + ',width=' + w_width + ',height=' + w_height + ',directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no') ;
			beforewin10 = targetHTML;
			winclosed10 = 0;
		}
	} else {
		if (!winclosed10) {
			sWin10.close() ;
		}
		sWin10 = null;
		sWin10 = window.open(targetHTML, 'Graph', 'toolbar=no,status=no,top=' + ypos + ',left=' + xpos + ',width=' + w_width + ',height=' + w_height + ',directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no') ;
		beforewin10 = targetHTML;
		winclosed10 = 0;
	}

	if (sWin10 != null) {
		sWin10.focus() ;
	}

	return;
}

function clickItem13() {

	var w_width = 260 ;
	var w_height = 245 ;

	if (navigator.appName == "Netscape") {
		w_width = 280;
		w_height = 220;
	}

	var targetHTML = "/Korean/Wts/Include/SearchBnfsItem_s01.jsp?isDblPopUp=Y" ;

	var xpos = event.screenX ;
	var ypos = event.screenY ;

	if (beforewin13 == null) {
		sWin13 = window.open(targetHTML, 'ItemSrch2', 'toolbar=no,status=no,top=' + ypos + ',left=' + xpos + ',width=' + w_width + ',height=' + w_height + ',directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no') ;
		beforewin13 = targetHTML;
		winclosed13 = 0;
	} else if (beforewin13 == targetHTML) {
		if (winclosed13) {
			sWin13 = null;
			sWin13 = window.open(targetHTML, 'ItemSrch2', 'toolbar=no,status=no,top=' + ypos + ',left=' + xpos + ',width=' + w_width + ',height=' + w_height + ',directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no') ;
			beforewin13 = targetHTML;
			winclosed13 = 0;
		}
	} else {
		if (!winclosed13) {
			sWin13.close() ;
		}
		sWin13 = null;
		sWin13 = window.open(targetHTML, 'ItemSrch2', 'toolbar=no,status=no,top=' + ypos + ',left=' + xpos + ',width=' + w_width + ',height=' + w_height + ',directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no') ;
		beforewin13 = targetHTML;
		winclosed13 = 0;
	}

	if (sWin13 != null) {
		sWin13.focus() ;
	}

	return;
}

function clickFOPrcSrch() {

	if (Trim(document.forms[0].txtItmCd.value).length != 0) {
		if (!isFuOpt(Trim(document.forms[0].txtItmCd.value))) {
			alert(" Á¾¸ñÄÚµå¸¦ ¿Ã¹Ù¸£°Ô ÀÔ·ÂÇÏ¿© ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù. \n\n ¿¹) ¼±¹° : 5ÀÚ¸® , ¿É¼Ç : 8ÀÚ¸®") ;
			document.forms[0].txtItmCd.focus() ;
			document.forms[0].txtItmCd.select() ;
			return false;
		}
	}

	var w_width = 340 ;
	var w_height = 550 ;

	if (navigator.appName == 'Netscape') {
		w_height = 620;
	}

	var targetHTML = "/Korean/Wts/FuOpt/OrdCcld/jsp/FOOCActPrcSrch_s01.jsp?txtItmCd=" + Trim(document.forms[0].txtItmCd.value) ;

	var xpos = ( screen.width - w_width ) / 2 ;
	var ypos = ( screen.height - w_height ) / 2 ;

	if (beforewinPrc == null) {
		sWin1 = window.open(targetHTML, 'FuOptPrcSrch', 'toolbar=no,status=no,top=' + ypos + ',left=' + xpos + ',width=' + w_width + ',height=' + w_height + ',directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no') ;
		beforewinPrc = targetHTML;
		winclosedPrc = 0;
	} else if (beforewinPrc == targetHTML) {
		if (winclosedPrc) {
			sWinPrc = null;
			sWinPrc = window.open(targetHTML, 'FuOptPrcSrch', 'toolbar=no,status=no,top=' + ypos + ',left=' + xpos + ',width=' + w_width + ',height=' + w_height + ',directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no') ;
			beforewinPrc = targetHTML;
			winclosedPrc = 0;
		}
	} else {
		if (!winclosedPrc) {
			sWinPrc.close() ;
		}
		sWinPrc = null;
		sWinPrc = window.open(targetHTML, 'FuOptPrcSrch', 'toolbar=no,status=no,top=' + ypos + ',left=' + xpos + ',width=' + w_width + ',height=' + w_height + ',directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no') ;
		beforewinPrc = targetHTML;
		winclosedPrc = 0;
	}

	if (sWinPrc != null) {
		sWinPrc.focus() ;
	}
	return;
}

function closeWindow1() {
	winclosed1 = 1;
	return;
}

function closeWindow11() {
	winclosed11 = 1;
	return;
}

function closeWindow2() {
	winclosed2 = 1;
	return;
}

function closeWindow12() {
	winclosed12 = 1;
	return;
}

function closeWindow3() {
	winclosed3 = 1;
	return;
}

function closeWindow4() {
	winclosed4 = 1;
	return;
}

function closeWindow5() {
	winclosed5 = 1;
	return;
}

function closeWindow6() {
	winclosed6 = 1;
	return;
}

function closeWindow7() {
	winclosed7 = 1;
	return;
}

function closeWindow8() {
	winclosed8 = 1;
	return;
}

function closeWindow9() {
	winclosed9 = 1;
	return;
}

function closeWindow10() {
	winclosed10 = 1;
	return;
}

function closeWindow13() {
	winclosed13 = 1;
	return;
}

function closeWindow14() {
	winclosed14 = 1;
	return;
}

function closeWindow15() {
	winclosed15 = 1;
	return;
}

function closeWindowPrc() {
	winclosedPrc = 1;
	return;
}

// ÆÄ¶ó¹ÌÅÍ¿¡ ÀÇÇØ À©µµ¿ì Open
function openWindow01(strURL, strName, strFearture) {
	if ((strURL == null) || (strURL.length == 0) || (strURL == "")) {
		doNothing() ;
	} else {
		var lo_openWindow01 = null ;
		lo_openWindow01 = window.open(strURL, strName, strFearture) ;
		if (lo_openWindow01 != null) {
			lo_openWindow01.focus() ;
		}
	}
}

// ÆÄ¶ó¹ÌÅÍ¿¡ ÀÇÇØ À©µµ¿ì Open
function openWindow02(strURL, strName, strFearture, blnReplace) {
	if ((strURL == null) || (strURL.length == 0) || (strURL == "")) {
		doNothing() ;
	} else {
		var lo_openWindow02 = null ;
		lo_openWindow02 = window.open(strURL, strName, strFearture, blnReplace) ;
		if (lo_openWindow02 != null) {
			lo_openWindow02.focus() ;
		}
	}
}

// ¾Æ¹« ¿É¼Ç¾øÀÌ À©µµ¿ì¸¦ ÃÖ´ëÈ­ ½ÃÅ°¸ç Open
function openWindow_Max01(strURL, strName) {
	if ((strURL == null) || (strURL.length == 0) || (strURL == "")) {
		doNothing() ;
	} else {
		var lo_openWindow_max01 = null ;
		lo_openWindow_max01 = window.open(strURL, strName, "width=" + screen.width + ",height=" + screen.height) ;
		if (lo_openWindow_max01 != null) {
			lo_openWindow_max01.focus() ;
		}
	}
}

// ¿É¼Ç¿¡ µû¶ó À©µµ¿ì¸¦ Center¿¡ Open
function openWindow_Center01(strURL, strName, strFearture, strWidth, strHeight)
{
	if ((strURL == null) || (strURL.length == 0) || (strURL == ""))
	{
		doNothing() ;
	}
	else
	{
		var lo_openWindow_center01 = null ;

		if ((strWidth == null) || (strWidth.length == 0) || (strWidth == "") || (parseInt(strWidth, 10) == 0))
		{
			strWidth = 640;
		}

		if ((strHeight == null) || (strHeight.length == 0) || (strHeight == "") || (parseInt(strHeight, 10) == 0))
		{
			strHeight = 500;
		}

		var xpos = ( screen.width - strWidth ) / 2 ;
		var ypos = ( screen.height - strHeight ) / 2 ;

		if ((strFearture == null) || (strFearture.length == 0) || (strFearture == ""))
		{
			strFearture = "";
		}
		else
		{
			strFearture = strFearture + ",width=" + strWidth + ",height=" + strHeight + ",top=" + ypos + ",left=" + xpos;
		}
		lo_openWindow_center01 = window.open(strURL, strName, strFearture) ;
		if (lo_openWindow_center01 != null)
		{
			lo_openWindow_center01.focus() ;
		}
	}
}

function openModalDialog01(width, height, url, opt) {
	if ((url == null) || (url.length < 1) || (url == " ")) {
		doNothing() ;
	} else {
		if ((width == null) || (width.length < 1) || (width == " ")) {
			width = "dialogWidth:300px;";
		} else {
			width = "dialogWidth:" + width + ";";
		}

		if ((height == null) || (height.length < 1) || (height == " ")) {
			height = ";dialogHeight:500px;";
		} else {
			height = ";dialogHeight:" + height + ";";
		}

		if ((opt == null) || (opt.length < 1) || (opt == " ")) {
			opt = "scroll:no; status:no; titlebar:no; center:yes; help:no;";
		}

		opt = width + height + opt;
		return window.showModalDialog(url, "", opt) ;
	}
}

function openModelessDialog01(width, height, url, opt) {
	if ((url == null) || (url.length < 1) || (url == " ")) {
		doNothing() ;
	} else {
		if ((width == null) || (width.length < 1) || (width == " ")) {
			width = "dialogWidth:300px;";
		} else {
			width = "dialogWidth:" + width + ";";
		}

		if ((height == null) || (height.length < 1) || (height == " ")) {
			height = ";dialogHeight:500px;";
		} else {
			height = ";dialogHeight:" + height + ";";
		}

		if ((opt == null) || (opt.length < 1) || (opt == " ")) {
			opt = "scroll:no; status:no; titlebar:no; center:yes; help:no;";
		}
		opt = width + height + opt;
		return window.showModelessDialog(url, "", opt) ;
	}
}

// ÆË¾÷À©µµ¿ì°´Ã¼
var pProgressWin01 = null ;

//	½ÇÇàÁßÀÎ ºê¶ó¿ìÀúÀÇ °¡¿îµ¥¿¡ 'Ã³¸®Áß' ¸Þ¼¼Áö¸¦ ÆË¾÷À©µµ¿ì°´Ã¼·Î ¶ç¿î´Ù.
function openProgress01() {
	var width = 320 ;
	var height = 60 ;
	var w_width, w_height ;
	if (navigator.appName == "Netscape")
	{
		w_width = window.innerWidth ;
		w_height = window.innerHeight ;
	}
	else
	{
		w_width = document.body.clientWidth ;
		w_height = document.body.clientHeight ;
	}
//alert("document.body.clientWidth = [" + document.body.clientWidth + "]") ;
//alert("document.body.clientHeight = [" + document.body.clientHeight + "]") ;
//alert("screen.availWidth = [" + screen.availWidth + "]") ;
//alert("screen.availHeight = [" + screen.availHeight + "]") ;
//alert("event.screenX = [" + event.screenX + "]") ;
//alert("event.screenY = [" + event.screenY + "]") ;
	var xpos = (w_width - width) / 2 ;
	var ypos = (w_height - height) / 2 ;
	pProgressWin01 = window.createPopup() ;
	pProgressWin01.document.body.innerHTML = "" +
	                                         "<div style=\"position:absolute;width:100%;height:100%;border:1px solid black;font:normal 10pt ±¼¸²;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#CCCCCC, EndColorStr=#FFFFFF);padding:10px;\" align=\"center\">" +
	                                         "	Ã³¸® ÁßÀÔ´Ï´Ù.<br>Àá½Ã¸¸ ±â´Ù·Á ÁÖ¼¼¿ä.<br>" +
	                                         "	<img src=\"http://image.youfirst.co.kr/image/common/img_progerss_03.gif\" border=\"0\">" +
	                                         "</div>";
	pProgressWin01.show(xpos, ypos, width, height, document.body) ;
}

function closeProgress01()
{
	if (pProgressWin01 != null)
	{
		pProgressWin01.hide() ;
		pProgressWin01 = null ;
	}
}

function isEmpty(strVal)
{
	try
	{
		strVal = new String(strVal) ;
		if (Trim(strVal) == '') return true ;
		return false ;
	}
	catch(e)
	{
		alert("/web/js/Common.js isEmpty(strVal) Exception = [" + e + "]") ;
		return false ;
	}
}

function Trim(strVal){
	return trim(strVal) ;
}

function LTrim(strVal)
{
	try
	{
		strVal = new String(strVal) ;
		var i ;
		i = 0 ;
		while (strVal.substring(i, i + 1) == ' ')  i = i + 1 ;
		return strVal.substring(i) ;
	}
	catch(e)
	{
		alert("/web/js/Common.js LTrim(strVal) Exception = [" + e + "]") ;
		return "" ;
	}
}

function RTrim(strVal)
{
	try
	{
		strVal = new String(strVal) ;
		var b ;
		var i = strVal.length - 1 ;
		while (i >= 0 && strVal.substring(i, i + 1) == ' ') i = i - 1 ;
		return strVal.substring(0, i + 1) ;
	}
	catch(e)
	{
		alert("/web/js/Common.js RTrim(strVal) Exception = [" + e + "]") ;
		return "" ;
	}
}

// °ªÀÌ ¼ýÀÚÀÎÁö Ã¼Å©
function isNumber(strVal)
{
	try
	{
		if ( (strVal != null) && (strVal.length != 0) )
		{
			return !(isNaN(strVal)) ;
		}
		else
		{
			return false ;
		}
	}
	catch(e)
	{
		alert("/web/js/Common.js isNumber(strVal) Exception = [" + e + "]") ;
		return false ;
	}
}

function trimZero(strVal)
{
	if (strVal.charAt(0) == '0')
	{
		return strVal.substring(1, strVal.length) ;
	}
	else
	{
		return strVal ;
	}
}

function isDate(argYYYYMMDD) {
	var sDate = Trim(argYYYYMMDD).replace(/(\,|\.|\-|\/)/g, "") ;
	var aDaysInMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) ;

	if ((argYYYYMMDD == null) || (Trim(argYYYYMMDD).length == 0) || (argYYYYMMDD.length < 8)) {
		return false;
	} else if (sDate.length != 8) {
		return false;
	} else if (!isNumber(sDate.substr(0, 4)) || !isNumber(sDate.substr(4, 2)) || !isNumber(sDate.substr(6, 2))) {
		return false;
	} else {
		iYear = eval(sDate.substr(0, 4)) ;
		iMonth = eval(sDate.substr(4, 2)) ;
		iDay = eval(sDate.substr(6, 2)) ;

		var iDaysInMonth = (iMonth != 2) ? aDaysInMonth[iMonth - 1] : ((iYear % 4 == 0 && iYear % 100 != 0 || iYear % 400 == 0) ? 29 : 28) ;

		if ((iDay != null && iMonth != null && iYear != null && iMonth < 13 && iMonth > 0 && iDay > 0 && iDay <= iDaysInMonth) == false) {
			return false;
		} else {
			return true;
		}
	}
}

function isYYYYMMDD(argYYYYMMDD, argGubun) {
	var sDate = (argYYYYMMDD != null) && (argYYYYMMDD.length != 0) ? Trim(argYYYYMMDD) : "" ;
	var aDaysInMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) ;

	if ((argYYYYMMDD == null) || (argYYYYMMDD.length == 0) || (argYYYYMMDD.length < 8)) {
		return false;
	} else {
		if ((argGubun == null) || (argGubun.length == 0)) {
			sDate = argYYYYMMDD;
		} else {
			if ((argGubun.length == 1)) {
				sDate = argYYYYMMDD.replace(/(\+argGubun+\/)/g, "") ;
			} else {
				sDate = argYYYYMMDD;
			}
		}

		if (sDate.length != 8) {
			return false;
		} else if (!isNumber(sDate.substr(0, 4)) || !isNumber(sDate.substr(4, 2)) || !isNumber(sDate.substr(6, 2))) {
			return false;
		} else {
			iYear = eval(sDate.substr(0, 4)) ;
			iMonth = eval(sDate.substr(4, 2)) ;
			iDay = eval(sDate.substr(6, 2)) ;

			var iDaysInMonth = (iMonth != 2) ? aDaysInMonth[iMonth - 1] : ((iYear % 4 == 0 && iYear % 100 != 0 || iYear % 400 == 0) ? 29 : 28) ;

			if ((iDay != null && iMonth != null && iYear != null && iMonth < 13 && iMonth > 0 && iDay > 0 && iDay <= iDaysInMonth) == false) {
				return false;
			} else {
				return true;
			}
		}
	}
}

// ½Ã°£ÀÎÁö È®ÀÎ
function isHHMM(argHHMM) {
	if (!isNumber(argHHMM)) {
		return false;
	} else if (argHHMM.length != 4) {
		return false;
	} else {
		var hh = parseInt(trimZero(argHHMM.substring(0, 2))) ;
		var mm = parseInt(trimZero(argHHMM.substring(2, 4))) ;

		if ((hh < 0) || (hh > 23)) {
			return false;
		} else if ((mm < 0) || (mm > 59)) {
			return false;
		} else {
			return true;
		}
	}
}

function isAlpha(val) {
	var comp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ;

	var len = val.length ;
	for (i = 0; i < len; i++) {
		if (comp.indexOf(val.substring(i, i + 1).toUpperCase()) < 0) {
			return false;
		}
	}
	return true;
}

function isAlphaNumeric(val) {
	var comp = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" ;

	var len = val.length ;
	for (i = 0; i < len; i++) {
		if (comp.indexOf(val.substring(i, i + 1).toUpperCase()) < 0) {
			return false;
		}
	}
	return true;
}

function isRegNo(reg) {
	reg = Trim(reg) ;
	if (reg.length != 13 || !isNumber(reg)) {
		return false;
	}

	hap = 0;
	for (i = 0; i < 8; i++) {
		hap = hap + (i + 2) * reg.substring(i, i + 1) ;
	}

	for (i = 8; i < 12; i++) {
		hap = hap + (i - 6) * reg.substring(i, i + 1) ;
	}
	hap = hap % 11;
	hap = 11 - hap;
	hap = hap % 10;

	if (hap != reg.substring(12, 13)) {
		return false;
	}
	return true;
}

function sLength(val) {
	var bit = '' ;
	var len = 0 ;
	for (i = 0; i < val.length; i++) {
		bit = val.charAt(i) ;
		if (escape(bit).length > 4) {
			len += 2;
		} else {
			len++;
		}
	}
	return len;
}

function isHstring(val) {
	var bit = '';
	var len = 0 ;
	for (i = 0; i < val.length; i++) {
		bit = val.charAt(i) ;
		if (escape(bit).length <= 4) return false;
	}
	return true;
}

function toNumeric(moneyString) {
	var len = moneyString.length ;
	var temp ;
	var money ;
	var rtn = "" ;

	var delimeter = "," ;

	if (moneyString.length == 0) return "0";
	if (moneyString.length < 3) return moneyString;

	for (var x = len; x > 0; x -= 3) {
		if ((x - 3) <= 0) {
			temp = moneyString.substring(0, x) ;
			delimeter = "";
		} else {
			temp = moneyString.substring(x - 3, x) ;
		}
		money = delimeter + temp;
		rtn = money + rtn;
	}
	return rtn;
}

// IFRAMEÀÇ ³ôÀÌ¸¦ Á¶Àý(_ ´ÙÀ½ÀÌ ´ë»óÀÌ µÇ´Â IFRAMEÀÇ ÀÌ¸§ÀÓ.)
function resizeSubIfrmHeight_iframe() {
	var objFrame = document.all["iframe"] ;
	var objBody = document.frames["iframe"].document.body ;
	try {
		var li_ifrmHeight = parseInt(objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight), 10) ;
		if (li_ifrmHeight > 500) {
			objFrame.height = li_ifrmHeight;
		}
	} catch(e) {
		if (e.description.indexOf("¾×¼¼½º°¡ °ÅºÎµÇ¾ú½À´Ï´Ù.") == 0 || e.description.indexOf("Á¢±ÙÀÌ °ÅºÎµÇ¾ú½À´Ï´Ù.") == 0) {
			objFrame.height = 500;
		}
	}
}

// ¹®ÀÚÀÇ ±æÀÌ¸¦ ±¸ÇÔ(ÇÑ±ÛÀº 2ÀÚ¸® Ã³¸®)
function getLength(strVal)
{
	try
	{
		strVal = new String(strVal) ;
		if ( (strVal == null) || (Trim(strVal).length == 0) )
		{
			return 0 ;
		}
		else
		{
			var li_length = 0 ;
			for (var ti_i = 0; ti_i < strVal.length; ti_i++)
			{
				if ( (strVal.charCodeAt(ti_i)) > 128 )
				{
					li_length += 2 ;
				}
				else
				{
					li_length += 1 ;
				}
			}
			return li_length ;
		}
	}
	catch(e)
	{
		alert("/web/js/Common.js getLength(strVal) Exception = [" + e + "]") ;
		return 0 ;
	}
}

// Select ObjectÀÇ °ªÀ» ¼±ÅÃÇÏ°Ô ÇÔ
function setSelect(argSelObjNm, argValue)
{
	try
	{
		var lo_Collection = document.getElementsByName(argSelObjNm) ;
		if (lo_Collection.length == 1)
		{
			for (var ti_i = 0; ti_i < lo_Collection.item(lo_Collection.length - 1).options; ti_i++)
			{
				if (lo_Collection.item(lo_Collection.length - 1).options[ti_i].value == argValue)
				{
					lo_Collection.item(lo_Collection.length - 1).options[ti_i].selected = true ;
					break ;
				}
			}
		}
		else
		{
			alert("ÇØ´ç ¿ÀºêÁ§Æ®°¡ ¿©·¯°³ ÀÖ½À´Ï´Ù.(setSelect)") ;
		}
	}
	catch(e)
	{
		//alert("setSelect(" + argSelObjNm + "" + argValue + ") Exception = [" + e + "]") ;
	}
}

// °èÁÂ¹øÈ£ Select ObjectÀÇ °ªÀ» ¼±ÅÃÇÏ°Ô ÇÔ
function setAcNoSelectByGubun(argSelObjNm, argGubunType, argValue)
{
	try
	{
		var lo_Object = document.getElementsByName(argSelObjNm).item(argSelObjNm) ;
		var ls_TempValue ;
		if (lo_Object.length < 1)
		{
			//alert("ÇØ´ç ¿ÀºêÁ§Æ®°¡ ¾ø½À´Ï´Ù.(setAcNoSelectByGubun)") ;
		}
		else
		{
			for (var ti_i = 0; ti_i < lo_Object.options.length; ti_i++)
			{
				ls_TempValue = "" ;
				if (parseInt(argGubunType, 10) == 1)
				{	//	°èÁÂ¹øÈ£ Áß ÁöÁ¡¹øÈ£
					ls_TempValue = parseInt(lo_Object.options[ti_i].value.substring(0, 3), 10) ;
				}
				else if (parseInt(argGubunType, 10) == 2)
				{	//	°èÁÂ¹øÈ£ Áß °èÁÂ±¸ºÐ
					ls_TempValue = parseInt(lo_Object.options[ti_i].value.substring(3, 5), 10) ;
				}
				else if (parseInt(argGubunType, 10) == 3)
				{	//	°èÁÂ¹øÈ£ Áß ¸¶Áö¸· ºÎºÐ °ª
					ls_TempValue = parseInt(lo_Object.options[ti_i].value.substring(5), 10) ;
				}

				if (ls_TempValue == parseInt(argValue, 10))
				{
					lo_Object.options[ti_i].selected = true ;
					break ;
				}
			}
		}
	}
	catch(e)
	{
		//alert("setAcNoSelectByGubun(" + argSelObjNm + ", " + argGubunType + ", " + argValue + ") Exception = [" + e + "]") ;
	}
}

// °èÁÂ¹øÈ£ Select ObjectÀÇ °ªÀ» ¼±ÅÃÇÏ°Ô ÇÔ
function setAcNoSelectByGubun_ID(argSelObjID, argGubunType, argValue)
{
	try
	{
		var lo_Object = document.getElementById(argSelObjID) ;
		var ls_TempValue ;
		if (lo_Object)
		{
			for (var ti_i = 0; ti_i < lo_Object.options.length; ti_i++)
			{
				ls_TempValue = "" ;
				if (parseInt(argGubunType, 10) == 1)
				{	//	°èÁÂ¹øÈ£ Áß ÁöÁ¡¹øÈ£
					ls_TempValue = parseInt(lo_Object.options[ti_i].value.substring(0, 3), 10) ;
				}
				else if (parseInt(argGubunType, 10) == 2)
				{	//	°èÁÂ¹øÈ£ Áß °èÁÂ±¸ºÐ
					ls_TempValue = parseInt(lo_Object.options[ti_i].value.substring(3, 5), 10) ;
				}
				else if (parseInt(argGubunType, 10) == 3)
				{	//	°èÁÂ¹øÈ£ Áß ¸¶Áö¸· ºÎºÐ °ª
					ls_TempValue = parseInt(lo_Object.options[ti_i].value.substring(5), 10) ;
				}

				if (ls_TempValue == parseInt(argValue, 10))
				{
					lo_Object.options[ti_i].selected = true ;
					break ;
				}
			}
		}
	}
	catch(e)
	{
		//alert("setAcNoSelectByGubun_ID(" + argSelObjID + ", " + argGubunType + ", " + argValue + ") Exception = [" + e + "]") ;
	}
}

// °ªÀÌ ¼ýÀÚÀÎÁö Ã¼Å©
function isNotNumber(strVal)
{
	try
	{
		if ( (strVal != null) && (strVal.length != 0) )
		{
			return isNaN(strVal) ;
		}
		else
		{
			return true ;
		}
	}
	catch(e)
	{
		alert("/web/js/Common.js isNotNumber(strVal) Exception = [" + e + "]") ;
		return true ;
	}
}

function chkEnter() {
	//	Netscape¿ë Enter Check¿¡ »ç¿ë(checkNSEnter())
	if (navigator.appName == "Netscape") {
		document.captureEvents(Event.KEYDOWN) ;
		document.onKeyDown = checkNSEnter;
		return checkNSEnter(ev) ;
	} else {
		return chkIEEnter() ;
	}
}

function chkIEEnter() {
	switch (event.keyCode) {
		case 13:
			return true;
			break;
		default:
			return false;
			break;
	}
}

function checkNSEnter(ev) {
	var ascii = parseInt(ev.which)
	if (ascii == 13) {
		return true;
	} else {
		return false;
	}
}

// ¹®ÀÚ¿­¿¡¼­ Æ¯Á¤ ¹®ÀÚ¸¦ Áö¿î´Ù.
function delChar(argParm, argChar) {
	var ls_Return = "" ;
	if ((argParm == null) || (Trim(argParm).length == 0)) {
		ls_Return = argParm;
	} else {
		while (argParm.indexOf(argChar) > 0) {
			ls_Return = ls_Return + argParm.substring(0, argParm.indexOf(argChar)) ;
			argParm = argParm.substring(argParm.indexOf(argChar) + 1) ;
		}
		ls_Return = ls_Return + argParm;
	}
	return ls_Return;
}

// ¹®ÀÚ¿­¿¡¼­ Æ¯Á¤ ¹®ÀÚ¸¦ ´ëÃ¼ÇÑ´Ù.
function changeChar(argParm, argTChar, argCChar) {
	var ls_Return = "" ;
	if ((argParm == null) || (argParm.length == 0) || (argParm == "")) {
		ls_Return = argParm;
	} else {
		while (argParm.indexOf(argTChar) >= 0) {
			ls_Return = ls_Return + argParm.substring(0, argParm.indexOf(argTChar)) + argCChar;
			argParm = argParm.substring(argParm.indexOf(argTChar) + 1) ;
		}
		ls_Return = ls_Return + argParm;
	}
	return ls_Return;
}

// Focus ÀÌµ¿(Æ÷Ä¿½º ÀÌµ¿ÇÒ °³Ã¼ÀÇ ÀÌ¸§À» ÆÄ¶ó¹ÌÅÍ·Î ¹ÞÀ½)
function setFocus(argObjID)
{
	try
	{
		var lo_Obj = document.getElementById(argObjID) ;
		if (lo_Obj)
		{
			lo_Obj.focus() ;
		}
	}
	catch(e)
	{
		//alert("setFocus(" + argObjID + ") Exception = [" + e + "]") ;
	}
}

// Focus ÀÌµ¿(Æ÷Ä¿½º ÀÌµ¿ÇÒ °³Ã¼¸¦ ÆÄ¶ó¹ÌÅÍ·Î ¹ÞÀ½)
function setFocus02(argObj)
{
	try
	{
		if (argObj)
		{
			argObj.focus() ;
		}
	}
	catch(e)
	{
		//alert("setFocus02(" + argObj + ") Exception = [" + e + "]") ;
	}
}

// ÀÔ·Â°ª ¼±ÅÃ(¼±ÅÃÇÒ °³Ã¼ÀÇ ID¸¦ ÆÄ¶ó¹ÌÅÍ·Î ¹ÞÀ½)
function setInputSelect_ID(argObjID)
{
	try
	{
		var lo_Obj = document.getElementById(argObjID) ;
		if (lo_Obj)
		{
			lo_Obj.select() ;
		}
	}
	catch(e)
	{
		//alert("setInputSelect_ID(" + argObjID + ") Exception = [" + e + "]") ;
	}
}

// ÀÔ·Â°ª ¼±ÅÃ(¼±ÅÃÇÒ °³Ã¼¸¦ ÆÄ¶ó¹ÌÅÍ·Î ¹ÞÀ½)
function setInputSelect_OBJ(argObj)
{
	try
	{
		if (argObj)
		{
			argObj.select() ;
		}
	}
	catch(e)
	{
		//alert("setInputSelect_OBJ(" + argObj + ") Exception = [" + e + "]") ;
	}
}

// ReadOnly ¼³Á¤(ReadOnly ¼³Á¤ÇÒ °³Ã¼ÀÇ ÀÌ¸§À» ÆÄ¶ó¹ÌÅÍ·Î ¹ÞÀ½)
function setReadOnly(argObjID, argValue)
{
	try
	{
		var lo_Obj = document.getElementById(argObjID) ;
		if (lo_Obj)
		{
			lo_Obj.readOnly = argValue ;
		}
	}
	catch(e)
	{
		//alert("setReadOnly(" + argObjID + ", " + argValue + ") Exception = [" + e + "]") ;
	}
}

// ReadOnly ¼³Á¤(ReadOnly ¼³Á¤ÇÒ °³Ã¼¸¦ ÆÄ¶ó¹ÌÅÍ·Î ¹ÞÀ½)
function setReadOnly02(argObj, argValue)
{
	try
	{
		if (argObj)
		{
			argObj.readOnly = argValue ;
		}
	}
	catch(e)
	{
		//alert("setReadOnly02(" + argObj + ", " + argValue + ") Exception = [" + e + "]") ;
	}
}

// Disable ¼³Á¤(Disable ¼³Á¤ÇÒ °³Ã¼ÀÇ ÀÌ¸§À» ÆÄ¶ó¹ÌÅÍ·Î ¹ÞÀ½)
function setDisable_ID(argObjID, argValue)
{
	try
	{
		var lo_Obj = document.getElementById(argObjID) ;
		if (lo_Obj)
		{
			lo_Obj.disabled = argValue ;
		}
	}
	catch(e)
	{
		//alert("setDisable(" + argObjID + ", " + argValue + ") Exception = [" + e + "]") ;
	}
}

// Disable ¼³Á¤(Disable ¼³Á¤ÇÒ °³Ã¼¸¦ ÆÄ¶ó¹ÌÅÍ·Î ¹ÞÀ½)
function setDisable_OBJ(argObj, argValue)
{
	try
	{
		if (argObj)
		{
			argObj.disabled = argValue ;
		}
	}
	catch(e)
	{
		//alert("setDisable02(" + argObj + ", " + argValue + ") Exception = [" + e + "]") ;
	}
}

// Select ObjectÀÇ °ªÀ» ¼±ÅÃÇÏ°Ô ÇÔ(¼±ÅÃÇÒ Select ObjectÀÇ ID¸¦ ÀÌ¿ëÇÏ¿© Select Object¿Í ÁÖ¾îÁø value¿Í ºñ±³ÇÏ¿© ¼±ÅÃÇÏ°Ô ÇÔ)
function setSelect_value(argSelObjID, argValue)
{
	try
	{
		var lo_Collection = document.getElementById(argSelObjID) ;
		for (var ti_i = 0; ti_i < lo_Collection.options; ti_i++)
		{
			if (lo_Collection.options[ti_i].value == argValue)
			{
				lo_Collection.options[ti_i].selected = true ;
				break;
			}
		}
	}
	catch(e)
	{
		//alert("setSelect_value(" + argSelObjID + ", " + argValue + ") Exception = [" + e + "]") ;
	}
}

// Select ObjectÀÇ °ªÀ» ¼±ÅÃÇÏ°Ô ÇÔ(Select Object¸¦ ÀÌ¿ëÇÏ¿© Select Object¿Í ÁÖ¾îÁø value¿Í ºñ±³ÇÏ¿© ¼±ÅÃÇÏ°Ô ÇÔ)
function setSelect_value02(argSelObj, argValue)
{
	try
	{
		if (argSelObj)
		{
			for (var ti_i = 0; ti_i < argSelObj.options; ti_i++)
			{
				if (argSelObj.options[ti_i].value == argValue)
				{
					argSelObj.options[ti_i].selected = true ;
					break ;
				}
			}
		}
	}
	catch(e)
	{
		//alert("setSelect_value02(" + argSelObj + ", " + argValue + ") Exception = [" + e + "]") ;
	}
}

// Select ObjectÀÇ °ªÀ» ¼±ÅÃÇÏ°Ô ÇÔ(Select ObjectÀÇ ID¸¦ ÀÌ¿ëÇÏ¿© Select Object¿Í ÁÖ¾îÁø Select ObjectÀÇ ¼ø¼­°ª°ú ºñ±³ÇÏ¿© ¼±ÅÃÇÏ°Ô ÇÔ)
function setSelect_num(argSelObjID, argNum)
{
	try
	{
		var lo_Collection = document.getElementById(argSelObjID) ;
		lo_Collection[argNum].selected = true ;
	}
	catch(e)
	{
		//alert("setSelect_num(" + argSelObjID + ", " + argNum + ") Exception = [" + e + "]") ;
	}
}

// Select ObjectÀÇ °ªÀ» ¼±ÅÃÇÏ°Ô ÇÔ(Select Object¸¦ ÀÌ¿ëÇÏ¿© Select Object¿Í ÁÖ¾îÁø Select ObjectÀÇ ¼ø¼­°ª°ú ºñ±³ÇÏ¿© ¼±ÅÃÇÏ°Ô ÇÔ)
function setSelect_num02(argSelObj, argNum)
{
	try
	{
		argSelObj[argNum].selected = true ;
	}
	catch(e)
	{
		//alert("setSelect_num02(" + argSelObj + ", " + argNum + ") Exception = [" + e + "]") ;
	}
}

// ObjectÀÇ °ªÀ» ÃÊ±âÈ­
function setInitObjValue(argObjID)
{
	try
	{
		var lo_Obj = document.getElementById(argObjID) ;

		if (lo_Obj)
		{
			var ls_Type = lo_Obj.type ;
			if (Trim(ls_Type).toUpperCase() == "CHECKBOX")
			{
				if (lo_Obj.checked)
				{
					lo_Obj.checked = false ;
				}
			}
			else if (Trim(ls_Type).toUpperCase() == "RADIO")
			{
				var tb_Check = true ;
				var ti_i = 0 ;
				var ts_Return ;
				while (tb_Check)
				{
					if (lo_Obj[ti_i])
					{
						if (lo_Obj[ti_i].checked)
						{
							lo_Obj[ti_i].checked = false ;
						}
					}
				}
			}
			else if (Trim(ls_Type).toUpperCase() == "SELECT")
			{
				lo_Obj.value = lo_Obj.options[0].value ;
			}
			else
			{
				lo_Obj.value = "" ;
			}
		}
	}
	catch(e)
	{
		//alert("setInitObjValue(" + argObjID + ") Exception = [" + e + "]") ;
	}
}

// FormÀÇ ¸ðµç ObjectÀÇ °ªÀ» ÃÊ±âÈ­
function setInitAllObjValue(argForm)
{
	try
	{
		if (argForm)
		{
			for (var i = 0; i < argForm.length; i++)
			{
				if (Trim(argForm.elements[i].type).toUpperCase() == "CHECKBOX")
				{
					if (argForm.elements[i].checked)
					{
						argForm.elements[i].checked = false ;
					}
				}
				else if (Trim(argForm.elements[i].type).toUpperCase() == "RADIO")
				{
					var tb_Check = true ;
					var ti_i = 0 ;
					var ts_Return ;
					while (tb_Check)
					{
						if (argForm.elements[i][ti_i])
						{
							if (argForm.elements[i][ti_i].checked)
							{
								argForm.elements[i][ti_i].checked = false ;
							}
						}
					}
				}
				else if (Trim(argForm.elements[i].type).toUpperCase() == "SELECT")
				{
					argForm.elements[i].value = argForm.elements[i].options[0].value ;
				}
				else
				{
					argForm.elements[i].value = "" ;
				}
			}
		}
	}
	catch(e)
	{
		//alert("setInitAllObjValue(" + argForm + ") Exception = [" + e + "]") ;
	}
}

// FormÀÇ ¸ðµç ObjectÀÇ °ªÀ» ÃÊ±âÈ­(ÃÊ±âÈ­ÀÇ ¿¹¿Ü Object¸¦ ¼³Á¤ÇÑ´Ù.)
function setInitAllObjValue02(argForm, argExceptionObj)
{
	try
	{
		if (argForm)
		{
			for (var i = 0; i < argForm.length; i++)
			{
				if (argForm.elements[i] != argExceptionObj)
				{
					if (Trim(argForm.elements[i].type).toUpperCase() == "CHECKBOX")
					{
						if (argForm.elements[i].checked)
						{
							argForm.elements[i].checked = false ;
						}
					}
					else if (Trim(argForm.elements[i].type).toUpperCase() == "RADIO")
					{
						var tb_Check = true ;
						var ti_i = 0 ;
						var ts_Return ;
						while (tb_Check)
						{
							if (argForm.elements[i][ti_i])
							{
								if (argForm.elements[i][ti_i].checked)
								{
									argForm.elements[i][ti_i].checked = false ;
								}
							}
						}
					}
					else if (Trim(argForm.elements[i].type).toUpperCase() == "SELECT")
					{
						argForm.elements[i].value = argForm.elements[i].options[0].value ;
					}
					else
					{
						argForm.elements[i].value = "" ;
					}
				}
			}
		}
	}
	catch(e)
	{
		//alert("setInitAllObjValue02(" + argForm + ", " + argExceptionObj + ") Exception = [" + e + "]") ;
	}
}

function getObjValue(argObj)
{
	try
	{
		if (argObj)
		{
			if ( (argObj.value == null) || (Trim(argObj.value).length == 0) )
			{
				return "" ;
			}
			else
			{
				return argObj.value ;
			}
		}
		else
		{
			return null ;
		}
	}
	catch(e)
	{
		//alert("getObjValue(" + argObj + ") Exception = [" + e + "]") ;
	}
}

function getObjValue_ID(argObjID)
{
	try
	{
		var lo_Obj = document.getElementById(argObjID) ;
		if (lo_Obj)
		{
			if ((lo_Obj.value == null) || (Trim(lo_Obj.value).length == 0))
			{
				return "" ;
			}
			else
			{
				return lo_Obj.value ;
			}
		}
		else
		{
			return null ;
		}
	}
	catch(e)
	{
		//alert("getObjValue_ID(" + argObj + ") Exception = [" + e + "]") ;
		return null ;
	}
}

//  ÀÔ·Â°ªÀÌ ÀÌ¸ÞÀÏ Çü½ÄÀÎÁö Ã¼Å©
function isValidEmail(input)
{
	//    var format = /^(\S+)@(\S+)\.([A-Za-z]+)$/;
	var format = /^((\w|[\-\.])+)@((\w|[\-\.])+)\.([A-Za-z]+)$/ ;
	return isValidFormat(input, format) ;
}

//  ÀÔ·Â°ªÀÌ »ç¿ëÀÚ°¡ Á¤ÀÇÇÑ Æ÷¸Ë Çü½ÄÀÎÁö Ã¼Å©
function isValidFormat(input, format)
{
	if (input.value.search(format) != -1)
	{
		return true;
		//¿Ã¹Ù¸¥ Æ÷¸Ë Çü½Ä
	}
	return false;
}

// BASE64 Encode
function base64Encode(decStr) {
	var base64s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" ;
	decStr = escape(decStr) ;
	var bits, dual, i = 0, encOut = '' ;
	while (decStr.length >= i + 3) {
		bits =
		(decStr.charCodeAt(i++) & 0xff) << 16 |
		(decStr.charCodeAt(i++) & 0xff) << 8 |
		decStr.charCodeAt(i++) & 0xff;
		encOut +=
		base64s.charAt((bits & 0x00fc0000) >> 18) +
		base64s.charAt((bits & 0x0003f000) >> 12) +
		base64s.charAt((bits & 0x00000fc0) >> 6) +
		base64s.charAt((bits & 0x0000003f)) ;
	}

	if (decStr.length - i > 0 && decStr.length - i < 3) {
		dual = Boolean(decStr.length - i - 1) ;
		bits =
		((decStr.charCodeAt(i++) & 0xff) << 16) |
		(dual ? (decStr.charCodeAt(i) & 0xff) << 8 : 0) ;
		encOut +=
		base64s.charAt((bits & 0x00fc0000) >> 18) +
		base64s.charAt((bits & 0x0003f000) >> 12) +
		(dual ? base64s.charAt((bits & 0x00000fc0) >> 6) : '=') +
		'=';
	}
	return encOut;
}

// BASE64 Decode
function base64Decode(encStr) {
	var base64s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
	var bits, decOut = '', i = 0;
	var undecOut ;
	for (; i < encStr.length; i += 4) {
		bits =
		(base64s.indexOf(encStr.charAt(i)) & 0xff) << 18 |
		(base64s.indexOf(encStr.charAt(i + 1)) & 0xff) << 12 |
		(base64s.indexOf(encStr.charAt(i + 2)) & 0xff) << 6 |
		base64s.indexOf(encStr.charAt(i + 3)) & 0xff;
		decOut += String.fromCharCode((bits & 0xff0000) >> 16, (bits & 0xff00) >> 8, bits & 0xff) ;
	}

	if (encStr.charCodeAt(i - 2) == 61) {
		undecOut = decOut.substring(0, decOut.length - 2) ;
	} else if (encStr.charCodeAt(i - 1) == 61) {
		undecOut = decOut.substring(0, decOut.length - 1) ;
	} else {
		undecOut = decOut;
	}

	return unescape(undecOut) ;
}

//Cookie °¡Á®¿À±â
function getCookie(name)
{
	var ls_find ;
	var first ;
	var str = name +"=" ;
	if(document.cookie.length > 0 )
	{
		ls_find = document.cookie.indexOf(str) ;
		if(ls_find == -1)
		{
			return null ;
		}
		else
		{
			first = parseInt(parseInt(ls_find, 10) + str.length, 10) ;
			end = document.cookie.indexOf(";", first) ;
			if(end == -1)
			{
				end = document.cookie.length ;
			}
			return unescape(document.cookie.substring(first, end)) ;
		}
	}
	else
	{
		return "" ;
	}
}

//Cookie ÀúÀå
function setCookie(name, value, expireDate)
{
	var cookieStr = name + "=" + escape(value) +
									"; domain=" + escape(".youfirst.co.kr") +
	                //"; domain=.youfirst.co.kr" +
	                "; path=/" +
									((expireDate == null )?"":("; expires=" + expireDate.toGMTString())) ;
	document.cookie = cookieStr ;
}

//Cookie »èÁ¦
function clearCookie()
{
	if (document.cookie != "")
	{
		thisCookie = document.cookie.split("; ") ;
		var today = new Date() ;
		var expireDate = new Date(today.getTime() - 60*60*24*1000) ;
//		expireDate = new Date ;
//		expireDate.setDate(expireDate.getDate()-1) ;

		for (i=0; i<thisCookie.length; i++)
		{
			cookieName = thisCookie[i].split("=")[0] ;
			if ( (cookieName != "ccguid") && (cookieName != "ccsession") )
			{
				document.cookie = cookieName + "= " + "; expires=" + expireDate.toGMTString() ;
			}
		}
	}
}

//  get¹æ½ÄÀ¸·Î ³Ñ¾î¿Â °ªÀ» ÆÄ½ÌÇÏ°í ÀÐ¾î³»¾î ÁÖ¾îÁø ÀÌ¸§¿¡ ÇØ´çµÇ´Â °ªÀ» ¹ÝÈ¯
function getParameter(parName)
{
	var ls_Retrun = "" ;
	try
	{
		if ( (parName == null) || (parName.length == 0) || (Trim(parName).length == 0) )
		{
			ls_Retrun = "" ;
		}
		else
		{
			var idx = document.URL.indexOf('?') ;
			var params = new Array() ;
			var nameVal ;
			if (idx != -1)
			{
				var pairs = document.URL.substring(idx+1, document.URL.length).split('&') ;
				for (var i = 0; i < pairs.length; i++)
				{
					nameVal = pairs[i].split('=') ;
					if (nameVal[0] == parName)
					{
						ls_Retrun = unescape(nameVal[1]) ;
						break ;
					}
					else
					{
						//ls_Retrun = nameVal[1] ;
						ls_Retrun = "" ;
					}
				}
			}
			else
			{
				ls_Retrun = "" ;
			}
		}
	}
	catch(e)
	{
		alert("ÆÄ¶ó¹ÌÅÍ È®ÀÎ ½Ã ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù.(getParameter(parName)) = [" + e + "]") ;
		ls_Retrun = "" ;
	}
	return ls_Retrun ;
}

//Á¤È¸¿ø1ÀÌ °øÀÎÀÎÁõÇÏ°í ·Î±×ÀÎ Çß´ÂÁö °Ë»çÇÔ
function checkLogin_PUBCERT()
{
	try
	{
		var ls_UserType = getCookie("UserType") ;
		if ( (ls_UserType != null) && (ls_UserType.length != 0) )
		{
			//ls_UserType = document.IssacWebDec.issacweb_decrypt_s(ls_UserType, keyname2) ;
			ls_UserType = Trim(ls_UserType) ;
		}

		if ( (ls_UserType != null) && (Trim(ls_UserType).length != 0) && (ls_UserType == "U") &&
					(getCookie("CID") != null)	&& (getCookie("ISSAC") != null)	&& (getCookie("UserDN") != null) )
		{
			return true ;
		}
		else
		{
			return false ;
		}
	}
	catch(e)
	{
		alert("·Î±×ÀÎ È®ÀÎ ½Ã ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù.(checkLogin_PUBCERT) = [" + e + "]") ;
		return false ;
	}
}

//Á¤È¸¿ø1À¸·Î ·Î±×ÀÎ Çß´ÂÁö °Ë»çÇÔ
function checkLogin_USER()
{
	try
	{
		var ls_UserType = getCookie("UserType") ;
		if ( (ls_UserType != null) && (ls_UserType.length != 0) )
		{
			//ls_UserType = document.IssacWebDec.issacweb_decrypt_s(ls_UserType, keyname2) ;
			ls_UserType = Trim(ls_UserType) ;
		}

		if ( (ls_UserType != null) && (Trim(ls_UserType).length != 0) && (ls_UserType == "U") &&
					(getCookie("CID") != null)	&& (getCookie("ISSAC") != null) )
		{
			return true ;
		}
		else
		{
			return false ;
		}
	}
	catch(e)
	{
		alert("·Î±×ÀÎ È®ÀÎ ½Ã ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù.(checkLogin_USER) = [" + e + "]") ;
		return false ;
	}
}

//Á¤È¸¿ø1ÀÌ Á¶È¸Àü¿ëÀ¸·Î ·Î±×ÀÎ Çß´ÂÁö °Ë»çÇÔ
function checkLogin_LIMIT()
{
	try
	{
		var ls_UserType = getCookie("UserType") ;
		if ( (ls_UserType != null) && (ls_UserType.length != 0) )
		{
			//ls_UserType = document.IssacWebDec.issacweb_decrypt_s(ls_UserType, keyname2) ;
			ls_UserType = Trim(ls_UserType) ;
		}

		if ( (ls_UserType != null) && (Trim(ls_UserType).length != 0) && (ls_UserType == "L") &&
					(getCookie("CID") != null)	&& (getCookie("ISSAC") != null) )
		{
			return true ;
		}
		else
		{
			return false ;
		}
	}
	catch(e)
	{
		alert("·Î±×ÀÎ È®ÀÎ ½Ã ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù.(checkLogin_LIMIT) = [" + e + "]") ;
		return false ;
	}
}

//Á¤È¸¿ø2·Î ·Î±×ÀÎ Çß´ÂÁö °Ë»çÇÔ
function checkLogin_REGULAR()
{
	try
	{
		var ls_UserType = getCookie("UserType") ;
		if ( (ls_UserType != null) && (ls_UserType.length != 0) )
		{
			//ls_UserType = document.IssacWebDec.issacweb_decrypt_s(ls_UserType, keyname2) ;
			ls_UserType = Trim(ls_UserType) ;
		}

		if ( (ls_UserType != null) && (Trim(ls_UserType).length != 0) && (ls_UserType == "R") &&
					(getCookie("CID") != null)	&& (getCookie("ISSAC") != null) )
		{
			return true ;
		}
		else
		{
			return false ;
		}
	}
	catch(e)
	{
		alert("·Î±×ÀÎ È®ÀÎ ½Ã ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù.(checkLogin_REGULAR) = [" + e + "]") ;
		return false ;
	}
}

//»ç¿ø·Î ·Î±×ÀÎ Çß´ÂÁö °Ë»çÇÔ
function checkLogin_STAFF()
{
	try
	{
		var ls_UserType = getCookie("UserType") ;
		if ( (ls_UserType != null) && (ls_UserType.length != 0) )
		{
			//ls_UserType = document.IssacWebDec.issacweb_decrypt_s(ls_UserType, keyname2) ;
			ls_UserType = Trim(ls_UserType) ;
		}

		if ( (ls_UserType != null) && (Trim(ls_UserType).length != 0) && (ls_UserType == "S") &&
					(getCookie("CID") != null)	&& (getCookie("ISSAC") != null) )
		{
			return true ;
		}
		else
		{
			return false ;
		}
	}
	catch(e)
	{
		alert("·Î±×ÀÎ È®ÀÎ ½Ã ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù.(checkLogin_STAFF) = [" + e + "]") ;
		return false ;
	}
}

//ÁØÈ¸¿øÀ¸·Î ·Î±×ÀÎ Çß´ÂÁö °Ë»çÇÔ
function checkLogin_MEMBER()
{
	try
	{
		var ls_UserType = getCookie("UserType") ;
		if ( (ls_UserType != null) && (ls_UserType.length != 0) )
		{
			//ls_UserType = document.IssacWebDec.issacweb_decrypt_s(ls_UserType, keyname2) ;
			ls_UserType = Trim(ls_UserType) ;
		}

		if ( (ls_UserType != null) && (Trim(ls_UserType).length != 0) && (ls_UserType == "M") &&
					(getCookie("CID") != null)	&& (getCookie("ISSAC") != null) )
		{
			return true ;
		}
		else
		{
			return false ;
		}
	}
	catch(e)
	{
		alert("·Î±×ÀÎ È®ÀÎ ½Ã ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù.(checkLogin_MEMBER) = [" + e + "]") ;
		return false ;
	}
}

//ADMINÀ¸·Î ·Î±×ÀÎ Çß´ÂÁö °Ë»çÇÔ
function checkLogin_ADMIN()
{
	try
	{
		var ls_UserType = getCookie("UserType") ;
		if ( (ls_UserType != null) && (ls_UserType.length != 0) )
		{
			//ls_UserType = document.IssacWebDec.issacweb_decrypt_s(ls_UserType, keyname2) ;
			ls_UserType = Trim(ls_UserType) ;
		}

		if ( (ls_UserType != null) && (Trim(ls_UserType).length != 0) && (ls_UserType == "A") &&
					(getCookie("CID") != null)	&& (getCookie("ISSAC") != null) )
		{
			return true ;
		}
		else
		{
			return false ;
		}
	}
	catch(e)
	{
		alert("·Î±×ÀÎ È®ÀÎ ½Ã ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù.(checkLogin_ADMIN) = [" + e + "]") ;
		return false ;
	}
}

//systemLanguage °ªÀ» ±¸ÇÔ
function getLanguage()
{
	try
	{
		return navigator.systemLanguage ;
	}
	catch(e)
	{
		alert("¾ð¾î ¼³Á¤°ªÀ» ºÒ·¯¿Ã¶§ ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù. = [" + e + "]") ;
	}
}

//Signkorea °øÀÎÀÎÁõ ¸ðµâ(CertManX) ¾ð¾î¼³Á¤
function setLanguage(argLang)
{	//	»ç¿ëÀÚ GUI¿¡¼­ ÇÑ±Û/¿µ¾î TEXT Ãâ·ÂÀ» ÁöÁ¤.¾ð¾î ¼³Á¤( 0: ±âº»°ª(ÇÑ±Û) , 1: ¿µ¾î)
	try
	{
		if (CertManX)
		{
			if ( (argLang != null) && (Trim(argLang).length != 0) )
			{
				if (argLang == "ko")
				{
					CertManX.SetLanguageMode(0) ;
				}
				else
				{
					CertManX.SetLanguageMode(1) ;
				}
			}
			else
			{
				if (parseInt(argLang, 10) == 1)
				{	//	¿µ¾î¶ó¸é
					alert("No language type value.") ;
				}
				else
				{
					alert("¾ð¾î ¼³Á¤ ±¸ºÐ°ªÀÌ ¾ø½À´Ï´Ù.") ;
				}
			}
		}
		else
		{
			if (parseInt(argLang, 10) == 1)
			{	//	¿µ¾î¶ó¸é
				alert("Do not have KOSCOM certificate application.") ;
			}
			else
			{
				alert("Signkorea °øÀÎÀÎÁõ ¸ðµâÀÌ ½ÇÇàµÇÁö ¾Ê¾Ò½À´Ï´Ù.") ;
			}
		}
	}
	catch(e)
	{
		if (parseInt(argLang, 10) == 1)
		{	//	¿µ¾î¶ó¸é
			alert("An Error Occurs.(setLanguage) = [" + e + "]") ;
		}
		else
		{
			alert("¾ð¾î ¼³Á¤½Ã ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù. = [" + e + "]") ;
		}
	}
}



/********************************************************************************************************
 ÇÃ·¡½Ã¹«ºñ »ðÀÔ Á¤ÀÇ
 * @info				:	ActivX °ü·Ã IE ¼öÁ¤
 * @param fID		:	Flash ID
 * @param fURL	:	Flash URL
 * @param w		:	width
 * @param h			:	height
 * @param wmode	:	wmode value(null,0 - ¸ðµå¼±ÅÃ ¾ÈÇÔ, 1 - ¸ðµå¼±ÅÃ)
 * @param bgClr	:	background color(null - ¼³Á¤¾ÈÇÔ, value - °ª¼³Á¤)
 * @param lstate	:	loop value(null,0 - °ª¼±ÅÃ ¾ÈÇÔ, 2 - loop false)
 ********************************************************************************************************/
function drawFlash(fID, fURL, w, h, wmode, bgClr, lstate) {
	var tmpStr = "";
	tmpStr += "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='" + w + "' height='" + h + "' id='" + fID + "' align='middle'>";
	tmpStr += "<param name='allowScriptAccess' value='always' />";
	tmpStr += "<param name='movie' value='" + fURL + "' />";
	tmpStr += "<param name='quality' value='high' />";
	tmpStr += "<param name='menu' value='false' />";

	if (lstate == 2) tmpStr += "<param name='loop' value='false' />";
	if (wmode == 1) tmpStr += "<param name='wmode' value='transparent' />";
    if (wmode == 2) tmpStr += "<param name='wmode' value='opaque' />";
    if (bgClr != null && bgClr != "undefined") tmpStr += "<param name='bgcolor' value='" + bgClr + "' />";

	tmpStr += "<embed src='" + fURL + "' quality='high' ";
	if (lstate == 2) tmpStr += "loop='false' ";
	if (wmode == 1) tmpStr += "wmode='transparent' ";
    if (wmode == 2) tmpStr += "wmode='opaque' ";
    if (bgClr != null && bgClr != "undefined") tmpStr += "bgcolor='" + bgClr + "' ";

	tmpStr += "width='" + w + "' height='" + h + "' name='" + fID + "' menu='false' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'  />";
	tmpStr += "</object>";

	document.write(tmpStr) ;
	//alert(tmpStr) ;
}

function navi(sbFlash_Pram) {/*¸ÞÀÎ_»ó´Ü³×ºñ*/
	drawFlash("GNB", "/web/frame/naviSub.swf?" + sbFlash_Pram, 996, 108, 1, "#ffffff") ;
}

function navi_sub(sbFlash_Pram) {/*¼­ºê_»ó´Ü³×ºñ*/
	drawFlash("GNB", "/web/frame/naviSub.swf?" + sbFlash_Pram, '100%', 112, 1, "#ffffff") ;
}

/********************************************************************************************************
 ¿ÜºÎ ÇÃ·¡½Ã ·Îµå
 ********************************************************************************************************/
function externalJS2(id) {
	document.write(id.innerHTML) ;
	id.id = "";
}

/********************************************************************************************************
 ¼­ºêÆäÀÌÁöº° »ó´Ü ÀÌ¹ÌÁöÄÆ
 ********************************************************************************************************/
function timg(idx) {
	document.write("<div id=\"timg\" style=\"background:#F3F3F3;\">") ;

	if (idx == null)
	{/*±âÅ¸ °øÅë*/
		drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_etc.swf", 620, 98, 1, "") ;
	}
	else
	{
		if (idx == 11) {/*°³ÀÎ°í°´*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_private01.swf", 620, 98, 1, "") ;
		}
		if (idx == 12) {/*°³ÀÎ°í°´*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_private02.swf", 620, 98, 1, "") ;
		}
		if (idx == 13) {/*°³ÀÎ°í°´*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_private03.swf", 620, 98, 1, "") ;
		}
		if (idx == 14) {/*°³ÀÎ°í°´*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_private04.swf", 620, 98, 1, "") ;
		}
		if (idx == 21) {/*±â¾÷°í°´*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_biz01.swf", 620, 98, 1, "") ;
		}
		if (idx == 22) {/*±â¾÷°í°´*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_biz02.swf", 620, 98, 1, "") ;
		}
		if (idx == 23) {/*±â¾÷°í°´*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_biz03.swf", 620, 98, 1, "") ;
		}
		if (idx == 24) {/*±â¾÷°í°´*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_biz04.swf", 620, 98, 1, "") ;
		}
		if (idx == 31) {/*ÅõÀÚÁ¤º¸*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_info01.swf", 620, 98, 1, "") ;
		}
		if (idx == 32) {/*ÅõÀÚÁ¤º¸*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_info02.swf", 620, 98, 1, "") ;
		}
		if (idx == 33) {/*ÅõÀÚÁ¤º¸*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_info03.swf", 620, 98, 1, "") ;
		}
		if (idx == 34) {/*ÅõÀÚÁ¤º¸*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_info04.swf", 620, 98, 1, "") ;
		}
		if (idx == 36) {/*ÅõÀÚÁ¤º¸*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_info06.swf", 620, 98, 1, "") ;
		}
		if (idx == 37) {/*ÅõÀÚÁ¤º¸*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_info07.swf", 620, 98, 1, "") ;
		}
		if (idx == 38) {/*ÅõÀÚÁ¤º¸(Àå³»ÆÄ»ý)*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_info08.swf", 620, 98, 1, "") ;
		}
		if (idx == 41) {/*Puzzle*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_stock01.swf", 620, 98, 1, "") ;
		}
		if (idx == 42) {/*ÁÖ¹®/½Ã¼¼*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_stock02.swf", 620, 98, 1, "") ;
		}
		if (idx == 43) {/*°èÁÂÁ¤º¸*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_stock03.swf", 620, 98, 1, "") ;
		}
		if (idx == 44) {/*ÆÄ¿öÆ®·¹ÀÌµù*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_stock04.swf", 620, 98, 1, "") ;
		}
		if (idx == 51) {/*°í°´¸¸Á·¼¾ÅÍ*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_customer01.swf", 620, 98, 1, "") ;
		}
		if (idx == 52) {/*°í°´¸¸Á·¼¾ÅÍ*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_customer02.swf", 620, 98, 1, "") ;
		}
		if (idx == 53) {/*°í°´¸¸Á·¼¾ÅÍ*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_customer03.swf", 620, 98, 1, "") ;
		}
		if (idx == 54) {/*°í°´¸¸Á·¼¾ÅÍ*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_customer04.swf", 620, 98, 1, "") ;
		}
		if (idx == 55) {/*°í°´¸¸Á·¼¾ÅÍ*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_customer05.swf", 620, 98, 1, "") ;
		}
		if (idx == 56) {/*°í°´¸¸Á·¼¾ÅÍ*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_customer06.swf", 620, 98, 1, "") ;
		}
		if (idx == 57) {/*°í°´¸¸Á·¼¾ÅÍ*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_customer07.swf", 620, 98, 1, "") ;
		}
		if (idx == 59) {/*°í°´¸¸Á·¼¾ÅÍ*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_customer09.swf", 620, 98, 1, "") ;
		}
		if (idx == 61) {/*¾ÆÄ«µ¥¹Ì*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_academy01.swf", 620, 98, 1, "") ;
		}
		if (idx == 62) {/*¾ÆÄ«µ¥¹Ì*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_academy02.swf", 620, 98, 1, "") ;
		}
		if (idx == 63) {/*¾ÆÄ«µ¥¹Ì*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_academy03.swf", 620, 98, 1, "") ;
		}
		if (idx == 64) {/*¾ÆÄ«µ¥¹Ì*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_customer10.swf", 620, 98, 1, "") ;
		}
		if (idx == 65) {/*¾ÆÄ«µ¥¹Ì*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_customer11.swf", 620, 98, 1, "") ;
		}
		if (idx == 7) {/*°øÀÎÀÎÁõ¼¾ÅÍ*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_etc.swf", 620, 98, 1, "") ;
		}
		if (idx == 8) {/*IR*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_ir.swf", 620, 98, 1, "") ;
		}
		if (idx == 9) {/*YFB*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_yfb.swf", 620, 98, 1, "") ;
		}
		if (idx == 120) {/*Global Trading*/
			drawFlash("top", "http://image.youfirst.co.kr/image/flash/top_fx.swf", 620, 98, 1, "") ;
		}
	}
	document.write("</div>") ;
}

/********************************************************************************************************
 ÀüÃ¼¸ÞÀÎÀ¸·Î ¸µÅ©
 ********************************************************************************************************/
function mainpageGo() {
	top.body.main_url.location.href = "/web/index_frame.html";
}

/********************************************************************************************************
 µ¿¿µ»óÆÄÀÏ »ðÀÔ Á¤ÀÇ
 ********************************************************************************************************/
function showVod(vID, vURL, ww, hh) {
	document.write("<embed src='" + vURL + "' width='" + ww + "' height='" + hh + "' name='" + vID + "' autostart='true'>") ;
	document.write("</embed>") ;
}

/********************************************************************************************************
 ·¹ÀÌ¾î show/hide Åä±Û±â´É
 ********************************************************************************************************/
function chgState(oID, oState) {
	if (isNull(oID)) return;
	var tObj = document.getElementById(oID) ;
	if (isNull(tObj)) return;
	if (isNull(oState)) {
		tObj.style.display = (tObj.style.display == "none") ? "" : "none";
	} else {
		tObj.style.display = oState;
	}
}

var currOID;
function chgView(oID) {
	if (currOID != oID && !isNull(currOID)) chgState(currOID, "none") ;
	chgState(oID, "") ;
	currOID = oID;
}

function isNull(cObj) {
	if (cObj == null || cObj == "undefined") return true;
	return false;
}

/********************************************************************************************************
 ÀÌ¹ÌÁö ·Ñ¿À¹ö Á¤ÀÇ
 ********************************************************************************************************/
function EImgChg(flag) {
	source = event.srcElement;
	if (source.name == "") {
		return false;
	} else if (document.images && source.tagName == "IMG") {
		imgElement = source.name;
		// ÀÌ¹ÌÁö name
		imgPath = source.src;
		// ÀÌ¹ÌÁö src ¼Ó¼º°ª
		imgPathLen = imgPath.length;
		imgPathFlag = imgPath.lastIndexOf("/") ;
		imgName = imgPath.substring(0, imgPathFlag + 1) ;

		document.images[imgElement].src = imgName + imgElement + "_" + flag + ".gif";
	}
}

/********************************************************************************************************
 ShowHide Layer // ¾ÆÄ«µ¥¹Ì>°­»ç¼Ò°³
 ********************************************************************************************************/
function chg_view(pTxt, cIdx, fIdx, lIdx) {
	try {
		var tmpObj = document.getElementById(pTxt + cIdx) ;
		if (tmpObj == null) return;
		for (var i = fIdx; i <= lIdx; i++) {
			try {
				if (i == cIdx) {
					document.getElementById(pTxt + i).style.display = "";
				} else {
					document.getElementById(pTxt + i).style.display = "none";
				}
			} catch(ex) {
			}
		}
	} catch (e) {
	}
}

/********************************************************************************************************
 ¸®½ºÆ®³» Æ¯Á¤¼±ÅÃ¶óÀÎ Ç¥½Ã
 ********************************************************************************************************/
var curr_tr;
function sel_tr(tObj) {
	if (curr_tr == tObj) return;
	if (curr_tr != null && curr_tr != "undefined") {
		curr_tr.style.backgroundColor = "";
		curr_tr.style.color = "#333333";
	}
	tObj.style.backgroundColor = "#EEF3FA";
	tObj.style.color = "#000000";
	curr_tr = tObj;
}

/********************************************************************************************************
 Popup Á¤ÀÇ
 º¯¼ö Á¤ÀÇ : pop - ÆÄÀÏ¸í, width - °¡·Î»çÀÌÁî, height - ¼¼·Î»çÀÌÁî, flag - 0:½ºÅ©·Ñ¾øÀ½, 1:½ºÅ©·ÑÀÖÀ½
 ********************************************************************************************************/
function pop(pop, width, height, flag) {
	var url = pop;
	var wd = width;
	var he = height;
	var topposition = (screen.height) ? (screen.height - he) / 2 : 0;
	var leftposition = (screen.width) ? (screen.width - wd) / 2 : 0;

	if (flag == "0") {
		window.open(url, "", "toolbar=0,menubar=0,scrollbars=no,resizable=no,width=" + wd + ",height=" + he) ;
	}
	else {
		window.open(url, "", "toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=" + wd + ",height=" + he) ;
	}
}


/********************************************************************************************************
 ¸µÅ©½Ã ¶óÀÎ ¾ø¾Ö±â Á¤ÀÇ
 ********************************************************************************************************/
function allblur() {
	for (i = 0; i < document.links.length; i++)
		document.links[i].onfocus = document.links[i].blur;
}

function goto(trg, URL) {
	window.open(URL, trg, '') ;
}

/********************************************************************************************************
 ¼¿·ºÆ®¹Ú½º ¼±ÅÃ½Ã ÆäÀÌÁöÀÌµ¿
 ********************************************************************************************************/
function goselect(form) {
	var myindex = form.go.selectedIndex
	window.location = (form.go.options[myindex].value) ;
}

/********************************************************************************************************
 ÄÁÅÙÃ÷ÆäÀÌÁö¿¡¼­ ÆäÀÌÁö¿Í ¸Þ´ºÂÊ ¸µÅ©¹®Á¦
 ********************************************************************************************************/
function frLink(left, body) {
	parent.leftFrame.location.href = left;
	parent.subFrame.location.href = body;
}

/********************************************************************************************************
 Çö´ë»óÇ°°ü_¼­ºê¸ÞÀÎ ÃßÃµ»óÇ°¹è³Ê
 ********************************************************************************************************/
var tParam1, tParam2;
tParam1 = getParam() ;
tParam2 = getParam() ;

while (tParam1 == tParam2) {
	tParam2 = getParam() ;
}

function getParam() {
	var tmpVal;
	tmpVal = Math.floor(Math.random() * 6 + 1) ;
	return tmpVal;
}

function linkFn(idx) {
	var tmpVal;
	tmpVal = Math.floor(Math.random() * 6 + 1) ;
	return tmpVal;

	if (idx == 1) javascript:changeMenu_cm('0101', '0201', '/html/banking/trans/trans.html') ;
	if (idx == 2) javascript:changeMenu_cm('0101', '0301', '/html/banking/trade/fund.html') ;
	if (idx == 3) javascript:changeMenu_cm('0101', '04', '/html/banking/acc/open.html') ;
	if (idx == 4) javascript:changeMenu_cm('0101', '0501', '/html/banking/user/buyacc.html') ;
	if (idx == 5) javascript:changeMenu_cm('0201', '01', '/html/mall/recom/listall_01.html') ;
	if (idx == 6) javascript:changeMenu_cm('0301', '0101', '/html/info/fund/chart.html') ;
}

function drawRecom() {/*¸ÞÀÎ_»ó´Ü³×ºñ*/
	drawFlash("ban", "./ban_recom.swf?param1=" + tParam1 + "&param2=" + tParam2, 246, 258, 1, "#FFFFFF") ;
}


/********************************************************************************************************
 ÁÂÃø¹è³Ê
 ********************************************************************************************************/
function leftBanner(idx) {
	if (idx == 1) {/*Çö´ë»óÇ°°ü*/
		document.write("<div style=\"margin:10px 0; text-align:center;\"><a href=\"javascript:void(window.open('../mall/pop_saleplan.html','plan','width=660,height=500,scrollbars=no'))\"><img src=\"http://image.hyundaifund.co.kr/banner/l_saleplan.gif\" alt=\"ÆÇ¸Å¿¹Á¤»óÇ° ¾È³»\" /></a></div>") ;
	}
	if (idx == 2) {/*ÀÎÅÍ³Ý¹ðÅ·*/
		document.write("<div style=\"margin:15px 0;\"><a href=\"#\"><img src=\"http://image.hyundaifund.co.kr/mall/ban_01.gif\" alt=\"ÆÇ¸Å¿¹Á¤»óÇ°\" /></a></div>") ;
	}
	else {
	}
}

/********************************************************************************************************
 ÆË¾÷¶ç¿ì±â
 ********************************************************************************************************/
function Dr() {
	var fundDrWin = window.open('', 'Dr', 'toolbar=0,menubar=0,scrollbars=no,resizable=no,width=741,height=504,top="+Math.round(topposition)+",left="+Math.round(leftposition)') ;
	fundDrWin.focus() ;
}
/********************************************************************************************************
 2006/12 ¿ù ºÎÅÍ ¸®´º¾ó¿¡¼­ »ç¿ëµÇ´Â js µéÀº ¾Æ·¡¿¡ »õ·Ó°Ô Ãß°¡ÇÕ´Ï´Ù.
 ¸®´º¾ó¿¡¼­ »ç¿ëµÇ´Â JS µéÀº ¾Æ·¡·Î ¿Å°Ü ÁÖ½Ã°í ÀÌÈÄ¿¡ ÀÌ ¶óÀÎ À§¿¡¼­ÀÇ JS µéÀº
 »èÁ¦ÇÏµµ·Ï ÇÏ°Ú½À´Ï´Ù.
 ********************************************************************************************************/

/*****************************************
 /* ¿À´ÃÀÇ ³¯Â¥¸¦ ³â¿ùÇüÅÂ·Î °¡Áö°í ¿À´Â ¸Þ¼­µå
 ****************************************/
function getYYYYMM()
{
	var return_value = '';

	var today = new Date() ;
	var ty = today.getFullYear() + '';
	var tm = today.getMonth() + 1;

	if (tm < 10)
		tm = "0" + tm;

	return_value = ty + tm;

	return return_value;
}

/*****************************************
 /* ¿À´ÃÀÇ ³¯Â¥ °®°í ¿À´Â ¸Þ¼­µå
 ****************************************/
function getToday(str_format)
{
	var return_value = '';

	var today = new Date() ;
	var ty = today.getFullYear() + '';
	var tm = today.getMonth() + 1;
	var td = today.getDate() ;

	if (tm < 10)
		tm = "0" + tm;
	if (td < 10)
		td = "0" + td;

	return_value = ty + tm + td;

	if (typeof(str_format) != 'undefined' && str_format != '')
		return_value = dateFormatting(return_value, str_format) ;

	//alert(return_value) ;
	return return_value;
}
/*****************************************
 /* ¿À´ÃÀÇ ³¯Â¥ + 1 À»°®°í ¿À´Â ¸Þ¼­µå ÀÚµ¿ÀÌÃ¼¿¡¼­ »ç¿ë
 ********************************************/
function getTodayTranEnd(str_format)
{
	var return_value = '';

	var today = new Date() ;
	var ty = today.getFullYear() + '';
	var tm = today.getMonth() + 1;
	var td = today.getDate() + 1;

	if (tm < 10)
		tm = "0" + tm;
	if (td < 10)
		td = "0" + td;

	return_value = ty + tm + td;

	if (typeof(str_format) != 'undefined' && str_format != '')
		return_value = dateFormatting(return_value, str_format) ;

	return return_value;
}

/*****************************************
 /* ¿À´ÃÀÇ ³âµµ + 1 À»°®°í ¿À´Â ¸Þ¼­µå ÀÚµ¿ÀÌÃ¼¿¡¼­ »ç¿ë
 ****************************************/
function getTodayTranStart(str_format)
{
	var return_value = '';

	var today = new Date() ;
	var ty = today.getFullYear() + 1 + '';
	var tm = today.getMonth() + 1;
	var td = today.getDate()  ;

	if (tm < 10)
		tm = "0" + tm;
	if (td < 10)
		td = "0" + td;

	return_value = ty + tm + td;

	if (typeof(str_format) != 'undefined' && str_format != '')
		return_value = dateFormatting(return_value, str_format) ;

	return return_value;
}

/*****************************
 /* date¸¦ Æ÷¸ËÆÃ ÇØÁÜ
 *****************************/
function dateFormatting(str_date, str_format)
{
	if (str_date.length == 8) {
		str_format = str_format.replace('yyyy', str_date.substring(0, 4)) ;
		str_format = str_format.replace('yy', str_date.substring(2, 4)) ;
		str_format = str_format.replace('mm', str_date.substring(4, 6)) ;
		str_format = str_format.replace('dd', str_date.substring(6, 8)) ;
	}
	return str_format;
}


/*****************************
 /* trim
 *****************************/
function trim(strVal)
{
	strVal = new String(strVal) ;
	return strVal.replace(/(^ *)|( *$)/g, "") ;
}

String.prototype.trim = function() {
	return this.replace(/(^ *)|( *$)/g, "") ;
}

/**
 *	comma Á¦°Å
 *
 */
function unFormatComma(str) {
	return str.replace(/[,]/g, "") ;
}

function unFormatSlash(str)
{
	return str.replace(/[\/]/g, "") ;
}

function unFormatDot(str) {
	return str.replace(/[.]/g, "") ;
}

function unFormatAccNo(str) {
	return str.replace(/[-]/g, "") ;
}

function addSlashSingleQuot(str) {
	return str.replace(/[']/g, "\'") ;
}

function addSlashDoubleQuot(str) {
	return str.replace(/["]/g, "\\\"") ;
}

/**
 *	comma »ðÀÔ"
 *
 */
function formatComma(num) {
	idx = num.length - 3;
	while (idx > 0) {
		num = num.substr(0, idx) + "," + num.substr(idx) ;
		idx -= 3;
	}
	return num;
}

function formatAccNo(argAccNo){
	var index = 0 ;
	var formatStr = "" ;

	try
	{
		if ( (argAccNo != null) && (Trim(argAccNo).length != 0) )
		{
			if (argAccNo.length > 3)
			{
				index = 3 ;
				formatStr = argAccNo.substr(0, 3) + "-" ;
			}

			if (argAccNo.length > 5)
			{
				index = 5 ;
				formatStr += argAccNo.substr(3, 2) + "-" ;
			}

			formatStr += argAccNo.substr(index) ;
		}
		else
		{
			formatStr = "" ;
		}
	}
	catch(e)
	{
		formatStr = "" ;
	}

	return formatStr ;
}

function onViewAccOut(accNo){

    var sAccGb = accNo.substring(0,1);
    //alert(sAccGb);
    if(accNo.length < 7){
        accNo = (accNo).replace(/([0-9]{3})([0-9]+)/,"$1-$2");
    }else{
        if(sAccGb == "0" || sAccGb == "1" || sAccGb == "7" || sAccGb == "9"){//±¸°èÁÂÆ÷¸Ë
            accNo = (accNo).replace(/([0-9]{3})([0-9]{2})([0-9]{6}$)/,"$1-$2-$3");
        }else{//½Å°èÁÂÆ÷¸Ë
            accNo = (accNo).replace(/([0-9]{3})([0-9]{3})([0-9]{3}$)/,"$1-$2-$3");
        }
    }
    return accNo;
}

function formatChdAccNo(argChdAccNo){
	var index = 0 ;
	var formatStr = "" ;

	try
	{
		if ( (argChdAccNo != null) && (Trim(argChdAccNo).length != 0) )
		{
			if (argChdAccNo.length > 3)
			{
				index = 3 ;
				formatStr = argChdAccNo.substr(0, 3) + "-" ;
			}

			formatStr += argChdAccNo.substr(index) ;
		}
		else
		{
			formatStr = "" ;
		}
	}
	catch(e)
	{
		formatStr = "" ;
	}

	return formatStr ;
}

function openSearch(findKeyword, name){
    window.open('/web/trading/power/jsp/trpw_st_code_popup.jsp?gubun=0&findKeyword='+findKeyword, name,'width=280,height=420,scrollbars=no') ;
}

/*****************************************
 /* º¸¾ÈÄ«µå»ç¿ë¹æ¹ý ÆË¾÷
 ****************************************/
function pop_scard() {
	var Url = "/web/Common/pop/pop_securitycard.html";
	openWindow_Center01(Url, "secu", "no", "660", "647") ;
}

/*
 * Change Image Rollover, Rollout & Layer State
 * @info : ÀÌ¹ÌÁö¿Í ·¹ÀÌ¾îÀÇ °ªÀ» ¹Þ¾Æ¼­ »óÅÂ¸¦ º¯°æÇØÁÖ´Â ÇÔ¼ö
 *         ÀÌ¹ÌÁö ¸íÀº ²À Á¦ÀÏ ¸¶Áö¸·ÀÌ o.gif(Rollover Image), x.gif(Rollout Image)À¸·Î ÁöÁ¤ÇÑ´Ù.
 */
function chgTab(tObj, dID, dState) {
	if (tObj == null) return;
	var tmpImg, tmpDiv, imgState, tmpState;
	tmpImg = tObj.getAttribute("src") ;
	if (tmpImg) tmpImg = tmpImg.substring(0,tmpImg.length-5) ; // ÀÌ¹ÌÁö ¸íµÚ¿¡ o, x.gif·Î ÁöÁ¤ÇÑ´Ù.
	imgState = (dState == "o")?"o.gif":"x.gif";
	tmpState = (dState == "o")?"block":"none";
	tObj.setAttribute("src",tmpImg+imgState) ;
	tmpDiv = document.getElementById(dID) ;
	if (tmpDiv) tmpDiv.style.display = tmpState;
}

/********************************************************************************************************
 °´Ã¼¸¦ ´ÙÀ½ °´Ã¼·Î Æ÷Ä¿¸¦ ÀÌµ¿ ½ÃÄÑ ÁØ´Ù.
 obj    : ÇöÀç °´Ã¼
 len    : Ã¼Å©ÇÒ ÀÚ¸´¼ö
 mobj   : ÀÌµ¿ÇÒ ´ÙÀ½ °´Ã¼
 Ãß°¡ÀÚ : 2008-04-29 ¿ÀÀü 10:46:00 ±èÁ¾¹Î
 ********************************************************************************************************/
function onMoveNext(obj, len, mobj){
    if(obj.value.length >= len){
        mobj.focus();
    }
}
/********************************************************************************************************
 °´Ã¼°ªÀ» ¼ýÀÚ·Î¸¸ ÀÔ·ÂÇÏ°Ô ÇÑ´Ù.
 obj    : ÇöÀç °´Ã¼
 Ãß°¡ÀÚ : 2008-05-09 ¿ÀÈÄ 4:59:54 ±èÁ¾¹Î
 ********************************************************************************************************/
function chkOnlyNum(obj){
    val=obj.value;
    re=/[^0-9]/gi;
    obj.value=val.replace(re,"");
}

/********************************************************************************************************
 * °Å·¡³»¿ª¿¡¼­ Á¶È¸±â°£ ³¯ÀÚ ¼¼ÆÃ±â´É
 * history.js ¿¡ ÀÖ´ø ±â´ÉÀ» °øÅëÀ¸·Î º¯°æ
 * 2008-10-06 ¿ÀÈÄ 2:08:58 ±èÁ¾¹Î
 ********************************************************************************************************/
function setDate(argGubun, argValue){
	var form = document.forms[0] ;
	var ls_date = form.txtEnd.value ;

	while (ls_date.indexOf("/") >= 0) {
		ls_date = ls_date.replace("/", "");
	}

        var ld_ToDate = new Date(ls_date.substring(0, 4), ls_date.substring(4, 6) - 1, ls_date.substring(6, 8)) ;
	var ld_NewDate = new Date() ;

	if (argGubun == "day"){
		ld_NewDate.setDate(ld_ToDate.getDate() + parseInt(argValue, 10));
	}else if (argGubun == "month"){
            ld_NewDate.setMonth(ld_ToDate.getMonth()  + parseInt(argValue, 10));
	}else if (argGubun == "year"){
		ld_NewDate.setYear(ld_ToDate.getYear() + parseInt(argValue, 10));
	}

	form.txtStart.value = ld_NewDate.getYear() + "/" +
	                      ((ld_NewDate.getMonth() + 1 < 10) ? "0" + (ld_NewDate.getMonth() + 1) : ld_NewDate.getMonth() + 1) + "/" +
	                      ((ld_NewDate.getDate() < 10) ? "0" + ld_NewDate.getDate() : ld_NewDate.getDate());
}

/********************************************************************************************************
 * HTML °³Ã¼¸¦ º¸ÀÌ°Ô/¾Èº¸ÀÌ°Ô ÇÏ´Â ±â´ÉÀ» ¼öÇàÇÔ.
 * history.js ¿¡ ÀÖ´ø ±â´ÉÀ» °øÅëÀ¸·Î º¯°æ
 * 2008-10-06 ¿ÀÈÄ 2:08:58 ±èÁ¾¹Î
 ********************************************************************************************************/
function HideElement(_id, _animation){
	var _el = document.getElementById(_id);
	var _gap = 30;

	if (_animation)
		_el.style.overflow = "hidden";
	else
		_el.style.overflow = "visible";

	this.hide = function(_ani){
		if (_ani){
			if (parseInt(_el.style.height, 10) - _gap > 0){
				_el.style.height = (parseInt(_el.style.height, 10) - _gap) + "px";
				setTimeout("this.hide(" + _ani + ")", 1);
			}else{
				_el.style.display = "none";
				_el.style.height = "";
			}
		}else{
		    _el.style.display = "none";
		}
	}

	this.show = function(_ani){
		if (_ani){
			if (parseInt(_el.style.height, 10) + _gap < _el.scrollHeight){
				_el.style.height = (parseInt(_el.style.height, 10) + _gap) + "px";
				setTimeout("this.show(" + _ani + ")", 1);
			}else{
				_el.style.height = "";
			}
		}

	}

	if (_el.style.display == "none"){
		_el.style.display = "";
		_el.style.height = 0 + "px";
		this.show(_animation);
	}else{
		_el.style.height = _el.scrollHeight + "px";
		this.hide(_animation);

	}
}

/********************************************************************************************************
 * HTML °³Ã¼¸¦ º¸ÀÌ°Ô/¾Èº¸ÀÌ°Ô ÇÏ´Â ±â´ÉÀ» ¼öÇàÇÔ.
 * history.js ¿¡ ÀÖ´ø ±â´ÉÀ» °øÅëÀ¸·Î º¯°æ
 * 2008-10-06 ¿ÀÈÄ 2:08:58 ±èÁ¾¹Î
 ********************************************************************************************************/
function alertShowAccount(frm, isel){

//    alert("½ÇÁ¦°ª : ½Å°èÁÂ : " + frm.selAcNo[isel].value + "\n" +
//          "±¸°èÁÂ : " + frm.selAcNo[isel].hbasic + "\n" +
//          "»óÇ°À¯Çü : " + frm.selAcNo[isel].htype + "\n" +
//          "»óÇ°±×·ì : " + frm.selAcNo[isel].hgroup + "\n" +
//          "°èÁÂ»ç¿ë±¸ºÐ : " + frm.selAcNo[isel].haccgb);

    frm.hbasic.value    = frm.selAcNo[isel].hbasic;
    frm.htype.value     = frm.selAcNo[isel].htype;
    frm.hgroup.value    = frm.selAcNo[isel].hgroup;
    frm.haccgb.value    = frm.selAcNo[isel].haccgb;
}

/********************************************************************************************************
 * °èÁÂ¹øÈ£À» ½Å°èÁÂ ±¸°èÁÂ Æ÷¸ËÀ¸·Î º¸¿©ÁØ´Ù.
 * ±¸°èÁÂ           : 01101123456   => 011-01-123456
 * ½Å°èÁÂ 9ÀÚ¸®     : 211011234     => 211-011-234
 * ½Å°èÁÂ 11ÀÚ¸®    : 21101123456   => 211-011-234-56
 * 2008-12-30 ¿ÀÈÄ 4:06:56 ±èÁ¾¹Î
 ********************************************************************************************************/
function onConvertAccOut(arg){
    var sRetVal = "";
    var sAccGb = arg.substring(0,1);

    if(sAccGb == "0" || sAccGb == "1" || sAccGb == "7" || sAccGb == "9"){//±¸°èÁÂÆ÷¸Ë
        sRetVal = arg.replace(/([0-9]{3})([0-9]{2})([0-9]{6}$)/,"$1-$2-$3");
    }else{//½Å°èÁÂÆ÷¸Ë
        if(arg.length < 10){
            sRetVal = arg.replace(/([0-9]{3})([0-9]{3})([0-9]+)/,"$1-$2-$3");
        }else{
            sRetVal = arg.replace(/([0-9]{3})([0-9]{3})([0-9]{3})([0-9]+)/,"$1-$2-$3-$4");
        }
    }

    return sRetVal;
}


/********************************************************************************************************
 * ¼Û±Ý°¡´É ±â°ü¸ÅÃ¼ÄÚµå ¼³Á¤
 * 2009-06-29 ¿ÀÈÄ 3:02:54 ±èÁ¾¹Î
 ********************************************************************************************************/
function onOptionBankCd(arg){


    document.write("<option value='039' " + (("039" == arg) ? "selected" : "") + " >°æ³²ÀºÇà            [039]</option>");
    document.write("<option value='261' " + (("261" == arg) ? "selected" : "") + " >±³º¸Áõ±Ç            [261]</option>");
    document.write("<option value='034' " + (("034" == arg) ? "selected" : "") + " >±¤ÁÖÀºÇà            [034]</option>");
    document.write("<option value='004' " + (("004" == arg) ? "selected" : "") + " >±¹¹ÎÀºÇà            [004]</option>");
    document.write("<option value='003' " + (("003" == arg) ? "selected" : "") + " >±â¾÷ÀºÇà            [003]</option>");
    document.write("<option value='011' " + (("011" == arg) ? "selected" : "") + " >³óÇùÁß¾ÓÈ¸          [011]</option>");
    document.write("<option value='012' " + (("012" == arg) ? "selected" : "") + " >³óÇùÈ¸¿øÁ¶ÇÕ        [012]</option>");
    document.write("<option value='031' " + (("031" == arg) ? "selected" : "") + " >´ë±¸ÀºÇà            [031]</option>");
    document.write("<option value='267' " + (("267" == arg) ? "selected" : "") + " >´ë½ÅÁõ±Ç            [267]</option>");
    document.write("<option value='238' " + (("238" == arg) ? "selected" : "") + " >´ë¿ìÁõ±Ç            [238]</option>");
    document.write("<option value='055' " + (("055" == arg) ? "selected" : "") + " >µµÀÌÄ¡ÀºÇà          [055]</option>");
    document.write("<option value='279' " + (("279" == arg) ? "selected" : "") + " >µ¿ºÎÁõ±Ç            [279]</option>");
    document.write("<option value='209' " + (("209" == arg) ? "selected" : "") + " >µ¿¾çÁ¾±Ý            [209]</option>");
    document.write("<option value='287' " + (("287" == arg) ? "selected" : "") + " >¸Þ¸®Ã÷Áõ±Ç          [287]</option>");
    document.write("<option value='230' " + (("230" == arg) ? "selected" : "") + " >¹Ì·¡¿¡¼ÂÁõ±Ç        [230]</option>");
    document.write("<option value='059' " + (("059" == arg) ? "selected" : "") + " >¹Ì¾²ºñ½ÃµµÄìUFJÀºÇà [059]</option>");
    document.write("<option value='058' " + (("058" == arg) ? "selected" : "") + " >¹ÌÁîÈ£ÄÚÆÛ·¹ÀÌÆ®ÀºÇà[058]</option>");
    document.write("<option value='060' " + (("060" == arg) ? "selected" : "") + " >¹ðÅ©¿Àºê¾Æ¸Þ¸®Ä«    [060]</option>");
    document.write("<option value='032' " + (("032" == arg) ? "selected" : "") + " >ºÎ»êÀºÇà            [032]</option>");
    document.write("<option value='064' " + (("064" == arg) ? "selected" : "") + " >»ê¸²Á¶ÇÕ            [064]</option>");
    document.write("<option value='002' " + (("002" == arg) ? "selected" : "") + " >»ê¾÷ÀºÇà            [002]</option>");
    document.write("<option value='240' " + (("240" == arg) ? "selected" : "") + " >»ï¼ºÁõ±Ç            [240]</option>");
    document.write("<option value='050' " + (("050" == arg) ? "selected" : "") + " >»óÈ£ÀúÃàÀºÇàÁß¾ÓÈ¸  [050]</option>");
    document.write("<option value='045' " + (("045" == arg) ? "selected" : "") + " >»õ¸¶À»±Ý°í¿¬ÇÕÈ¸    [045]</option>");
    document.write("<option value='007' " + (("007" == arg) ? "selected" : "") + " >¼öÇùÁß¾ÓÈ¸          [007]</option>");
    document.write("<option value='291' " + (("291" == arg) ? "selected" : "") + " >½Å¿µÁõ±Ç            [291]</option>");//2009-09-03 ¿ÀÈÄ 2:14:51 Ãß°¡
    document.write("<option value='048' " + (("048" == arg) ? "selected" : "") + " >½Å¿ëÇùµ¿Á¶ÇÕ        [048]</option>");
    document.write("<option value='088' " + (("088" == arg) ? "selected" : "") + " >½ÅÇÑÀºÇà            [088]</option>");
    document.write("<option value='278' " + (("278" == arg) ? "selected" : "") + " >½ÅÇÑ±ÝÀ¶ÅõÀÚ        [278]</option>");
    document.write("<option value='005' " + (("005" == arg) ? "selected" : "") + " >¿ÜÈ¯ÀºÇà            [005]</option>");
    document.write("<option value='020' " + (("020" == arg) ? "selected" : "") + " >¿ì¸®ÀºÇà            [020]</option>");
    document.write("<option value='247' " + (("247" == arg) ? "selected" : "") + " >¿ì¸®ÅõÀÚÁõ±Ç        [247]</option>");
    document.write("<option value='280' " + (("280" == arg) ? "selected" : "") + " >À¯ÁøÅõÀÚÁõ±Ç        [280]</option>");//2009-09-03 ¿ÀÈÄ 2:14:51 Ãß°¡
    //document.write("<option value='265' " + (("265" == arg) ? "selected" : "") + " >ÀÌÆ®·¹ÀÌµåÁõ±Ç      [265]</option>");//2009-12-01 ¿ÀÈÄ 3:33:45 Ãß°¡
    document.write("<option value='037' " + (("037" == arg) ? "selected" : "") + " >ÀüºÏÀºÇà            [037]</option>");
    document.write("<option value='035' " + (("035" == arg) ? "selected" : "") + " >Á¦ÁÖÀºÇà            [035]</option>");
    document.write("<option value='071' " + (("071" == arg) ? "selected" : "") + " >Áö½Ä°æÁ¦ºÎ(¿ìÃ¼±¹)  [071]</option>");
    document.write("<option value='264' " + (("264" == arg) ? "selected" : "") + " >Å°¿òÁõ±Ç            [264]</option>");//2010-02-01 ¿ÀÈÄ 6:24:13 ½Ç ¼­¹ö Ãß°¡
    document.write("<option value='270' " + (("270" == arg) ? "selected" : "") + " >ÇÏ³ª´ëÅõÁõ±Ç        [270]</option>");
    document.write("<option value='081' " + (("081" == arg) ? "selected" : "") + " >ÇÏ³ªÀºÇà            [081]</option>");
    document.write("<option value='262' " + (("262" == arg) ? "selected" : "") + " >ÇÏÀÌÅõÀÚÁõ±Ç        [262]</option>");
    document.write("<option value='027' " + (("027" == arg) ? "selected" : "") + " >ÇÑ±¹¾¾Æ¼ÀºÇà        [027]</option>");
    document.write("<option value='243' " + (("243" == arg) ? "selected" : "") + " >ÇÑ±¹ÅõÀÚÁõ±Ç        [243]</option>");
    document.write("<option value='269' " + (("269" == arg) ? "selected" : "") + " >ÇÑÈ­Áõ±Ç            [269]</option>");
    //document.write("<option value='218' " + (("218" == arg) ? "selected" : "") + " >Çö´ëÁõ±Ç              [218]</option>");
    document.write("<option value='056' " + (("056" == arg) ? "selected" : "") + " >¾Ëºñ¿¡½º ÀºÇà       [056]</option>");//2010-02-01 ¿ÀÈÄ 6:25:37 ÀºÇà¸í º¯°æ
    document.write("<option value='263' " + (("263" == arg) ? "selected" : "") + " >HMCÅõÀÚÁõ±Ç         [263]</option>");
    document.write("<option value='054' " + (("054" == arg) ? "selected" : "") + " >HSBCÀºÇà            [054]</option>");
    document.write("<option value='057' " + (("057" == arg) ? "selected" : "") + " >JP¸ð°Ç              [057]</option>");
    document.write("<option value='023' " + (("023" == arg) ? "selected" : "") + " >SCÁ¦ÀÏÀºÇà          [023]</option>");
    document.write("<option value='266' " + (("266" == arg) ? "selected" : "") + " >SKÁõ±Ç              [266]</option>");

//    document.write("<option value='002' "+ (("002" == arg) ? "selected" : "") +" >»ê¾÷ÀºÇà [2]</option>               ");
//    document.write("<option value='003' "+ (("003" == arg) ? "selected" : "") +" >±â¾÷ÀºÇà [3]</option>               ");
//    document.write("<option value='004' "+ (("004" == arg) ? "selected" : "") +" >±¹¹ÎÀºÇà [4]</option>               ");
//    document.write("<option value='005' "+ (("005" == arg) ? "selected" : "") +" >¿ÜÈ¯ÀºÇà [5]</option>               ");
//    document.write("<option value='007' "+ (("007" == arg) ? "selected" : "") +" >¼öÇùÁß¾ÓÈ¸ [7]</option>             ");
//    document.write("<option value='011' "+ (("011" == arg) ? "selected" : "") +" >³óÇùÁß¾ÓÈ¸ [11]</option>            ");
//    document.write("<option value='012' "+ (("012" == arg) ? "selected" : "") +" >³óÇùÈ¸¿øÁ¶ÇÕ [12]</option>          ");
//    document.write("<option value='020' "+ (("020" == arg) ? "selected" : "") +" >¿ì¸®ÀºÇà [20]</option>              ");
//    document.write("<option value='023' "+ (("023" == arg) ? "selected" : "") +" >SCÁ¦ÀÏÀºÇà [23]</option>            ");
//    document.write("<option value='027' "+ (("027" == arg) ? "selected" : "") +" >ÇÑ±¹¾¾Æ¼ÀºÇà [27]</option>          ");// 07.07.31 ÇÑ¹ÌÀºÇà=>½ÃÆ¼/ÇÑ¹Ì(27)
//    document.write("<option value='031' "+ (("031" == arg) ? "selected" : "") +" >´ë±¸ÀºÇà [31]</option>              ");
//    document.write("<option value='032' "+ (("032" == arg) ? "selected" : "") +" >ºÎ»êÀºÇà [32]</option>              ");
//    document.write("<option value='034' "+ (("034" == arg) ? "selected" : "") +" >±¤ÁÖÀºÇà [34]</option>              ");
//    document.write("<option value='035' "+ (("035" == arg) ? "selected" : "") +" >Á¦ÁÖÀºÇà [35]</option>              ");
//    document.write("<option value='037' "+ (("037" == arg) ? "selected" : "") +" >ÀüºÏÀºÇà [37]</option>              ");
//    document.write("<option value='039' "+ (("039" == arg) ? "selected" : "") +" >°æ³²ÀºÇà [39]</option>              ");
//    document.write("<option value='045' "+ (("045" == arg) ? "selected" : "") +" >»õ¸¶À»±Ý°í¿¬ÇÕÈ¸ [45]</option>      ");
//    document.write("<option value='048' "+ (("048" == arg) ? "selected" : "") +" >½Å¿ëÇùµ¿Á¶ÇÕ [48]</option>          ");
//    document.write("<option value='050' "+ (("050" == arg) ? "selected" : "") +" >»óÈ£ÀúÃàÀºÇàÁß¾ÓÈ¸ [50]</option>    ");
//    document.write("<option value='054' "+ (("054" == arg) ? "selected" : "") +" >HSBCÀºÇà [54]</option>              ");
//    document.write("<option value='055' "+ (("055" == arg) ? "selected" : "") +" >µµÀÌÄ¡ÀºÇà [55]</option>            ");
//    document.write("<option value='056' "+ (("056" == arg) ? "selected" : "") +" >ABN¾Ï·ÎÀºÇà [56]</option>           ");
//    document.write("<option value='057' "+ (("057" == arg) ? "selected" : "") +" >JP¸ð°Ç [57]</option>                ");
//    document.write("<option value='058' "+ (("058" == arg) ? "selected" : "") +" >¹ÌÁîÈ£ÄÚÆÛ·¹ÀÌÆ®ÀºÇà [58]</option>  ");
//    document.write("<option value='059' "+ (("059" == arg) ? "selected" : "") +" >¹Ì¾²ºñ½ÃµµÄìUFJÀºÇà [59]</option>   ");
//    document.write("<option value='060' "+ (("060" == arg) ? "selected" : "") +" >¹ðÅ©¿Àºê¾Æ¸Þ¸®Ä« [60]</option>      ");
//    document.write("<option value='064' "+ (("064" == arg) ? "selected" : "") +" >»ê¸²Á¶ÇÕ [64]</option>              ");
//    document.write("<option value='071' "+ (("071" == arg) ? "selected" : "") +" >Áö½Ä°æÁ¦ºÎ(¿ìÃ¼±¹) [71]</option>    ");
//    document.write("<option value='081' "+ (("081" == arg) ? "selected" : "") +" >ÇÏ³ªÀºÇà [81]</option>              ");
//    document.write("<option value='088' "+ (("088" == arg) ? "selected" : "") +" >½ÅÇÑÀºÇà [88]</option>              ");
//    document.write("<option value='209' "+ (("209" == arg) ? "selected" : "") +" >µ¿¾çÁ¾±Ý [209]</option>             ");
//    //document.write("<option value='218' "+ (("218" == arg) ? "selected" : "") +" >Çö´ëÁõ±Ç [218]</option>             ");
//    document.write("<option value='230' "+ (("230" == arg) ? "selected" : "") +" >¹Ì·¡¿¡¼ÂÁõ±Ç [230]</option>         ");
//    document.write("<option value='238' "+ (("238" == arg) ? "selected" : "") +" >´ë¿ìÁõ±Ç [238]</option>             ");
//    document.write("<option value='240' "+ (("240" == arg) ? "selected" : "") +" >»ï¼ºÁõ±Ç [240]</option>             ");
//    document.write("<option value='243' "+ (("243" == arg) ? "selected" : "") +" >ÇÑ±¹ÅõÀÚÁõ±Ç [243]</option>         ");
//    document.write("<option value='247' "+ (("247" == arg) ? "selected" : "") +" >¿ì¸®ÅõÀÚÁõ±Ç [247]</option>         ");
//    document.write("<option value='262' "+ (("262" == arg) ? "selected" : "") +" >ÇÏÀÌÅõÀÚÁõ±Ç [262]</option>         ");
//    document.write("<option value='263' "+ (("263" == arg) ? "selected" : "") +" >HMCÅõÀÚÁõ±Ç [263]</option>          ");
//    document.write("<option value='266' "+ (("266" == arg) ? "selected" : "") +" >SKÁõ±Ç [266]</option>               ");
//    document.write("<option value='269' "+ (("269" == arg) ? "selected" : "") +" >ÇÑÈ­Áõ±Ç [269]</option>             ");
//    document.write("<option value='270' "+ (("270" == arg) ? "selected" : "") +" >ÇÏ³ª´ëÅõÁõ±Ç [270]</option>         ");
//    document.write("<option value='278' "+ (("278" == arg) ? "selected" : "") +" >±Â¸ð´×½ÅÇÑÁõ±Ç [278]</option>       ");
}

function onOptionBankCdSmallAppr(arg){

    document.write("<option value='039' " + (("039" == arg) ? "selected" : "") + " >°æ³²ÀºÇà            [039]</option>");
    document.write("<option value='261' " + (("261" == arg) ? "selected" : "") + " >±³º¸Áõ±Ç            [261]</option>");
    document.write("<option value='034' " + (("034" == arg) ? "selected" : "") + " >±¤ÁÖÀºÇà            [034]</option>");
    document.write("<option value='004' " + (("004" == arg) ? "selected" : "") + " >±¹¹ÎÀºÇà            [004]</option>");
    document.write("<option value='003' " + (("003" == arg) ? "selected" : "") + " >±â¾÷ÀºÇà            [003]</option>");
    document.write("<option value='011' " + (("011" == arg) ? "selected" : "") + " >³óÇùÁß¾ÓÈ¸          [011]</option>");
    document.write("<option value='012' " + (("012" == arg) ? "selected" : "") + " >³óÇùÈ¸¿øÁ¶ÇÕ        [012]</option>");
    document.write("<option value='031' " + (("031" == arg) ? "selected" : "") + " >´ë±¸ÀºÇà            [031]</option>");
    document.write("<option value='267' " + (("267" == arg) ? "selected" : "") + " >´ë½ÅÁõ±Ç            [267]</option>");
    document.write("<option value='238' " + (("238" == arg) ? "selected" : "") + " >´ë¿ìÁõ±Ç            [238]</option>");
    document.write("<option value='055' " + (("055" == arg) ? "selected" : "") + " >µµÀÌÄ¡ÀºÇà          [055]</option>");
    document.write("<option value='279' " + (("279" == arg) ? "selected" : "") + " >µ¿ºÎÁõ±Ç            [279]</option>");
    document.write("<option value='209' " + (("209" == arg) ? "selected" : "") + " >µ¿¾çÁ¾±Ý            [209]</option>");
    document.write("<option value='287' " + (("287" == arg) ? "selected" : "") + " >¸Þ¸®Ã÷Áõ±Ç          [287]</option>");
    document.write("<option value='230' " + (("230" == arg) ? "selected" : "") + " >¹Ì·¡¿¡¼ÂÁõ±Ç        [230]</option>");
    document.write("<option value='059' " + (("059" == arg) ? "selected" : "") + " >¹Ì¾²ºñ½ÃµµÄìUFJÀºÇà [059]</option>");
    document.write("<option value='058' " + (("058" == arg) ? "selected" : "") + " >¹ÌÁîÈ£ÄÚÆÛ·¹ÀÌÆ®ÀºÇà[058]</option>");
    document.write("<option value='060' " + (("060" == arg) ? "selected" : "") + " >¹ðÅ©¿Àºê¾Æ¸Þ¸®Ä«    [060]</option>");
    document.write("<option value='032' " + (("032" == arg) ? "selected" : "") + " >ºÎ»êÀºÇà            [032]</option>");
    document.write("<option value='064' " + (("064" == arg) ? "selected" : "") + " >»ê¸²Á¶ÇÕ            [064]</option>");
    document.write("<option value='002' " + (("002" == arg) ? "selected" : "") + " >»ê¾÷ÀºÇà            [002]</option>");
    document.write("<option value='240' " + (("240" == arg) ? "selected" : "") + " >»ï¼ºÁõ±Ç            [240]</option>");
    document.write("<option value='050' " + (("050" == arg) ? "selected" : "") + " >»óÈ£ÀúÃàÀºÇàÁß¾ÓÈ¸  [050]</option>");
    document.write("<option value='045' " + (("045" == arg) ? "selected" : "") + " >»õ¸¶À»±Ý°í¿¬ÇÕÈ¸    [045]</option>");
    document.write("<option value='007' " + (("007" == arg) ? "selected" : "") + " >¼öÇùÁß¾ÓÈ¸          [007]</option>");
    document.write("<option value='291' " + (("291" == arg) ? "selected" : "") + " >½Å¿µÁõ±Ç            [291]</option>");//2009-09-03 ¿ÀÈÄ 2:14:51 Ãß°¡
    document.write("<option value='048' " + (("048" == arg) ? "selected" : "") + " >½Å¿ëÇùµ¿Á¶ÇÕ        [048]</option>");
    document.write("<option value='088' " + (("088" == arg) ? "selected" : "") + " >½ÅÇÑÀºÇà            [088]</option>");
    document.write("<option value='278' " + (("278" == arg) ? "selected" : "") + " >½ÅÇÑ±ÝÀ¶ÅõÀÚ        [278]</option>");
    document.write("<option value='005' " + (("005" == arg) ? "selected" : "") + " >¿ÜÈ¯ÀºÇà            [005]</option>");
    document.write("<option value='020' " + (("020" == arg) ? "selected" : "") + " >¿ì¸®ÀºÇà            [020]</option>");
    document.write("<option value='247' " + (("247" == arg) ? "selected" : "") + " >¿ì¸®ÅõÀÚÁõ±Ç        [247]</option>");
    document.write("<option value='280' " + (("280" == arg) ? "selected" : "") + " >À¯ÁøÅõÀÚÁõ±Ç        [280]</option>");//2009-09-03 ¿ÀÈÄ 2:14:51 Ãß°¡
    //document.write("<option value='265' " + (("265" == arg) ? "selected" : "") + " >ÀÌÆ®·¹ÀÌµåÁõ±Ç      [265]</option>");//2009-12-01 ¿ÀÈÄ 3:33:45 Ãß°¡
    document.write("<option value='037' " + (("037" == arg) ? "selected" : "") + " >ÀüºÏÀºÇà            [037]</option>");
    document.write("<option value='035' " + (("035" == arg) ? "selected" : "") + " >Á¦ÁÖÀºÇà            [035]</option>");
    document.write("<option value='071' " + (("071" == arg) ? "selected" : "") + " >Áö½Ä°æÁ¦ºÎ(¿ìÃ¼±¹)  [071]</option>");
    //document.write("<option value='264' " + (("264" == arg) ? "selected" : "") + " >Å°¿òÁõ±Ç            [264]</option>");//2009-12-01 ¿ÀÈÄ 3:33:52 Ãß°¡
    document.write("<option value='270' " + (("270" == arg) ? "selected" : "") + " >ÇÏ³ª´ëÅõÁõ±Ç        [270]</option>");
    document.write("<option value='081' " + (("081" == arg) ? "selected" : "") + " >ÇÏ³ªÀºÇà            [081]</option>");
    document.write("<option value='262' " + (("262" == arg) ? "selected" : "") + " >ÇÏÀÌÅõÀÚÁõ±Ç        [262]</option>");
    document.write("<option value='027' " + (("027" == arg) ? "selected" : "") + " >ÇÑ±¹¾¾Æ¼ÀºÇà        [027]</option>");
    document.write("<option value='243' " + (("243" == arg) ? "selected" : "") + " >ÇÑ±¹ÅõÀÚÁõ±Ç        [243]</option>");
    document.write("<option value='269' " + (("269" == arg) ? "selected" : "") + " >ÇÑÈ­Áõ±Ç            [269]</option>");
    document.write("<option value='218' " + (("218" == arg) ? "selected" : "") + " >Çö´ëÁõ±Ç            [218]</option>");
    document.write("<option value='056' " + (("056" == arg) ? "selected" : "") + " >ABN¾Ï·ÎÀºÇà         [056]</option>");
    document.write("<option value='263' " + (("263" == arg) ? "selected" : "") + " >HMCÅõÀÚÁõ±Ç         [263]</option>");
    document.write("<option value='054' " + (("054" == arg) ? "selected" : "") + " >HSBCÀºÇà            [054]</option>");
    document.write("<option value='057' " + (("057" == arg) ? "selected" : "") + " >JP¸ð°Ç              [057]</option>");
    document.write("<option value='023' " + (("023" == arg) ? "selected" : "") + " >SCÁ¦ÀÏÀºÇà          [023]</option>");
    document.write("<option value='266' " + (("266" == arg) ? "selected" : "") + " >SKÁõ±Ç              [266]</option>");


}

































