
function CheckAll(form)
{
  for (var i=0;i<form.elements.length;i++)
  {
    var e = form.elements[i];
    if (e.name != 'chkall')
       e.checked = form.chkall.checked;
  }
}

function Jtrim(str)
{
        var i = 0;
        var len = str.length;
        if ( str == "" ) return( str );
        j = len -1;
        flagbegin = true;
        flagend = true;
        while ( flagbegin == true && i< len)
        {
           if ( str.charAt(i) == " " )
                {
                  i=i+1;
                  flagbegin=true;
                }
                else
                {
                        flagbegin=false;
                }
        }

        while  (flagend== true && j>=0)
        {
            if (str.charAt(j)==" ")
                {
                        j=j-1;
                        flagend=true;
                }
                else
                {
                        flagend=false;
                }
        }

        if ( i > j ) return ("")

        trimstr = str.substring(i,j+1);
        return trimstr;
}

function isemail (s)
{
        if (s.length > 100)
        {
                window.alert("E-mail地址长度不能超过100位 ！");
                return false;
        }

         var regu = "^(([0-9a-zA-Z]+)|([0-9a-zA-Z]+[_.0-9a-zA-Z-]*[0-9a-zA-Z]+))@([a-zA-Z0-9-]+[.])+([a-zA-Z]{2}|net|NET|com|COM|gov|GOV|mil|MIL|org|ORG|edu|EDU|int|INT)$"
         var re = new RegExp(regu);
         if (s.search(re) != -1) {
               return true;
         } else {
               window.alert ("请输入有效合法的E-mail地址 ！")
               return false;
         }
}

function eng_isemail (s)
{
        if (s.length > 100)
        {
                window.alert("The length of E-mail address can't exceed 100!");
                return false;
        }

         var regu = "^(([0-9a-zA-Z]+)|([0-9a-zA-Z]+[_.0-9a-zA-Z-]*[0-9a-zA-Z]+))@([a-zA-Z0-9-]+[.])+([a-zA-Z]{2}|net|NET|com|COM|gov|GOV|mil|MIL|org|ORG|edu|EDU|int|INT)$"
         var re = new RegExp(regu);
         if (s.search(re) != -1) {
               return true;
         } else {
               window.alert ("Please input effective and legal E-mail address!")
               return false;
         }
}

function isusername (s)
{
         var regu = "^([a-zA-Z]+[_0-9a-zA-Z@.-]*)$"
         var re = new RegExp(regu);
         if (s.search(re) != -1) {
               return true;
         } else {
               window.alert ("请使用规范的用户名！")
               return false;
         }
}

function eng_isusername (s)
{
         var regu = "^([a-zA-Z]+[_0-9a-zA-Z@.-]*)$"
         var re = new RegExp(regu);
         if (s.search(re) != -1) {
               return true;
         } else {
               window.alert ("Please use the normal UserName!")
               return false;
         }
}

function checklogin(theForm)
{
  if(theForm.username.value == "")
  {
    alert("请输入用户名！");
    theForm.username.focus();
    return (false);
  }
  if(theForm.password.value == "")
  {
    alert("请输入密码！");
    theForm.password.focus();
    return (false);
  }
}

function checkeng_login(theForm)
{
  if(theForm.username.value == "")
  {
    alert("Please input UserName!");
    theForm.username.focus();
    return (false);
  }
  if(theForm.password.value == "")
  {
    alert("Please input PassWord!");
    theForm.password.focus();
    return (false);
  }
}

