	//±º¼ö »ç·ÉºÎ
	var popWindow = null;
	function newpanel(filename, height, width)
	{
		var winopts;
		winopts = "width=" + width + ",height=" + height + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes";
		var popWindow = window.open(filename,'panel', winopts);
		if (navigator.appVersion.indexOf("(X11") != -1 || navigator.appVersion.indexOf("(MSIE") != -1) {
			popWindow = window.open(filename,'panel', winopts);
			remote.opener.name="opener";
		}
		popWindow.display = self;
	}
	function GetPost(m_post1,m_post2,  m_addr)
	{
		str="/member/popup/getpost.asp?post1=" + m_post1 + "&post2=" + m_post2 + "&addr=" + m_addr;
		newpanel(str, 320, 345);
	}
	function ascii_check(m_str)
	{
		count = 0;
		for( i = 0 ; i < m_str.length ; i++)
		{
			buf = m_str.charAt(i);
			if( (buf >= 'A' && buf <= 'Z') || (buf >= 'a' && buf <= 'z') || (buf >= '0' && buf <= '9'))
			{
				count = count + 1;
			}
			else return -1;
		}
		return count;
	}
	function numeric_check(m_num)
	{
		count = 0;
		for( i = 0 ; i < m_num.length ; i++)
		{
			buf = m_num.charAt(i);
			if(buf > "9" || buf < "0") return -1;
			else count = count + 1;
		}
		return count;
	}

	function id_check(m_id)
	{
		var strTmp = m_id.value;
		if(strTmp == "") return;
		if(strTmp.length < 4 || strTmp.length > 8)
		{
			alert("ID´Â 4ÀÚÀÌ»ó 8ÀÚ±îÁö ÀÔ·Â°¡´ÉÇÕ´Ï´Ù. ");
			m_id.value = "";
			m_id.focus();
		}
		if(ascii_check(strTmp) < 0) {
			alert("ID´Â 8ÀÚ ÀÌ³»·Î ¿µ¹®°ú ¼ýÀÚ·Î¸¸ »ç¿ëÇÏ½Ê½Ã¿À ");
			m_id.value = "";
			m_id.focus();
		}
	}
	function pwd_check()
	{
		var strTmp = document.fo.inpwd.value;
		if(strTmp == "") return;
		
		if(strTmp.length < 4 || strTmp.length > 8)
		{
			alert("PASSWORD´Â 4ÀÚÀÌ»ó 8ÀÚ±îÁö ÀÔ·Â °¡´ÉÇÕ´Ï´Ù. ");
			document.fo.inpwd.value = "";
			document.fo.inpwd.focus();
		}
	}
	function repwd_check()
	{
		var strTmp = document.fo.inpwd2.value;
		var oriTmp = document.fo.inpwd.value;
		
		if(strTmp != oriTmp) {
			alert("ºñ¹Ð¹øÈ£°¡ Æ²¸³´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À ");
			document.fo.inpwd2.value = "";
			document.fo.inpwd.value = "";
			document.fo.inpwd.focus();
		}
	}
	function name_check(m_name)
	{
		var strTmp = m_name.value;
		
		if(strTmp.length < 2 && strTmp != "")
		{
			alert("ÀÌ¸§ ÀÔ·ÂÀ» ¿Ï·áÇÏ¿© ÁÖ½Ê½Ã¿À ");
			document.fo.inname.value="";
			document.fo.inname.focus();
		}
		temp=0
		for( i = 0 ; i < strTmp.length ; i++)
		{
			buf = strTmp.charAt(i);
			if( (buf >= 'A' && buf <= 'Z') || (buf >= 'a' && buf <= 'z') || (buf >= '0' && buf <= '9'))
			{
			     temp = temp + 1;	
			}
                }
                if (temp != 0) {
                   alert("ÇÑ±ÛÀÌ¸§¸¸ ÀÔ·ÂÇÏ¼¼¿ä. ");
		   document.fo.inname.value="";
		   document.fo.inname.focus();
		}
	}
	
	function Check_Prev(index_jumin1) {
		var tmp = index_jumin1.value;
		if(tmp == "") return;
		if(numeric_check(tmp) < 6) {
			alert("ÁÖ¹Îµî·Ï ¹øÈ£¸¦ ¿Ã¹Ù¸¦°Ô ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À. ");
			index_jumin1.value = "";
			index_jumin1.focus();
			return;
		}
		else {  
			
			a=tmp.substring(0,2)
	                b=tmp.substring(2,4)
	                c=tmp.substring(4,6)
	                //d=tmp2.substring(0,1)
                        document.fo.inyy.value = '19'+a
	                document.fo.inmm.value = b
	                document.fo.indd.value = c
	                
	                	
	       }
			
	}
	
	
	
	function len_chk(field){
	if (field.value.length < 6) 
		field.value = field.value.substring(0, 6);
	else 
		document.fo.inju2.focus();
	}
	
	
