function isBlank(str) {
	flag = 0;
	for (i=0; i<str.length; i++) {
		if (str.substr(i,1) != ' ') {
			flag = 1
		}
	}
	return flag;
}
function pwd_chk1() {
	var form = document.frm;
	if (!isBlank(form.strName.value)) {
		alert('ÀÌ¸§À» ÀÔ·ÂÇØÁÖ¼¼¿ä');
		form.strName.focus();
		return false;
	}
	if (!isBlank(form.strSsn1.value) || !isBlank(form.strSsn2.value)) {
	alert('ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä');
	form.strSsn1.focus();
	return false;
	} else {
	str1 = form.strSsn1.value ;
	str2 = form.strSsn2.value ;
	li_value = new Array(13);
	var li_lastid,li_mod,li_minus,li_last;
	li_lastid    = parseFloat(str2.substring(6,7));
	li_value[0]  = parseFloat(str1.substring(0,1))  * 2;
	li_value[1]  = parseFloat(str1.substring(1,2))  * 3;
	li_value[2]  = parseFloat(str1.substring(2,3))  * 4;
	li_value[3]  = parseFloat(str1.substring(3,4))  * 5;
	li_value[4]  = parseFloat(str1.substring(4,5))  * 6;
	li_value[5]  = parseFloat(str1.substring(5,6))  * 7;
	li_value[6]  = parseFloat(str2.substring(0,1))  * 8;
	li_value[7]  = parseFloat(str2.substring(1,2))  * 9;
	li_value[8]  = parseFloat(str2.substring(2,3))  * 2;
	li_value[9]  = parseFloat(str2.substring(3,4))  * 3;
	li_value[10] = parseFloat(str2.substring(4,5))  * 4;
	li_value[11] = parseFloat(str2.substring(5,6))  * 5;
	li_value[12] = 0;
	for (var i = 0; i<12;i++)
	{
		li_value[12] = li_value[12] + li_value[i];
	}
	li_mod = li_value[12] %11;
	li_minus = 11 - li_mod;
	li_last = li_minus % 10;
	if (li_last != li_lastid)
	{
		alert ('ÁÖ¹Îµî·Ï¹øÈ£°¡ ¸ÂÁö ¾Ê½À´Ï´Ù.');
		form.strSsn1.focus();
		return false;
	}
   }
   form.action = "/nc_p/nc_p.php";
	form.submit();
}
function jumin_move() { 
   var f = document.frm; 
   if (f.strSsn1.value.length >5) { f.strSsn2.focus();} 
   if (f.strSsn2.value.length >6) { f.nmdBtn.focus();} 
   return;
} 
function menuShow(menuidx) {
   if(document.all(menuidx).style.display=="none") 
     document.all(menuidx).style.display="inline";
    else
     document.all(menuidx).style.display="none";
}
function bt(id,after) { 
   try{
   var k=document.all(id).id;
   k=k.split("_");
   if(document.all[k[0]].style.display=="inline") return;
   } catch (e) {}
   eval(id+'.filters.blendTrans.stop();'); 
   eval(id+'.filters.blendTrans.Apply();'); 
   eval(id+'.src="'+after+'";'); 
   eval(id+'.filters.blendTrans.Play();'); 
}
function bt_index(id,after) { 
   document.all("notice1").style.display=="none"; 
   for(i=1;i<=4;i++) {
      kkang="menu" + i + "_m";
      if(id!=kkang) {
         bt(kkang,"./images/tab0" + i + "_off.gif");
         document.all("notice" + i).style.display="none"; 
      } else {
         document.all("notice" + i).style.display="block"; 
      }
   }
   try{
   var k=document.all(id).id;
   k=k.split("_");
   if(document.all[k[0]].style.display=="inline") return;
   } catch (e) {}
   eval(id+'.filters.blendTrans.stop();'); 
   eval(id+'.filters.blendTrans.Apply();'); 
   eval(id+'.src="'+after+'";'); 
   eval(id+'.filters.blendTrans.Play();'); 
   document.all.aaa.value=id;
}
function ssnChk(strBid) {
   window.open("/include/ssnchk.php?strBid=" + strBid,"ssnchk","toolbar=no,menubar=no,scrollbars=no,resizable=no,locationbar=no,width=450,height=270,top=200,left=300" );
}
function neoDelete(strSeq,strBid,rtnUrl,brd_id) {
   mode="DELETE";
   window.open("/include/pwdchk.php?strSeq=" + strSeq + "&strBid=" + strBid + "&rtnUrl=" + rtnUrl + "&brd_id=" + brd_id + "&mode=" + mode,"ssnchk","toolbar=no,menubar=no,scrollbars=no,resizable=no,locationbar=no,width=450,height=270,top=200,left=300" );
}
function neoEdit(strSeq,strBid,rtnUrl,brd_id) {
   mode="EDI";
   window.open("/include/pwdchk.php?strSeq=" + strSeq + "&strBid=" + strBid + "&rtnUrl=" + rtnUrl + "&brd_id=" + brd_id + "&mode=" + mode,"ssnchk","toolbar=no,menubar=no,scrollbars=no,resizable=no,locationbar=no,width=450,height=270,top=200,left=300" );
}