function checkfeedback(theForm)
{
  if(theForm.顾客名称.value == "")
  {
    alert("请输入顾客名称！");
    theForm.顾客名称.focus();
    return (false);
  }
  if(theForm.联系人.value == "")
  {
    alert("请输入联系人！");
    theForm.联系人.focus();
    return (false);
  }
  if(theForm.电子邮件.value == "")
  {
    alert("请输入电子邮件！");
    theForm.电子邮件.focus();
    return (false);
  }
  if(!isemail(theForm.电子邮件.value))
  {
    theForm.电子邮件.focus();
    return (false);
  }
  if(theForm.电话.value == "")
  {
    alert("请输入电话！");
    theForm.电话.focus();
    return (false);
  }
  if(theForm.信息内容.value == "")
  {
    alert("请输入信息内容！");
    theForm.信息内容.focus();
    return (false);
  }
  if(theForm.顾客的期望.value == "")
  {
    alert("请输入顾客的期望！");
    theForm.顾客的期望.focus();
    return (false);
  }
}

function checkorder(theForm)
{
  if(theForm.客户名称.value == "")
  {
    alert("请输入客户名称！");
    theForm.客户名称.focus();
    return (false);
  }
  if(theForm.联系人.value == "")
  {
    alert("请输入联系人！");
    theForm.联系人.focus();
    return (false);
  }
  if(theForm.地址.value == "")
  {
    alert("请输入地址！");
    theForm.地址.focus();
    return (false);
  }
  if(theForm.电话.value == "")
  {
    alert("请输入电话！");
    theForm.电话.focus();
    return (false);
  }
  if(theForm.价格条件.value == "")
  {
    alert("请输入价格条件！");
    theForm.价格条件.focus();
    return (false);
  }
  if(theForm.目的港.value == "")
  {
    alert("请输入目的港！");
    theForm.目的港.focus();
    return (false);
  }
  if(theForm.发运方式.value == "")
  {
    alert("请输入发运方式！");
    theForm.发运方式.focus();
    return (false);
  }
}

function checkjob(theForm)
{
  if(theForm.T0.value == "")
  {
    alert("请输入职位名称！");
    theForm.T0.focus();
    return (false);
  }
  if(theForm.T1.value == "")
  {
    alert("请输入招聘人数！");
    theForm.T1.focus();
    return (false);
  }
  if(isNaN(theForm.T1.value)){
    alert("招聘人数应为数字！");
    theForm.T1.focus();
    return (false);
  }
  if(theForm.T3.value == "")
  {
    alert("请输入年龄要求！");
    theForm.T3.focus();
    return (false);
  }
  if(theForm.T4.value == "")
  {
    alert("请输入学历要求！");
    theForm.T4.focus();
    return (false);
  }
  if(theForm.T5.value == "")
  {
    alert("请输入其他！");
    theForm.T5.focus();
    return (false);
  }
}

function checksearch2(theForm)
{
  if(theForm.word.value == "")
  {
    alert("请输入关键字！");
    theForm.word.focus();
    return (false);
  }
}

function checkpassword(theForm)
{
  if(theForm.oldpwd.value == "")
  {
    alert("请输入旧密码！");
    theForm.oldpwd.focus();
    return (false);
  }
  if(jtrim(theForm.oldpwd.value) != jtrim(theForm.pwd.value))
  {
    alert("您输入的旧密码不正确，请重新输入！");
    theForm.oldpwd.focus();
    return (false);
  }
  if(theForm.newpwd.value == "")
  {
    alert("请输入新密码！");
    theForm.newpwd.focus();
    return (false);
  }
  if(theForm.newpwd.value.length<4)
  {
    alert("新密码必须大于3位！");
    theForm.newpwd.focus();
    return (false);
  }
  if(theForm.confirmpwd.value == "")
  {
    alert("请输入验证密码！");
    theForm.confirmpwd.focus();
    return (false);
  }
  if(theForm.newpwd.value != theForm.confirmpwd.value)
  {
    alert("验证密码与新密码不一致！");
    theForm.confirmpwd.focus();
    return (false);
  }
}

function checkpage(theForm)
{
  if(theForm.page.value == "")
  {
    alert("请输入页码！");
    theForm.page.focus();
    return (false);
  }
  if(isNaN(theForm.page.value)){
    alert("页码应为数字！");
    theForm.page.focus();
    return (false);
  }
}

