/*

Developer : Lee,Young-Hwa who is a JAVA, C++, PHP Developer

*/
function userID(form)
{
	var str = form.userID.value;
	if (str.length <= 0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("ID¸¦ Àû¾îÁÖ¼¼¿ä");
		form.userID.focus();
		return false;
	}
	return true;
}

function userPW(form)
{
	var str = form.userPW.value;
	if (str.length <= 0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("ºñ¹Ð¹øÈ£À» Àû¾îÁÖ¼¼¿ä");
		form.userPW.focus();
		return false;
	}
	return true;
}

function userPW_Confirm(form)
{
	var str = form.userPW_Confirm.value;
	if (str.length <= 0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("ºñ¹Ð¹øÈ£È®ÀÎ¶õÀ» ÀÔ·ÂÇÏ½Ê½Ã¿À");
		form.userPW_Confirm.focus();
		return false;
	}
	return true;
}

function comparePW(form)
{
	var str1 = form.userPW.value;
	var str2 = form.userPW_Confirm.value;
	if(str1 != str2) {
		window.alert("µÎ°³ÀÇ ºñ¹Ð¹øÈ£°¡ ´Ù¸¨´Ï´Ù.");
		form.userPW_Confirm.focus();
		return false;
	}
	return true;
}

function email(form)
{
	var temp = 0;
	var count = 0;
	var flagFirst = 0;
	var str = form.email.value;
	if (str.length > 0) {
		for (temp=0; temp < str.length-1; temp++) {
			if (str.charAt(temp)=="@") {
				var flagFirst=1;
			}
			if (str.charAt(temp)==".") {
				count+=1;
			}
		}
		if (flagFirst == 1 && (count >= 1 && count <= 3)) {
			return true;
		}
		else {
			window.alert("Á¤È®ÇÑ eMail ÁÖ¼Ò°¡ ¾Æ´Õ´Ï´Ù.");
			form.email.focus();
			return false;
		}
	}
	else {
		window.alert("eMailÁÖ¼Ò¸¦ Àû¾îÁÖ¼¼¿ä.");
		form.email.focus();
		return false;
	}
	return false;
}

function name(form)
{
	var str = form.name.value;
	if (str.length <= 0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("¼º¸íÀ» Àû¾îÁÖ¼¼¿ä");
		form.name.focus();
		return false;
	}
	return true;
}

function sNO1(form)
{
	var str = form.sNO1.value;
	if (str.length <= 0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ Àû¾îÁÖ¼¼¿ä.");
		form.sNO1.focus();
		return false;
	}
	return true;
}

function sNO2(form)
{
	var str = form.sNO2.value;
	if (str.length <= 0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ Àû¾îÁÖ¼¼¿ä");
		form.sNO2.focus();
		return false;
	}
	return true;
}

function birthYear(form)
{
	var str = form.birth_year.value;
	if (str.length != 4 || str < 1900 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("ÅÂ¾î³­ ³âµµ¸¦ Àû¾îÁÖ¼¼¿ä");
		form.birth_year.focus();
		return false;
	}
	return true;
}

function birthMonth(form)
{
	var str = form.birth_month.value;
	if (str.length <= 0) {
		window.alert("ÅÂ¾î³­ ¿ùÀ» Àû¾îÁÖ¼¼¿ä");
		form.birth_month.focus();
		return false;
	}
	return true;
}

function birthDay(form)
{
	var str = form.birth_day.value;
	if (str.length <= 0) {
		window.alert("ÅÂ¾î³­ ³¯À» Àû¾îÁÖ¼¼¿ä");
		form.birth_day.focus();
		return false;
	}
	return true;
}

function homeZipCode_1(form)
{
	var str = form.homeZipCode_1.value;
	if (str.length <= 0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("ÀÚÅÃ ¿ìÆí¹øÈ£¸¦ Àû¾îÁÖ¼¼¿ä");
		form.homeZipCode_1.focus();
		return false;
	}
	return true;
}

function homeZipCode_2(form)
{
	var str = form.homeZipCode_2.value;
	if (str.length <= 0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("ÀÚÅÃ ¿ìÆí¹øÈ£¸¦ Àû¾îÁÖ¼¼¿ä");
		form.homeZipCode_2.focus();
		return false;
	}
	return true;
}