//	function len_chk(index_jumin1){
//		var tmp = index_jumin1.value;
//		var leng
//		leng = tmp.length + 1;			
//		alert(leng);
		
//		if (leng == 6){
//			document.fo.inju2.focus();
//		}
//	}		 
	
	function jumin_check(index_jumin1, index_jumin2)
	{
		var tmp1 = index_jumin1.value;
		var tmp2 = index_jumin2.value;
		
		if  (tmp1 == "" && tmp2 == "") return;
		if  (numeric_check(tmp1+tmp2)<0) {
		    alert("ÁÖ¹Îµî·Ï ¹øÈ£´Â ¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù. ");
		    index_jumin1.value = "";
		    index_jumin2.value = "";
		    index_jumin1.focus();
		    return;
		}
		
		tmpJumin = tmp1 + tmp2;
		if(tmpJumin == "") return;
		if(tmpJumin.length < 13 || tmpJumin == "000000-0000001"){
			alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ ¿Ã¹Ù¸£°Ô ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À");
			index_jumin1.value = "";
			index_jumin2.value = "";
			index_jumin1.focus();
			return;
		}
		store = new Array(13);
		
		for(i = 0 ; i < tmpJumin.length ; i++) {
			store[i] = tmpJumin.charAt(i);
		}
		m=store[0]*2+store[1]*3+store[2]*4+store[3]*5+store[4]*6+store[5]*7+store[6]*8+store[7]*9+store[8]*2+store[9]*3+store[10]*4+store[11]*5;
		n=m%11;
		o=11-n;
		if ( o>9 ) o=o%10;

		if ( o!=store[12] ){
			alert("ÁÖ¹Îµî·Ï¹øÈ£°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù. ´Ù½ÃÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À. ");
			index_jumin1.value = "";
			index_jumin2.value = "";
			index_jumin1.focus();
		}
	}
	function check_year()
	{
		var m_year = document.fo.inyy.value;
		
		if(m_year == "") return;
		count = numeric_check(m_year);
		if( count < 4)
		{
			alert("³âµµ¸¦ ¿Ã¹Ù¸£°Ô ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À. ");
			document.fo.inyy.value = "";
			document.fo.inyy.focus();
			return;
		}
	}
	function check_mon()
	{
		var m_mon = document.fo.inmm.value;
		var str;
		
		if(m_mon == "") return;
		count = numeric_check(m_mon);
		if( (count < 0 || count > 2) || (m_mon > 12 || m_mon < 1)) {
			alert("¿ùÀÇ ÀÔ·ÂÀÌ Àß¸ø µÇ¾ú½À´Ï´Ù. ");
			document.fo.inmm.value = "";
			document.fo.inmm.focus();
			return;
		}
		if(count == 1){
			str = "0" + m_mon;
			document.fo.inmm.value = str;
		}
		return;
	}
	function check_day()
	{
		var m_day = document.fo.indd.value;
		var str;
		
		if(m_day == "") return;
		count = numeric_check(m_day);
		if( (count < 0 || count > 2) || (m_day > 31 || m_day < 1)) {
			alert("ÀÏÀÇ ÀÔ·ÂÀÌ Àß¸ø µÇ¾ú½À´Ï´Ù. ");
			document.fo.indd.value = "";
			document.fo.indd.focus();
			return;
		}
		if(count == 1){
			str = "0" + m_day;
			document.fo.indd.value = str;
		}
		return;
	}
	function check_email(index_email)
	{
		var m_mail = index_email.value;
		
		if(m_mail == "") return;
		if(m_mail.indexOf('@', 1) == -1 || m_mail.length < 5) {
			alert("ÀüÀÚ¸ÞÀÏ ÁÖ¼Ò¸¦ Á¤È®ÇÏ°Ô ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À. ");
			index_email.value = "";
			index_email.focus();
		}
		var l_num = m_mail.length;
		if(m_mail.substring(l_num-11,l_num) == "hanmail.net") {
			alert("hanmail.net °èÁ¤Àº ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù. ");
			index_email.value = "";
			index_email.focus();
		}
		if(m_mail.substring(l_num-8,l_num) == "daum.net") {
			alert("daum.net °èÁ¤Àº ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù. ");
			index_email.value = "";
			index_email.focus();
		}
	}
	function check_post(index_post1, index_post2)
	{
		var m_post1 = index_post1.value;
		var m_post2 = index_post2.value;
		
		if( m_post2 == "") return;
		if(numeric_check(m_post1) < 3 || numeric_check(m_post2) < 3) {
			alert("¿ìÆí¹øÈ£¸¦ Àß¸øÀÔ·Â ÇÏ¼Ì½À´Ï´Ù. ");
			index_post1.value = "";
			index_post2.focus();
			return;
		}
	}
	function check_phone(phone_num, mx_num, m_str)
	{
		var m_phone = phone_num.value;
		
		if(m_phone == "") return;
		if( numeric_check(m_phone) < mx_num)
		{
			str = m_str + "ÀÇ ÀÔ·ÂÀÌ Àß¸ø µÇ¾ú½À´Ï´Ù. ";
			alert(str);
			phone_num.value = "";
			phone_num.focus();
			return;
		}
	}
	function check_married(type, event)
	{
		var m_radio = document.fo.inmarried;
		
		var m_year = document.fo.inwedyy.value;
		var m_mon  = document.fo.inwedmm.value;
		var m_day  = document.fo.inweddd.value;
		
		if(m_radio[0].checked == true && event == 0) {
			//alert("°áÈ¥±â³äÀÏ ÀÔ·ÂÀ» À§ÇØ¼­ °áÈ¥À¯¹« Ç×¸ñÀ» º¯°æ ÇÕ´Ï´Ù.");
			m_radio[1].checked = true;
			return;
		}
		if( type == "year") {
			if( m_year == "") return;
			if( numeric_check(m_year) < 4) {
				alert("°áÈ¥±â³äÀÏÀÇ ³âµµ¸¦ Àß¸øÀÔ·Â ÇÏ¼Ì½À´Ï´Ù.");
				document.fo.inwedyy.value = "";
				document.fo.inwedmm.focus();
				return;
			}
		}
		else if(type == "mon") {
			if(m_mon == "") return;
			count = numeric_check(m_mon);
			if( (count > 2 || count < 0) || (m_mon > 12 || m_mon < 1) ) {
				alert("°áÈ¥±â³äÀÏÀÇ ¿ùÀ» Àß¸øÀÔ·Â ÇÏ¼Ì½À´Ï´Ù. ");
				document.fo.inwedmm.value = "";
				document.fo.inwedmm.focus();
				return;
			}
			if(count == 1) document.fo.inwedmm.value = "0" + m_mon;
			return;
		}
		else if(type == "day") {
			if(m_day == "") return;
			count = numeric_check(m_day);
			if( (count > 2 || count < 0) || (m_day > 31 || m_day < 1) ) {
				alert("°áÈ¥±â³äÀÏÀÇ ÀÏÀ» Àß¸øÀÔ·Â ÇÏ¼Ì½À´Ï´Ù. ");
				document.fo.inweddd.value = "";
				document.fo.inweddd.focus();
				return;
			}
			if(count == 1) document.fo.inweddd.value = "0" + m_day;
			return;
		}
	}
	
	function check_maradio()
	{
		if(document.fo.inmarried[0].checked == true) {
			document.fo.inwedyy.value = "";
			document.fo.inwedmm.value = "";
			document.fo.inweddd.value = "";
		}
		else document.fo.inwedyy.focus();
	}
	function check_children(in_event)
	{
		var m_radio = document.fo.inchildren;
				
		if(m_radio[0].checked == true && in_event == 0) {
			m_radio[1].checked = true;
			return;
		}
        }
	function check_chradio()
	{
		if(document.fo.inchildren[0].checked == true) {
		   document.fo.inchildnum1.checked = false;
		   document.fo.inchildnum2.checked = false;
		   document.fo.inchildnum3.checked = false;
		   document.fo.inchildnum4.checked = false;
		   document.fo.inchildnum5.checked = false;
		}
	}
	function check_age()
	{
		var chk_year,chk_mon,chk_day;
		var chk_age,msg;
		var today = new Date();
		var year = today.getYear();
                var mon = today.getMonth()+1;
                var day = today.getDate();
	        chk_year = year - document.fo.inyy.value + 1;
	        chk_mon = parseInt(document.fo.inmm.value);
	        chk_day = parseInt(document.fo.indd.value);
	        if ((chk_year <= 12) || (chk_year == 13 && chk_mon > mon) || (chk_year == 13 && chk_mon == mon && chk_day > day)) {
	             msg = "14¼¼ ¹Ì¸¸ÀÎ »ç¿ëÀÚ´Â ºÎ¸ð´ÔÀÇ µ¿ÀÇ¸¦ ¾ò¾î¾ß ÇÕ´Ï´Ù.\nºÎ¸ð´ÔÀÌ µ¿ÀÇÇÏ½Ã´Â °æ¿ì ÁÖ¹Îµî·Ï ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.ÀÔ·Â¿¹) 654321-1234567 ";
	             chk_age = prompt(msg,"");
                
                     if (chk_age != null)
                         return 1;
                     else
                         return 0;
                }
                else
                   return 1;
        }        