function checkeng_page(theForm)
{
  if(theForm.page.value == "")
  {
    alert("Please input page!");
    theForm.page.focus();
    return (false);
  }
  if(isNaN(theForm.page.value)){
    alert("The page must be a number!");
    theForm.page.focus();
    return (false);
  }
}

function checkaddadmin(theForm)
{
  if (theForm.T1.value == "")
  {
    alert("请输入账户名！");
    theForm.T1.focus();
    return (false);
  }
  if(theForm.T1.value.length<4)
  {
    alert("账户名必须大于3位！");
    theForm.T1.focus();
    return (false);
  }
  if(!isusername(theForm.T1.value))
  {
    theForm.T1.focus();
    return (false);
  }
  if (theForm.T2.value == "")
  {
    alert("请输入密码！");
    theForm.T2.focus();
    return (false);
  }
  if(theForm.T2.value.length<4)
  {
    alert("密码必须大于3位！");
    theForm.T2.focus();
    return (false);
  }
  if (theForm.T3.value == "")
  {
    alert("请输入确认密码！");
    theForm.T3.focus();
    return (false);
  }
  if(theForm.T3.value!=theForm.T2.value)
  {
    alert("确认密码与原密码不一致！");
    theForm.T3.focus();
    return (false);
  }
}

function checkeditadmin(theForm)
{
  if (theForm.T1.value == "")
  {
    alert("请输入原密码！");
    theForm.T1.focus();
    return (false);
  }
  if(theForm.T1.value.length<4)
  {
    alert("原密码必须大于3位！");
    theForm.T1.focus();
    return (false);
  }
  if(theForm.T1.value != theForm.T.value)
  {
    alert("原密码有误！");
    theForm.T1.focus();
    return (false);
  }
  if (theForm.T2.value == "")
  {
    alert("请输入新密码！");
    theForm.T2.focus();
    return (false);
  }
  if(theForm.T2.value.length<4)
  {
    alert("新密码必须大于3位！");
    theForm.T2.focus();
    return (false);
  }
  if (theForm.T3.value == "")
  {
    alert("请输入确认密码！");
    theForm.T3.focus();
    return (false);
  }
  if(theForm.T3.value!=theForm.T2.value)
  {
    alert("确认密码与新密码不一致！");
    theForm.T3.focus();
    return (false);
  }
}

function checknews(theForm)
{
  if (theForm.T1.value == "")
  {
    alert("请输入新闻标题！");
    theForm.T1.focus();
    return (false);
  }
  if (theForm.T_1.value == "")
  {
    alert("请输入英文标题！");
    theForm.T_1.focus();
    return (false);
  }
  if (theForm.S0.value == "")
  {
    alert("请输入发布日期！");
    theForm.S0.focus();
    return (false);
  }
  if (theForm.S1.value == "")
  {
    alert("请输入新闻内容！");
    theForm.S1.focus();
    return (false);
  }
  if (theForm.S_1.value == "")
  {
    alert("请输入英文内容！");
    theForm.S_1.focus();
    return (false);
  }
}

function checktheme(theForm)
{
  if (theForm.T1.value == "")
  {
    alert("请输入版块名称！");
    theForm.T1.focus();
    return (false);
  }
}

function checkclass(theForm)
{
  if (theForm.T1.value == "")
  {
    alert("请输入类别名称！");
    theForm.T1.focus();
    return (false);
  }
  if (theForm.T5.value == "")
  {
    alert("请输入类别的英文名称！");
    theForm.T5.focus();
    return (false);
  }
}