var select_obj;

function ZB_layerAction(name,status) { 
   var obj=document.all[name];
   var _tmpx,_tmpy, marginx, marginy;
   _tmpx = event.clientX + parseInt(obj.offsetWidth);
   _tmpy = event.clientY + parseInt(obj.offsetHeight);
   _marginx = document.body.clientWidth - _tmpx;
   _marginy = document.body.clientHeight - _tmpy ;
   if(_marginx < 0) _tmpx = event.clientX + document.body.scrollLeft + _marginx ;
   else _tmpx = event.clientX + document.body.scrollLeft ;
   if(_marginy < 0) _tmpy = event.clientY + document.body.scrollTop + _marginy +20;
   else _tmpy = event.clientY + document.body.scrollTop ;
   obj.style.posLeft=_tmpx-13;
   obj.style.posTop=_tmpy-12;

   if(status=='visible') {
      if(select_obj) {
         select_obj.style.visibility='hidden';
         select_obj=null;
      }
      select_obj=obj;
   }else{
      select_obj=null;
   }
   obj.style.visibility=status; 
}
function kkk() {
   alert("-_-");
}
function print_ZBlayer(name, homepage, mail, member_no, boardID, writer, traceID, traceType, isAdmin, isMember) {
var printHeight = 0;
var printMain="";


homepage=homepage.replace("%"," ");
homepage = homepage.split("@");

   if(homepage) {
      printMain = "<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor=''><td style=font-family:±¼¸²;font-size:9pt height=18 nowrap>&nbsp;<img src=/board/image/"+homepage[0]+" border=0 align=absmiddle>&nbsp;&nbsp;"+homepage[2]+"&nbsp;&nbsp;</a></td></a></tr>";
      printHeight = printHeight + 16;
   }
   if(mail) {
      printMain = printMain +	"<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=window.open('open_window.php?mode=m&str="+mail+"','ZBremote','width=1,height=1,left=1,top=1');><td style=font-family:±¼¸²;font-size:9pt height=18 nowrap>&nbsp;<img src=images/n_mail.gif border=0 align=absmiddle>&nbsp;&nbsp;¸ÞÀÏ º¸³»±â&nbsp;&nbsp;</td></tr>";
      printHeight = printHeight + 16;
   }
   if(member_no) {
      if(isMember) {
         printMain = printMain +	"<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=window.open('view_info.php?member_no="+member_no+"','view_info','width=400,height=510,toolbar=no,scrollbars=yes');><td style=font-family:±¼¸²;font-size:9pt height=18 nowrap>&nbsp;<img src=images/n_memo.gif border=0 align=absmiddle>&nbsp;&nbsp;ÂÊÁö º¸³»±â&nbsp;&nbsp;</td></tr>";
         printHeight = printHeight + 16;
      }
      printMain = printMain +	"<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=window.open('view_info2.php?member_no="+member_no+"','view_info','width=400,height=510,toolbar=no,scrollbars=yes');><td style=font-family:±¼¸²;font-size:9pt height=18 nowrap>&nbsp;<img src=images/n_information.gif border=0 align=absmiddle>&nbsp;&nbsp;È¸¿øÁ¤º¸ º¸±â&nbsp;&nbsp;</td></tr>";
      printHeight = printHeight + 16;
   }
   if(writer) {
      printMain = printMain +	"<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=location.href='zboard.php?id="+boardID+"&sn1=on&sn=on&ss=off&sc=off&keyword="+writer+"';><td style=font-family:±¼¸²;font-size:9pt height=18 nowrap>&nbsp;<img src=images/n_search.gif border=0 align=absmiddle>&nbsp;&nbsp;ÀÌ¸§À¸·Î °Ë»ö&nbsp;&nbsp;</td></tr>";
      printHeight = printHeight + 16;
   }
   if(isAdmin) {
      if(member_no) {
         printMain = printMain +	"<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=window.open('open_window.php?mode=i&str="+member_no+"','ZBremote','width=1,height=1,left=1,top=1');><td style=font-family:±¼¸²;font-size:9pt height=18 nowrap>&nbsp;<img src=images/n_modify.gif border=0 align=absmiddle>&nbsp;&nbsp;<font color=darkred>È¸¿øÁ¤º¸ º¯°æ&nbsp;&nbsp;</td></tr>";
         printHeight = printHeight + 16;
      }
      printMain = printMain +	"<tr onMouseOver=this.style.backgroundColor='#bbbbbb' onMouseOut=this.style.backgroundColor='' onMousedown=window.open('open_window.php?mode="+traceType+"&str="+traceID+"','ZBremote','width=1,height=1,left=1,top=1');><td style=font-family:±¼¸²;font-size:9pt height=18 nowrap>&nbsp;<img src=images/n_relationlist.gif border=0 align=absmiddle>&nbsp;&nbsp;<font color=darkred>°ü·Ã±Û ÃßÀû</font>&nbsp;&nbsp;</td></tr>";
      printHeight = printHeight + 16;
   }

   var printHeader = "<div id='"+name+"' style='position:absolute; left:10px; top:25px; width:127; height: "+printHeight+"; z-index:1; visibility: hidden' onMousedown=ZB_layerAction('"+name+"','hidden')><table border=0><tr><td colspan=3 onMouseover=ZB_layerAction('"+name+"','hidden') height=3></td></tr><tr><td width=5 onMouseover=ZB_layerAction('"+name+"','hidden') rowspan=2>&nbsp;</td><td height=5></td></tr><tr><td><table  border='0' cellspacing='1' cellpadding='0' bgcolor='black' width=100% height=100%><tr><td valign=top bgcolor=white><table border=0 cellspacing=0 cellpadding=3 width=100% height=100%>";
   var printFooter = "</table></td></tr></table></td><td width=5 rowspan=2 onMouseover=ZB_layerAction('"+name+"','hidden')>&nbsp;</td></tr><tr><td colspan=3 height=10 onMouseover=ZB_layerAction('"+name+"','hidden')></td></tr></table></div>";
   document.writeln(printHeader+printMain+printFooter);
}

