//ÀÚ¹Ù Æã¼Ç ¸ðÀ½
//Çì´õÆÄÀÏ¿¡ »ðÀÔµÇ´Â ºÎºÐ ½ÃÀÛ
<!--
if (navigator.appName == 'Microsoft Internet Explorer') {
	document.write('<link rel="STYLESHEET" type="text/css" href="/msie.css">');
} else {
	document.write('<link rel="STYLESHEET" type="text/css" href="/netscape.css">');
}

//window.defaultStatus = '½Ã¼³¹°¾ÈÀüÁø´ÜÇùÈ¸¿¡ ¿À½Å °ÍÀ» È¯¿µÇÕ´Ï´Ù.';
//window.name='assi_main';
//alert(window.name);
//Çì´õÆÄÀÏ¿¡ »ðÀÔµÇ´Â ºÎºÐ ³¡



//##############   main menu rollover ±â´É ###########


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}




//°ø¹éÀ» Á¦°ÅÇÔ...
function trim(strText) { 
	//if¸¦ ¾È¾²°í while¸¦ ¾´ °Í¿¡ ÁÖÀÇ ::::::::::::> ¹®ÀÚ¿­.substring(½ÃÀÛÁ¡(ºÎÅÍ),ÀÌ ¹®ÀÚÁ÷Àü±îÁ÷ Ã£´Â´Ù(±îÁ÷))
	while (strText.substring(0,1) == ' ') 
	    strText = strText.substring(1, strText.length);
	//if¸¦ ¾È¾²°í while¸¦ ¾´ °Í¿¡ ÁÖÀÇ ::::::::::::> ¹®ÀÚ¿­.length		
	while (strText.substring(strText.length-1,strText.length) == ' ')
	     strText = strText.substring(0, strText.length-1);
			
	return strText;
} 

//°ø¹é¿©ºÎ¸¦ Ã¼Å©ÇÔ...
function isBlank(str)
{
	str = trim(str);
	if(str.length >= 1) {
		return false;
	} else {
		return true;	
	}
}

//ÀÌ¸ÞÀÏ À¯È¿¼º °Ë»ç
function emailRegular(email) {
	if (email.length <= 0)
		return false;
	if (email.search(/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z][0-9a-z-]*[0-9a-z]\.)+[a-z]{2}[mtgvu]?$/) != -1) {
	   return true;
   } else {
      return false;
	}
}


//°ªÀÇ ±æÀÌ À¯È¿¼ºÀ» °Ë»ç
function lengthChk(str,strlength) {
	if(trim(str).length <= strlength) {
		return false;
	} else {
		return true;	
	}
}

//°Ë»ö¾î°¡ ¾øÀ» °æ¿ì °æ°í ¸Þ½ÃÁö, °ÅÁþ ¹ÝÈ¯
function searchWordChk(str,strlength) {
	if(lengthChk(str,strlength))
	{
		return true;	
	} else {
		alert('°Ë»ö¾î´Â ÇÑÀÚ ÀÌ»ó ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.');
		return false;
	}
}

//¼ýÀÚÁ¶ÇÕ °Ë»ç
function IsNumeric(name){
	if (name.search(/^[0-9-]*$/) != -1) {
		return true;
	} else {
		return false;
	}
}

//¿µ¹®¼Ò¹®ÀÚ && ¼ýÀÚÁ¶ÇÕ °Ë»ç
function alNumRegular(name){
	if (name.search(/^[a-z0-9-_]*$/) != -1) {
		return true;
	} else {
		return false;
	}
}