function checkmaterial(theForm)
{
  if(theForm.T0.value == "")
  {
    alert("请输入等级！");
    theForm.T0.focus();
    return (false);
  }
  if(theForm.T1.value == "")
  {
    alert("请输入Gs(Br)的前缀！");
    theForm.T1.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T1.value)){
      alert("Gs(Br)的前缀应为数字！");
      theForm.T1.focus();
      return (false);
    }
  }
  if(theForm.T11.value == "")
  {
    alert("请输入Gs(Br)的后缀！");
    theForm.T11.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T11.value)){
      alert("Gs(Br)的后缀应为数字！");
      theForm.T11.focus();
      return (false);
    }
  }
  if(theForm.T2.value == "")
  {
    alert("请输入mT(Br)的前缀！");
    theForm.T2.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T2.value)){
      alert("mT(Br)的前缀应为数字！");
      theForm.T2.focus();
      return (false);
    }
  }
  if(theForm.T12.value == "")
  {
    alert("请输入mT(Br)的后缀！");
    theForm.T12.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T12.value)){
      alert("mT(Br)的后缀应为数字！");
      theForm.T12.focus();
      return (false);
    }
  }
  if(theForm.T3.value == "")
  {
    alert("请输入Oe(Hcb)的前缀！");
    theForm.T3.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T3.value)){
      alert("Oe(Hcb)的前缀应为数字！");
      theForm.T3.focus();
      return (false);
    }
  }
  if(theForm.T13.value == "")
  {
    alert("请输入Oe(Hcb)的后缀！");
    theForm.T13.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T13.value)){
      alert("Oe(Hcb)的后缀应为数字！");
      theForm.T13.focus();
      return (false);
    }
  }
  if(theForm.T4.value == "")
  {
    alert("请输入kA/m(Hcb)的前缀！");
    theForm.T4.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T4.value)){
      alert("kA/m(Hcb)的前缀应为数字！");
      theForm.T4.focus();
      return (false);
    }
  }
  if(theForm.T14.value == "")
  {
    alert("请输入kA/m(Hcb)的后缀！");
    theForm.T14.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T14.value)){
      alert("kA/m(Hcb)的后缀应为数字！");
      theForm.T14.focus();
      return (false);
    }
  }
  if(theForm.T5.value == "")
  {
    alert("请输入Oe(Hcj)的前缀！");
    theForm.T5.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T5.value)){
      alert("Oe(Hcj)的前缀应为数字！");
      theForm.T5.focus();
      return (false);
    }
  }
  if(theForm.T15.value == "")
  {
    alert("请输入Oe(Hcj)的后缀！");
    theForm.T15.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T15.value)){
      alert("Oe(Hcj)的后缀应为数字！");
      theForm.T15.focus();
      return (false);
    }
  }
  if(theForm.T6.value == "")
  {
    alert("请输入kA/m(Hcj)的前缀！");
    theForm.T6.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T6.value)){
      alert("kA/m(Hcj)的前缀应为数字！");
      theForm.T6.focus();
      return (false);
    }
  }
  if(theForm.T16.value == "")
  {
    alert("请输入kA/m(Hcj)的后缀！");
    theForm.T16.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T16.value)){
      alert("kA/m(Hcj)的后缀应为数字！");
      theForm.T16.focus();
      return (false);
    }
  }
  if(theForm.T7.value == "")
  {
    alert("请输入MGOe(BH)的前缀！");
    theForm.T7.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T7.value)){
      alert("MGOe(BH)的前缀应为数字！");
      theForm.T7.focus();
      return (false);
    }
  }
  if(theForm.T17.value == "")
  {
    alert("请输入MGOe(BH)的后缀！");
    theForm.T17.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T17.value)){
      alert("MGOe(BH)的后缀应为数字！");
      theForm.T17.focus();
      return (false);
    }
  }
  if(theForm.T8.value == "")
  {
    alert("请输入kJ/m3(BH)的前缀！");
    theForm.T8.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T8.value)){
      alert("kJ/m3(BH)的前缀应为数字！");
      theForm.T8.focus();
      return (false);
    }
  }
  if(theForm.T18.value == "")
  {
    alert("请输入kJ/m3(BH)的后缀！");
    theForm.T18.focus();
    return (false);
  }
  else
  {
    if(isNaN(theForm.T18.value)){
      alert("kJ/m3(BH)的后缀应为数字！");
      theForm.T18.focus();
      return (false);
    }
  }
}