function openWindow2(a) {
   window.open(a, "subpart");
}
function numOnly(obj,frm,isCash){
	//ÀÔ·ÂÇÊµåÀÇ ÀÔ·Â°ªÀÌ ¼ýÀÚ ÀÔ·Â°¡´É.
	//»ç¿ë¿¹ : <input type="text" name="text" onKeyUp="javascript:numOnly(this,document.ÆûÀÌ¸§,true);">
	//¼¼ÀÚ¸® ÄÞ¸¶ »ç¿ë½Ã true , ¼ýÀÚ¸¸ ÀÔ·Â ½Ã false
	if (event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39) return;
	var returnValue = "";
	for (var i = 0; i < obj.value.length; i++){
		if (obj.value.charAt(i) >= "0" && obj.value.charAt(i) <= "9"){
			returnValue += obj.value.charAt(i);
		}else{
			returnValue += "";
		}
	}
	if (isCash){
		obj.value = cashReturn(returnValue);
		return;
	}
	obj.focus();
	obj.value = returnValue;
}


function numOnlyTime(obj,frm){
	if (event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39) return;
	var returnValue = "";
	for (var i = 0; i < obj.value.length; i++){
		if (obj.value.charAt(i) >= "0" && obj.value.charAt(i) <= "9"){
			returnValue += obj.value.charAt(i);
		}else{
			returnValue += "";
		}
	}
	if(parseInt(returnValue,10) >= 24) returnValue = "";
	obj.focus();
	obj.value = returnValue;
}


