var error = "Error:\n\n"
//=========================================================
//²úÆ·¶©¹º±íµ¥
//=========================================================
function productBuy(){
	names = document.form1.names
	tell  = document.form1.tell
	mail  = document.form1.mail
	addr  = document.form1.addr
	post  = document.form1.post
	gsmc  = document.form1.gsmc
	bz    = document.form1.bz
	if(names.value == ""){alert(error+"Name cannot be blank!");names.focus();return false}
	else if(tell.value == ""){alert(error+"Telephone cannot be blank!");tell.focus();return false}
	else if(tell.value.length < 7){alert(error+"The telephone is invalid!");tell.focus();return false}
	else if(mail.value == ""){alert(error+"The telephone is invalid!");mail.focus();return false}
    else if(mail.value.length < 6 || mail.value.indexOf("@")== -1 || mail.value.indexOf(".")== -1){alert(error+"E-mail address is invalid£¡");mail.focus();return false}
    else if(mail.value.indexOf("com")== -1 && mail.value.indexOf("net")== -1 && mail.value.indexOf("cn")== -1 && mail.value.indexOf("cc")== -1 && mail.value.indexOf("org")== -1){alert(error+"E-mail address is invalid£¡");mail.focus();return false}
	else if(addr.value == ""){alert(error+"Address cannot be blank!");addr.focus();return false}
	else if(gsmc.value == ""){alert(error+"The company name cannot be blank!");gsmc.focus();return false}
	else if(addr.value.length < 4){alert(error+"The address should be longer than four characters!");addr.focus();return false}
	else if(post.value == ""){alert(error+"Zip code cannot be blank!");post.focus();return false}
	else if(isNaN(post.value) || post.value.length != 6){alert(error+"Zip code is not correct!");post.focus();return false}
    else if(bz.value == ""){alert(error+"The message content can't be empty!");bz.focus();return false}
}
