function check_keyword(theform){
	if (!theform.key_word.value ){
		alert("請輸入關鍵字!!");
		theform.key_word.focus();
		return false;
	}
return true;
}

function check_userdata(theform){

	if (!theform.total_items.value ){
		alert("請先選擇詢價項目!!");
		return false;
	}

	if (!theform.real_name.value ){
		alert("請輸入聯絡人姓名!!");
		theform.real_name.focus();
		return false;
	}
	if (!theform.address.value ){
		alert("請填寫聯絡地址!!");
		theform.address.focus();
		return false;
	}
	if (!theform.phone.value ){
		alert("請填寫聯絡電話!!");
		theform.phone.focus();
		return false;
	}

return true;
}

function check_login_value(theform){
	if (!theform.login_id.value ){
		alert("請輸入會員帳號!!");
		theform.login_id.focus();
		return false;
	}
	if (!theform.login_pw.value ){
		theform.login_pw.focus();
		alert("請輸入會員密碼!!");
		return false;
	}
return true;
}

function check_email_value(theform){
	if (!theform.email.value ){
		alert("請輸入電子郵件信箱!!");
		theform.email.focus();
		return false;
	}
}

function check_member_value(theform){
	if (!theform.name.value ){
		alert("請輸入會員帳號!!");
		theform.name.focus();
		return false;
	}
	if (!theform.password.value ){
		theform.password.focus();
		alert("請輸入會員密碼!!");
		return false;
	}
	if(!theform.password1.value){
		theform.password1.focus();
		alert("請輸入確認密碼!!");
		return false;
	}
	if(theform.password.value != theform.password1.value){
		theform.password1.focus();
		alert("會員密碼與確認密碼不同!!");
		return false;
	}
	if(!theform.real_name.value){
		theform.real_name.focus();
		alert("請輸入聯絡人姓名!!");
		return false;
	}
	if(!theform.phone.value){
		theform.phone.focus();
		alert("請輸入聯絡電話!!");
		return false;
	}

	if(theform.email.value.indexOf('@') < 0 || theform.email.value.indexOf('.') < 0 || theform.email.value.length  < 10) {
	    alert('請輸入電子郵件信箱');
		theform.email.focus();
		return false;
	}
return true;
}