function numOnlyDay(obj,frm){
	if (event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39) return;
	var returnValue = "";
	for (var i = 0; i < obj.value.length; i++){
		if (obj.value.charAt(i) >= "0" && obj.value.charAt(i) <= "9"){
			returnValue += obj.value.charAt(i);
		}else{
			returnValue += "";
		}
	}
	if(parseInt(returnValue,10)==0 || parseInt(returnValue,10)>=32 || !returnValue) returnValue = "01";
	obj.focus();
	obj.value = returnValue;
}


function isNumber(str) {
	if (str) {
		if (str.search(/[^0-9]/g) == -1) return true;
		else return false;
	}
	else return false;
}


function korOnly(str) {
	var strLength = str.length;
	var i;
	var Unicode;
	for (var i=0; i<strLength; i++){
		Unicode = str.charCodeAt(i);
		if ( !(44032 <= Unicode && Unicode <= 55203) ) return false;
	}
	return true;
}



function engOnlyUp1(obj){
	//¿µ¹® ,_,-, ¼ýÀÚ ¸¸ÀÌ ÀÔ·Â
	//»ç¿ë¿¹ : <input type="text" name="text" onKeyUp="javascript:engOnly(this);">
	if (event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39) return;
	var returnValue = "";
	for (var i = 0; i < obj.value.length; i++){
		var isNum = false;
		if ((obj.value.charAt(i) >= "0" && obj.value.charAt(i) <= "9") || (obj.value.charAt(i) >= "a" &&  obj.value.charAt(i) <= "z") || (obj.value.charAt(i) >= "A" && obj.value.charAt(i) <= "Z") || obj.value.charAt(i) == "_" || obj.value.charAt(i) == "-"){
			returnValue += obj.value.charAt(i);
		}
	}
	obj.value = returnValue;
}
function engOnlyUp2(obj){
	//space, -, _, ¼ýÀÚ, ., ¿µ¹®¸¸ ÀÔ·ÂµÇ°ÔÇÑ´Ù.
	if (event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39) return;
	var returnValue = "";
	for (var i = 0; i < obj.value.length; i++){
		var isNum = false;
		if ((obj.value.charAt(i) >= "0" && obj.value.charAt(i) <= "9") || (obj.value.charAt(i) >= "a" &&  obj.value.charAt(i) <= "z") || (obj.value.charAt(i) >= "A" && obj.value.charAt(i) <= "Z") || obj.value.charAt(i) == " " || obj.value.charAt(i) == "_" || obj.value.charAt(i) == "-" || obj.value.charAt(i) == "."){
			returnValue += obj.value.charAt(i);
		}
	}
	obj.value = returnValue;
}
function engOnlyUp3(obj){
	//¼ýÀÚ, ¿µ¹® ´ë¹®¸¸ ÀÔ·ÂµÇ°ÔÇÑ´Ù.
	if (event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39) return;
	var returnValue = "";
	for (var i = 0; i < obj.value.length; i++){
		var isNum = false;
		if ((obj.value.charAt(i) >= "0" && obj.value.charAt(i) <= "9") || (obj.value.charAt(i) >= "a" &&  obj.value.charAt(i) <= "z") || (obj.value.charAt(i) >= "A" && obj.value.charAt(i) <= "Z") ){
			returnValue += obj.value.charAt(i);
		}
	}
	obj.value = returnValue.toUpperCase();
}
function engOnlyUp4(obj){
	//¼ýÀÚ, ¿µ¹® ¼Ò¹®¸¸ ÀÔ·ÂµÇ°ÔÇÑ´Ù.
	if (event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39) return;
	var returnValue = "";
	for (var i = 0; i < obj.value.length; i++){
		var isNum = false;
		if ((obj.value.charAt(i) >= "0" && obj.value.charAt(i) <= "9") || (obj.value.charAt(i) >= "a" &&  obj.value.charAt(i) <= "z") || (obj.value.charAt(i) >= "A" && obj.value.charAt(i) <= "Z") ){
			returnValue += obj.value.charAt(i);
		}
	}
	obj.value = returnValue.toLowerCase();
}



