function submitFormjump(str,totleNum){
  var nums=totleNum;
  var content=document.getElementById("jump").value;
  var reg=/^[0-9]*$/;
  if(content==''){
	alert("������Ҫ��ת�uڼ�ҳ");
  }else if(!reg.test(content)){
	alert("ֻ����������");
  }else{
  	  if(str=="product_"||str=="news_"||str=="job_"||str=="supply_"||str=="file_"){
  	  	  if(content<=1){
		  	content='';
		  	str=str.split("_")[0];
		  }else if(content>=nums){
		  	if(nums==1){
		  		content='';
		  		str=str.split("_")[0];
		  	}else{
		  		content=nums;
		  	}
		  }
  	  }else{
	  	  if(content<=1){
		  	content=1;
		  }else if(content>=nums){
		  	if(nums==1){
		  		content=nums;
		  		str=str.split("_")[0];
		  	}else{
		  		content=nums;
		  	}
		  }
  	  }
	  window.location.href=""+str+content+".html";
  }
}
function enterListener(str,totleNum){
	if (event.keyCode == 13){
       	submitFormjump(str,totleNum);
   	}
}
function check(f){
	var regArray=new Array("~","～","`","·","｀","!","！","@",
         "＠","#","＃","$","＄","%","％","^","＾","&","＆","*","＊","(","（",")","）","-","－","_","＿",
         "!","<",">","=","＝","＋","{","｛","}","｝","[","【","［","]","］","】","＼","、","|","×",
         "｜","＇","“","”","‘","’","'",";","；","：",":","?","？","／","/","、","，",".","。","．","<","＜","《","》",
         ">","＞"); 
	if(f.name.value==''){
		return false;
	}else{
	　for(var i=1;i<=regArray.length;i++){
                if (f.name.value.indexOf(regArray[i])>=0){
                       alert("搜索关键字不可以包含：" + regArray[i]);
                       f.name.focus();
                       return false;
                }
         }
       f.submit();
	}
}