function login_submit()
{
	strAbs = new Array(12);
	chAbs  = new Array(12);

	chAbs[0] = document.fo.inid.value;
	chAbs[1] = document.fo.inpwd.value;
	chAbs[2] = document.fo.inname.value;
	chAbs[3] = document.fo.inju2.value;
	chAbs[4] = document.fo.indd.value;
	chAbs[5] = document.fo.inemail.value;
	chAbs[6] = document.fo.inzip2.value;
	chAbs[7] = document.fo.inaddress.value;
        chAbs[8] = document.fo.intel1.value;
	chAbs[9] = document.fo.intel2.value;
	chAbs[10] = document.fo.intel3.value;
	chAbs[11] = document.fo.inknow.value;
	
		
	strAbs[0] = "> ID"
	strAbs[1] = "> ºñ¹Ð¹øÈ£";
	strAbs[2] = "> ÀÌ¸§";
	strAbs[3] = "> ÁÖ¹Îµî·Ï¹øÈ£";
	strAbs[4] = "> »ýÀÏ";
	strAbs[5] = "> EMAIL";
	strAbs[6] = "> ¿ìÆí¹øÈ£";
	strAbs[7] = "> ÁÖ¼Ò";
	strAbs[8] = "> Áö¿ª¹øÈ£";
	strAbs[9] = "> ±¹¹ø";
	strAbs[10] = "> ÀüÈ­¹øÈ£";
	strAbs[11] = "> À©±Û¸®½¬¸¦ ¾Ë°ÔµÈ °æÀ§";
				
	max_num = 13;
	strDsp = "´ÙÀ½ÀÇ ÇÊ¼öÇ×¸ñÀÌ ´©¶ôµÇ¾ú½À´Ï´Ù\n";
	strDsp = strDsp + "------------------------------\n";
	tmp = ""
	for(i = 0 ; i < max_num ; i++)
	{
		if(chAbs[i] == "")	{
			tmp = tmp + strAbs[i] + "\n";
		}
	}
	if(tmp != "") {
		strDsp = strDsp + tmp + "\n"; 
		strDsp = strDsp + "\n------------------------------\n";
		alert(strDsp);
		return;
	}
	
	/* ¾ÆÀÌµð Áßº¹°Ë»ç Çß´ÂÁö °Ë»ç */
	if ( document.fo.idcheck_flag.value == "0" ) {
	   alert("¾ÆÀÌµð Áßº¹°Ë»ç¸¦ ÇÏÁö ¾ÊÀ¸¼Ì½À´Ï´Ù. È®ÀÎÇÏ½Ê½Ã¿À. ");
	   document.fo.inid.focus();
	   return;
	}
	
	var c_age;
	c_age = check_age();
	if (c_age == 1) {
	   /* ¼±ÅÃÁ¤º¸¸¦ ÇÏ³ª¶óµµ ³Ö¾ú´Ù¸é ¼±ÅÃÁ¤º¸ ´Ù ³Öµµ·Ï À¯µµÇÏ±â */
	   if ( option_check() > 0 ) 
	      login_submit2();
	   else 
	      document.fo.submit();
	}
	else
	    return;
}