function cashReturn(numValue){
	//numOnlyÇÔ¼ö¿¡ ¸¶Áö¸· ÆÄ¶ó¹ÌÅÍ¸¦ true·Î ÁÖ°í numOnly¸¦ ºÎ¸¥´Ù.
	var cashReturn = "";
	for (var i = numValue.length-1; i >= 0; i--){
		cashReturn = numValue.charAt(i) + cashReturn;
		if (i != 0 && i%3 == numValue.length%3) cashReturn = "," + cashReturn;
	}
	return cashReturn;
}



function removeComma(cash){
	//ÄÞ¸¶¸¦ ¾ø¾ÖÁØ´Ù.
	//»ç¿ë¹ý : document.ÆûÀÌ¸§.ÇÊµåÀÌ¸§.value = removeComma(document.ÆûÀÌ¸§.ÇÊµåÀÌ¸§.value);
	var returnValue = "";
	for (var i = 0; i < cash.length; i++){
		if (cash.charAt(i) != ","){
			returnValue += cash.charAt(i);
		}
	}
	return returnValue;
}



function zero_fill(inputvalue,demandLength){
	//12 --> 0012 Ã³·³ ¸¸µé±â
	var spaceValue = "";
	for (var i = 0; i < demandLength-inputvalue.length;i++){
		spaceValue += "0";
	}
	return spaceValue+inputvalue;
}



function space_fill(inputvalue,demandLength){
	var spaceValue = "";
	for (var i = 0; i < demandLength-inputvalue.length;i++){
		spaceValue += " ";
	}
	return spaceValue+inputvalue;
}



function removeLeftZero(inputValue){
	//¿ÞÂÊ 0 ¾ø¾Ö±â
	var zeroIdx = 0;
	for (var i = 0; i < inputValue.length; i++){
		if (inputValue.charAt(i) != "0" && inputValue.charAt(i) != ","){
			break;
		}
		else zeroIdx++;
	}
	return inputValue.substring(zeroIdx);
}



function isValidEmail(str){
	var pattern = /^[-_a-zA-Z0-9]+@[\.a-zA-Z0-9-]+\.[a-zA-Z]+$/;
	return (pattern.test(str)) ? true : false;
}

function nohanMail(str) {
	var email = str.split("@")
	if (email[1]=="hanmail.net") return false;
	else if (email[1]=="daum.net") return false;
	else return true;
}

// ÇØ´ç(ÁÖ¹Îµî·Ï¹øÈ£)±æÀÌ°¡ µÇ¸é ´ÙÀ½À¸·Î Ä¿¼­ ÀÌµ¿
function Move_Check(obj01,obj02,len) {
	if (obj01.value.length == len) {
		obj02.focus();
	}
}


