<!--
	/////////////// ÁÖ¼ÒÃ£±â ///////////////
	function ZipcodeSearch() {
		win_inputHAddr=window.open("/member/Search_Zip.asp","addrsearch","width=320,height=300,menubar=no,scrollbars=yes,top=200,left=200");
	}
	
	/////////////// ÁÖ¼Ò°Ë»ö ///////////////
	function formcheck(theform) {
		if (document.form.address.value == '') {
			alert("µ¿/¸é/¸®¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			document.form.address.focus();
			return false;
		}

		if (document.form.address.value.length < 2) {
			alert("µÎÀÚ¸® ÀÌ»ó ÀÔ·ÂÇÏ¼¼¿ä.");
			document.form.address.focus();
			return false;
		}
		document.form.action = "Search_Zip.asp";
		document.form.submit();
	}
	
	//////////////// ÁÖ¼ÒÀÔ·Â ///////////////////
	function ReturnHAddr(n) {
		opener.document.MemForm.Mem_Zip1.value = p_zip1[n];
		opener.document.MemForm.Mem_Zip2.value = p_zip2[n];
		opener.document.MemForm.Mem_Add.value = p_adr1[n];
		opener.document.MemForm.Mem_Add2.focus();
		self.close();
	}
	////////////// ÁÖ¼ÒÃ£±â ////////////////
	function makeArray(n) {
		this.length = n;
		for(var i = 1; i <= n; i++)
		   this[i] = 0;
		return this;
	}
	
	/////////////// ¾ÆÀÌµð Áßº¹Ã¼Å© ///////////////
	function CheckID() {
		if (document.MemForm.Mem_Id.value.length < 4) {
			alert('¾ÆÀÌµð´Â 4ÀÚÀÌ»ó ÀÌ¾î¾ßÇÕ´Ï´Ù');
			document.MemForm.Mem_Id.focus();
			return;
		}
		
		if (document.MemForm.Mem_Id.value != "") {
			n = document.MemForm.Mem_Id.value;
			window.open("Search_Id.asp?CheckId="+n,"IDSearch","width=300,height=160,menubar=no,scrollbars=no,top=200,left=200");
		}
	}
	
	///////////// Æ¯¼ö¹®ÀÚ Ã¼Å© ///////////////
	function CheckCharID( argObject ) {
		Char = argObject.value;

		for (i = 0; i < Char.length; i++) {
			var ch = Char.substr(i,1);

			if ((ch < "0" || ch > "9") && (ch < "A" || ch > "Z") && (ch < "a" || ch > "z") && (ch != "_") && (ch != ".")) {				alert('¾ÆÀÌµð¿¡´Â Æ¯¼ö¹®ÀÚ°¡ µé¾î°¥¼ö ¾ø½À´Ï´Ù.');
				Char.focus();
				return false;
			}
		}
		return true;
	}
	
	/////////////// È¸¿ø°¡ÀÔ ///////////////
	function MemCheck(theForm) {
		theForm = document.MemForm;

		if(theForm.Mem_Id.value == "") {
			alert("È¸¿ø ¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä.")
			theForm.Mem_Id.focus();
			return;
		}
		
		if(theForm.Mem_Id.value.length < 4) {
			alert('¾ÆÀÌµð´Â 4ÀÚÀÌ»ó ÀÌ¾î¾ßÇÕ´Ï´Ù');
			theForm.Mem_Id.focus();
			return;
		}
		
		if(!CheckCharID(theForm.Mem_Id)) {
			return false;
		}

		if(theForm.Mem_Pass.value == "") {
			alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			theForm.Mem_Pass.focus();
			return;
		}
		
		if(theForm.Mem_Pass.value.length < 4) {
			alert('ºñ¹Ð¹øÈ£´Â 4ÀÚÀÌ»ó ÀÌ¾î¾ßÇÕ´Ï´Ù');
			theForm.Mem_Pass.focus();
			return;
		}
		
		if(theForm.Mem_Pass1.value == "") {
			alert("ºñ¹Ð¹øÈ£ È®ÀÎÀ» À§ÇÏ¿© ÇÑ¹ø´õ ÀÔ·ÂÇÏ¼¼¿ä.")
			theForm.Mem_Pass1.focus();
			return;
		}
		
		if(theForm.Mem_Pass.value != theForm.Mem_Pass1.value) {
			alert("ºñ¹Ð¹øÈ£°¡ Æ²·È½À´Ï´Ù.\n\n ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
			theForm.Mem_Pass1.focus();
			return;
		}
	
		if(theForm.Mem_Name.value == "") {
			alert("È¸¿ø¼º¸íÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
			theForm.Mem_Name.focus();
			return;
		}
		
		var Str_Jumin1 = theForm.Mem_Jumin1.value;
		var Str_Jumin2 = theForm.Mem_Jumin2.value;
		
		if((Str_Jumin1 == "") || (Str_Jumin2 == "")) {
			alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			theForm.Mem_Jumin1.focus();
			return;
		}
		
		if(Str_Jumin2.substring(0,1) > 4) {
			alert('ÁÖ¹Îµî·Ï¹øÈ£°¡ Àß¸øÀÔ·ÂµÇ¾ú½À´Ï´Ù.....');
			theForm.Mem_Jumin2.focus();
			return;
		}

		if ((Str_Jumin1 == '72') || (Str_Jumin2 == '18')) {
		  alert('ÁÖ¹Îµî·Ï¹øÈ£°¡ Àß¸øÀÔ·ÂµÇ¾ú½À´Ï´Ù.....');
		  theForm.Mem_Jumin1.focus();
		  return;
		}
		
		var f1=Str_Jumin1.substring(0,1)
		var f2=Str_Jumin1.substring(1,2)
		var f3=Str_Jumin1.substring(2,3)
		var f4=Str_Jumin1.substring(3,4)
		var f5=Str_Jumin1.substring(4,5)
		var f6=Str_Jumin1.substring(5,6)
		var hap=f1*2+f2*3+f3*4+f4*5+f5*6+f6*7
		var l1=Str_Jumin2.substring(0,1)
		var l2=Str_Jumin2.substring(1,2)
		var l3=Str_Jumin2.substring(2,3)
		var l4=Str_Jumin2.substring(3,4)
		var l5=Str_Jumin2.substring(4,5)
		var l6=Str_Jumin2.substring(5,6)
		var l7=Str_Jumin2.substring(6,7)
		hap=hap+l1*8+l2*9+l3*2+l4*3+l5*4+l6*5
		hap=hap%11
		hap=11-hap
		hap=hap%10
		
		if (hap != l7) {
			alert('ÁÖ¹Îµî·Ï¹øÈ£°¡ Àß¸øÀÔ·ÂµÇ¾ú½À´Ï´Ù.');
			theForm.Mem_Jumin2.focus();
			return;
		}
		
		if(theForm.Mem_Email.value == "") {
			alert("E-mailÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
			theForm.Mem_Email.focus();
			return;
		}
		
		if(!email_check(theForm.Mem_Email))	{
			return 
		}

		if(theForm.Mem_Zip1.value == "" ||theForm.Mem_Zip2.value == "") {
			alert("¿ìÆí¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			ZipcodeSearch();
			return;
		}
		
		/*if(theForm.Mem_Tel1.value == "") {
			alert("ÇÚµåÆù¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			theForm.Mem_Tel1.focus();
			return;
		}*/

		if(theForm.Mem_Tel2.value == "") {
			alert("ÇÚµåÆù¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			theForm.Mem_Tel2.focus();
			return;
		}
			
		if(theForm.Mem_Tel3.value == "") {
			alert("ÇÚµåÆù¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			theForm.Mem_Tel3.focus();
			return;
		}
				
		theForm.action = "https://www.koreanfolk.co.kr/member/Member_Join_Ok.asp";
		theForm.submit();
	}
	
	///////////// E-mail Ã¼Å© ///////////////
	function email_check( argObject ) {
		strEMail = argObject.value;
		   
		if ( (strEMail.indexOf("@",0) == -1) || (strEMail.indexOf(".",0) == -1) ) {
			alert('E-mail ÁÖ¼Ò¸¦ Á¤È®ÇÏ°Ô ÀÔ·ÂÇÏ½Ê½Ã¿À.');
			argObject.focus();
			argObject.select();
			return false;
		}

		if((strEMail.substring(strEMail.indexOf("@",1),99).toLowerCase() == "@daum.net")||(strEMail.substring(strEMail.indexOf("@",1),99).toLowerCase() == "@hanmail.net")){
			alert("daum, hanmail »ç¿ëÀÚ´Â ÀÌ¸ÞÀÏÀ» ¹Ù²Ù½Ã±â ¹Ù¶ø´Ï´Ù.");
			return false;
		}

		for (i = 0; i < strEMail.length; i++) {
			var ch = strEMail.substr(i,1);

			if ( (ch < "0" || ch > "9") && (ch < "A" || ch > "Z") && (ch < "a" || ch > "z") && (ch != "@") && (ch != "_") && (ch != ".") && (ch != "-") ) {				alert('E-mail ÁÖ¼Ò¸¦ Á¤È®ÇÏ°Ô ÀÔ·ÂÇÏ½Ê½Ã¿À.');
				argObject.focus();
				argObject.select();
				return false;
			}
		}
		return true;
	}
	
	//////////////// Æ÷Ä¿½º ÀÌµ¿ /////////////////	function focus_move() {		theForm = document.MemForm;
        key = event.keyCode;
        if (key != 9 && key != 16) {
                flag    = theForm.Mem_Jumin1.value.length;
                if (flag==6) {
					theForm.Mem_Jumin2.focus();
                }
        }
	}
	
	function Focus_Move1() {
		theForm = document.MemForm;
		key = event.keyCode;
		if (key != 9 && key != 16) {
		        flag    = theForm.Mem_Tel1.value.length;
		        if (flag==3) {
					theForm.Mem_Tel2.focus();
		        }
		}
	}
	
	function Focus_Move2() {
		theForm = document.MemForm;
		key = event.keyCode;
		if (key != 9 && key != 16) {
		        flag    = theForm.Mem_Tel2.value.length;
		        if (flag==4) {
					theForm.Mem_Tel3.focus();
		        }
		}
	}
	
	//////////// ÁÖ¹Î¹øÈ£·Î »ý³â¿ùÀÏ ÀÚµ¿ÀÔ·Â ////////////
	function birth_check() {
		theForm = document.MemForm;
        Jumin = theForm.Mem_Jumin1.value;
        
        if(Jumin.substring(0,2) > "05")
                theForm.Mem_Birth1.value = "19" + Jumin.substring(0,2)
        else
                theForm.Mem_Birth1.value = "20" + Jumin.substring(0,2)
        
        theForm.Mem_Birth2.value = Jumin.substring(2,4)
        theForm.Mem_Birth3.value = Jumin.substring(4,6)
	}
	
	/////////////// ¾ÆÀÌµð Áßº¹È®ÀÎ ///////////
	function FormCheck() {
		if (document.CheckIDForm.CheckId.value == "") {
			alert ("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			document.CheckIDForm.CheckId.focus();
			return false;
		}
		
		if (document.CheckIDForm.CheckId.value.length < 4) {
			alert('¾ÆÀÌµð´Â 4ÀÚÀÌ»ó ÀÌ¾î¾ßÇÕ´Ï´Ù');
			document.CheckIDForm.CheckId.focus();
			return false;
		}
		document.CheckIDForm.action = "Search_Id.asp";
		document.CheckIDForm.submit();
	}
	
	function Submitbutton(n) {
		opener.document.MemForm.Mem_Id.value = n;
		opener.document.MemForm.Mem_Pass.focus();
		self.close();
	}
	
// -->