function homeAdrs(form)
{
	var str = form.homeAdrs.value;
	if (str.length <= 0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("ÀÚÅÃ ÁÖ¼Ò¸¦ Àû¾îÁÖ¼¼¿ä");
		form.homeAdrs.focus();
		return false;
	}
	return true;
}

function homeTel(form)
{
	var str = form.homeTel.value;
	if (str.length<=0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("ÀÚÅÃ ÀüÈ­¹øÈ£¸¦ Àû¾îÁÖ¼¼¿ä");
		form.homeTel.focus();
		return false;
	}
	return true;
}

function companyZipCode_1(form)
{
	var str = form.companyZipCode_1.value;
	if (str.length <= 0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("È¸»ç ¿ìÆí¹øÈ£¸¦ Àû¾îÁÖ¼¼¿ä");
		form.companyZipCode_1.focus();
		return false;
	}
	return true;
}

function companyZipCode_2(form)
{
	var str = form.companyZipCode_2.value;
	if (str.length <= 0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("È¸»ç ¿ìÆí¹øÈ£¸¦ Àû¾îÁÖ¼¼¿ä");
		form.companyZipCode_2.focus();
		return false;
	}
	return true;
}

function companyAdrs(form)
{
	var str = form.companyAdrs.value;
	if (str.length <= 0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("È¸»ç ÁÖ¼Ò¸¦ Àû¾îÁÖ¼¼¿ä");
		form.companyAdrs.focus();
		return false;
	}
	return true;
}

function companyTel(form)
{
	var str=form.companyTel.value;
	if (str.length <= 0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("È¸»ç ÀüÈ­¹øÈ£¸¦ Àû¾îÁÖ¼¼¿ä");
		form.companyTel.focus();
		return false;
	}
	return true;
}

function companyName(form)
{
	var str=form.companyName.value;
	if(str.length<=0 || str.replace(/^[ ]+$/g, "") == "")
	{
		window.alert("Á÷Àå¸í¸¦ Àû¾îÁÖ¼¼¿ä");
		form.companyName.focus();
		return false;
	}
	return true
}

function companyDept(form)
{
	var str=form.companyDept.value;
	if(str.length<=0 || str.replace(/^[ ]+$/g, "") == "")
	{
		window.alert("ºÎ¼­¸í¸¦ Àû¾îÁÖ¼¼¿ä");
		form.companyDept.focus();
		return false;
	}
	return true
}

function hp(form)
{
	var str = form.hp.value;
	if (str.length <= 0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("ÈÞ´ëÆù¹øÈ£¸¦ Àû¾îÁÖ¼¼¿ä");
		form.hp.focus();
		return false;
	}
	return true;
}

function fax(form)
{
	var str = form.fax.value;
	if (str.length <= 0 || str.replace(/^[ ]+$/g, "") == "") {
		window.alert("ÆÑ½º¹øÈ£¸¦ Àû¾îÁÖ¼¼¿ä");
		form.fax.focus();
		return false;
	}
	return true;
}

function job(form)
{
	var str = form.job.value;
	if (str.length <= 0 || str == -1) {
		window.alert("Á÷¾÷À» ¼±ÅÃÇØÁÖ¼¼¿ä");
		form.job.focus();
		return false;
	}
	return true;
}

function education(form)
{
	var str = form.education.value;
	if (str.length <= 0 || str == -1) {
		window.alert("±³À°¼öÁØÀ» ¼±ÅÃÇØÁÖ¼¼¿ä");
		form.education.focus();
		return false;
	}
	return true;
}

function income(form)
{
	var str = form.income.value;
	if (str.length <= 0 || str == -1) {
		window.alert("¼Òµæ¼öÁØÀ» ¼±ÅÃÇØÁÖ¼¼¿ä");
		form.income.focus();
		return false;
	}
	return true;
}

function wedding(form)
{
	if (form.wedding[0].checked || form.wedding[1].checked) {
		return true;
	}
	else if (! form.wedding.checked) {
		window.alert("°áÈ¥¿©ºÎ¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä");
		return false;
	}
}