 /*
¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ common_scr - ÀÚ¹Ù½ºÅ©¸³Æ® Ãß°¡ ÇÔ¼ö ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ
	¡Ý Version : common ¿ÜÀÇ Ãß°¡ÇÏ´Â ÀÚ¹Ù½ºÅ©¸³Æ® ÇÔ¼ö
	¡Ý Product Day	: 2009.12.28
	¡Ý Last Modify	: 2010.01.01
	¡Ý Notice :
¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ¢Æ
*/
/*	
	//¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë
	¡Ý Common + Ãß°¡ ÇÔ¼ö Á¤ÀÇ
		fn_		: ÇÔ¼ö ¾îµÎ.
		_Chk 	: ¹º°¡ Ã¼Å©ÇØ¼­ ³Ñ¾î°¡¾ß ÇÒ °æ¿ì
			is		: ´Ü¼ø Ã¼Å©
			only	: ÀÔ·Â¹Þ´Â key in Á¦ÇÑ
			inout	: ¹®ÀÚ¸¦ Ãß°¡ÇÏ°Å³ª »èÁ¦ÇÒ ¶§
			msg		: ÀÔ·Â¹ÞÁö ¸»¾Æ¾ß ÇÒ °æ¿ì msg °æ°í ¾È³»
			gfn		: obj °ªÀ» return ÇØ¾ß µÉ °æ¿ì
			act		: °ªÀ» ¹Þ¾Æ ¹º°¡ ½ÇÇàÇÒ °æ¿ì
	//¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë
*/