// -------------------------------------------------------------------------------
//°Ç±³ºÎ µî·Ï È®ÀÎ 
function check_konkyo_winOpen(form, url){

	url += "?";
			
	if(!form.company_name.value){
		alert("È¸»ç(´ÜÃ¼¸í)À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.\n°ø¹éÀº Çã¿ëÀÌ ¾ÈµË´Ï´Ù.");
		form.company_name.focus();
		return false;
	} 
	url += "company_name=" + form.company_name.value;
//	alert(url);
	
	if(!trim(form.company_num.value)){
		alert("¹ýÀÎ(»ç¾÷ÀÚ)¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.\n°ø¹éÀº Çã¿ëÀÌ ¾ÈµË´Ï´Ù.");
		form.company_num.focus();
		return false;
	}
	
	if(!IsNumeric(form.company_num.value)){
		alert("¹ýÀÎ(»ç¾÷ÀÚ)¹øÈ£´Â ¼ýÀÚ·Î¸¸ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		form.company_num.focus();
		form.company_num.select();
		return false;
	}

	if(!trim(form.chief.value)){
		alert("´ëÇ¥ÀÚ ¼º¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.\n°ø¹éÀº Çã¿ëÀÌ ¾ÈµË´Ï´Ù.");
		form.chief.focus();
		return false;
	}
	url += "&chief=" + form.chief.value;

	
	if(JuminChk(form, form.joomin_birth.value, form.joomin_region.value)==false){
		return false;
	}
//	 url += "&JuminChk=" + form.JuminChk.value;		
   
	if(!form.year.selectedIndex){
		alert("°Ç±³ºÎ µî·Ï¿¬µµ¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä."); 
		return false;
		}
		
	if(!form.month.selectedIndex){
		alert("°Ç±³ºÎ µî·Ï¿ùÀ» ¼±ÅÃÇØÁÖ¼¼¿ä."); 
		return false;
		}
		
	if(!form.day.selectedIndex){
		alert("°Ç±³ºÎ µî·ÏÀÏÀ» ¼±ÅÃÇØÁÖ¼¼¿ä."); 
		return false;
		}				
				
//	alert(form.year.options[form.year.selectedIndex].value);
//	alert(form.month.options[form.month.selectedIndex].value);
//	alert(form.day.options[form.day.selectedIndex].value);	
	
	 url += "&konkyo_registered_day=" + form.year.options[form.year.selectedIndex].value + 
	 		"-" + form.month.options[form.month.selectedIndex].value + 
	 		"-" + form.day.options[form.day.selectedIndex].value ;		
	 
	if(!trim(form.konkyo_register.value)){
		alert("°Ç±³ºÎµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.\n°ø¹éÀº Çã¿ëÀÌ ¾ÈµË´Ï´Ù.");
		form.konkyo_register.focus();
		return false;
		
		if(!IsNumeric(form.konkyo_register.value)){
			alert("µî·Ï¹øÈ£Àº ¼ýÀÚ·Î¸¸ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
			form.konkyo_register.focus();
			form.konkyo_register.select();
			return false;
		}
	}
	  url += "&konkyo_register=" + form.konkyo_register.value;	
//return false;
	  
     window.open(url,"chk","width=299,height=175,left=400,top=200");
     return false;	
     
     
     

}


// -------------------------------------------------------------------------------


//¾ÆÀÌµð ´Ù½ÃÀÔ·ÂÀÇ select()
function select_id(){
	opener.document.juso.id.select();
	window.close();
}

//¾ÆÀÌµð Ã½Å©ÀÇ ÆË¾÷Ã¢(check_id_popup.php) =====> ±æÀÌ && ¿µ¹®¼Ò¹®ÀÚ ¼ýÀÚÁ¶ÇÕ°Ë»ç=====>¼ø¼­ÁÖÀÇ!!!!
function check_id_winOpen(xx){
	var id = document.juso.id;
	
	if(!id.value){
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÈÄ Áßº¹È®ÀÎÀ» ÇÏ¼¼¿ä!");
		id.focus();
		return false;
	} 

	if((id.value.length < 4) || (id.value.length > 10)){
		alert("¾ÆÀÌµð´Â 4ÀÚÀÌ»ó 10ÀÚÀÌÇÏ·Î ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
		id.focus();
		id.select();
		return false;			
	}

	if(!alNumRegular(id.value)){
		alert("¾ÆÀÌµð´Â ¿µ¹®¼Ò¹®ÀÚ/¼ýÀÚÁ¶ÇÕÀ¸·Î ¸¸µå¼Å¾ß ÇÕ´Ï´Ù.");
		id.focus();
		id.select();
		return false;	
	}
	
	 xx = xx + "?id=" + id.value;
	//var win_left = screen.width;
	window.open(xx,"checkIDWin","width=300,height=175,left=400,top=200");
}


function daychk(form) {
	var day = form.day.options[form.day.options.selectedIndex].value;
	var month = form.month.options[form.month.options.selectedIndex].value;
	var msg = '¼±ÅÃÇÏ½Å ³¯Â¥°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù.';

	if((month == 2) && (day > 28)) {
		alert(msg); return false;
	}

	var j = month % 2;
	if((month < 7) && (j == 0) && (day > 30)){
		alert(msg); return false;
	}

	if((month >= 8) && (j == 1) && (day > 30)){
		alert(msg);	return false;
	}
}

function JuminChk(form,birth,region) {
	if (isJuminNo(trim(birth),trim(region)) == false )  {
		alert("ÁÖ¹Î¹øÈ£°¡ Àß¸øµÇ¾ú½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØÁÖ¼¼¿ä");
		form.joomin_birth.select();
			return false;
	}
}
					
function isJuminNo(psn_no1, psn_no2) {
	if (psn_no1.length != 6) return false;
	if (psn_no2.length != 7) return false;
					
	j1  = psn_no1.charAt(0) * 2
	j2  = psn_no1.charAt(1) * 3
	j3  = psn_no1.charAt(2) * 4
	j4  = psn_no1.charAt(3) * 5
	j5  = psn_no1.charAt(4) * 6
	j6  = psn_no1.charAt(5) * 7
	j7  = psn_no2.charAt(0) * 8
	j8  = psn_no2.charAt(1) * 9
	j9  = psn_no2.charAt(2) * 2
	j10 = psn_no2.charAt(3) * 3
	j11 = psn_no2.charAt(4) * 4
	j12 = psn_no2.charAt(5) * 5
	j13 = psn_no2.charAt(6)
					
	sum = j1+j2+j3+j4+j5+j6+j7+j8+j9+j10+j11+j12
	rest = (sum % 11)
	conclusion = 11 - rest
				
	if ( j13 != conclusion ) {
		if ( j13 != conclusion - 10) return false;
	}


}

//¿©·¯ ÀÔ·ÂÆûÃ¼Å©
function checkform(x){	

	if(x.is_registerchk.value == "false") {
		alert("°Ç±³ºÎ µî·ÏÁ¤º¸¸¦ È®ÀÎÇÏÁö ¾Ê¾Ò½À´Ï´Ù.");
		return false;
	}		
	
	if(x.is_idchk.value == "false") {
		alert("¾ÆÀÌµðÁßº¹ È®ÀÎÀ» ÇÏÁö ¾Ê¾Ò½À´Ï´Ù.");
		return false;
	}
	
	if(!trim(x.passwd.value)){
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.\n°ø¹éÀº Çã¿ëÀÌ ¾ÈµË´Ï´Ù.");
		x.passwd.focus();
		return false;
	}

	if((x.passwd.value.length < 4) || (x.passwd.value.length > 8)){
		alert("ºñ¹Ð¹øÈ£´Â 4ÀÚÀÌ»ó 8ÀÚÀÌÇÏ·Î ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
		x.passwd.focus();
		x.passwd.select();
		return false;			
	}

	if(!alNumRegular(x.passwd.value)){
		alert("ºñ¹Ð¹øÈ£´Â ¿µ¹®¼Ò¹®ÀÚ/¼ýÀÚÁ¶ÇÕÀ¸·Î ¸¸µå¼Å¾ß ÇÕ´Ï´Ù.");
		x.passwd.focus();
		x.passwd.select();
		return false;	
	}
	
	//ºñ¹Ð¹øÈ£ È®ÀÎÆûÃ½Å©
	if(x.passwd.value != x.repasswd.value){
		alert("ÀÔ·ÂÇÏ½Å ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾ÊÀ¾´Ï´Ù.\n\n´Ù½Ã ÀÔ·ÂÇÏ½Ê½Ã¿À.");
		x.repasswd.focus();
		x.repasswd.select();
		return false;	
	}

	//¸¸¾à ÀÌ¸ÞÀÏÀ» ±âÀÔÇß´Ù¸é...............
	if(!emailRegular(x.email.value)){
		alert("¿Ã¹Ù¸¥ ÀÌ¸ÞÀÏ ÁÖ¼ÒÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		x.email.focus();
		x.email.select();
		return false;
	}
	
	x.company_name.disabled = false;	
	x.company_num.disabled = false;	
	x.chief.disabled = false;	
	x.joomin_birth.disabled = false;	
	x.joomin_region.disabled = false;	
	x.year.disabled = false;
	x.month.disabled = false;
	x.day.disabled = false;
	x.konkyo_register.disabled = false;		
}

function zipcode_win() {
	var width = 398;
	var height = 205;
	var left = screen.width/2 - width/2;
	var top = screen.height/2 - height/2;
	window.open("step.php","zipcode_win","width="+width+", height="+height+", top="+ top +", left="+ left +" scrollbars=0");
}

/*
function modifyform(x){	
	
	if(!trim(x.company_name.value)){
		alert("È¸»ç(´ÜÃ¼¸í)À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.\n°ø¹éÀº Çã¿ëÀÌ ¾ÈµË´Ï´Ù.");
		x.company_name.focus();
		return false;
	}

	if(!trim(x.company_num.value)){
		alert("¹ýÀÎ(»ç¾÷ÀÚ)¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.\n°ø¹éÀº Çã¿ëÀÌ ¾ÈµË´Ï´Ù.");
		x.company_num.focus();
		return false;
	}

	if(!daychk(x)){
		return false;
	}	

	if(!trim(x.passwd.value)){
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.\n°ø¹éÀº Çã¿ëÀÌ ¾ÈµË´Ï´Ù.");
		x.passwd.focus();
		return false;
	}

	if((x.passwd.value.length < 4) || (x.passwd.value.length > 8)){
		alert("ºñ¹Ð¹øÈ£´Â 4ÀÚÀÌ»ó 8ÀÚÀÌÇÏ·Î ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
		x.passwd.focus();
		x.passwd.select();
		return false;			
	}

	if(!alNumRegular(x.passwd.value)){
		alert("ºñ¹Ð¹øÈ£´Â ¿µ¹®¼Ò¹®ÀÚ/¼ýÀÚÁ¶ÇÕÀ¸·Î ¸¸µå¼Å¾ß ÇÕ´Ï´Ù.");
		x.passwd.focus();
		x.passwd.select();
		return false;	
	}
	
	

	//¸¸¾à ÀÌ¸ÞÀÏÀ» ±âÀÔÇß´Ù¸é...............
	if(x.email.value.length > 1){
		if(!emailRegular(x.email.value)){
			alert("¿Ã¹Ù¸¥ ÀÌ¸ÞÀÏ ÁÖ¼ÒÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
			x.email.focus();
			x.email.select();
			return false;
		}
	}
*/	

/*
	if(!(x.zipcode1_1.value) || !(x.zipcode1_2.value)){
		alert("¿ìÆí¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.\n°ø¹éÀº Çã¿ëÀÌ ¾ÈµË´Ï´Ù.");
		x.zipcode1.focus();
		return false;
	}


		
	if(x.address.value.length == 0) {
		alert("ÁÖ¼Ò(1)¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
		form.address1.focus();
		return false;
	}

	if((trim(x.address2.value) == '') && (x.zipcode2_1.value)){
		alert("ÁÖ¼Ò(2)¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.\n°ø¹éÀº Çã¿ëÀÌ ¾ÈµË´Ï´Ù.");
		x.address2.focus();
		return false;
	}

	if(x.phone.value == 0){
		alert("ÀüÈ­¹øÈ£À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.\n°ø¹éÀº Çã¿ëÀÌ ¾ÈµË´Ï´Ù.");
		x.phone.focus();
		return false;
	}
	
	if(!x.memberfree.checked){
		alert("È¸ºñ ³³ºÎ À¯¹«¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.");
		return false;
	}

}
*/
-->

