var emailformat=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;

function check_develop(){
	if(this.form1.name.value == ""){
		this.form1.name.focus();
		alert("请填写姓名！");
		return false;
	}
	if(this.form1.company.value == ""){
		this.form1.company.focus();
		alert("请填写公司！");
		return false;
	}
	if(this.form1.email.value == ""){
		this.form1.email.focus();
		alert("请填写邮件！");
		return false;
	}
	if(!emailformat.exec(document.form1.email.value)){
		document.form1.email.focus();
		alert("邮件格式不正确！");
		return false;
	}
	if(this.form1.tel.value == ""){
		this.form1.tel.focus();
		alert("请填写电话！");
		return false;
	}
	if(this.form1.prodname.value == ""){
		this.form1.prodname.focus();
		alert("请填写所需产品！");
		return false;
	}
}

function check_sample(){
	if(this.form1.name.value == ""){
		this.form1.name.focus();
		alert("请填写姓名！");
		return false;
	}
	if(this.form1.company.value == ""){
		this.form1.company.focus();
		alert("请填写公司！");
		return false;
	}
	if(this.form1.email.value == ""){
		this.form1.email.focus();
		alert("请填写邮件！");
		return false;
	}
	if(!emailformat.exec(document.form1.email.value)){
		document.form1.email.focus();
		alert("邮件格式不正确！");
		return false;
	}
	if(this.form1.tel.value == ""){
		this.form1.tel.focus();
		alert("请填写电话！");
		return false;
	}
	if(this.form1.model.value == ""){
		this.form1.model.focus();
		alert("请填写申请型号！");
		return false;
	}
	if(this.form1.count.value == ""){
		this.form1.count.focus();
		alert("请填写申请数量！");
		return false;
	}
	if(this.form1.prodname.value == ""){
		this.form1.prodname.focus();
		alert("请填写产品名称！");
		return false;
	}
	if(this.form1.expect.value == ""){
		this.form1.expect.focus();
		alert("请填写期望时间！");
		return false;
	}
}

function check_order(){
	if(this.form1.name.value == ""){
		this.form1.name.focus();
		alert("请填写姓名！");
		return false;
	}
	if(this.form1.company.value == ""){
		this.form1.company.focus();
		alert("请填写公司！");
		return false;
	}
	if(this.form1.email.value == ""){
		this.form1.email.focus();
		alert("请填写邮件！");
		return false;
	}
	if(!emailformat.exec(document.form1.email.value)){
		document.form1.email.focus();
		alert("邮件格式不正确！");
		return false;
	}
	if(this.form1.tel.value == ""){
		this.form1.tel.focus();
		alert("请填写电话！");
		return false;
	}
	if(this.form1.model.value == ""){
		this.form1.model.focus();
		alert("请填写采购型号！");
		return false;
	}
	if(this.form1.count.value == ""){
		this.form1.count.focus();
		alert("请填写采购数量！");
		return false;
	}
	if(this.form1.expect.value == ""){
		this.form1.expect.focus();
		alert("请填写期望货期！");
		return false;
	}
}

function check_query(){
	if(this.form1.name.value == ""){
		this.form1.name.focus();
		alert("请填写姓名！");
		return false;
	}
	if(this.form1.company.value == ""){
		this.form1.company.focus();
		alert("请填写公司！");
		return false;
	}
	if(this.form1.email.value == ""){
		this.form1.email.focus();
		alert("请填写邮件！");
		return false;
	}
	if(!emailformat.exec(document.form1.email.value)){
		document.form1.email.focus();
		alert("邮件格式不正确！");
		return false;
	}
	if(this.form1.tel.value == ""){
		this.form1.tel.focus();
		alert("请填写电话！");
		return false;
	}
	if(this.form1.model.value == ""){
		this.form1.model.focus();
		alert("请填写查询型号！");
		return false;
	}
	if(this.form1.count.value == ""){
		this.form1.count.focus();
		alert("请填写需求数量！");
		return false;
	}
}