var tel=/^[0-9]{5,20}$/;//电话验证
var qu=/^[0-9]{3,4}$/;//区号验证
var email=/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$///email验证
var sj=/^[0-9]{11}$///手机
var lastuser="";
var expURL=/^http:\/\/([\w-]+\.)+[\w-]+(\/[\w-   .\/?%&=]*)?/;//网址验证
var zip=/^[0-9]{6}$///邮编
var oicq=/^[0-9]{5,15}$/;//oicq验证
var kong=/(^\s*)|(\s*$)/  /*判断空格*/
var age=/^[0-9]{1,3}$///手机


function check()
{
	if(document.Form1.username.value.replace(kong,"")=="")
	{
		alert("请填写姓名！");
		document.Form1.username.focus();
		return false
	}
//	if(document.Form1.company.value.replace(kong,"")=="")
//	{
//		alert("请填写公司名称！");
//		document.Form1.company.focus();
//		return false
//	}

//	if(document.Form1.addr.value.replace(kong,"")=="")
//	{
//		alert("请填写联系地址！");
//		document.Form1.addr.focus();
//		return false
//	}
	if(!tel.test(document.Form1.tel.value))
	{
		alert("请填写正确的电话！");
		document.Form1.tel.focus();
		return false
	}

	if(!email.test(document.Form1.email.value)&&document.Form1.email.value!="")
	{
		alert("请填写正确的Email！");
		document.Form1.email.focus();
		return false
	}
	//if(!tel.test(document.Form1.fax.value)&&document.Form1.fax.value!="")
//	if(!tel.test(document.Form1.fax.value))
//	{
//		alert("请填写正确的传真！");
//		document.Form1.fax.focus();
//		return false
//	}
	if(document.Form1.title.value.replace(kong,"")=="")
	{
		alert("请填写主题！");
		document.Form1.title.focus();
		return false
	}

	if(document.Form1.content.value.replace(kong,"")=="")
	{
		alert("请填写留言内容！");
		document.Form1.content.focus();
		return false
	}
//return true;
document.Form1.submit();

}
function cance()
{
document.Form1.reset();  
return false;
	
}