/*
PHP version 5
Copyright (c) 2002-2010 ECISP.CN
声明：这不是一个免费的软件，请在许可范围内使用
作者：Bili E-mail:huangqyun@163.com  QQ:6326420
http://www.ecisp.cn	http://www.easysitepm.com
*/
function orderamount(id) {
	var um=document.getElementById("amount"+id);
	var amount=document.getElementById("amount"+id).value;
	if (isNaN(amount) || parseInt(amount)!=amount || amount<=0){
		alert(amount_inputerror);
		um.value='1';
		return false;
	}
}

function orderadd(){
	if(document.mainform.alias.value == "") {
		alert(alias_empty);
		document.mainform.alias.focus();
		return false;
	}
	if (document.mainform.cityone.value==0){
		alert(cityone_empty);
		document.mainform.cityone.focus();
		return false;
	}
	if (document.mainform.citytwo.value==0){
		alert(citytwo_empty);
		document.mainform.citytwo.focus();
		return false;
	}
	if (document.mainform.citythree.value==0){
		alert(citythree_empty);
		document.mainform.citythree.focus();
		return false;
	}
	if(document.mainform.address.value == "") {
		alert(address_empty);
		document.mainform.address.focus();
		return false;
	}
	if(document.mainform.tel.value == "" && document.mainform.mobile.value == ""  ) {
		alert(tel_empty);
		document.mainform.tel.focus();
		return false;
	}
	if(document.mainform.zipcode.value != "") {
		if(!document.mainform.zipcode.value.match(/[1-9]\d{5}(?!\d)/)) {
			alert(zipcode_empty);
			document.mainform.zipcode.focus();
			return false;
		}
	}
}