function checkproduct(theForm)
{
  if(theForm.T0.value == "")
  {
    alert("请输入品名！");
    theForm.T0.focus();
    return (false);
  }
  if(theForm.T1.value == "")
  {
    alert("请输入Ｒｏ！");
    theForm.T1.focus();
    return (false);
  }
  if(isNaN(theForm.T1.value)){
    alert("请输入数值Ｒｏ！");
    theForm.T1.focus();
    return (false);
  }
  if(theForm.T2.value == "")
  {
    alert("请输入Ｒｉ！");
    theForm.T2.focus();
    return (false);
  }
  if(isNaN(theForm.T2.value)){
    alert("请输入数值Ｒｉ！");
    theForm.T2.focus();
    return (false);
  }
  if(theForm.T3.value == "")
  {
    alert("请输入Ｔ！");
    theForm.T3.focus();
    return (false);
  }
  if(isNaN(theForm.T3.value)){
    alert("请输入数值Ｔ！");
    theForm.T3.focus();
    return (false);
  }
  if(theForm.T4.value == "")
  {
    alert("请输入Ｂ！");
    theForm.T4.focus();
    return (false);
  }
  if(isNaN(theForm.T4.value)){
    alert("请输入数值Ｂ！");
    theForm.T4.focus();
    return (false);
  }
  if(theForm.T5.value == "")
  {
    alert("请输入Ｌ！");
    theForm.T5.focus();
    return (false);
  }
  if(isNaN(theForm.T5.value)){
    alert("请输入数值Ｌ！");
    theForm.T5.focus();
    return (false);
  }
  if(theForm.T6.value == "")
  {
    alert("请输入Ｈ！");
    theForm.T6.focus();
    return (false);
  }
  if(isNaN(theForm.T6.value)){
    alert("请输入数值Ｈ！");
    theForm.T6.focus();
    return (false);
  }
}

function checknote(theForm)
{
  if (theForm.note.value == "")
  {
    alert("请输入该图片的注释信息！");
    theForm.note.focus();
    return (false);
  }
  if(theForm.note.value.length>12)
  {
    alert("图片的注释信息必须小于等于12个字符！");
    theForm.note.focus();
    return (false);
  }
}

function checkvote(theForm)
{
  if(theForm.T0.value == "")
  {
    alert("请输入调查主题！");
    theForm.T0.focus();
    return (false);
  }
  if(theForm.T_0.value == "")
  {
    alert("请输入调查的英文主题！");
    theForm.T_0.focus();
    return (false);
  }
  if(theForm.T1.value == "")
  {
    alert("请输入选项１！");
    theForm.T1.focus();
    return (false);
  }
  if(theForm.T_1.value == "")
  {
    alert("请输入英文选项１！");
    theForm.T_1.focus();
    return (false);
  }
  if(theForm.T2.value == "")
  {
    alert("请输入选项２！");
    theForm.T2.focus();
    return (false);
  }
  if(theForm.T_2.value == "")
  {
    alert("请输入英文选项２！");
    theForm.T_2.focus();
    return (false);
  }
  if(theForm.T3.value == "")
  {
    alert("请输入选项３！");
    theForm.T3.focus();
    return (false);
  }
  if(theForm.T_3.value == "")
  {
    alert("请输入英文选项３！");
    theForm.T_3.focus();
    return (false);
  }
}

function checkselect(theForm)
{
var trkChk=0;

for(i=0; i < theForm.length; i++)
{
if (theForm.elements[i].type == 'checkbox' && theForm.elements[i].name == 'id' && theForm.elements[i].checked)
{ trkChk++; }
}
if (trkChk>0)
return true;
else
{
alert("您没有选择任何项目。请选中您希望删除项目旁边的复选框。");
return false;
}
}

