//--检测搜索的安全性-->

	   function doSearch() {

	      var keywords = trim(document.searchForm.keywords.value);
		 // var direction = document.searchForm.direction.value;

          if(keywords == "") {
		    alert("请输入关键字！");
			document.searchForm.keywords.focus();
		    return false;
		  } 
		  
		  
		  
		 }

           function trim(inputString) {
	   
              if (typeof inputString != "string") { return inputString; }
              var retValue = inputString;
              var ch = retValue.substring(0, 1);
              while (ch == " ") { 
	          //检查字符串开始部分的空格
                  retValue = retValue.substring(1, retValue.length);
                  ch = retValue.substring(0, 1);
              }
              ch = retValue.substring(retValue.length-1, retValue.length);
              while (ch == " ") {
                 //检查字符串结束部分的空格
                 retValue = retValue.substring(0, retValue.length-1);
                 ch = retValue.substring(retValue.length-1, retValue.length);
              }
              while (retValue.indexOf("  ") != -1) { 
	         //将文字中间多个相连的空格变为一个空格
                 retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); 
              }
              return retValue;
           } 

//-->
 document.write("<form id=\"form1\" method=\"post\" action=\"../Search/search.aspx\", content=\"text/html; charset=utf-8\"> ");
 document.write("<input  name=\"keyword\" type=\"text\" class=\"src_inpurt\" value=\"请输入您感兴趣的产品\" onclick=\"javascript:if(this.value.substring(0,3)=='请输入') this.value=''\" /><select name=\"type\" style=\" float: left; margin-left: 5px;\"><option value='supply' selected >供应信息</option><option value='purchase'>求购信息</option><option value='company'>公司库</option><option value='news'>行业资讯</option></select><input id=\"Sub1\" type=\"image\" value=\"\" src=\"/images/search.gif\" style=\" float:left; margin-left: 5px;\" /></form>");

	

