function pungsun(s){
	document.all["_pungsun_span"].innerHTML=s;
	document.all["_pungsun_"].style.left=event.clientX+15;
	document.all["_pungsun_"].style.top=event.clientY+document.body.scrollTop;
	document.all["_pungsun_"].style.display='';

	var tempW=document.all["_pungsun_"].offsetWidth+parseInt(document.all["_pungsun_"].style.left,10);
	var bodyW=document.body.offsetWidth;
	if(tempW>bodyW) document.all["_pungsun_"].style.left=parseInt(document.all["_pungsun_"].style.left,10)-(tempW-bodyW)-30;
}

function unpungsun(){
	document.all["_pungsun_"].style.display='none';
}

function pungsunReady(){
	echo("<div id='_pungsun_' style='padding:5;position:absolute;display:none;z-index:104;background:white;color:gray;border:1 solid gray' align=left>");
	echo("<span id='_pungsun_span'></span>");
	echo("</div>");
}
var hangul_index=new Array("°¡","³ª","´Ù","¶ó","¸¶","¹Ù","»ç","¾Æ","ÀÚ","Â÷","Ä«","Å¸","ÆÄ","ÇÏ");
var faq_cate=new Array("ÁÖ¹®/°áÁ¦ °ü·Ã","¹è¼Û/Ãë¼Ò/±³È¯","È¸¿ø°ü·Ã","±âÅ¸¹®ÀÇ");
var area_cate=new Array("°­¿øµµ","°æ±âµµ","°æ»ó³²µµ","°æ»óºÏµµ","±¤ÁÖ","´ë±¸","´ëÀü","ºÎ»ê","¼­¿ï","¿ï»ê","ÀÎÃµ","Àü¶ó³²µµ","Àü¶óºÏµµ","Á¦ÁÖµµ","ÃæÃ»³²µµ","ÃæÃ»ºÏµµ");

function viewStatus(str){
	switch(str){
		case "ÁÖ¹®Ãë¼Ò":
			echo("<font color='red'>"+str+"</font>");
			break;
		case "ÁÖ¹®¿Ï·á":
			echo("<font color='blue'>"+str+"</font>");
			break;
		default:
			echo(str);
			break;
	}
}

