function jtrim(str)
{     while (str.charAt(0)==" ")
          {str=str.substr(1);}      
     while (str.charAt(str.length-1)==" ")
         {str=str.substr(0,str.length-1);}
     return(str);
}

	
function doQuery1(){
   var url = "http://bit.sz-map.com/emap/bitmap/szmap/index_tc.htm?actionid=keyQuery&poName="+document.all.queryName.value;
   window.open(url,'zdframe','width=1000,top=10,left=10,height=680,resizable=1');
}
function roadQuery(){
 	 if (document.all.roadName.value == "点击输入查询的路名" || document.all.roadName.value == ""){
 	 	 //alert("请输入查询信息！");
 	 	 return;
 	 }
  var url = "http://bit.sz-map.com/emap/bitmap/szmap/index_tc.htm?actionid=roadQuery&poName="+document.all.roadName.value;
   window.open(url,'zdframe','width=1000,top=10,left=10,height=680,resizable=1');
 }
                              
function gjquery(){
   if (document.all.gjqdinput.value =="" || document.all.gjzdinput.value=="" || document.all.gjqdinput.value =="点击输入出发位置" || document.all.gjzdinput.value=="点击输入目的地"){
     return;
   }
   var url = "http://bit.sz-map.com/emap/bitmap/gjhc.htm?busStartName="+document.all.gjqdinput.value+"&busEndName="+document.all.gjzdinput.value;
   window.open(url,'gjframe','width=528,top=10,left=10,height=435');
}

function xlquery(){
   if (document.all.station.value ==""){
     return;
   }
   var url = "http://bit.sz-map.com/emap/bitmap/szmap/index_tc.htm?actionid=gjxl&poName="+document.all.station.value;
   window.open(url,'zdframe','width=1000,top=10,left=10,height=680,resizable=1');
}

function zdquery(){
   if (document.all.zdInput.value ==""){
     return;
   }
   var url = "http://bit.sz-map.com/emap/bitmap/szmap/index_tc.htm?actionid=gjzd&poName="+document.all.zdInput.value;
   window.open(url,'zdframe','width=1000,top=10,left=10,height=680,resizable=1');
}

function KeySearch(){
   if (document.all.keyInput.value ==""){
     return;
   }
	 	 var url;
	 	 var ztstr=document.all.selSearchSort.value;
	 	 
	 	 if(ztstr.indexOf("TM_ROADC")!=-1){
	 	 var rn=document.all.keyInput.value;;
          url="http://maps.sz-map.com/emap/topicmaps/sztest/map?functionID=roadQuery&bufferName="+rn+"&inputName="+rn+"&queryType=roadQuery&forward=outroad.jsp&bufferLayerName=道路中心线";

	 	 }else{
            url = "http://maps.sz-map.com/emap/topicmaps/sztest/map?queryType=000&queryLayer="+ztstr+"&functionID=queryFromDB&forward=queryResult2.jsp&insName="+document.all.keyInput.value;
		 }
	//	 alert(url);
    	window.open(url,'keyframe','channelmode=0,directories =0,screenX=0,screenY=0,left=845,top=95,width=185,height=450,resizable=0,titlebar=yes,toolbar=0,menubar=0,status =1,location=0,scrollbars=yes');
		 

}