function MemberFormCheck(obj) {
	if (obj.c_country.value == "0") {
		alert("Please select Country");
		obj.c_country.focus();
		return false;   
	}
	if (obj.c_account.value == "") {
		alert("Email is still blank!!");
		obj.c_account.focus();
		return false;   
	}
	if (obj.c_password.value == "") {
		alert("Password is still blank!!");
		obj.c_password.focus();
		return false;   
	}
	if (obj.c_password.value != obj.v_password.value) {
		alert("The confirm password you entered do not match!!");
		obj.v_password.focus();
		return false;   
	}
	if (obj.c_name.value == "") {
		alert("Company Name is still blank!!");
		obj.c_name.focus();
		return false;   
	}
	if (obj.c_contact_f.value == "") {
		alert("First Name is still blank!!");
		obj.c_contact_f.focus();
		return false;   
	}
	if (obj.c_tel.value == "") {
		alert("Business Tel is still blank");
		obj.c_tel.focus();
		return false;   
	}
	if (obj.c_fax.value == "") {
		alert("Business Fax is still blank");
		obj.c_fax.focus();
		return false;   
	}
	if (obj.c_address.value == "") {
		alert("Street Address is still blank!!");
		obj.c_address.focus();
		return false;   
	}
	if (obj.c_city.value == "") {
		alert("City is still blank!!");
		obj.c_city.focus();
		return false;   
	}
	
	return true;
}

//Check Change Password Form
function ChangePWCheck(obj,c_pw) {
	if (obj.current_password.value != c_pw) {
		alert("Current Password you have given is incorrect.");
		obj.current_password.focus();
		return false;   
	}
	if (obj.new_password.value == "") {
		alert("Notice! The field of New Password was still blank.");
		obj.new_password.focus();
		return false;   
	}
	if (obj.new_password.value != obj.confirm_password.value) {
		alert("The New Password does not match the Confirm Password.");
		obj.confirm_password.focus();
		return false;   
	}
	return true;
}

//Check contact us form
function ContactusFormCheck(obj) {
	if (obj.cu_name.value == "") {
		alert("Notice! The field of Name was still blank.");
		obj.cu_name.focus();
		return false;   
	}
	if (obj.cu_tel.value == "") {
		alert("Notice! The field of Tel was still blank.");
		obj.cu_tel.focus();
		return false;   
	}
	if (obj.cu_email.value == "") {
		alert("Notice! The field of e-mail was still blank.");
		obj.cu_email.focus();
		return false;   
	} else {
		if (obj.cu_email.value.indexOf("@") == -1 || obj.cu_email.value.indexOf(".") == -1) {
			alert("Your e-mail are not in correct format.");
			obj.cu_email.focus();
			return false;
		}
	}
	if (obj.cu_content.value == "") {
		alert("Notice! The field of Content was still blank.");
		obj.cu_content.focus();
		return false;   
	}
	return true;
}

function CheckTerm(form){
    if(form.m_agree_term.checked){
        document.getElementById('div_send_show').style.display='';
    }else{
        document.getElementById('div_send_show').style.display='none';
    }
}

function ProductsFormCheck(obj) {
	if (obj.p_name.value == "") {
		alert("Notice! The field of Product Name was still blank.");
		obj.p_name.focus();
		return false;
	}
	if (obj.pc_id_str.value == "") {
		alert("Notice! The field of Product Category was still blank.");
		obj.pc_id_str.focus();
		return false;
	}
	return true;
}