// checkbox °ª Ã¼Å©¼ö °¡Á®¿À±â
function getCheckedBoxCount(obj){	// obj:form.name °ª
	try{
		count=0;

		if(obj.value==undefined){
			for(i=0;i<obj.length;i++) if(obj[i].checked==true) count++;
		}
		else if(obj.checked==true) count++;

		return count;
	}
	catch(e){
		return 0;
	}
}
// id º° È­¸é º¸ÀÌ±â viewObj º¸¿©Áú id, hiObj °¨Ãâid ±âÁØÀÌ µÇ´Â ¹®ÀÚ¿­
function view_id(viewObj,hiObj){
	try{
		for(i=0;;i++){
			document.getElementById(hiObj+i).style.display="none";
		}
	}
	catch(e){}

	viewObj.style.display="";
}
function divClose(obj){
	obj.style.display="none";
}
function divShow(obj){
	obj.style.display="";

	Top=document.body.scrollTop;
	Left=document.body.scrollLeft;
	Height=document.body.offsetHeight;
	Width=document.body.offsetWidth;

	t=(Height/2)-(obj.offsetHeight/2)+Top;
	l=((Width/2)-(obj.offsetWidth)/2)+Left;

	obj.style.top=t-50;
	obj.style.left=l;
}
function echo(str){
	document.write(str);
}
function strlen(str){
	var len = 0;

	for (var i=0; i < str.length; i++) {
		var n = str.charCodeAt(i);
		if ((n >= 0)  && (n < 256)) len ++;
			else len += 2;
	}
	return len;
}
function setCookie(name,value,day) {
	var todayDate = new Date();
	todayDate.setTime(todayDate.getTime() + (1000 * 3600) * 24 * day); // 1ÀÏ
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function getCookie(Name) {
	var search = Name + "="
	if (document.cookie.length > 0) { // ÄíÅ°°¡ ¼³Á¤µÇ¾î ÀÖ´Ù¸é
			offset = document.cookie.indexOf(search)
			if (offset != -1) { // ÄíÅ°°¡ Á¸ÀçÇÏ¸é
				offset += search.length
				// set index of beginning of value
				end = document.cookie.indexOf(";", offset)
				// ÄíÅ° °ªÀÇ ¸¶Áö¸· À§Ä¡ ÀÎµ¦½º ¹øÈ£ ¼³Á¤
				if (end == -1) end = document.cookie.length
				return unescape(document.cookie.substring(offset, end))
			}
	}
	return "";
}
//³¯Â¥ ¼±ÅÃÃ¢ Ãâ·Â
var startYear=2005;
var endYear=2015;
function makeYMD(yID,mID,dID,curDate,on_change){	//³âµµid, ´Þid, ÀÏid, ÇöÀç³¯Â¥ ex)20050315, on_change ÀÌº¥Æ®
	var curYear,curMon,curDay;

	curYear=curDate.substr(0,4);
	curMon=curDate.substr(4,2);
	curDay=curDate.substr(6,2);

	echo("<select name='"+yID+"' onchange='lastDayPrint("+yID+","+mID+", 1, "+dID+");"+on_change+"'>");
	for(j=startYear;j<endYear;j++){
		if(curYear==j) echo("<option value='"+j+"' selected>"+j+"</option>");
		else echo("<option value='"+j+"'>"+j+"</option>");
	}
	echo("</select> ³â ");

	echo("<select name='"+mID+"' onchange='lastDayPrint("+yID+","+mID+", 1, "+dID+");"+on_change+"'>");
	for(j=1;j<13;j++){
		if(curMon==j) echo("<option value='"+j+"' selected>"+j+"</option>");
		else echo("<option value='"+j+"'>"+j+"</option>");
	}
	echo("</select> ¿ù ");

	echo("<select name='"+dID+"' onchange='"+on_change+"'>");
	lastDayPrint(curYear,curMon,0,curDay);
	echo("</select> ÀÏ ");

}
function makeHM(hID,mID,curDate,on_change){
	var curHour,curMin;

	curHour=curDate.substr(0,2);
	curMin=curDate.substr(2,2);

	echo("<select name='"+hID+"' onchange='"+on_change+"'>");
	for(j=0;j<24;j++){
		if(parseInt(curHour,10)==j) echo("<option value='"+j+"' selected>"+j+"</option>");
		else echo("<option value='"+j+"'>"+j+"</option>");
	}
	echo("</select> ½Ã ");

	echo("<select name='"+mID+"' onchange='"+on_change+"'>");
	for(j=0;j<60;j++){
		if(parseInt(curMin,10)==j) echo("<option value='"+j+"' selected>"+j+"</option>");
		else echo("<option value='"+j+"'>"+j+"</option>");
	}
	echo("</select> ºÐ ");
}
//¸¶Áö¸·³¯ ±¸ÇÏ´Â ÇÔ¼ö year:³âµµ, month:´Þ, s:0ÀºÃâ·Â 1Àº³»¿ë¹Ù²Ù±â, day:³¯Â¥ (¿ÀºêÁ§Æ® ¶Ç´Â ¼ýÀÚ¹Þ±â)
// s:0ÀÎ Ãâ·ÂÇüÀÏ¶§ day°ª¿¡ ¸ÂÃß¾î¼­ ³¯Â¥ °ªÀÌ ¸ÂÃß¾îÁø´Ù.
// ex) lastDayPrint(2000,10,0,15), lastDayPrint(year,month,1,day)
function lastDayPrint(year,month,s,day){
	var Lday=new Array(31,28,31,30,31,30,31,31,30,31,30,31);
	var mMonth, mYear, lastDay, curDay;
  
	//¹Þ¾Æ¿Â µ¥ÀÌÅ¸°¡ ¿ÀºêÁ§Æ®ÇüÀÎ°¡ ±×³É ¼ýÀÚÀÎ°¡ °Ë»ç
	if(year.value==undefined){
		mMonth=month;
		mYear=year;
		curDay=day;
	}
	else{
		mMonth=month.value;
		mYear=year.value;
		curDay=day.value;
	}

	//¹Þ¾Æ¿Â ´ÞÀÌ 2¿ù´ÞÀÎ°¡ ¾Æ´Ñ°¡ °Ë»ç
	if (mMonth==2){
		lastDay=28;
		if((mYear%4)==0 && (mYear%100)!=0){
			lastDay=29;
		}
	}
	else{
		lastDay=Lday[mMonth-1];
	}

	//value°ª ³»¿ë¸¸ ¹Ù²Ü°æ¿ì value°ª °¹¼ö ¼³Á¤
	if(s==1) day.length=lastDay;

	//½ÇÁúÀûÀÎ Ã³¸®
	for(i=1;i<=lastDay;i++){
		if(s==0){
			if(i==curDay) echo("<option value='"+i+"' selected>"+i+"</option>");
			else echo("<option value='"+i+"'>"+i+"</option>");
		}
		else{
			day.options[i-1].value=i;
			day.options[i-1].text=i;
		}
	}
}
function resizeImg(img){
	var thumb = new Image;
	thumb.src = img.src;
	var w = thumb.width;
	var h = thumb.height;

	if( w > 39){
		img.width = 39;
	}
	if( h > 22){
		img.height = 22;
	}
}
// ¸ÖÆ¼ ¼¿·ºÆ®¹Ú½º¿¡¼­ °ª ÀÌµ¿½ÃÅ°±â
function re_moveOver(obj,calvin2,calvin3){
        var boxLength = obj.length;
        
        var selectedText = calvin2;
        
        var selectedValue = calvin3;
        var i;
        var isNew = true;
        if (boxLength != 0) {
                for (i = 0; i < boxLength; i++) {
                        thisitem = obj.options[i].text;
                        if (thisitem == selectedText) {
                                isNew = false;
                                break;
                              }
                   }
        } 
        
        if (isNew) {
                
                newoption = new Option(selectedText, selectedValue, false, false);
                obj.options[boxLength] = newoption;
        }
        obj.selectedIndex=boxLength;
}
function removeMe(obja, objb){
	var boxLength = obja.length;
	var arrSelected = new Array();
	var count = 0;
	var selectindexvalue=obja.selectedIndex;
	for (i = 0; i < boxLength; i++) {
			if (obja.options[i].selected) {
					arrSelected[count] = obja.options[i].value;
			}
			count++;
	}
	var x;
	for (i = 0; i < boxLength; i++) {
			for (x = 0; x < arrSelected.length; x++) {
					if (obja.options[i].value == arrSelected[x]) {
							
							var selectedText = obja.options[i].text;
							var selectedValue = obja.options[i].value;
							
							re_moveOver(objb,selectedText,selectedValue)  ;
							obja.options[i] = null;
					   }
			}
			boxLength = obja.length;
	}
	selectindexvalue=selectindexvalue-1;
	if(selectindexvalue<0) selectindexvalue=0;
	if(selectindexvalue>obja.length) selectindexvalue=obja.length;

	obja.selectedIndex=selectindexvalue;
}
function selectall(obj) {
	var boxLength = obj.length;

	if (boxLength != 0) {
		for (i = 0; i < boxLength; i++) {
			obj.options[i].selected=true;
	   }
	}
}
textareaTrim = function(obj){
	var str = obj.value;
	var str_ = '';
	var arr = str.split('\n');
	for(var i = 0; i < arr.length; i++)
	{
		row = arr[i].replace(/^\s+/g,'').replace(/\s+$/g,'');
		if( row )
		{
			str_ += row + '\n';
		}
	}
	obj.value = str_.trim();
}
String.prototype.trim = function(){
	return this.replace(/(^\s*)|(\s*$)/g, "");
}

// ¸ÞÀÏ °ü·Ã ÇÔ¼ö -------------------------------------------------------------
function checkAll(obj,bool) {
	for(i=0;i<obj.length;i++) obj[i].checked=bool;
}
function sendMail(obj) {
	var str2="";
	var str1="";
	
	for(i=1;i<obj.length;i++){
		if(obj[i].checked==true){
			if(str1=="") str1=obj[i].value;
			else{
				if(obj[i].value!="") str2=str2+obj[i].value+";";
			}
		}
	}

	mail("?mailaddr="+str1+"&mailaddrcc="+str2);
}
function number_format(numstr) {
	var numstr = String(numstr);
	var re0 = /(\d+)(\d{3})($|\..*)/;
	if (re0.test(numstr)) return numstr.replace(re0,function(str,p1,p2,p3) { return number_format(p1) + "," + p2 + p3;});
	else return numstr;
}
function mail(str){
	window.open('/intraNet/mail/mail.jsp'+str,'mail','width=600,height=600');
}
function directMail(str){
	mail("?mailaddr="+str);
}

var show_me;
function showPro(){
	show_me=window.showModelessDialog("/include/pro.html", "show_me","status:no;dialogWidth:306px;dialogHeight:150px;unadorned:1");
}
function closePro(){
	show_me.window.close();
}
// ¸µÅ©¸¦ È­¸é °¡¿îµ¥ ·¹ÀÌ¾î·Î »Ñ¸®±â
// »ç¿ë¹ý <a href="link" target="_blank" onclick="openIFLayerCenter(this.innerText,width,height,this.href);return false;">link</a>
function openIFLayerCenter(title,w,h,source){
	var IFLayer=document.createElement("div");
	IFLayer.style.cssText="width:"+w+";height:"+h+";z-index;99999;position:absolute;top:-4000;left:-4000;cursor:hand;border:1px solid #D4D0C8;padding:0 0 0 0;font:normal 12px lucida console;color:white;background-color:#2D4988;";

	IFLayer.innerHTML="<div style='width:100%' onclick='user.submit()'><table cellspacing='0' width='100%' class='e9 white'><tr><td>&nbsp; "+title+"</td><td align='right'><button style='width:18;height:18'><b>X</b></button></td></tr></table></div>";

	with(IFLayer.appendChild(document.createElement("div")))
	{
		style.cssText="border:1px solid white;";
		with(appendChild(document.createElement("div")))
		{
			style.cssText="border:2px solid #D4D0C8;";
			with(appendChild(document.createElement("iframe")))
			{
				src=source;
				frameborder=0;	
				width=w;
				height=h;
			}//with
		}//with
	}//with
	document.body.appendChild(IFLayer);
	IFLayer.innerHTML+="<div align='center' style='padding:3;background:#cccccc;color:black' onclick='user.submit()'><input type='button' value='´Ý±â' style='width:80;border:1 solid #000000'></div>";
	with(IFLayer.style){
		left=(document.body.clientWidth-(w+20))/2;
		top=(document.body.clientHeight-(h+50))/2;
		width=w;
		height=h;
	};//with
}
// ±×¸²À» È­¸é °¡¿îµ¥¿¡ ÆË¾÷À¸·Î ¶Ù¿ì±â
// »ç¿ë¹ý openImageWinCenter('http://paragonbase.com/good.jpg')
function openImageWinCenter(imageRef){
	var x,y,w,h,loadingMsg;
	//ÆË¾÷µÉ Ã¢ÀÇ ÃÊ±â Å©±â
	w=300;h=100;
	//È­¸é ÇÑ°¡¿îµ¥·Î ÆË¾÷Ã¢ ¶ç¿ì±â À§ÇÑ ÁÂÇ¥ °è»ê
	x=Math.floor( (screen.availWidth-(w+12))/2 );y=Math.floor( (screen.availHeight-(h+30))/2 );

	//ÀÌÁö¹Ì°¡ ·ÎµùÁß¿¡ ³»º¸³¾ ¸Þ½ÃÁö
	loadingMsg="<table width=100% height=100%><tr><td valign=center align=center><font size='2' color='#ff6600' face='termanal'>NOW LODDING...</font></td></tr></table>";

	with( window.open("","",'height='+h+',width='+w+',top='+y+',left='+x+',scrollbars=no,resizable=no') )
	{
		document.write(
		"<body topmargin=0 rightmargin=0 bottommargin=0 leftmargin=0>",
		loadingMsg,
		"<img src=\""+imageRef+"\" hspace=0 vspace=0 border=0 onmousedown=\"window.close();\" onload=\"document.title=this.src;document.body.removeChild(document.body.children[0]);window.resizeTo(this.width+12,this.height+30);window.moveTo(Math.floor( (screen.availWidth-(this.width+12))/2),Math.floor( (screen.availHeight-(this.height+30))/2 ));\">",
		"</body>");
		focus();
	}
}
// ÆË¾÷Ã¢À» È­¸é °¡¿îµ¥¿¡ ¶Ù¿ì±â
// »ç¿ë¹ý <a href="link" onclick="openWinCenter(this.href,'newPopUp','width=x,height=x,status=yes,menubar=yes');return false">
function openWinCenter(url, wname, wopt) {
	var newopt = "", wHeight = 0, wWidth = 0;
	if (wopt != undefined) {
		var woptlist = wopt.replace(/ /g, "").split(",");
		for (var i in woptlist) {
			if (woptlist[i].match(/^height=/i)) {
				wHeight = parseInt(woptlist[i].substr(7),10);
				if (!isNaN(wHeight)) newopt += "top=" + Math.floor((screen.availHeight - wHeight) / 2) + ",";
			}
			if (woptlist[i].match(/^width=/i)) {
				wWidth = parseInt(woptlist[i].substr(6),10);
				if (!isNaN(wWidth)) newopt += "left=" + Math.floor((screen.availWidth - wWidth) / 2) + ",";
			}
		}
	}
	return window.open(url, wname, newopt + wopt);
} 

// ÆÄÀÏÀÔ·Â Ã¢
// »ç¿ë¹ý filePop("opener.forms[0].file_name.value");
function filePop(filename){
	window.open('/tradeMan/include/file_add.jsp?mode=default&formObj='+filename ,'inserfile','status=0, menubar =0, toolbar=0, scrollbars=no, width=500, height=155, left=150, top = 150, resizable=no');
}
// ¼ýÀÚÀÔ·Â °ü·Ã
function check_key(s){
	//46:¹æÇâÄ¿¼­Å°,16 ½¬ÇÁÆ®, 96~105 Å°ÆÐµå, 144 Numlock, 27 ESC
	if((s>46 || s==16) && (s<96 || s>105) && s!=144 && s!=27){
		if(s<48 || s>57){
			alert("¼ýÀÚ¸¸ ÀÔ·ÂÇÏ¼¼¿ä");
			return false;
		}
	}
	return true;
}
function num2han(num,mode,obj)
{
	if((event.keyCode < 48)||(event.keyCode > 57)) {
		event.returnValue = false;
	}			

    if ( num == "" || num == "0" ) {
        if ( mode == "3" ) {
            return_input.value = "";
        }
        else if ( mode == "4" ) {
			return "";
		}
        return "";
    }

    num=new String(num);
    num=num.replace(/,/gi,"");

    var len  = num.length;
    var temp1 = "";
    var temp2 = "";

    if ( len/4 > 3 && len/4 <= 4 ) {
        if ( len%4 == 0 ) {
            temp1 = ciphers_han(num.substring(0,4)) + "Á¶" + ciphers_han(num.substring(4,8)) + "¾ï" + ciphers_han(num.substring(8,12)) + "¸¸" + ciphers_han(num.substring(12,16));
        }
        else {
            temp1 = ciphers_han(num.substring(0,len%4)) + "Á¶" + ciphers_han(num.substring(len%4,len%4+4)) + "¾ï" + ciphers_han(num.substring(len%4+4,len%4+8)) + "¸¸" + ciphers_han(num.substring(len%4+8,len%4+12));
        }
    }
    else if ( len/4 > 2 && len/4 <= 3 ) {
        if ( len%4 == 0 ) {
            temp1 = ciphers_han(num.substring(0,4)) + "¾ï" + ciphers_han(num.substring(4,8)) + "¸¸" + ciphers_han(num.substring(8,12));
        }
        else {
            temp1 = ciphers_han(num.substring(0,len%4)) + "¾ï" + ciphers_han(num.substring(len%4,len%4+4)) + "¸¸" + ciphers_han(num.substring(len%4+4,len%4+8));
        }
    }
    else if ( len/4 > 1 && len/4 <= 2 ) {
        if ( len%4 == 0 ) {
            temp1 = ciphers_han(num.substring(0,4)) + "¸¸" + ciphers_han(num.substring(4,len));
        }
        else {
            temp1 = ciphers_han(num.substring(0,len%4)) + "¸¸" + ciphers_han(num.substring(len%4,len));
        }
    }
    else if ( len/4 <= 1 ) {
        temp1 = ciphers_han(num.substring(0,len));
    }

    for (var i=0; i<temp1.length; i++) {
        temp2 = temp2 + num_han(temp1.substring(i, i+1));
    }

    temp3=new String(temp2);
    temp3=temp3.replace(/¾ï ¸¸/gi,"¾ï ");
    temp3=temp3.replace(/Á¶ ¾ï/gi,"Á¶ ");

	if (temp3==undefined){
		alert('ok');
		temp3='';
	}
	return temp3;
}
function hanStr(num)
{
	if(num>=0) document.write(gongNumberStr(num));
	else document.write("-"+gongNumberStr(num));
}
function gongNumberStr(num){	
	var units = ["","¸¸","¾ï","Á¶","°æ","ÇØ","½Ã","¾ç","±¸","°£","Á¤","Àç","±Ø","Ç×ÇÏ»ç","¾Æ½ÂÁö","³ªÀ¯Å¸","ºÒ°¡»çÀÇ","¹«·®´ë¼ö"];
	num=''+num;
	ls=num.length;
	un=0;

	var temp=num.charAt(ls-1);
	ls=ls-1;

	for(i=1;i<=ls;i++){
		if((i%4)==0){
			un++;
			temp=units[un]+temp;
		}
		temp=num.charAt(ls-i)+temp;
	}

	ls=temp.length;
	temp2="";
	young=0;
	for(i=0;i<ls;i=i+1){
		if(temp.charAt(i)>0 && temp.charAt(i)<10){
			temp2=temp2+temp.charAt(i);
			if(temp.charAt(i)>=0 && temp.charAt(i)<=9)
				young=1;
			else
				young=0;
		}
		else{
			if(young==1){
				temp2=temp2+temp.charAt(i);
				if(temp.charAt(i)>=0 && temp.charAt(i)<=9) young=1;
				else young=0;
			}
		}
	}
	if(temp2=="") temp2=0;
	return temp2;
}
function ciphers_han(num)
{
    var len  = num.length;
    var temp = "";

    if ( len == 1 ) {
        temp = num;
    }
    else if ( len == 2 ) {
        temp = num.substring(0,1) + "½Ê" + num.substring(1,2);
    }
    else if ( len == 3 ) {
        temp = num.substring(0,1) + "¹é" + num.substring(1,2) + "½Ê" + num.substring(2,3);
    }
    else if ( len == 4 ) {
        temp = num.substring(0,1) + "Ãµ" + num.substring(1,2) + "¹é" + num.substring(2,3) + "½Ê" + num.substring(3,4);
    }

    num=new String(temp);
    num=num.replace(/0½Ê/gi,"");
    num=num.replace(/0¹é/gi,"");
    num=num.replace(/0Ãµ/gi,"");
    return num;
}
function num_han(num)
{
    if ( num == "1" )       return "ÀÏ";
    else if ( num == "2" )  return "ÀÌ";
    else if ( num == "3" )  return "»ï";
    else if ( num == "4" )  return "»ç";
    else if ( num == "5" )  return "¿À";
    else if ( num == "6" )  return "À°";
    else if ( num == "7" )  return "Ä¥";
    else if ( num == "8" )  return "ÆÈ";
    else if ( num == "9" )  return "±¸";
    else if ( num == "½Ê" ) return "½Ê";
    else if ( num == "¹é" ) return "¹é";
    else if ( num == "Ãµ" ) return "Ãµ";
    else if ( num == "¸¸" ) return "¸¸ ";
    else if ( num == "¾ï" ) return "¾ï ";
    else if ( num == "Á¶" ) return "Á¶ ";
    else if ( num == "0" )  return "";
}
function busino(str){
	if(str=="" || str.length<10) return "";

	echo(str.substr(0,3)+"-"+str.substr(3,2)+"-"+str.substr(5,5));

}
function number_format(numstr) {
	var numstr = String(numstr);
	var re0 = /(\d+)(\d{3})($|\..*)/;
	if (re0.test(numstr)) return numstr.replace(re0,function(str,p1,p2,p3) { return number_format(p1) + "," + p2 + p3;});
	else return numstr;
}
// ÁÖ¹Î¹øÈ£ Ã¼Å©
function check_juminno(juminno) {
        if(juminno=="" || juminno==null || juminno.length!=13) {
                alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ Àû¾îÁÖ¼¼¿ä.");
                return false;
        }
        var jumin1 = juminno.substr(0,6);
        var jumin2 = juminno.substr(6,7);
        var yy           = jumin1.substr(0,2);        // ³âµµ
        var mm     = jumin1.substr(2,2);        // ¿ù
        var dd     = jumin1.substr(4,2);        // ÀÏ
        var genda  = jumin2.substr(0,1);        // ¼ºº°
        var msg, ss, cc;

        // ¼ýÀÚ°¡ ¾Æ´Ñ °ÍÀ» ÀÔ·ÂÇÑ °æ¿ì
        if (!isNumeric(jumin1)) {
                alert("ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®¸¦ ¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        // ±æÀÌ°¡ 6ÀÌ ¾Æ´Ñ °æ¿ì
        if (jumin1.length != 6) {
                alert("ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®¸¦ ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        // Ã¹¹øÂ° ÀÚ·á¿¡¼­ ¿¬¿ùÀÏ(YYMMDD) Çü½Ä Áß ±âº» ±¸¼º °Ë»ç
        if (yy < "00" || yy > "99" ||
                mm < "01" || mm > "12" ||
                dd < "01" || dd > "31") {
                alert("ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®¸¦ ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        // ¼ýÀÚ°¡ ¾Æ´Ñ °ÍÀ» ÀÔ·ÂÇÑ °æ¿ì
        if (!isNumeric(jumin2)) {
                alert("ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®¸¦ ¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        // ±æÀÌ°¡ 7ÀÌ ¾Æ´Ñ °æ¿ì
        if (jumin2.length != 7) {
                alert("ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®¸¦ ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        // ¼ºº°ºÎºÐÀÌ 1 ~ 4 °¡ ¾Æ´Ñ °æ¿ì
        if (genda < "1" || genda > "4") {
                alert("ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®¸¦ ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        // ¿¬µµ °è»ê - 1 ¶Ç´Â 2: 1900³â´ë, 3 ¶Ç´Â 4: 2000³â´ë
        cc = (genda == "1" || genda == "2") ? "19" : "20";
        // Ã¹¹øÂ° ÀÚ·á¿¡¼­ ¿¬¿ùÀÏ(YYMMDD) Çü½Ä Áß ³¯Â¥ Çü½Ä °Ë»ç
        if (isYYYYMMDD(parseInt(cc+yy), parseInt(mm), parseInt(dd)) == false) {
                alert("ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®¸¦ ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        // Check Digit °Ë»ç
        if (!isSSN(jumin1, jumin2)) {
                alert("ÀÔ·ÂÇÑ ÁÖ¹Îµî·Ï¹øÈ£¸¦ °ËÅäÇÑ ÈÄ, ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
                return false;
        }
        return true;
}

// onpropertychange="selectbox_hidden('layerid')"
function selectbox_hidden(layer_id){
	var ly = eval(layer_id);

	// ·¹ÀÌ¾î ÁÂÇ¥
	var ly_left = ly.offsetLeft; 
	var ly_top = ly.offsetTop; 
	var ly_right = ly.offsetLeft + ly.offsetWidth; 
	var ly_bottom = ly.offsetTop + ly.offsetHeight; 

	// ¼¿·ºÆ®¹Ú½ºÀÇ ÁÂÇ¥ 
	var el; 

	for (i=0; i<document.forms.length; i++){
		for (k=0; k<document.forms[i].length; k++){
			el = document.forms[i].elements[k];
			if (el.type == "select-one"){
				var el_left = el_top = 0;
				var obj = el;
				if (obj.offsetParent){
					while (obj.offsetParent){
						el_left += obj.offsetLeft;
						el_top += obj.offsetTop;
						obj = obj.offsetParent;
					}
				}
				el_left += el.clientLeft;
				el_top += el.clientTop;
				el_right = el_left + el.clientWidth;
				el_bottom = el_top + el.clientHeight;

				// ÁÂÇ¥¸¦ µûÁ® ·¹ÀÌ¾î°¡ ¼¿·ºÆ® ¹Ú½º¸¦ Ä§¹üÇßÀ¸¸é ¼¿·ºÆ® ¹Ú½º¸¦ hidden ½ÃÅ´
				if ((ly_right >= el_left && ly_left <= el_right) && (ly_bottom >= el_top && ly_top <= el_bottom)) el.style.visibility = 'hidden';
			}
		}
	}
}

// °¨Ãß¾îÁø ¼¿·ºÆ® ¹Ú½º¸¦ ¸ðµÎ º¸ÀÌ°Ô ÇÔ 
function selectbox_visible(){
	for (i=0; i<document.forms.length; i++){
		for (k=0; k<document.forms[i].length; k++){
			el = document.forms[i].elements[k];
			if (el.type == "select-one" && el.style.visibility == 'hidden') el.style.visibility = 'visible';
		}
	}
}

function popupPreview(no,num){
	openWinCenter('/include/preview.html?no='+no+'&num='+num, 'preview', 'width=550, height=550')
}
