function on_selmail(){
	var frm = document.myform;
	var str = frm.email_kr.options[frm.email_kr.selectedIndex].value;
	
	if(str == "1"){

		document.getElementById("email2").style.display="inline";

		//frm.email2.value = "";
		frm.email2.focus();
	}else{
		document.getElementById("email2").style.display="none";
		frm.email2.value = str;
		
	}
}
function on_readonly(th){
	var frm = document.regist;
	var str = frm.email.options[frm.email.selectedIndex].value;
	
	if(str != "1"){
		setTimeout('document.regist.email2.blur()',1);
	}
}

function checkid() {
	var id = eval(myform.id)
    var AlphaDigit; 
    var IDLength; 
    var NumberChar, CompChar; 
    var ChkFlag; 
    str=document.myform.id.value;
        
	if(!id.value){
		alert('¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ½ÅÈÄ È®ÀÎÇÏ¼¼¿ä');
		myform.id.focus();
		return false;
	} else {
		if(myform.id.value) {
			if(myform.id.value.length < 4 || myform.id.value.length > 10){
				alert("¾ÆÀÌµð´Â 4~10ÀÚ »çÀÌ·Î ÀÔ·ÂÇÏ½Ê½Ã¿À.");
				myform.id.focus();
				return false;
			}else{
				AlphaDigit= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; 
				
				IDLength = str.length; 
				
				for (i = 0; i < IDLength; i++){ 
					NumberChar = str.charAt(i); 
					ChkFlag = false; 
					for (j = 0; j < AlphaDigit.length ; j++){ 
						CompChar = AlphaDigit.charAt(j); 
						if (NumberChar.toLowerCase() == CompChar.toLowerCase())
							ChkFlag = true; 
					} 
					if (ChkFlag == false){ 
						alert("ID´Â ¼ýÀÚ¿Í ¿µ¹®ÀÇ Á¶ÇÕ¸¸ÀÌ °¡´ÉÇÕ´Ï´Ù."); 
						document.myform.id.value=""; 
						document.myform.id.focus(); 
						return false; 
					} 
				}    
			}
		}	
		return true;
	}
}
// ¼ýÀÚÃ¼Å© ÇÔ¼ö
function NumberCheck(strTemp)
{
var strLen = strTemp.length
var chick = true

for(i=0; i < strLen; i++)
{
  if((strTemp.charAt(i) < "0") || (strTemp.charAt(i) > "9"))
   {
    chick = false;
	 break;
	 }
	}
	return chick;
}

//null checkÇÔ¼ö
function nullCheck(strTemp)
{
var TempLen = strTemp.length;
var chick = false;
for(i=0; i < TempLen; i++)
 {
  if(strTemp.charAt(i) != " ")
   {
   chick = true;
   break;
    }
   }
  return chick
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
 }
 function pop_up1(url) {
	 	var left_ = screen.width;
		var top_ = screen.height;
		
		left_ = left_/2 - (500/2);
		top_ = top_/2 - (250/2);
  window.open(url,'search','width=500, height=250, scrollbars=no status=yes,left='+left_+',top='+top_+'');
}
 function open_idcheck() {
	 	var left_ = screen.width;
		var top_ = screen.height;
		
		left_ = left_/2 - (300/2);
		top_ = top_/2 - (170/2);
	if (checkid()) {
		window.open("../member/checkid.php?id=" + myform.id.value,"id","width=300,height=170,left="+left_+",top="+top_+"");
	}
}


