<!--
function checknum(checkStr,checkOK)
{
  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)
  {
    return (false);
  }
  return (true);
}

function UserValidator(theForm)
{

  if (theForm.mailname.value == "")
  {
    alert("邮件列表名称为必填项目，请输入！");
	theForm.mailname.focus();
	return(false);
  }
  if (theForm.mailname.value.length < 2)
  {
    alert("列表名称不能少于两个字符，请重输！");
	theForm.mailname.focus();
	return(false);
  }

  if (theForm.name.value == "")
  {
    alert("管理员名称为必填项目，请输入！");
	theForm.name.focus();
	return(false);
  }
  if (theForm.name.value.length < 2)
  {
    alert("管理员名称不能少于两个字符，请重输！");
	theForm.name.focus();
	return(false);
  }

  if (theForm.password.value == "")
  {
    alert("请输入密码！");
    theForm.passwd.focus();
    return (false);
  }
  if (theForm.password.value.length < 3)
  {
    alert("密码不能小于 3 位！");
    theForm.passwd.focus();
    return (false);
  }
  if (theForm.password.value.length > 20)
  {
    alert("密码不能大于 20 位");
    theForm.passwd.focus();
    return (false);
  }

  if (theForm.email.value == "")
  {
    alert("请输入EMAIL地址！");
	theForm.email.focus();
	return(false);
  }
  if ((theForm.email.value.length < 7) || (theForm.email.value.indexOf("@") == -1) || (theForm.email.value.indexOf(".") == -1))
  {
    alert("邮件地址错误！");
	theForm.email.focus();
	return(false);
  }

  if (theForm.mailtext.value == "")
  {
    alert("邮件列表简介为必填项目，请输入！");
    theForm.mailtext.focus();
    return (false);
  }

return (true);
}
 //-->