	function CheckStrLen(textval,maxlen){
        var temp; //µé¾î¿À´Â ¹®ÀÚ°ª...
        var msglen;
        msglen = maxlen*2;

        l = textval.value.length;
        tmpstr = "" ;

        if (l == 0){
        }else{
            for(k=0;k<l;k++){
                temp = textval.value.charAt(k);
                if (escape(temp).length > 4){
                    msglen -= 2;
                }else{
                    msglen--;
                }
                if(msglen < 0){
                    alert("ÃÑ ¿µ¹® "+(maxlen*2)+"ÀÚ ÇÑ±Û " + maxlen + "ÀÚ ±îÁö ÀÛ¼ºÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.");
                    textval.value = tmpstr;
                    break;
                }else{
                    tmpstr += temp;
                }
            }
        }
    }


function auto_close(){
	if (/MSIE/.test(navigator.userAgent)){
		if (navigator.appVersion.indexOf("MSIE 8.0")==-1){ // IE 8.0
			window.opener='self';
			window.open('','_parent','');
			window.close();
		} else if(navigator.appVersion.indexOf("MSIE 7.0")==-1){ // IE 7.0
			window.open('about:blank','_self').close();
		} else { // ETC
			window.opener=self;
			self.close();
		}
	}else{
		window.opener=self;
		self.close();
	}
}

//ÀÌ¸ÞÀÏ °Ë»ç
function verify_email(on) {
	var reg = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/;
	
	if (reg.test(on)==false) {
		alert("Àß¸øµÈ ÀÌ¸ÞÀÏ ÁÖ¼ÒÀÔ´Ï´Ù. \n´Ù½Ã ÀÛ¼ºÇÏ¼¼¿ä.");
		return false;
	}
}

//±âº» ÇÃ·¹½¬ ¿­¶§
function script_flash2(flash_root,w,h){
	flash_str=" <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+w+"' height='"+h+"'> ";
	flash_str=flash_str+" <param name='movie' value='"+flash_root+"'> ";
	flash_str=flash_str+" <param name='quality' value='high'> ";
	flash_str=flash_str+" <param name='wmode' value='transparent' /> ";
	flash_str=flash_str+" <embed src='"+flash_root+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+w+"' height='"+h+"'></embed> ";
	flash_str=flash_str+" </object> ";

	document.write(flash_str);
}

//ÇÃ·¹½¬ À§Ä¡ÁöÁ¤ÇØ¼­ ¿­¶§
function script_flash(flash_root,w,h,left,top){
	flash_str=" <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+w+"' height='"+h+"' style='position:absolute; left:"+left+"px; top:"+top+"px;'> ";
	flash_str=flash_str+" <param name='movie' value='"+flash_root+"'> ";
	flash_str=flash_str+" <param name='quality' value='high'> ";
	flash_str=flash_str+" <param name='wmode' value='transparent' /> ";
	flash_str=flash_str+" <embed src='"+flash_root+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+w+"' height='"+h+"'></embed> ";
	flash_str=flash_str+" </object> ";

	document.write(flash_str);
}

//°Ë»öÁ¶°Ç È®ÀÎ : ~_list.asp
function search_sendit(on,sd,ed) {

	//½ÃÀÛ³¯Â¥ Çü½Ä °Ë»ç
	if (check_date(on.s_year1,on.s_month1,on.s_day1)==false) {
		on.s_day1.focus();
		return false;
	} else {
		start_date=on.s_year1.value+"-"+on.s_month1.value+"-"+on.s_day1.value;
	}

	//³¡³¯Â¥ Çü½Ä °Ë»ç
	if (check_date(on.s_year2,on.s_month2,on.s_day2)==false) {
		on.s_day2.focus();
		return false;
	} else {
		end_date=on.s_year2.value+"-"+on.s_month2.value+"-"+on.s_day2.value;
	}

	//½ÃÀÛ³¯Â¥ ~ ³¡³¯Â¥ ºñ±³
	if (start_date>end_date) {
		alert("°Ë»ö±â°£ÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù. ´Ù½Ã ¼±ÅÃÇÏ¼¼¿ä.");
		return false;
	}

	//½ÃÀÛ³¯Â¥ È®ÀÎ
	if (start_date<sd) {
		alert(sd+" ÀÌÈÄºÎÅÍ °Ë»öÀÌ °¡´ÉÇÕ´Ï´Ù. ´Ù½Ã ¼±ÅÃÇÏ¼¼¿ä.");
		return false;
	}

	//³¡³¯Â¥ È®ÀÎ
	if (end_date>ed) {
		alert("¿À´Ã ÀÌÈÄÀÇ ³¯Â¥´Â °Ë»öÇÒ ¼ö ¾ø½À´Ï´Ù. ´Ù½Ã ¼±ÅÃÇÏ¼¼¿ä.");
		return false;
	}

	on.action=on.action+"&start_date="+start_date+"&end_date="+end_date;
}

