// JavaScript Document
function Check()
{
  if (document.form1.name.value=="")
  {
    alert("请输入您的姓名！");
	document.form1.name.focus();
	return false;
  }
  if (document.form1.age.value=="")
  {
    alert("年龄不能为空！");
	document.form1.age.focus();
	return false;
  }  
  if(document.form1.email.value.length!=0)
  {
    if (document.form1.email.value.charAt(0)=="." ||        
         document.form1.email.value.charAt(0)=="@"||       
         document.form1.email.value.indexOf('@', 0) == -1 || 
         document.form1.email.value.indexOf('.', 0) == -1 || 
         document.form1.email.value.lastIndexOf("@")==document.form1.email.value.length-1 || 
         document.form1.email.value.lastIndexOf(".")==document.form1.email.value.length-1)
     {
      alert("请输入正确的电子邮箱地址！");
      document.form1.email.focus();
      return false;
      }
   }
 else
  {
   alert("电子邮箱不能为空！");
   document.form1.email.focus();
   return false;
   }
  if (document.form1.address.value=="")
  {
    alert("地址不能为空！");
	document.form1.address.focus();
	return false;
  }  if (document.form1.youbian.value=="")
  {
    alert("邮编不能为空！");
	document.form1.youbian.focus();
	return false;
  }
     if (document.form1.tel.value=="")
  {
    alert("请输入您的联系电话！");
	document.form1.tel.focus();
	return false;
  } 
  return true;  
}