function check()
{
//var email	= myform.email.value;
if(myform.mode.value=='write'){
	var a=0; for(i=0;i<myform.elements.length;i++) { if(myform.elements[i].name=="sex") { if(myform.elements[i].checked == true) { a++ } } } if(a == 0) { alert("±¸ºÐ(¼ºº°)À» ¼±ÅÃÇØÁÖ¼¼¿ä."); return false; }
}
if(checkid()!=true){
		return false;
}
if(nullCheck(document.myform.id.value)==false)
{
alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
document.myform.id.focus();
return;
}
if(nullCheck(document.myform.pwd.value)==false || (document.myform.pwd.value.length < 4))
{
alert("ºñ¹Ð¹øÈ£´Â 4ÀÚ¸® ÀÌ»óÀÌ¾î¾ß ÇÕ´Ï´Ù");
document.myform.pwd.focus();
return;
}
 astr = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*";

for(i=0; i < document.myform.pwd.value.length; i++)
    {
    if(astr.indexOf(document.myform.pwd.value.substring(i,i+1))< 0)
     {
       alert("ºñ¹Ð¹øÈ£´Â ¿µ¾î¿Í ¼ýÀÚ¿Í Æ¯¼ö¹®ÀÚ(!@#$%^&*)¸¸ »ç¿ë °¡´ÉÇÕ´Ï´Ù");

        document.myform.pwd.value = "";

        document.myform.pwd.focus();

       return;

       }
     }
if(nullCheck(document.myform.pwd1.value)==false)
{
alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä");
document.myform.pwd1.focus();
return;
}
if(document.myform.pwd.value != document.myform.pwd1.value)
{
alert("ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù");
document.myform.pwd.value="";
document.myform.pwd1.value="";
return;
}

if(nullCheck(document.myform.nickname.value)==false)
{
alert("´Ð³×ÀÓÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
document.myform.nickname.focus();
return;
}
if(nullCheck(document.myform.byear.value)==false)
{
alert("»ý³âÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä");
document.myform.byear.focus();
return;
}
if(nullCheck(document.myform.job.value)==false)
{
alert("Á÷¾÷À» ¼±ÅÃÇØ ÁÖ¼¼¿ä");
document.myform.job.focus();
return;
}if(nullCheck(document.myform.character.value)==false)
{
alert("¼º°ÝÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä");
document.myform.character.focus();
return;
}if(nullCheck(document.myform.stature.value)==false)
{
alert("½ÅÀå(Å°)À» ¼±ÅÃÇØÁÖ¼¼¿ä.");
document.myform.stature.focus();
return;
}if(nullCheck(document.myform.outward.value)==false)
{
alert("¿Ü¸ð¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä.");
document.myform.outward.focus();
return;
}if(nullCheck(document.myform.build.value)==false)
{
alert("¸ö¸Å¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä.");
document.myform.build.focus();
return;
}
var a=0; for(i=0;i<myform.elements.length;i++) { if(myform.elements[i].name=="meeting_type") { if(myform.elements[i].checked == true) { a++ } } } if(a == 0) { alert("¿øÇÏ´Â ¸¸³²À» ¼±ÅÃÇØÁÖ¼¼¿ä."); return false; }




document.myform.submit();


}



function birth_check() {
        strjumin = document.myform.jumin1.value

        if(strjumin.substring(0,2) > "05")
                document.myform.Byear.value = "19" + strjumin.substring(0,2)
        else
                document.myform.Byear.value = "20" + strjumin.substring(0,2)

        bmonth_pos = strjumin.substring(2,4) - 1
        bday_pos = strjumin.substring(4,6) - 1

        document.myform.Bmonth[bmonth_pos].selected = true
        document.myform.Bday[bday_pos].selected = true

        document.myform.jumin2.focus()

}

function birth_write()
{
if(myform.jumin1.value != "")
{
myform.Byear.value = "19" + myform.jumin1.value.substring(0,2);
myform.Bmonth.value = myform.jumin1.value.substring(2,4);
myform.Bday.value = myform.jumin1.value.substring(4,6);
}else{
myform.Byear.value = "";
myform.Bmonth.value = "";
myform.Bday.value = "";
}
}



var isNN = (navigator.appName.indexOf("Netscape")!=-1);

function autoTab(input,len, e) {
        var keyCode = (isNN) ? e.which : e.keyCode;
        var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
        if(input.value.length >= len && !containsElement(filter,keyCode)) {
        input.value = input.value.slice(0, len);
        input.form[(getIndex(input)+1) % input.form.length].focus();
}

function aaa(e) {
        var keyCode = (isNN) ? e.which : e.keyCode;
        alert(keyCode);
        return false;
}
function containsElement(arr, ele) {
        var found = false, index = 0;
        while(!found && index < arr.length)
        if(arr[index] == ele)
        found = true;
        else
        index++;
        return found;
}

function getIndex(input) {
        var index = -1, i = 0, found = false;
        while (i < input.form.length && index == -1)
        if (input.form[i] == input)index = i;
        else i++;
        return index;
        }
return true;

}




