function FrontPage_Form1_Validator(theForm)
{

  if (theForm.name.value == "")
  {
    alert("请输入联系人。");
    theForm.name.focus();
    return (false);
  }

  if (theForm.name.value.length < 2)
  {
    alert("联系人最少要输入两个字。");
    theForm.name.focus();
    return (false);
  }

  if (theForm.name.value.length > 20)
  {
    alert("联系人不能超过20个字。");
    theForm.name.focus();
    return (false);
  }

  if (theForm.tel1.value == "")
  {
    alert("请输入联系电话。");
    theForm.tel1.focus();
    return (false);
  }

  if (theForm.tel1.value.length < 7)
  {
    alert("电话最少要输入七个字。");
    theForm.tel1.focus();
    return (false);
  }


if (theForm.email.value==""){

alert("请输入E-mail。");
    theForm.email.focus();
    return (false);
}

if (theForm.email.value.charAt(0) == "." || theForm.email.value.charAt(0) == "@" || theForm.email.value.indexOf('@', 0) == -1 || theForm.email.value.indexOf('.', 0) == -1 || theForm.email.value.lastIndexOf("@") == theForm.email.value.length-1 || theForm.email.value.lastIndexOf(".") == theForm.email.value.length-1)
{
alert("请输入正确的 E-mail 地址！");
theForm.email.focus();
return (false);
}





  if (theForm.title.value == "")
  {
    alert("请输入留言主题。");
    theForm.title.focus();
    return (false);
  }


  if (theForm.content.value == "")
  {
    alert("请输入留言具体内容。");
    theForm.content.focus();
    return (false);
  }

  return (true);
}

