function FrontPage_Form1_Validator(theForm)
{
 


  if (theForm.xingm.value == "")
  {
    alert("姓名不能为空。");
    theForm.xingm.focus();
    return (false);
  }
 
if (theForm.xingm.value.length<2) 
{
	alert("姓名不能少于2位!");
	theForm.xingm.focus();
	return false;
}




  if (theForm.tel.value == "" )
  {
    alert("电话号码不能为空。");
    theForm.tel.focus();
    return (false);
  }

 var checkOK = "0123456789-.+";
  var checkStr = theForm.tel.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("电话号码含有非法字符");
    theForm.tel.focus();
    return (false);
  }


if (theForm.tel.value.length<7) 
{
	alert("电话号码不能少于7位!");
	theForm.tel.focus();
	return false;
}


 if (theForm.neir.value == "")
  {
    alert("内容不能为空。");
    theForm.neir.focus();
    return (false);
  }
 
	return true;
}