// »ö»ó Á¤ÀÇ
var bgcolor_on="#E8F4FF";
var bgcolor_off="";

// Á¤±Ô½Ä Á¤ÀÇ
var regular_name=/^[°¡-ÆR]+$/;
var regular_id=/^[a-zA-Z0-9_]+$/;


// ---------------------------------------------------------------------- //


// Á¤±Ô½Ä °Ë»ç
function check_regular(on,str,n,reg) {
	str_value=on.value;
	str_value=str_value.replace(/ /g,"");
	str_value=str_value.replace(/\r\n/g,"");

	if (str_value.length==0) {
		alert(str + " ÀÔ·ÂÇÏ¼¼¿ä.");
		on.value="";
		on.focus();
		return false;
	} else if (reg.test(on.value)==false) {
		alert("»ç¿ëÇÒ ¼ö ¾ø´Â ¹®ÀÚ°¡ Æ÷ÇÔµÇ¾î ÀÖ½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
		on.focus();
		return false;
	} else if (str_value.length<n) {
		alert(str + " " + n + "±ÛÀÚ ÀÌ»ó ÀÔ·ÂÇÏ¼¼¿ä.");
		on.focus();
		return false;
	}
}


// ÀÔ·Â°ª ±æÀÌ °Ë»ç
function check_value(on,str,n) {
	str_value=on.value;
	str_value=str_value.replace(/ /g,"");
	str_value=str_value.replace(/\r\n/g,"");

	if (str_value.length==0) {
		alert(str + " ÀÔ·ÂÇÏ¼¼¿ä.");
		on.value="";
		on.focus();
		return false;
	} else if (str_value.length<n) {
		alert(str + " " + n + "±ÛÀÚ ÀÌ»ó ÀÔ·ÂÇÏ¼¼¿ä.");
		on.focus();
		return false;
	}
}

// °ø¹éÁ¦°Å
function trim_data(on) {
	var trim_string=on;

	trim_string +="";
	on=trim_string.replace(/^\s*|\s*$/g,"");
}

//¼ýÀÚ¸¸ ÀÔ·Â
function onlynum() {
	if ((((event.keyCode>=48)&&(event.keyCode<=57))||
	(event.keyCode==8)||(event.keyCode==13))==false) {
		event.returnValue=false;
	}
}

//¼ýÀÚ¸¸ ÀÔ·Â2
function onlynum2(on) {
	var str = document.all[on].value;
	for(var i=0; i<str.length; i++) {
		if(((str.charCodeAt(i))<48||(str.charCodeAt(i))>57)) {
		document.all[on].value = "";
		return false;
		} else {   } // Ã³¸®
	}
}

//¼ýÀÚ, Æ÷ÀÎÆ® ÀÔ·Â : ½Ã·Â
function onlypoint() {
	if ((((event.keyCode>=48)&&(event.keyCode<=57))||
	(event.keyCode==46)||(event.keyCode==13))==false) {
		event.returnValue=false;
	}
}

//¹®ÀÚ¸¸ ÀÔ·Â : ÇÑ±ÛÀÌ¸§
function onlykorchar() {
	if ((((event.keyCode>=97)&&(event.keyCode<=122))||
	((event.keyCode>=65)&&(event.keyCode<=90))||
	(event.keyCode==13))==false) {
		event.returnValue=false;
	}
}

//¿µ¹®¸¸ ÀÔ·Â : ¾÷¹«¼º°ú
function onlyenglish() {
	if ((
	((event.keyCode>=97)&&(event.keyCode<=100))||
	((event.keyCode>=65)&&(event.keyCode<=68))||
	(event.keyCode==83)||(event.keyCode==115)||(event.keyCode==13))==false) {
		event.returnValue=false;
	}
}

//¹®ÀÚ, ¼ýÀÚ, ¾ð´õ¹Ù ÀÔ·Â
function onlychar_underbar() {
	if ((((event.keyCode>=97)&&(event.keyCode<=122))||
	((event.keyCode>=65)&&(event.keyCode<=90))||
	((event.keyCode>=48)&&(event.keyCode<=57))||
	(event.keyCode==95)||(event.keyCode==13))==false) {
		event.returnValue=false;
	}
}

//¹®ÀÚ, ¼ýÀÚ, ¾ð´õ¹Ù ÀÔ·Â
function onlychar() {
	if ((((event.keyCode>=97)&&(event.keyCode<=122))||
	((event.keyCode>=65)&&(event.keyCode<=90))||
	((event.keyCode>=48)&&(event.keyCode<=57)))==false) {
		event.returnValue=false;
	}
}

//¹®ÀÚ, ¼ýÀÚ ÀÔ·Â2
function onlychar2(on) {
	var str = document.all[on].value;
	for(var i=0; i<str.length; i++) {
		if(((str.charCodeAt(i) >= 48 && str.charCodeAt(i) <=57) || (str.charCodeAt(i) >=65 && str.charCodeAt(i) <= 90) || (str.charCodeAt(i) >= 97 && str.charCodeAt(i) <= 122))) {
		
		} else {
			document.all[on].value = "";
			return false;
		} // Ã³¸®
	}
}

//¹®ÀÚ, ¼ýÀÚ, °ø¹é, µû¿ÈÇ¥ ÀÔ·Â : ¿µ¹®ÀÌ¸§
function onlyengchar() {
	if ((((event.keyCode>=97)&&(event.keyCode<=122))||
	((event.keyCode>=65)&&(event.keyCode<=90))||
	((event.keyCode>=48)&&(event.keyCode<=57))||
	(event.keyCode==32)||(event.keyCode==39)||
	(event.keyCode==13))==false) {
		event.returnValue=false;
	}
}

//¹®ÀÚ, ¼ýÀÚ, °ñ¹ðÀÌ, Æ÷ÀÎÆ® ÀÔ·Â : ÀÌ¸ÞÀÏ
function onlyemail() {
	if ((((event.keyCode>=97)&&(event.keyCode<=122))||
	((event.keyCode>=65)&&(event.keyCode<=90))||
	((event.keyCode>=48)&&(event.keyCode<=57))||
	(event.keyCode==64)||(event.keyCode==46)||
	(event.keyCode==13))==false) {
		event.returnValue=false;
	}
}

//³¯Â¥ Çü½Ä °Ë»ç : 07-08
function check_date(date_year,date_month,date_day) {
	if (
			((date_month.value=="02")&&(date_day.value>29))
			||((date_month.value=="04")&&(date_day.value>30)) || ((date_month.value=="06")&&(date_day.value>30))
			||((date_month.value=="09")&&(date_day.value>30)) || ((date_month.value=="11")&&(date_day.value>30))
		) {
		alert("Àß¸øµÈ ³¯Â¥ÀÔ´Ï´Ù. ´Ù½Ã ¼±ÅÃÇÏ¼¼¿ä.");
		return false;
	}
}

//³¯Â¥ Çü½Ä °Ë»ç : 07-08
function verify_date(date_month,date_day) {
	var reg = /^(01|02|03|04|05|06|07|08|09|10|11|12)+$/;

	if (reg.test(date_month)==false) {
		alert("Àß¸øµÈ ³¯Â¥ÀÔ´Ï´Ù. ´Ù½Ã ¼±ÅÃÇÏ¼¼¿ä.");
		return false;
	}

	if (date_day !="") {
		if (
				(date_day<1)||(date_day>31)||((date_month=="02")&&(date_day>29))
				||((date_month=="04")&&(date_day>30)) || ((date_month=="06")&&(date_day>30))
				||((date_month=="09")&&(date_day>30)) || ((date_month=="11")&&(date_day>30))
			) {
			alert("Àß¸øµÈ ³¯Â¥ÀÔ´Ï´Ù. ´Ù½Ã ¼±ÅÃÇÏ¼¼¿ä.");
			return false;
		}
	}
}

//ÆäÀÌÁö ÀÌµ¿
function move_location(on) {
	location=on;
}



//»ç¾÷ÀÚµî·Ï¹øÈ£ Ã¼Å©
function check_companynum(on){
	var checkID = new Array(1, 3, 7, 1, 3, 7, 1, 3, 5, 1);
	var bizID = on;
	var i, Sum=0, c2, remander;
	 
	for (i=0; i<=7; i++) Sum += checkID[i] * bizID.charAt(i);

	c2 = "0" + (checkID[8] * bizID.charAt(8));
	c2 = c2.substring(c2.length - 2, c2.length);

	Sum += Math.floor(c2.charAt(0)) + Math.floor(c2.charAt(1));

	remander = (10 - (Sum % 10)) % 10 ;
 
	if (Math.floor(bizID.charAt(9)) != remander){
		alert("Àß¸øµÈ »ç¾÷ÀÚ µî·Ï¹øÈ£ÀÔ´Ï´Ù. \n´Ù½Ã ÀÛ¼ºÇÏ¼¼¿ä.");
		return false;
	}else{
		return true;
	}
}




var showFlashObject=function(objID,objSource,objWidth,objHeight,objQuality,objWmode,objBgcolor,objXML){
if(objXML){var chkMovie=0;if(objSource.match(/=/))objSource=objSource+"&server="+objXML+"&chkMovie="+chkMovie;else objSource=objSource+"?server="+objXML+"&chkMovie="+chkMovie;}
var pageUrl=self.window.location.href;
if(pageUrl.substring(0,5)=="https") swfUrl="https";
else swfUrl="http";
if(!objID)objID="ShockwaveFlash1";
if(!objWidth)objWidth="0";
if(!objHeight)objHeight="0";
if(!objQuality)objQuality="high";
if(!objWmode)objWmode="transparent";
document.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+swfUrl+'://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0" width="'+objWidth+'" height="'+objHeight+'" id="'+objID+'" type="application/x-shockwave-flash" data="'+objSource+'">');
document.writeln('<param name="movie" value="'+objSource+'" />');
document.writeln('<param name="allowFullScreen" value="false" />');
document.writeln('<param name="scale" value="noscale" />');
document.writeln('<param name="allowScriptAccess" value="always" />');
document.writeln('<param name="menu" value="false" />');
document.writeln('<param name="quality" value="high" />');
document.writeln('<param name="bgcolor" value="'+objBgcolor+'" />');
document.writeln('<param name="wmode" value="'+objWmode+'" />');
document.writeln('<embed src="'+objSource+'" allowScriptAccess="always" menu="false" quality="high" bgcolor="'+objBgcolor+'" wmode="'+objWmode+'" width="'+objWidth+'" height="'+objHeight+'" name="'+objID+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.writeln('</object>');};



//ÀÌ¹ÌÁö ÆÄÀÏ °Ë»ç
function check_image(on) {
	extension=on.substr(on.length-3,3);
	extension=extension.toLowerCase();

	if (((extension=="jpg")||(extension=="gif"))==false) {
		alert("JPG ¶Ç´Â GIF ÀÌ¹ÌÁö¸¦ ¼±ÅÃÇÏ¼¼¿ä.");
		return false;
	}
}


/*
 * ÆË¾÷ ÀÚµ¿ ¸®»çÀÌÂ¡
 *  - À©µµ È¯°æ¿¡ µû¶ó »çÀÌÁî°¡ ´Ù¸¦ ¼ö ÀÖ½À´Ï´Ù.
 *  - ÆË¾÷ÆäÀÌÁöÀÇ ½ºÅ©¸³Æ® ÃÖÇÏ´Ü¿¡¼­ ½ÇÇàÇÏ½Ê½Ã¿À.
 *
 * (ex.) window.onload = function(){popupAutoResize();}
*/
function popupAutoResize() {
    var thisX = parseInt(document.body.scrollWidth);
    var thisY = parseInt(document.body.scrollHeight);
    var maxThisX = screen.width - 50;
    var maxThisY = screen.height - 50;
    var marginY = 0;
 //   alert(thisX + "===" + thisY);
    //alert("ÀÓ½Ã ºê¶ó¿ìÀú È®ÀÎ : " + navigator.userAgent);
    // ºê¶ó¿ìÀúº° ³ôÀÌ Á¶Àý. (Ç¥ÁØ Ã¢ ÇÏ¿¡¼­ Á¶ÀýÇØ ÁÖ½Ê½Ã¿À.)

    if (navigator.userAgent.indexOf("MSIE 6") > 0) marginY = 45;        // IE 6.x
    else if(navigator.userAgent.indexOf("MSIE 7") > 0) marginY = 75;    // IE 7.x
    else if(navigator.userAgent.indexOf("MSIE 8") > 0) marginY = 79;    // IE 8.x
    else if(navigator.userAgent.indexOf("Firefox") > 0) marginY = 87;   // FF
    else if(navigator.userAgent.indexOf("Opera") > 0) marginY = 30;     // Opera
    else if(navigator.userAgent.indexOf("Netscape") > 0) marginY = -2;  // Netscape


    if (navigator.userAgent.indexOf("MSIE 6") > 0) marginX = 10;        // IE 6.x
    else if(navigator.userAgent.indexOf("MSIE 7") > 0) marginX = 6;    // IE 7.x
    else if(navigator.userAgent.indexOf("MSIE 8") > 0) marginX = 6;    // IE 8.x
    else if(navigator.userAgent.indexOf("Firefox") > 0) marginX = 10;   // FF
    else if(navigator.userAgent.indexOf("Opera") > 0) marginX = 10;     // Opera
    else if(navigator.userAgent.indexOf("Netscape") > 0) marginX = 10;  // Netscape


    if (thisX > maxThisX) {
        window.document.body.scroll = "yes";
        thisX = maxThisX;
    }
    if (thisY > maxThisY - marginY) {
        window.document.body.scroll = "yes";
        thisX += 19;
        thisY = maxThisY - marginY;
    }
    window.resizeTo(thisX+marginX, thisY+marginY);

    // ¼¾ÅÍ Á¤·Ä
    // var windowX = (screen.width - (thisX+10))/2;
    // var windowY = (screen.height - (thisY+marginY))/2 - 20;
    // window.moveTo(windowX,windowY);
}



function Allchk(){
	if (document.all.chkAll.checked==true){
		chkType=true;
	}else{
		chkType=false;	
	}
	if (document.all.chk.length>0) {
		for (i=0;i<document.all.chk.length;i++)
			eval("document.all.chk["+i+"].checked=chkType")
	} else {
		eval("document.all.chk.checked=chkType")
	}
}


function Space_All(str){
    var index,len;
    while(true){
        index = str.indexOf(" ");
        //°ø¹éÀÌ ¾øÀ¸¸é Á¾·á ÇÕ´Ï´Ù.
        if(index == -1)break;
        //¹®ÀÚ¿­ ±æÀÌ¸¦ ±¸ÇÕ´Ï´Ù.
        len = str.length;
        //°ø¹éÀ» Àß¶ó ³À´Ï´Ù.
        str = str.substring(0,index) + str.substring((index+1),len);
    }
    return str;
} 