/* ¼±ÅÃÁ¤º¸¸¦ ÇÏ³ª¶óµµ ÀÔ·ÂÇß´Ù¸é ÀÔ·ÂÇÏ·Á°í ÇÑ°ÍÀ¸·Î ÆÇ´Ü */
function option_check() {
	var op_check=0;
	if (document.fo.job.value != "-")
	   op_check++;
        if (document.fo.inedu.value != "-") 
	   op_check++;
        if (document.fo.inmoney.value != "-") 
	   op_check++;
        if (document.fo.inmarried[1].checked == true) {
           if ((document.fo.inwedyy.value != "") || (document.fo.inwedmm.value != "") || (document.fo.inweddd.value != "")) {
   	      op_check++;
           }
        } 
        if (document.fo.inchildren[1].checked == true) {
           if ((document.fo.inchildnum1.checked == true) || (document.fo.inchildnum2.checked == true) || (document.fo.inchildnum3.checked == true) || (document.fo.inchildnum4.checked == true) || (document.fo.inchildnum5.checked == true)) {
   	      op_check++;
           }
        }
        if (document.fo.inhobby.value != "-") 
	   op_check++;
        if (document.fo.inconnect_type.value != "-") 
	   op_check++;
        if (document.fo.instudy_type.value != "-") 
	   op_check++;
        if (document.fo.instudy_time.value != "-") 
	   op_check++;
	
	return op_check;
}

