
function commoncheckform(theForm)
{

if (theForm.Name.value == "")
{
 alert("请在 姓名 域中输入值。");
 theForm.Name.focus();
 return (false);
}

if (theForm.Name.value.length < 2)
{
 alert("在 姓名 域中，请至少输入 2 个字符。");
 theForm.Name.focus();
 return (false);
}

if (theForm.Name.value.length > 8)
{
 alert("在 姓名 域中，请最多输入 8 个字符。");
 theForm.Name.focus();
 return (false);
}

if (theForm.IDnumber.value == "")
{
 alert("请在 身份证号码 域中输入值。");
 theForm.IDnumber.focus();
 return (false);
}

if (theForm.IDnumber.value.length < 15)
{
 alert("在 身份证号码 域中，请至少输入 15 个字符。");
 theForm.IDnumber.focus();
 return (false);
}

if (theForm.IDnumber.value.length > 18)
{
 alert("在 身份证号码 域中，请最多输入 18 个字符。");
 theForm.IDnumber.focus();
 return (false);
}

if (theForm.city.options[theForm.city.selectedIndex].value=="-1")
{
 alert("请选择您所在的城市。");
 //theForm.city.focus();
 return (false);
}

if (theForm.Email.value == "")
{
 alert("请在 E-mail 地址 域中输入值。");
 theForm.Email.focus();
 return (false);
}

if (theForm.Email.value.length < 3)
{
 alert("在 E-mail 地址 域中，请至少输入 3 个字符。");
 theForm.Email.focus();
 return (false);
}

if (!(checkEmailhostFormat(theForm,theForm.Email))){
 return (false);
}

if (theForm.tel.value == "")
{
 alert("请在 联系电话 域中输入值。");
 theForm.tel.focus();
 return (false);
}

if (theForm.tel.value.length < 6)
{
 alert("在 联系电话 域中，请至少输入 6 个字符。");
 theForm.tel.focus();
 return (false);
}

if ((theForm.paygate.value=="31")&&(theForm.mobileno_icbc.value.length!=11)){
	alert("请确认您所填写的电话是中国移动的手机！");
	theForm.mobileno_icbc.focus();
	return (false);
}

return (true);

}

