function chk(){
	var checkform = document.join_form;

//------- ¾ÆÀÌµð Ã¼Å© ----------------------------------
	if(checkform.user_id.value != "") {
		if(checkform.user_id.value.length < 4 || checkform.user_id.value.length > 15 || !sualchk(checkform.user_id.value)) {
			window.alert("¾ÆÀÌµð´Â ¿µ¹®°ú ¼ýÀÚÀÇ Á¶ÇÕÀ¸·Î 4~15ÀÚ±îÁö¸¸ ÀÔ·ÂÇÏ½Ê½Ã¿À.");
			checkform.user_id.focus();
			return false;
		}
	} else {
		window.alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿À.");
		checkform.user_id.focus();
		return false;
	}
	
//------- ÆÐ½º¿öµå Ã¼Å© ----------------------------------
	var pwd1 = checkform.user_pwd1;
	var pwd2 = checkform.user_pwd2;
	var pwd1_value = removeblank(pwd1.value);
	var pwd2_value = removeblank(pwd2.value);

	if(pwd1_value == "") {
		window.alert("ÆÐ½º¿öµå¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
		pwd1.focus();
		return false;
	}
	if(pwd2_value == "") {
		window.alert("ÆÐ½º¿öµå¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
		pwd2.focus();
		return false;
	}
	if(pwd1_value != "" && pwd2_value != "") {
		if(pwd1_value.length < 4 || pwd1_value.length > 8 || !sualchk(pwd1_value)) {
			window.alert("ÆÐ½º¿öµå´Â ¿µ¹®°ú ¼ýÀÚÀÇ Á¶ÇÕÀ¸·Î 4~8ÀÚ±îÁö¸¸ ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
			pwd1.focus();
			return false;
		}
		if(pwd2_value.length < 4 || pwd2_value.length > 8 || !sualchk(pwd2_value)) {
			window.alert("ÆÐ½º¿öµå´Â ¿µ¹®°ú ¼ýÀÚÀÇ Á¶ÇÕÀ¸·Î 4~8ÀÚ±îÁö¸¸ ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
			pwd2.focus();
			return false;
		}
	}
	if(pwd1_value != pwd2_value) {
		window.alert("ÆÐ½º¿öµå°¡ ÀÏÄ¡ÇÏÁö¾Ê½À´Ï´Ù.");
		pwd1.focus();
		return false;
	}	


   str = checkform.name.value;
   if (str == ""){
        alert("ÀÌ¸§À» ÀÔ·ÂÇÏ½Ê½Ã¿À.");
		checkform.name.focus();
		return false;
	}
		  
   str = checkform.birth01.value;
   if (str == ""){
        alert("»ý³â¿ùÀÏÀ» ÀÔ·ÂÇÏ½Ê½Ã¿À.");
		checkform.birth01.focus();
		return false;
	}
	
   str = checkform.birth02.value;
   if (str == ""){
        alert("»ý³â¿ùÀÏÀ» ÀÔ·ÂÇÏ½Ê½Ã¿À.");
		checkform.birth02.focus();
		return false;
	}

   str = checkform.birth03.value;
   if (str == ""){
        alert("»ý³â¿ùÀÏÀ» ÀÔ·ÂÇÏ½Ê½Ã¿À.");
		checkform.birth03.focus();
		return false;
	}
	
   var email			= checkform.email.value;       //E-mail
   var email_1			= checkform.email_1.value;       //E-mail
   var email_2			= checkform.email_2.value;       //E-mail
   
   join_form.email.value =  checkform.email_1.value + checkform.email_2.value;
   email = checkform.email.value;

	// E-mail Ã¼Å© 

	if (email_1 == "")
	{
		alert("E-mailÀ» ÀÔ·ÂÇÏ½Ê½Ã¿À.");
		checkform.email_1.focus();
		return false;
	}
	if (email_2 == "")
	{
		alert("E-mailÀ» ÀÔ·ÂÇÏ½Ê½Ã¿À.");
		checkform.email_2.focus();
		return false;
	}	
	if (email != "") 
	{
		if ( !check_Email() ) {
			checkform.email_1.focus();
		return false;
		}
	}

//------------------------------------------------------
	
   str = checkform.email.value;
   if (str == ""){
        alert("ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇÏ½Ê½Ã¿À.");
		checkform.email.focus();
		return false;
	}

	
//end function
}

	
function checkid(){
var checkform = document.join_form;
	var blnkchk = removeblank(checkform.user_id.value);
	if (checkform.user_id.value == ""){
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä");
		checkform.user_id.focus();
		return false;
	}
	if (checkform.user_id.value.length < 4 || checkform.user_id.value.length > 15 || !sualchk(checkform.user_id.value)){
		alert ("¾ÆÀÌµð´Â 4ÀÚÀÌ»ó 15ÀÚ ÀÌÇÏ·Î ÀÔ·ÂÇØÁÖ¼¼¿ä")
		checkform.user_id.focus();
		return false;
	}
	if (!sualchk(blnkchk))
	{
		alert("È¸¿ø¾ÆÀÌµð´Â ¿µ¹®°ú ¼ýÀÚ¸¸ ÀÔ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù.\n ´Ù½Ã ÇÑ¹ø È®ÀÎÇÏ½Å ÈÄ ÀÔ·Â¹Ù¶ø´Ï´Ù.");
		checkform.user_id.focus();
		return false;
	}
	
	url="id_search.php?user_id=" + checkform.user_id.value;
	window.open(url,"idfinder","toolbar=no,resize=no,width=350,height=176,top=205,left=385");
}


function emailserv(){
  var frm = document.join_form;
  var email_1 = frm.email_1.value;
  var email_2 = frm.email_2.value;
  
  if( email_2 == " ")  {
		var urlname = "email_input.php?email_1="+ email_1;
		window.open(urlname, "email_org","height=125,width=350, menubar=no,directories=no,resizable=no,status=no,scrollbars=no,top=205,left=385");
  }
}

function check_Email()
{  
	var email = document.join_form.email.value;
	var email_1 = "";
	var email_2 = "";
	var check_point = 0;

	if (email.indexOf("@") < 0 ) {
		alert("e-mail¿¡ @ °¡ ºüÁ®ÀÖ½À´Ï´Ù.");
		join_form.email.focus();
		return false;
	}
	if (email.indexOf(".") < 0 ) {
		alert("e-mail¿¡ . °¡ ºüÁ®ÀÖ½À´Ï´Ù.");
		join_form.email.focus();
		return false;
	}

	if (email.indexOf("'") >= 0 ) {
		alert("e-mail¿¡ ' ´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	if (email.indexOf("|") >= 0 ) {
		alert("e-mail¿¡ | ´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	if (email.indexOf(">") >= 0 ) {
		alert("e-mail¿¡ > ´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	if (email.indexOf("<") >= 0 ) {
		alert("e-mail¿¡ < ´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	if (email.indexOf(" ") >= 0 ) {
		alert("e-mail¿¡ ½ºÆäÀÌ½º´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}

          for (var j = 0 ; j < email.length; j++)
          {
               if ( email.substring(j, j + 1) != "@"  && check_point == 0 ) {
						email_1 = email_1 + email.substring(j, j + 1)
               } else if ( email.substring(j, j + 1) == "@" )  {
						check_point = check_point + 1;
               } else {
               		email_2 = email_2 + email.substring(j, j + 1);	
               }
          }

	if (check_point > 1 ) {
		alert("e-mail¿¡ @ ´Â 1¹øÀÌ»ó µé¾î°¥¼ö ¾ø½À´Ï´Ù.");
		join_form.email.focus();
		return false;
	}

	if (email_2.indexOf("(") >= 0 ) {
		alert("e-mail¿¡ ( ´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	if (email_2.indexOf("(") >= 0 ) {
		alert("e-mail¿¡ ( ´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	if (email_2.indexOf(")") >= 0 ) {
		alert("e-mail¿¡ ) ´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	if (email_2.indexOf(",") >= 0 ) {
		alert("e-mail¿¡ , ´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	if (email_2.indexOf(";") >= 0 ) {
		alert("e-mail¿¡ ; ´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	if (email_2.indexOf(":") >= 0 ) {
		alert("e-mail¿¡ : ´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	if (email_2.indexOf("/") >= 0 ) {
		alert("e-mail¿¡ / ´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	if (email_2.indexOf("[") >= 0 ) {
		alert("e-mail¿¡ [ ´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	if (email_2.indexOf("]") >= 0 ) {
		alert("e-mail¿¡ ] ´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	if (email_2.indexOf("{") >= 0 ) {
		alert("e-mail¿¡ { ´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	if (email_2.indexOf("}") >= 0 ) {
		alert("e-mail¿¡ } ´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	if (email_2.indexOf(" ") >= 0 ) {
		alert("e-mail¿¡ ½ºÆäÀÌ½º´Â Æ÷ÇÔÇÒ¼ö ¾ø½À´Ï´Ù..");
		join_form.email.focus();
		return false;
	}
	return true;
}
