function indexcheckform(){
    var obj = document.search.wd;     
    var re = validateFirstName(obj);
    switch(re){
       case 1:
         {
          alert('搜索字符过长！');
          document.search.wd.focus();
          return false;
         }
       case -1:
         {
          return false;
         }
       case 2:
         {
          alert('搜索非法字符！');
          document.search.wd.focus();
          return false;
         }
        return true;
    }
  }
  
  //搜索函数
	
	function so(obj){
	  if(obj == 0){
	    document.getElementById("0").innerHTML = '<b style="color:#000000">产品</b>';
	    document.search.action="http://www.wtianx.com/spro.aspx";
	  }else{
	     document.getElementById("0").innerHTML = '<a href="http://www.wtianx.com/pro.aspx" title="查询产品信息" onclick="return so(0)">产品</a>';
	  }
	  if(obj == 1){
	   document.getElementById("1").innerHTML = '<b style="color:#000000">供应</b>';
	   document.search.action="http://www.wtianx.com/sbiz.aspx";
	   document.search.t.value="0";
	  }else{
	   document.getElementById("1").innerHTML = '<a href="http://www.wtianx.com/gy.aspx" title="查询供应信息" onclick="return so(1)">供应</a>';
	  }
	  if(obj == 2){
	   document.getElementById("2").innerHTML = '<b style="color:#000000">求购</b>';
	   document.search.action="http://www.wtianx.com/sbiz.aspx";
	   document.search.t.value="1";
	  }else{
	   document.getElementById("2").innerHTML = '<a href="http://www.wtianx.com/qg.aspx" title="查询求购信息" onclick="return so(2)">求购</a>';
	  }
	  if(obj == 3){
	   document.getElementById("3").innerHTML = '<b style="color:#000000">合作</b>';
	   document.search.action="http://www.wtianx.com/sbiz.aspx";
	   document.search.t.value="2";
	  }else{
	   document.getElementById("3").innerHTML = '<a href="http://www.wtianx.com/hz.aspx" title="查询合作信息" onclick="return so(3)">合作</a>';
	  }
	  if(obj == 4){
	   document.getElementById("4").innerHTML = '<b style="color:#000000">代理</b>';
	   document.search.action="http://www.wtianx.com/sbiz.aspx";
	   document.search.t.value="3";
	  }else{
	   document.getElementById("4").innerHTML = '<a href="http://www.wtianx.com/dl.aspx" title="查询代理信息" onclick="return so(4)">代理</a>';
	  }
	  if(obj == 5){
	   document.getElementById("5").innerHTML = '<b style="color:#000000">公司</b>';
	   document.search.action="http://www.wtianx.com/scompany.aspx";
	  }else{
	   document.getElementById("5").innerHTML = '<a href="http://www.wtianx.com/company.aspx" title="查询公司信息" onclick="return so(5)">公司</a>';
	  }
	return false;
	}
