function ValidateForm(theForm)
{
	theForm.systemTest.value="on";
	if (theForm.linkMan.value.length<1 || theForm.linkMan.value.length>20)
	{
		alert("请正确输入“联系人”信息");
		theForm.linkMan.focus();
		return false;
	}
	if (theForm.demand_class.value==0)
    {
		alert("您必须选择需求类别");
		theForm.demand_class.focus();
		return false;
	}
	if ((theForm.demand_class.value==2)&&(theForm.enterpriseName.value.length<=0))
		{
		alert("选择企业需求，必须填企业名称");
		theForm.enterpriseName.focus();
		return false;
		}
	if (theForm.telephone.value.length<1 || theForm.telephone.value.length>30)
	{
		alert("请正确输入“联系电话”信息");
		theForm.telephone.focus();
		return false;
	}
	if (theForm.EMail.value.length<1 || theForm.EMail.value.length>30)
	{
		alert("请正确输入“EMail”信息");
		theForm.EMail.focus();
		return false;
	}
    var emailpattern = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
	if (!emailpattern.test(theForm.EMail.value))
	{
		alert("请正确输入“EMail”信息");
		theForm.EMail.focus();
		return false;
	}
	var telPattern = /^[0-9\-]+$/;
	if (!telPattern.test(theForm.telephone.value))
	{
		alert("请正确输入“联系电话”信息，只允许使用数字和“-”");
		theForm.telephone.focus();
		return false;
	}

	var checkedRequestItem=false;
	for(var i=0;i<theForm.requestItem.length;i++)
		if (theForm.requestItem[i].checked) checkedRequestItem=true;	

	if (!checkedRequestItem)
	{
		alert("您必须选择一项服务");
		theForm.requestItem[0].focus();	
		return false;
	}
	if ( theForm.requestExplain.value.length>500)
	{
		alert("“备注”信息请不要超过500个字");
		theForm.requestExplain.focus();
		return false;
	}
	theForm.frmSubmit.disabled=true;
}
