function email_change(v){
	if(v.value!='00' || v.value!=''){
		document.joinform.email2.value=v.value
	}	
}


function chk_form(){
	var f=document.joinform
	f.title.value=f.name.value+'´ÔÀÇ ÅðÁ÷º¸Çè »ó´ã½ÅÃ»ÀÔ´Ï´Ù.';
	f.email.value=f.email1.value+f.email2.value;

	if(f.company.value==''){
		alert('È¸»ç¸íÀ» ½áÁÖ¼¼¿ä.');
		f.company.focus();
		return false;
	}
	if(f.establish.value==''){
		alert('È¸»ç¼³¸³³âµµÀ» ½áÁÖ¼¼¿ä.');
		f.establish.focus();
		return false;
	}
	if(f.company_region.value==''){
		alert('È¸»ç¼ÒÀçÁö¸¦ ½áÁÖ¼¼¿ä.');
		f.company_region.focus();
		return false;
	}
	if(f.tel.value==''){
		alert('ÀüÈ­¹øÈ£¸¦ ½áÁÖ¼¼¿ä.');
		f.tel.focus();
		return false;
	}
/*
	if(f.fax.value==''){
		alert('ÆÑ½º¹øÈ£¸¦ ½áÁÖ¼¼¿ä.');
		f.fax.focus();
		return false;
	}
*/
	if(f.name.value==''){
		alert('½ÅÃ»ÀÎÀ» ½áÁÖ¼¼¿ä.');
		f.name.focus();
		return false;
	}
	if(f.email1.value=='' || f.email2.value==''){
		alert('ÀÌ¸ÞÀÏÀ» È®ÀÎÇØÁÖ¼¼¿ä.');
		f.email1.focus();
		return false;
	}

	f.action='mail_forms_act.php';
	f.submit();
}

//¿µ¹®,¼ýÀÚ,-¸¸ÀÔ·Â
function onlyAlNumDash(Obj) {
	if (isAlphaNumDashStr(Obj.value) == false && Obj.value != '') {
		alert("¿µ¹®°ú ¼ýÀÚ¸¸ °¡´ÉÇÕ´Ï´Ù.");
		Obj.value = "";
		Obj.focus();
		return false;
	} 
	return true;
}

//¼ýÀÚ¸¸ÀÔ·Â
function onlyNum(Obj) {
	if (isNumStr(Obj.value) == false && Obj.value != '') {
		alert("¼ýÀÚ¸¸ °¡´ÉÇÕ´Ï´Ù.");
		Obj.value = "";
		Obj.focus();
		return false;
	} 
	return true;
}

//¼ýÀÚ,-¸¸ÀÔ·Â
function onlyNumDash(Obj) {
	if (isNumDashString(Obj.value) == false && Obj.value != '') {
		alert("¼ýÀÚ¿Í -¸¸ °¡´ÉÇÕ´Ï´Ù.");
		Obj.value = "";
		Obj.focus();
		return false;
	} 
	return true;
}

//ÇÑ±Û¸¸ÀÔ·Â
function onlyHan(Obj) {
	if (isHanStr(Obj.value) == false && Obj.value != '') {
		alert("ÇÑ±Û¸¸ °¡´ÉÇÕ´Ï´Ù.");
		Obj.value = "";
		Obj.focus();
		return false;
	} 
	return true;
}

/*--------------------------------------------------
             Check Alphanumeric RETURN T/F
----------------------------------------------------*/

function isEmail(str) {
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	if (filter.test(str)) {return true;}
	else {return false;}
}

//¿µ¹®Ã¼Å©
function isAlphaStr(stValue) {
	for(var i=0; i<stValue.length;i ++) {
		if (isAlphaChr( stValue.charAt(i)) == true) {continue;}
        return false;
	}
	return true;
}

//¿µ¹®,¼ýÀÚÃ¼Å©
function isAlphaNumStr(stValue) {
	for(var i=0; i<stValue.length;i ++) {
		if (isAlphaChr(stValue.charAt(i)) == true) {continue;}
		if (isNumChr( stValue.charAt(i)) == true) {continue;}
		return false;
	}
	return true;
}

//¿µ¹®,¼ýÀÚ,-Ã¼Å©
function isAlphaNumDashStr(stValue) {
	for(var i=0; i<stValue.length;i ++) {
		if (isAlphaChr( stValue.charAt(i)) == true) {continue;}
		if (isNumChr( stValue.charAt(i)) == true) {continue;}
		if (isNumDashChr(stValue.charAt(i)) == true) {continue;}
		return false;
	}
	return true;
}

//¼ýÀÚÃ¼Å©
function isNumStr(stValue) {
	for(var i=0 ; i< stValue.length ; i ++) {
		if (isNumChr(stValue.charAt(i)) == true) {continue;}
		return false;
	}
	return true;
}

//¼ýÀÚ,-Ã¼Å©
function isNumDashString(stValue) {
	for(var i=0 ; i< stValue.length ; i ++) {
		if (isNumDashChr(stValue.charAt(i)) == true) {continue;}
		return false;                
	}
	return true;
}

//ÇÑ±ÛÃ¼Å©
function isHanStr(stValue) {
	for(i=0;i<stValue.length;i++) {
		if (isHanChr(stValue.charCodeAt(i)) == true) {continue;}
	}
}

function isAlphaChr(ch) {
	if (isUpperAlphaChr(ch) == true || isLowerAlphaChr(ch) == true) {return true;}
	else {return false;}
}

function isUpperAlphaChr(ch) {
	if (ch >= 'A' && ch <= 'Z') {return true;}
	else {return false;}
}

function isLowerAlphaChr(ch) {
	if (ch >= 'a' && ch <= 'z') {return true;}
	else {return false;}
}

function isNumChr(ch) {
	if (ch >= '0' && ch <= '9') {return true;}
	else {return false;}
}

function isNumDashChr(ch) {
	if (isNumChr(ch) == true || ch == "-"  || ch == "."  || ch == "_"  || ch == "@") {return true;}
	else {return false;}
}

function isHanChr(ch) {
	if (ch > 128) {return true;}
	else {return false;}
}

function isSpChr(ch) {
	if (ch == " ") {return true;}
	else {return false;}
}