function login_submit2()
{
	if (document.fo.job.value == "-") {
	    alert("Á÷¾÷À» ¼±ÅÃÇØ ÁÖ¼¼¿ä. ");
	    return;
	}
         
        if (document.fo.inedu.value == "-") {
            alert("ÃÖÁ¾ÇÐ·ÂÀ» ¼±ÅÃÇØÁÖ½Ê½Ã¿À. ");
            document.fo.inedu.focus();
            return;
        }
        
        if (document.fo.inmoney.value == "-") {
            alert("ÇÑ ´Þ¿¡ ÁöÃâ °¡´ÉÇÏ½Å ±³À°ºñ¸¦ ¼±ÅÃÇØÁÖ½Ê½Ã¿À. ");
            document.fo.inmoney.focus();
            return;
        }
        
        if (document.fo.inmarried[1].checked == true) {
           if ((document.fo.inwedyy.value == "") || (document.fo.inwedmm.value == "") || (document.fo.inweddd.value == "")) {
                alert("°áÈ¥±â³äÀÏÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä. ");
                return;
           }
        } 
        
        if (document.fo.inchildren[1].checked == true) {
           if ((document.fo.inchildnum1.checked == false) && (document.fo.inchildnum2.checked == false) && (document.fo.inchildnum3.checked == false) && (document.fo.inchildnum4.checked == false) && (document.fo.inchildnum5.checked == false)) {
                alert("ÀÚ³à³ªÀÌ¸¦ Ã¼Å©ÇØ ÁÖ¼¼¿ä. ");
                return;
           }
        }
        
        if (document.fo.inhobby.value == "-") {
            alert("Ãë¹Ì»ýÈ°(°ü½ÉºÐ¾ß)¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä. ");
            document.fo.inhobby.focus();
            return;
        }
        
        if (document.fo.inconnect_type.value == "-") {
            alert("¿Â¶óÀÎ Á¢¼ÓÈ¯°æÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä. ");
            document.fo.inconnect_type.focus();
            return;
        }
        
        if (document.fo.instudy_type.value == "-") {
            alert("ÇÐ½ÀÇàÅÂ¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä. ");
            document.fo.instudy_type.focus();
            return;
        }
        
        if (document.fo.instudy_time.value == "-") {
            alert("ÇÐ½À½Ã°£¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä. ");
            document.fo.instudy_time.focus();
            return;
        }
	document.fo.submit();
}