function mysubmit(theform)
{
    if(theform.pic.value=="")
    {
    	alert("请点击浏览按钮，选择您要上传的jpg或gif文件!")
    	theform.pic.focus;
    	return (false);
    }
    else
    {
    	str= theform.pic.value;
    	strs=str.toLowerCase();
    	lens=strs.length;
    	extname=strs.substring(lens-4,lens);
    	if(extname!=".jpg" && extname!=".gif")
    	{
    		alert("请选择jpg或gif文件！");
    		return (false);
    	}
    }
    return (true);
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function checksearch_p(theForm)
{
  if(theForm.Ro1.value != "")
  {
    if(isNaN(theForm.Ro1.value)){
      alert("Ro前缀必须为数值！");
      theForm.Ro1.focus();
      return (false);
    }
  }
  if(theForm.Ro2.value != "")
  {
    if(isNaN(theForm.Ro2.value)){
      alert("Ro后缀必须为数值！");
      theForm.Ro2.focus();
      return (false);
    }
  }
  if(theForm.Ro1.value != "" && theForm.Ro2.value != "")
  {
    if(jtrim(theForm.Ro1.value) > jtrim(theForm.Ro2.value)){
      alert("Ro前缀应小于等于后缀！");
      theForm.Ro1.focus();
      return (false);
    }
  }
  if(theForm.Ri1.value != "")
  {
    if(isNaN(theForm.Ri1.value)){
      alert("Ri前缀必须为数值！");
      theForm.Ri1.focus();
      return (false);
    }
  }
  if(theForm.Ri2.value != "")
  {
    if(isNaN(theForm.Ri2.value)){
      alert("Ri后缀必须为数值！");
      theForm.Ri2.focus();
      return (false);
    }
  }
  if(theForm.Ri1.value != "" && theForm.Ri2.value != "")
  {
    if(jtrim(theForm.Ri1.value) > jtrim(theForm.Ri2.value)){
      alert("Ri前缀应小于等于后缀！");
      theForm.Ri1.focus();
      return (false);
    }
  }
  if(theForm.T1.value != "")
  {
    if(isNaN(theForm.T1.value)){
      alert("T前缀必须为数值！");
      theForm.T1.focus();
      return (false);
    }
  }
  if(theForm.T2.value != "")
  {
    if(isNaN(theForm.T2.value)){
      alert("T后缀必须为数值！");
      theForm.T2.focus();
      return (false);
    }
  }
  if(theForm.T1.value != "" && theForm.T2.value != "")
  {
    if(Jtrim(theForm.T1.value) > Jtrim(theForm.T2.value)){
      alert("T前缀应小于等于后缀！");
      theForm.T1.focus();
      return (false);
    }
  }
  if(theForm.L1.value != "")
  {
    if(isNaN(theForm.L1.value)){
      alert("L前缀必须为数值！");
      theForm.L1.focus();
      return (false);
    }
  }
  if(theForm.L2.value != "")
  {
    if(isNaN(theForm.L2.value)){
      alert("L后缀必须为数值！");
      theForm.L2.focus();
      return (false);
    }
  }
  if(theForm.L1.value != "" && theForm.L2.value != "")
  {
    if(Jtrim(theForm.L1.value) > Jtrim(theForm.L2.value)){
      alert("L前缀应小于等于后缀！");
      theForm.L1.focus();
      return (false);
    }
  }
  if(theForm.W1.value != "")
  {
    if(isNaN(theForm.W1.value)){
      alert("W前缀必须为数值！");
      theForm.W1.focus();
      return (false);
    }
  }
  if(theForm.W2.value != "")
  {
    if(isNaN(theForm.W2.value)){
      alert("W后缀必须为数值！");
      theForm.W2.focus();
      return (false);
    }
  }
  if(theForm.W1.value != "" && theForm.W2.value != "")
  {
    if(Jtrim(theForm.W1.value) > Jtrim(theForm.W2.value)){
      alert("W前缀应小于等于后缀！");
      theForm.W1.focus();
      return (false);
    }
  }
  if(theForm.H1.value != "")
  {
    if(isNaN(theForm.H1.value)){
      alert("H前缀必须为数值！");
      theForm.H1.focus();
      return (false);
    }
  }
  if(theForm.H2.value != "")
  {
    if(isNaN(theForm.H2.value)){
      alert("H后缀必须为数值！");
      theForm.H2.focus();
      return (false);
    }
  }
  if(theForm.H1.value != "" && theForm.H2.value != "")
  {
    if(Jtrim(theForm.H1.value) > Jtrim(theForm.H2.value)){
      alert("H前缀应小于等于后缀！");
      theForm.H1.focus();
      return (false);
    }
  }
}

function checksearch_m(theForm)
{
  if(theForm.T11.value != "")
  {
    if(isNaN(theForm.T11.value)){
      alert("Br前缀必须为数值！");
      theForm.T11.focus();
      return (false);
    }
  }
  if(theForm.T12.value != "")
  {
    if(isNaN(theForm.T12.value)){
      alert("Br后缀必须为数值！");
      theForm.T12.focus();
      return (false);
    }
  }
  if(theForm.T11.value != "" && theForm.T12.value != "")
  {
    if(theForm.T11.value > theForm.T12.value){
      alert("Br前缀应小于等于后缀！");
      theForm.T11.focus();
      return (false);
    }
  }
  if(theForm.T21.value != "")
  {
    if(isNaN(theForm.T21.value)){
      alert("Hcb前缀必须为数值！");
      theForm.T21.focus();
      return (false);
    }
  }
  if(theForm.T22.value != "")
  {
    if(isNaN(theForm.T2.value)){
      alert("Hcb后缀必须为数值！");
      theForm.T22.focus();
      return (false);
    }
  }
  if(theForm.T21.value != "" && theForm.T22.value != "")
  {
    if(theForm.T21.value > theForm.T22.value){
      alert("Hcb前缀应小于等于后缀！");
      theForm.T21.focus();
      return (false);
    }
  }
  if(theForm.T31.value != "")
  {
    if(isNaN(theForm.T31.value)){
      alert("Hcj前缀必须为数值！");
      theForm.T31.focus();
      return (false);
    }
  }
  if(theForm.T32.value != "")
  {
    if(isNaN(theForm.T32.value)){
      alert("Hcj后缀必须为数值！");
      theForm.T32.focus();
      return (false);
    }
  }
  if(theForm.T31.value != "" && theForm.T32.value != "")
  {
    if(theForm.T31.value > theForm.T32.value){
      alert("Hcj前缀应小于等于后缀！");
      theForm.T31.focus();
      return (false);
    }
  }
  if(theForm.T41.value != "")
  {
    if(isNaN(theForm.T41.value)){
      alert("(BH)max前缀必须为数值！");
      theForm.T41.focus();
      return (false);
    }
  }
  if(theForm.T42.value != "")
  {
    if(isNaN(theForm.T42.value)){
      alert("(BH)max后缀必须为数值！");
      theForm.T42.focus();
      return (false);
    }
  }
  if(theForm.T41.value != "" && theForm.T42.value != "")
  {
    if(theForm.T41.value > theForm.T42.value){
      alert("(BH)max前缀应小于等于后缀！");
      theForm.T41.focus();
      return (false);
    }
  }
}

function checkquestionary(theForm)
{
  if(theForm.T0.value == "")
  {
    alert("请输入调查主题！");
    theForm.T0.focus();
    return (false);
  }
  if(theForm.T1.value == "")
  {
    alert("请输入选项１！");
    theForm.T1.focus();
    return (false);
  }
  if(theForm.T2.value == "")
  {
    alert("请输入选项２！");
    theForm.T2.focus();
    return (false);
  }
  if(theForm.T3.value == "")
  {
    alert("请输入选项３！");
    theForm.T3.focus();
    return (false);
  }
}
