//¾ÆÀÌµð ºñ¹øÃ£±â¿¡¼­ ÁÖ¹Î¹øÈ£Ã¼Å©
function lost_mem_open() {
	window.open('mem_lost.htm','m_lost','width=400,height=200,menubar=no,scrollbars=no');
}

function lost_mem(){
	if(document.m_lost.m_name.value==""){
		alert("ÀÌ¸§À» ³Ö¾îÁÖ¼¼¿ä!!");
		document.m_lost.m_name.focus();
		return false;
	}

	if (document.m_lost.m_juminno1.value == ""  )	{
		alert("ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä!!");
		document.m_lost.m_juminno1.focus();
		return false;
	}

	if (document.m_lost.m_juminno2.value == ""  )	{
		alert("ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä!!");
		document.m_lost.m_juminno2.focus();
		return false;
	}

	document.m_lost.submit();

	//window.open('mem_lost_ok.asp?m_juminno1='+document.m_lost.m_juminno1.value+'&m_juminno2='+document.m_lost.m_juminno2.value,'m_lost','width=400,height=200,menubar=no,scrollbars=no');
}

//·Î±ä¾ÆÀÌµð/ºñ¹ø °ø¹éÃ¼Å©ÇÏ±â
function login_mem(){
	if (document.m_login.m_email.value == ""  )	{
		alert("ÀÌ¸ÞÀÏ ¾ÆÀÌµð¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä!!");
		document.m_login.m_email.focus();
		return false;
	}
	if (document.m_login.m_pwd.value == ""  )	{
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä!!");
		document.m_login.m_pwd.focus();
		return false;
	}
	document.m_login.submit();
}

function next_it(){
	document.m_login.m_pwd.focus();
	return;
}
function onlyNumber()
{
	if ( event.keyCode<48 || event.keyCode>57 )
		event.returnValue=false;
}

// »õ·Î¿î  À©µµ¿ì¶ç¿ì´ÂÇÔ¼ö
function sub(url, field)
{ 
	var opt = "toolbar=no,resizable=yes,scrollbars=yes,location=no,resize=no,menubar=no,directories=no,copyhistory=0,width=318,height=200,top= 330,left = 370"; 	
	window.open(url, 'new_window', opt); 
}

function next1() {
	if(document.m_lost.m_juminno1.value.length==6) {
	document.m_lost.m_juminno2.focus()
	return; 
	}
}

function juminno_check1(){
	if(document.m_lost.m_juminno2.value.length==7) {
		jumin=document.m_lost.m_juminno1.value  + document.m_lost.m_juminno2.value
		gop="234567892345"
		var i=0
		sum=0
		while(i<=5) {
			a=jumin.charAt(i) 
			b=gop.charAt(i)
			sum+=eval(a*b)
			i++
		}
		i=6
		while(i<=11) {
			a=jumin.charAt(i)
			b=gop.charAt(i)
			sum+=eval(a*b)
			i++
		}

		endpoint=11-(sum%11)+""
		endpoint=endpoint.substring(endpoint.length-1,endpoint.length)
		bunho=jumin.charAt(12)+""
		if(bunho!=endpoint) {
			alert('Á¤»óÀûÀÎ ÁÖ¹Îµî·Ï¹øÈ£°¡ ¾Æ´Õ´Ï´Ù.');
			document.m_lost.m_juminno2.focus();
			return false; 
		}
	}
}

function next() {
	if(document.theForm.m_juminno1.value.length==6) {
	document.theForm.m_juminno2.focus()
	return; 
	}
}

function juminno_check(){
	if(document.theForm.m_juminno2.value.length==7) {
		jumin=document.theForm.m_juminno1.value  + document.theForm.m_juminno2.value
		gop="234567892345"
		var i=0
		sum=0
		while(i<=5) {
			a=jumin.charAt(i) 
			b=gop.charAt(i)
			sum+=eval(a*b)
			i++
		}
		i=6
		while(i<=11) {
			a=jumin.charAt(i)
			b=gop.charAt(i)
			sum+=eval(a*b)
			i++
		}

		endpoint=11-(sum%11)+""
		endpoint=endpoint.substring(endpoint.length-1,endpoint.length)
		bunho=jumin.charAt(12)+""
		if(bunho!=endpoint) {
			alert('Á¤»óÀûÀÎ ÁÖ¹Îµî·Ï¹øÈ£°¡ ¾Æ´Õ´Ï´Ù.');
			document.theForm.m_juminno2.focus();
			return false; 
		}
	}
}



function CheckLogin() {
	if(document.frmLogIn.m_email.value==''){
		alert('ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä');
	    document.frmLogIn.m_email.focus();
	    return;
	}
	
	var mailCheck = document.frmLogIn.m_email.value.match(/^(\".*\"|[;A-Za-z0-9_-]([A-Za-z0-9_-]|[\+\.])*)@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z0-9][A-Za-z0-9_-]*(\.[A-Za-z0-9][A-Za-z0-9_-]*)+)$/);

	if(mailCheck == null){
		alert(" ÀÌ¸ÞÀÏ Çü½ÄÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.\n\n ¿¹) name@domain.com");
		document.frmLogIn.m_email.focus();
		return;
	}

	if(document.frmLogIn.m_pwd.value==''){
		alert('ÆÐ½º¿öµå¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä');
	    document.frmLogIn.m_pwd.focus();
	    return;
	}

	document.frmLogIn.submit();
}

function LoginEnter() {
	if(window.event.keyCode == 13) {
		CheckLogin();
	}
}

function CheckFind() {
	if(document.frmLogIn.m_email.value==''){
		alert('ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä');
	    document.frmLogIn.m_email.focus();
	    return;
	}
	
	if(document.frmLogIn.m_name.value==''){
		alert('ÀÌ¸§À» ÀÔ·ÂÇØÁÖ¼¼¿ä');
	    document.frmLogIn.m_name.focus();
	    return;
	}

	var mailCheck = document.frmLogIn.m_email.value.match(/^(\".*\"|[;A-Za-z0-9_-]([A-Za-z0-9_-]|[\+\.])*)@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z0-9][A-Za-z0-9_-]*(\.[A-Za-z0-9][A-Za-z0-9_-]*)+)$/);

	if(mailCheck == null){
		alert(" ÀÌ¸ÞÀÏ Çü½ÄÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.\n\n ¿¹) name@domain.com");
		document.frmLogIn.m_email.focus();
		return;
	}

	document.frmLogIn.submit();
}

function FindEnter() {
	if(window.event.keyCode == 13) {
		CheckFind();
	}
}