/*/////////////////////////////////////////////////////////////////////*/
/*
	// Cookie ¼³Á¤ ( setCookie / getCookie )
*/
/*/////////////////////////////////////////////////////////////////////*/
	//	setCookie
	function setCookie( cookiename, cookievalue, expiredays ){
		var todayDate = new Date();
		todayDate.setDate( todayDate.getDate() + expiredays );
		//	document.cookie.domain="automart.co.kr"
		document.cookie = cookiename + "=" + escape( cookievalue ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
		return;
	}

	//	getCookie
	function getCookie(cookiename) {
		var nameOfCookie = cookiename + "=";
		var x = 0;
		while(x <= document.cookie.length) {
			var y = (x + nameOfCookie.length);
			if(document.cookie.substring(x,y) == nameOfCookie) {
				if((endOfCookie = document.cookie.indexOf(";",y)) == -1)
					endOfCookie = document.cookie.length;
				return unescape(document.cookie.substring(y,endOfCookie));
			}
			x = document.cookie.indexOf(" ",x) + 1;
			if(x == 0)
				break;
		}
		return "";
	}


/*/////////////////////////////////////////////////////////////////////*/
/*
	//	ÆË¾÷Ã¢	popup_user(lvlink, winnm,'725','500','1','1','','','','');
	//			popup_user(lvlink, winnm,'725','400'); => ³ª¸ÓÁö ¿É¼ÇÀº no ·Î Ã³¸®µÊ. º¸Åë ½ºÅ©·Ñ ¿É¼ÇÀº ÁØ´Ù.(Â÷·®»ó¼¼¶§´Â noÁØ´Ù)
	//			popup_user(lvlink, winnm,'725','500',½ºÅ©·Ñ,¸®»çÀÌÁî);
*/
/*/////////////////////////////////////////////////////////////////////*/
	//	¸ðµç ÆË¾÷Ã¢Àº ¾Æ·¡ popup_user¸¦ »ç¿ëÇÏ°íÀÚ ÇÑ´Ù.
	function popup_user(urlstr,winnm,wid,hei,scr,res,wto,wle,loc,sta) {
		if (winnm=='') { winnm = 'NewWin'; }
		if (wid == '') { wid = '640'; }
		if (hei == '') { hei = '480'; }
		if (scr == '') { scr = '1'; }
		if (res == '') { res = '1'; }
		if (wto == '') { wto = '0'; }
		if (wle == '') { wle = '0'; }
		if (loc == '') { loc = 'no'; }
		if (sta == '') { sta = 'no'; }
		window.open (urlstr,winnm,"resizable="+res+",top="+wto+",left="+wle+",location="+loc+",status="+sta+",scrollbars="+scr+",directories=no,"+"width="+wid+",height="+hei+",menubar=no");
	}

	/* ±âÁ¸ È¨ÇÇ¿¡¼­ »ç¿ëÇß´ø °ÍÀÎµ¥.. db¿¡¼­ °¡²û »ç¿ëÇÏ±æ·¡ ³Ö¾îµÒ.. but ¾ÕÀ¸·Î´Â ¾È¾µ °ÍÀÓ. */
	function pop_on_user(urlstr,winnm,wid,hei,wto,wle,loc,sta,scr,res) {
		if (winnm=='') { winnm = 'NewWin'; }
		if (wid == '') { wid = '640'; }
		if (hei == '') { hei = '480'; }
		if (wto == '') { wto = '0'; }
		if (wle == '') { wle = '0'; }
		if (loc == '') { loc = 'no'; }
		if (sta == '') { sta = 'no'; }
		if (scr == '') { scr = 'no'; }
		if (res == '') { res = 'no'; }
		window.open (urlstr,winnm,"resizable="+res+",top="+wto+",left="+wle+",location="+loc+",status="+sta+",scrollbars="+scr+",directories=no,"+"width="+wid+",height="+hei+",menubar=no");
	}


/*/////////////////////////////////////////////////////////////////////*/
/*	
	//	¿ìÆí¹øÈ£ Ã£±â
	//	¿¹:	<a href="javascript:fn_pop_zipcode('zip1=PERZIP1&zip2=PERZIP2&addr1=PERADDR1&addr2=PERADDR2&frnm=form1')" onfocus="blur();" ><img src="/images/btn_addSearch.gif" border="0" /></a>
	//		<td style="padding-left: 5px"><a href="javascript:fn_pop_zipcode('zip1=PERZIP1&zip2=PERZIP2&addr1=PERADDR1&addr2=PERADDR2&frnm=form1')" 
				onfocus="blur();" ><img src="/images/btn_addSearch.gif" border="0" /></a></td>
			<td style="padding-left: 5px"><img src="/images/img_dot02.gif" /></td> 
			<input type="text" class="input_box" size="28" readonly name="PERADDR1" value="" onClick="javascript:pop_zipcode('zip1=PERZIP1&zip2=PERZIP2&addr1=PERADDR1&addr2=PERADDR2&frnm=form1');" />
			<input type="text" class="input_box" size="49" maxlength=50 name="PERADDR2" value="" />
*/
/*/////////////////////////////////////////////////////////////////////*/
	function fn_pop_zipcode(lvlink){
		lvlink = "/common/pop_zipcode.asp?Type=1&" + lvlink;
		popup_user(lvlink, 'WinZipCode','420','330','1','0','','','','');
	}


/*/////////////////////////////////////////////////////////////////////*/
/*	
	//	object ¿¡ ÀÔ·ÂÇÒ ¶§ Ã¼Å©
*/
/*/////////////////////////////////////////////////////////////////////*/
	//	ÀÔ·Â¹Þ¾Æ keyUp½Ã ´ÙÀ½ Ä­ ÁöÁ¤ÇØ¼­ ÀÌµ¿½ÃÅ´
	//	<input name="PEH_DamJumin1" style='ime-mode:disabled;' onkeypress="fn_ChkNum();" onkeyup="fn_NextAutoFocus(this.value, document.all.PEH_DamJumin2, 6);"> - <input
	//	<input name="PEH_DamJumin1" style='ime-mode:disabled;' onkeypress="fn_ChkNum();" onkeyup="fn_NextAutoFocus(this.value, form1.PEH_DamJumin2, 6);"> - <input
	//	onkeyup="fn_NextAutoFocus(ÇöÀçobj°ª, ÀÌµ¿µÉobj¸í, ÇÔ¼ö°¡ Àû¿ëµÉ ÀÔ·Â°ª¼ö);"> - <input
	//	onkeyup="fn_NextAutoFocus(this.value, form1.PEH_DamJumin2, 6);"> - <input
	function fn_NextAutoFocus(curval,furobj,chknum){
		var length = curval.length;
		if(length >= chknum){
			furobj.focus();
			return;
		}
	}
	//	ÀÔ·Â¹Þ¾Æ keyUp½Ã ´ÙÀ½ Ä­ ÁöÁ¤ÇØ¼­ ÀÌµ¿ÇÏ¸é¼­ obj¸¦ select ½ÃÅ´ -> °ªÀ» ¹Ù·Î ¼öÁ¤ÇÒ ¼ö ÀÖÀ½.
	//	À§ fn_NextAutoFocus ÇÔ¼ö¿¡¼­ select¸¸ Ãß°¡ÇÔ.
	function fn_NextAutoFocusSelect(curval,furobj,chknum){
		var length = curval.length;
		if(length >= chknum){
			furobj.focus();
			furobj.select();
			return;
		}
	}
	/*
		//ÁÖ¹Î¹øÈ£ Ä­ ÀÌµ¿½Ã, ¼ýÀÚ¸¸ ¹Þ°Ô.. -> Áö±ÝÀº À§ÀÇ ÇÔ¼ö¸¦ ÀÌ¿ëÇÔ.. ÃßÈÄ »ç¿ë¿©ºÎ È®ÀÎÇØ¼­ »èÁ¦¿¹Á¤
		//	onkeypress="onlyNum();" style="ime-mode:disabled" onkeyup="moveForm(document.registercheck, this.value,document.registercheck.jumin2.name,6);"
		//	onfocus="javascript:document.registercheck.jumin1.select();">
		//<input size="7" maxlength=7 name="jumin2" onkeypress="onlyNum();" onkeyup="moveForm(document.registercheck, this.value,document.registercheck.pass1.name,7);"
		//		onfocus="javascript:document.registercheck.jumin2.select();">
	*/
	function moveForm(formobj, move, sname, s) {
		if(move.length == 4 && s == 4){
			formobj.elements[sname].focus();
		}
		else if(move.length == 2 && s == 2){
			formobj.elements[sname].focus();
		}
		else if(move.length == 3 && s == 3){
			formobj.elements[sname].focus();
		}
		else if(move.length == 5 && s == 5){
			formobj.elements[sname].focus();
		}
		else if(move.length == 6 && s == 6){
			formobj.elements[sname].focus();
		}
		else if(move.length == 7 && s == 7){
			formobj.elements[sname].focus();
		}
		else if(move.length == 9 && s == 9){
			formobj.elements[sname].focus();
		}
		else if(move.length == 8 && s == 8){
			formobj.elements[sname].focus();
		}
	}


/*/////////////////////////////////////////////////////////////////////*/
/*
	// textbox object : ¼ýÀÚ Ã¼Å© ÇÔ¼ö
*/
/*/////////////////////////////////////////////////////////////////////*/
	//	¼ýÀÚ¸¸ ÀÔ·Â°¡´É (±Ý¾×µî¿¡ »ç¿ë) : ÀÔ·Â¹ÞÀ» ¶§ Ã¼Å©..
	//	<input style='ime-mode:disabled;' onkeypress="fn_ChkNum();"...
	function fn_ChkNum() {
		if (event.keyCode < 48 || event.keyCode > 57) {
			event.returnValue = false; }
	}

	//	¼ýÀÚ¿Í ´ë½Ã(-) ¸¸ ÀÔ·Â °¡´É (°èÁÂ¹øÈ£ µî¿¡ »ç¿ë) : ÀÔ·Â¹ÞÀ» ¶§ Ã¼Å©..
	//	style='ime-mode:disabled;' onkeypress="fn_ChkDashNum();"...
	function fn_ChkDashNum() {
		if ( (event.keyCode < 48 || event.keyCode > 57) && !(event.keyCode==45) ) {
			event.returnValue = false; }
	}

	// ¼ýÀÚ¸¸ ÀÔ·Â¹ÞÀ» ¼ö ÀÖ°Ô.. À§ ¼Ò½º¿Í µ¿ÀÏÇÑµ¥ msg °¡ Ãß°¡µÈ °Í¸¸ ´Ù¸§.. ::: À§ ¼Ò½º·Î ÅëÀÏÇÏµµ·Ï ÇÏÀÚ.. ³ªÁß¿¡ ¾ø¾ÖÀÚ.
		function onlynumber(){
			if((event.keyCode<48)||(event.keyCode>57)){
				event.returnValue=false;
				alert("ÇÑ±Û ¹× ¿µ¹®, ±âÈ£µîÀº »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.   \n\n¼ýÀÚ¸¸ ÀÔ·ÂÇÏ½Ê½Ã¿ä."); }
		}
		function ChkNumMsg() {
			if((event.keyCode<48)||(event.keyCode>57)){
				event.returnValue=false;
				alert("ÇÑ±Û ¹× ¿µ¹®, ±âÈ£µîÀº »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.   \n\n¼ýÀÚ¸¸ ÀÔ·ÂÇÏ½Ê½Ã¿ä."); }
		}
	//	object ÀÔ·Â°ªÀÇ ¼ýÀÚ È®ÀÎ (CommFun.inc) : ¼ýÀÚ=True, ±×¿Ü=false ::: ÀÔ·Â¹ÞÀº ÈÄ Ã¼Å©..
		function ValidateNumber(obj){
			var num="0123456789";
			var cnt_chk=0;
			for (var i=0;i< obj.value.length;i++){
				if (-1 == num.indexOf(obj.value.charAt(i))){
					cnt_chk += 1; }
			}
			if(cnt_chk > 0){
				return false;
			} else {
				return true;
			}
		}


	// ±Ý¾×¿¡ »ç¿ëµÈ ¼ýÀÚ¿¡ Æ÷ÇÔµÈ ÄÞ¸¶(,)¸¸ »èÁ¦ÇÏ±â : db¿¡ ³ÖÀ»¶§ »ç¿ë
	function fn_DelComma(str1) {
		var isspacei = 0;
		var isspacea = '';
		var isspacec = '';
		var space1 =','
		for (isspacei=0; isspacei < str1.length ; isspacei++) {
			if (str1.substring(isspacei,isspacei+1) != space1) {
				isspacea = str1.substring(isspacei,isspacei+1);
				isspacec = isspacec + isspacea;
			}
		}
		return isspacec
	}

	//	¼ýÀÚÀÎÁö ¿©ºÎ¸¸ Ã¼Å© : ÄÞ¸¶°¡ »ðÀÔµÈ °æ¿ì(±Ý¾×..) fn_ChkArgNum(fn_DelComma(str1)) À¸·Î ÄÞ¸¶»©´Â ÇÔ¼ö·Î 2Áß Ã³¸®ÇØ¾ß ÇÔ.
	function fn_ChkArgNum(str1) {
		var isnumerici = 0;
		var isnumericj = 0;
		var isnumericc ='TRUE';
		var numstr ='0123456789'
		for (isnumericj=0; isnumericj < str1.length ; isnumericj++)	{
			for (isnumerici = 0 ; isnumerici < numstr.length ; isnumerici++) {
				if (str1.substring(isnumericj,isnumericj+1) == numstr.substring(isnumerici,isnumerici+1))break
			}
			if ( isnumerici == 10 ) {
				isnumericc = 'FALSE';
				isnumericj = str1.length;
			}
		}
		return isnumericc
	}

	//	¼ýÀÚ¿¡ ÄÞ¸¶ Æ÷¸Ë ³Ö±â..(±Ý¾×¿¡ »ç¿ë)
	function fn_CheckWonFormat(rtnForm) {
		rtnForm.value = (rtnForm.value).replace(/,/g,"");
		rtnForm.value = fn_AddComma(rtnForm.value);
	}

	//	¼ýÀÚ¿¡ ÄÞ¸¶ Æ÷¸Ë ³Ö±â..(±Ý¾×¿¡ »ç¿ë) : fn_CheckWonFormat¿¡¼­ È£Ãâ
	function fn_AddComma(num) {
		var c;
		var strNum = "" + num;
		if ((c = strNum.charAt(0)) == "-") {
			strNum = strNum.substring(1, strNum.length); }
		var size = strNum.length;
		var r = size % 3;
		var v = size / 3;
		var pos = 0;
		var sb = "";
		if (c == "-") sb += c;
		sb += strNum.substring(0, r);
		for (var i = 0; i < v; i++) {
			pos = i * 3 + r;
			if ((pos != 0) && (pos <= size - 3)) {
				sb += ","; }
			sb += strNum.substring(pos, pos +3); }
		return sb;
	}

	//	¼ýÀÚ¿¡ ÄÞ¸¶ Âï±â (gfnNumAddcomma.inc)
	function gfnNumAddComma(nNumber) {
	    var i;
	    nNumber = '' + nNumber;

	    if (nNumber.length > 3) {
	        var mod = nNumber.length%3 ;
	        var output = (mod > 0 ? (nNumber.substring(0,mod)) : '');

	        for (i=0 ; i < Math.floor(nNumber.length/3) ; i++) {
	            if ((mod ==0) && (i ==0)) {
	                output += nNumber.substring(mod+3*i,mod+3*i+3);
	            } else {
	                output += ',' + nNumber.substring(mod+3*i,mod+3*i+3);
	            }
	        }
	        return (output);
	    }
	    	else return nNumber;
	}



/*/////////////////////////////////////////////////////////////////////*/
/*
	// textbox object : ¹®ÀÚ Ã¼Å© ÇÔ¼ö
*/
/*/////////////////////////////////////////////////////////////////////*/
	// »èÁ¦ÇÏ°íÀÚ ÇÏ´Â ¹®ÀÚ¸¦ »èÁ¦ (´ë»ó¹®ÀÚ¿­, ¾ø¾Ù¹®ÀÚ)
	// ¿¹ : ºó°ø°£ »èÁ¦½Ã -> fn_DelChar(str1, ' ')
	function fn_DelChar(str1, gubunja) {
		var isspacei = 0;
		var isspacea = '';
		var isspacec = '';
		var space1 = gubunja;
		for (isspacei=0; isspacei < str1.length ; isspacei++) {
			if (str1.substring(isspacei,isspacei+1) != space1) {
				isspacea = str1.substring(isspacei,isspacei+1);
				isspacec = isspacec + isspacea;
			}
		}
		return isspacec
	}


/*/////////////////////////////////////////////////////////////////////*/
/*
	// textbox object : Æ¯¼ö¹®ÀÚ Ã¼Å©
*/
/*/////////////////////////////////////////////////////////////////////*/
	// Æ¯¼ö¹®ÀÚ »ç¿ë ±ÝÁö °æ°íÃ¢ »ç¿ë fn_MsgIsValid_Csi()
	function isvalid_alert(str1) {
		var startnum = 0;
		for (startnum=0; startnum < str1.length ; startnum++) {
			if (str1.substring(startnum,startnum+2) == "--") {
				alert ("Æ¯¼ö¹®ÀÚ(['], [--], [;], [<])µîÀº »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.     \n\nÈ®ÀÎÇÏ°í ´Ù½Ã Á¤È®È÷ ÀÔ·Â¹Ù¶ø´Ï´Ù.");
				return false 	}
			if (str1.substring(startnum,startnum+1) == ";") {
				alert ("Æ¯¼ö¹®ÀÚ(['], [--], [;], [<])µîÀº »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.     \n\nÈ®ÀÎÇÏ°í ´Ù½Ã Á¤È®È÷ ÀÔ·Â¹Ù¶ø´Ï´Ù.");
				return false 	}
			if (str1.substring(startnum,startnum+1) == "'") {
				alert ("Æ¯¼ö¹®ÀÚ(['], [--], [;], [<])µîÀº »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.     \n\nÈ®ÀÎÇÏ°í ´Ù½Ã Á¤È®È÷ ÀÔ·Â¹Ù¶ø´Ï´Ù.");
				return false	}
			if (str1.substring(startnum,startnum+1) == "<") {
				alert ("Æ¯¼ö¹®ÀÚ(['], [--], [;], [<])µîÀº »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.     \n\nÈ®ÀÎÇÏ°í ´Ù½Ã Á¤È®È÷ ÀÔ·Â¹Ù¶ø´Ï´Ù.");
				return false	}
		}
		return true
	}

	// Æ¯¼ö¹®ÀÚ »ç¿ë½Ã Á¤»óÀûÀ¸·Î »ç¿ëÇÒ ¼ö ÀÖµµ·Ï Ä¡È¯ : 1ÀÚ¸®¾¿ Æ¯¼ö¹®ÀÚ º¯È¯
	function isvalid1(str1) {
		var startnum = 0;
		var changetxt = '';
		var resulttxt = '';
		var desttxt = ";";
		for (startnum=0; startnum < str1.length ; startnum++) {
			if (str1.substring(startnum,startnum+1) != desttxt) {
				changetxt = str1.substring(startnum,startnum+1);
				resulttxt = resulttxt + changetxt;	}
		}
		return resulttxt
	}

	// Æ¯¼ö¹®ÀÚ »ç¿ë½Ã Á¤»óÀûÀ¸·Î »ç¿ëÇÒ ¼ö ÀÖµµ·Ï Ä¡È¯ : 2ÀÚ¸®¾¿ Æ¯¼ö¹®ÀÚ º¯È¯
	function isvalid2(str1) {
		var startnum = 0;
		var changetxt = '';
		var resulttxt = '';
		var desttxt = "--";

		for (startnum=0; startnum < str1.length ; startnum++) {
			if (str1.substring(startnum,startnum+2) != desttxt) {
				changetxt = str1.substring(startnum,startnum+1);
				resulttxt = resulttxt + changetxt;
			}
		}
		return resulttxt
	}



/*/////////////////////////////////////////////////////////////////////*/
/*
	// ±âÅ¸ ..
*/
/*/////////////////////////////////////////////////////////////////////*/
	// ÁÖ¹Î¹øÈ£¸¦ copyÇØ¼­ pasteÇÒ¶§ ÀÚµ¿ ÀÌµ¿..
	function PasteJumin(curval,curobj,furobj,chknum){
		curobj.value = curval.substring(0,6);
		furobj.value = curval.substring(7,14);
	}

	//·¹ÀÌ¾î ¼û±è : ´Ü¼ø ¼û±è
	function hide(objid){
		document.getElementById(objid).style.display='none';
	}

	//·¹ÀÌ¾î ¿Â¿ÀÇÁ : Çö »óÅÂÀÇ ¹Ý´ë·Î Ã³¸®
	function showorhide(objid){
		var obj=document.getElementById(objid);
		obj.style.display=(obj.style.display=='none')? 'block' : 'none';
	}


/*/////////////////////////////////////////////////////////////////////*/
/*
	//	FAQ °ü·Ã 
*/
/*/////////////////////////////////////////////////////////////////////*/
	//	faq ¸¸µé±â
	function makefaqstyle(objid){
		var childs=document.getElementById(objid).childNodes;
		var titleobj,findclose,childnum=1;
		for(var i=0,childslen=childs.length; i<childslen; i++){
			if(childs[i].nodeType==1){
				if((childnum%2)==0){
					titleobj.innerHTML='<a href="#" onclick="showorhide(\''+childs[i].id+'\');return false;" title="³»¿ë¿­±â" style="cursor:pointer;">'+titleobj.innerHTML+'</a>';
					findclose=childs[i].getElementsByTagName('div');
					for(var j=0,fclen=findclose.length; j<fclen; j++){
						if(findclose[j].className=='close'){
							findclose[j].style.display='block';
							findclose[j].innerHTML='<a href="#" onclick="showorhide(\''+childs[i].id+'\');return false;">'+findclose[j].innerHTML+'</a>';
						}
					}
				}else{
					titleobj=childs[i];
				}
				childnum++;
			}
		}
	}
	// ÅØ½ºÆ® faq ¸¶¿ì½º ¿À¹ö
	function fortextfaq(obj){
		obj.className='t on';
		obj.onmouseout=function(){
			this.className='t';
		}
		obj.onclick=function(){
			var lis=obj.parentNode.getElementsByTagName('li');
			for(var i=0,lmt=lis.length; i<lmt; i++){
				if((i%2)==0){
					if(lis[i]!=this){
						lis[i].className='t';
						lis[i].onmouseover=function(){
							fortextfaq(this);
						}
					}else{
						this.className='t on';
						this.onmouseover=null;
						this.onmouseout=null;
					}
				}else{
					lis[i].style.display='none';
				}
			}
			var nextnode=obj;
			for(var i=0; i<1; i++){
				nextnode=nextnode.nextSibling;
				if(nextnode.nodeType!=1) i--;
			}
			nextnode.style.display='block';
		}
	}

/*/////////////////////////////////////////////////////////////////////*/
/*
	//	´Þ·Â ÆË¾÷Ã¢ Å©±â °áÁ¤ (js_reSize02.inc) 
	//	<body topmargin=0 leftmargin=0 bgcolor="ffffff" onResize="javascript:ResetSize('600','357');" onLoad="javascript:OnOpenWindow('530','357');">
	//	ÄíÅ° »ç¿ëÇÑ °ÍÀº Å©±â º¯µ¿ÀÌ ¾ø´ÂÁö È®ÀÎÇÏ±â À§ÇØ »ç¿ë
*/
/*/////////////////////////////////////////////////////////////////////*/
	// ÆË¾÷Ã¢À» Å©°Ô (WStartSize=¿ø·¡ width »çÀÌÁî, WEndSize=º¯°æµÉ width»çÀÌÁî, HStartSize=¿ø·¡ height»çÀÌÁî, HEndSize=º¯µ¿µÉ height»çÀÌÁî)
	function ChangePlusReSize(gubun, WStartSize, WEndSize, HStartSize, HEndSize) {
		if ( getCookie( "PopSize" ) == "P" )  {	return;   }
		WStartSize	= eval(WStartSize);
		WEndSize	= eval(WEndSize);
		HStartSize	= eval(HStartSize);
		HEndSize	= eval(HEndSize);
		while(WStartSize < WEndSize) {
			WStartSize = WStartSize + 5;
			parent.parent.window.resizeTo(WStartSize, HStartSize); }
		while(HStartSize < HEndSize) {
			HStartSize = HStartSize + 5;
			parent.parent.window.resizeTo(WEndSize, HStartSize); }
		setCookie("PopSize", "P", 0);
		return;
	}
	// ÆË¾÷Ã¢À» ÀÛ°Ô (WStartSize=¿ø·¡ width »çÀÌÁî, WEndSize=º¯°æµÉ width»çÀÌÁî, HStartSize=¿ø·¡ height»çÀÌÁî, HEndSize=º¯µ¿µÉ height»çÀÌÁî)
	function ChangeMinusReSize(gubun, WStartSize, WEndSize, HStartSize, HEndSize) {
		if ( getCookie( "PopSize" ) == "M" )  {	return;   }
		WStartSize	= eval(WStartSize);
		WEndSize		= eval(WEndSize);
		HStartSize	= eval(HStartSize);
		HEndSize		= eval(HEndSize);
		while(WStartSize > WEndSize) {
			WStartSize = WStartSize - 5;
			parent.parent.window.resizeTo(WStartSize, HStartSize); }
		setCookie("PopSize", "M", 0);
		return;
	}

/*/////////////////////////////////////////////////////////////////////*/
/* 
	//	Radio ¹öÆ° Ã¼Å©
*/
/*/////////////////////////////////////////////////////////////////////*/
	function get_Radio_Checked_Value(objControl) {
		var Control_Length = objControl.length;
		var Cnt =null;
		var rValue= null;
	
		for(Cnt=0; Cnt<Control_Length; Cnt++) {
		   if(objControl[Cnt].checked == true) {
		   	   rValue = objControl[Cnt].value;
		   	   break;
		   }
		}
		return rValue
	}


/*/////////////////////////////////////////////////////////////////////*/
/* 
	//	ÀÎÁõ ¿©ºÎ Ã¼Å© : (ÁÖ¹Îµî·Ï¹øÈ£ , »ç¾÷ÀÚµî·Ï¹øÈ£..)
*/
/*/////////////////////////////////////////////////////////////////////*/
	//	fgn_check.js : ¿Ü±¹ÀÎ ÁÖ¹Î¹øÈ£ Ã¼Å·
	function fgn_no_chksum(reg_no) {
	    var sum = 0;
	    var odd = 0;
	    buf = new Array(13);
	    for (i = 0; i < 13; i++) buf[i] = parseInt(reg_no.charAt(i));
	    odd = buf[7]*10 + buf[8];
	    if (odd%2 != 0) {
	      return false;
	    }
	    if ((buf[11] != 6)&&(buf[11] != 7)&&(buf[11] != 8)&&(buf[11] != 9)) {
	      return false;
	    }
	    multipliers = [2,3,4,5,6,7,8,9,2,3,4,5];
	    for (i = 0, sum = 0; i < 12; i++) sum += (buf[i] *= multipliers[i]);
	    sum=11-(sum%11);
	    if (sum>=10) sum-=10;
	    sum += 2;
	    if (sum>=10) sum-=10;
	    if ( sum != buf[12]) {
			return false;
	    } else {
			return true;
	    }
	}


/*
	//	¿¹Àü°Í.. ¾È¾²´Â °Í 
	//	function ChkDate() {
	//	function isnumeric(str1) {
	//	function isnumericwon(str1) {
	//	function gfnNumDelComma(str1) {
	//	function isspace(str1) {
*/