function chkWasacJumin() {
	var chkUrl;
	
	if (document.fo.inid.value==""){
		alert('¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä. ');
		document.fo.wasac[0].checked = false;
	}
	else if (document.fo.inju1.value=="" || document.fo.inju2.value=="") {
		alert('ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä. ');
		document.fo.wasac[0].checked = false;
	} 
	else 
	{
		chkUrl = '/member/popup/wasac_check.asp?id=' + document.fo.inid.value + '&jumin1=' + document.fo.inju1.value +'&jumin2='+ document.fo.inju2.value;
		window.open(chkUrl,'ChkUserIdWin','width=400,height=300,scrollbars=auto');
	}
}


function id_reg_check(gubun){
	if (document.fo.inid.value == "")
	{
		alert('¾ÆÀÌµð¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä. ');
		return false;
	}
	if(ascii_check(document.fo.inid.value) < 0) {
		alert("ID´Â 8ÀÚ ÀÌ³»·Î ¿µ¹®°ú ¼ýÀÚ·Î¸¸ »ç¿ëÇÏ½Ê½Ã¿À. ");
		document.fo.inid.value = "";
		document.fo.inid.focus();
		return false;
	}
	if ((document.fo.inid.value.length < 4) || (document.fo.inid.value.lenght > 8))
	{
		alert('¾ÆÀÌµð´Â 4ÀÚ ÀÌ»ó 8ÀÚ ÀÌÇÏÀÔ´Ï´Ù. ');
		return false;
	}
	window.open('/member/popup/ChkUserId.asp?id='+document.fo.inid.value+'&db_gubun='+gubun,'id_check','width=323 height=300');
}


function make(){
	layer1.innerHTML = "<input type=text name=wasac_id size=10 disabled>";
	layer2.innerHTML = "¿Í»è¾ÆÀÌµð: ";
} 

function make1(){
	layer1.innerHTML = "";
	layer2.innerHTML = "";
	document.fo.wa_id.value="";
}

