var menu={bus:"1",dr:"1"};var state;var srchlist;oo=false;avBubble.height=325;avBubble.width=335;$("#srchlist").css("overflow-y","scroll");var busDefault=$("#bussrchDiv").html();var drvDefault=$("#allprocess").html();var lineDefault=$("#linesrchDiv").html();var srchDefault=$("#resultSrch").html();var hashsend=1;$(window).hashchange(function(){if(hashsend){ajse.init(location.hash)}else{hashsend=1}});$(document).keypress(function(a){if(a.keyCode==13){return false}});$("#resultSrch li>a").click(function(c){c.preventDefault();$("#fdKeyword").val(this.innerHTML);var a="#tab=se&for=sr&q="+encodeURIComponent(this.innerHTML)+"&w="+$("#pjmap").width()+"&h="+$("#pjmap").height()+"&c="+mbattr.cn()+"&z="+mbattr.zl()+"&s=1";hashsend=0;if($.browser.msie){$.locationHash(a)}else{location.hash=a}ajse.viewSrch=1;ajse.init(a)});showTip(pjtips.init);sizeCtrl.init([window,"#dituzhx"]);function elsize(a){var c=sizeCtrl.getAllSize();sizeCtrl.setAllSize({"#pjmapContainer,#pjmap":{width:(parseInt(c["#dituzhx"].width)+"px"),height:(parseInt(c[window].height)-60+"px")},"#srchlist":{height:(parseInt(c[window].height)-190+"px")},"#bussrchDiv":{height:(parseInt(c[window].height)-205+"px")},"#drresdiv":{height:(parseInt(c[window].height)-205+"px")}});poiCtrl.setPoi("#tips","57px",(parseInt(c["#dituzhx"].width)-300)/2+345+"px");if(a){maplet.resize($("#pjmap").width(),$("#pjmap").height())}}elsize();maplet=new Maplet("pjmap");maplet.centerAndZoom(new MPoint(mapGEO),mapZOOM);maplet.addControl(new MStandardControl());maplet.clickToCenter=false;maplet.setCursorStyle("default",img_URL+"/openhand.cur");maplet.setCursorStyle("move",img_URL+"/closedhand.cur");var uiee={cList:{0:["\u4ee5\u6b64\u4e3a\u8d77\u70b9",1],1:["\u4ee5\u6b64\u4e3a\u7ec8\u70b9",2],2:["\u67e5\u8be2\u9644\u8fd1\u516c\u4ea4\u7ad9\u70b9",2],3:["\u5468\u8fb9\u641c\u7d22",1],4:["\u67e5\u627e\u9644\u8fd1\u4f18\u60e0\u5546\u6237",4],5:["<img src='"+img_URL+"/uiee_zi.png' /> \u653e\u5927",1],6:["<img src='"+img_URL+"/uiee_zo.png' /> \u7f29\u5c0f",1],7:["<img src='"+img_URL+"/uiee_sc.png' /> \u5c45\u4e2d",2],8:["\u6e05\u9664\u641c\u7d22\u7ed3\u679c",3]},uArr:[],dArr:[],uObj:null,wh:"sr",hvQ:0,hvZ:0,hvL:0,hvS:0,hvB:0,hvD:0,sMk:null,bus:{qMk:null,zMk:null},dr:{qMk:null,zMk:null},init:function(){this.uObj=new MContextMenu();$.each(this.cList,function(d,a){if(a[1]==2||a[1]==4){var c=new MContextMenuItem(a[0],uiee["u"+d],1)}else{var c=new MContextMenuItem(a[0],uiee["u"+d])}uiee.uObj.addItem(c);if(a[1]==3||a[1]==4){uiee.disable(d)}uiee.uArr[d]=c});maplet.setContextMenu(this.uObj)},disable:function(a){if(this.uObj){this.uObj.disableItem(a);this.dArr.push(a)}if(a==8){uiee.change(0,"\u4ee5\u6b64\u4e3a\u8d77\u70b9");uiee.change(1,"\u4ee5\u6b64\u4e3a\u7ec8\u70b9")}},enable:function(a,c){if($.inArray(a+"",this.dArr)!=-1){this.uObj.enableItem(a,c)}},hide:function(){this.uObj.hide()},change:function(a,c){if(this.uObj){this.uObj.modifyItem(a,c)}},resetQZ:function(){uiee.hvQ=0;uiee.hvZ=0},pdYh:function(a){a=parseInt(a);if($.inArray(a,[187,188,195])!=-1&&maplet.getZoomLevel()>=8){uiee.enable(4,uiee.u4)}else{uiee.disable(4)}},u0:function(){var a=maplet.fP;if(uiee.bus.qMk){maplet.removeOverlay(uiee.bus.qMk)}if(uiee.dr.qMk){maplet.removeOverlay(uiee.dr.qMk)}uiee.hvQ=1;uiee.change(0,"\u4fee\u6539\u8d77\u70b9\u5230\u6b64\u5904");if(uiee.wh=="dr"){uiee.dr.qMk=new MMarker(new MPoint(a),new MIcon(img_URL+"/orig.gif",34,30,0,30));maplet.addOverlay(uiee.dr.qMk);ajse.jcqd=a;ajse.qName="\u5730\u56fe\u6240\u793a\u8d77\u70b9";wDrive.qkw="\u5730\u56fe\u6240\u793a\u8d77\u70b9";$("#qdkeyword").val("\u5730\u56fe\u6240\u793a\u8d77\u70b9");ajse.jczd?wDrive.panduan():null}else{uiee.bus.qMk=new MMarker(new MPoint(a),new MIcon(img_URL+"/orig.gif",34,30,0,30));maplet.addOverlay(uiee.bus.qMk);userPoint.city=$("#city").html();userPoint.ysqd=a;userPoint.orName="\u5730\u56fe\u6240\u793a\u8d77\u70b9";userPoint.origName="\u5730\u56fe\u6240\u793a\u8d77\u70b9";$("#busOrig").val("\u5730\u56fe\u6240\u793a\u8d77\u70b9");userPoint.bqd=1;userPoint.yszd?userPoint.panduanBu():null}},u1:function(){var a=maplet.fP;var c="\u8bf7\u8f93\u5165\u51fa\u53d1\u5730";if(uiee.bus.zMk){maplet.removeOverlay(uiee.bus.zMk)}if(uiee.dr.zMk){maplet.removeOverlay(uiee.dr.zMk)}uiee.hvZ=1;uiee.change(1,"\u4fee\u6539\u7ec8\u70b9\u5230\u6b64\u5904");if(uiee.wh=="dr"){uiee.dr.zMk=new MMarker(new MPoint(a),new MIcon(img_URL+"/dest.gif",34,30,0,30));maplet.addOverlay(uiee.dr.zMk);ajse.jczd=a;ajse.zName="\u5730\u56fe\u6240\u793a\u7ec8\u70b9";wDrive.zkw="\u5730\u56fe\u6240\u793a\u7ec8\u70b9";$("#zdkeyword").val("\u5730\u56fe\u6240\u793a\u7ec8\u70b9");ajse.jcqd?wDrive.panduan():null}else{uiee.bus.zMk=new MMarker(new MPoint(a),new MIcon(img_URL+"/dest.gif",34,30,0,30));maplet.addOverlay(uiee.bus.zMk);userPoint.city=$("#busCity").val();userPoint.yszd=a;userPoint.deName="\u5730\u56fe\u6240\u793a\u7ec8\u70b9";userPoint.destName="\u5730\u56fe\u6240\u793a\u7ec8\u70b9";$("#busDest").val("\u5730\u56fe\u6240\u793a\u7ec8\u70b9");userPoint.bzd=1;userPoint.ysqd?userPoint.panduanBu():null}},u2:function(){var a="#tab=bu&for=sa&poi="+maplet.fP+"&city="+encodeURIComponent($("#lineCity").val())+"&w="+$("#pjmap").width()+"&h="+$("#pjmap").height();hashsend=0;if($.browser.msie){$.locationHash(a)}else{location.hash=a}ajse.init(a)},u3:function(){var a="";var f="\u5730\u56fe\u53f3\u952e\u6807\u70b9";var e="\u5730\u56fe\u6240\u793a";var c=maplet.fP;a+='<div class="wyqTabs"><ul class="wTabNav"><li><span  class="selected" name="#wyqTab2" onclick="wyqTabs($(this).attr(\'name\'),this)">\u5468\u8fb9\u67e5\u8be2</span></li><li><span  name="#wyqTab1" onclick="wyqTabs($(this).attr(\'name\'),this)">\u516c\u4ea4/\u9a7e\u8f66</span></li>';a+="";a+='</ul><div id="wyqTab1" class="tabcont">';a+='<div class="tabitem top"><div class="itemleft">\u5230\u8fd9\u91cc\u6765</div><div class="itemcon">\u51fa\u53d1\u5730\uff1a<input type="text" class="inptext" id="FHinput"/><br/>\u76ee\u7684\u5730\uff1a'+f+'<br/><input id="FHbus" type="button" class="orng" value="\u516c\u4ea4\u65b9\u6848" onclick="tabDo.bus(\''+c+"',$('#FHinput').val(),'"+e+'\',1)"/><input id="FHdr" type="button" class="green" value="\u9a7e\u8f66\u5bfc\u822a" onclick="tabDo.dr(\''+c+"',$('#FHinput').val(),'"+e+'\',1)"/></div><div class="c"></div></div>';a+='<div class="tabitem"><div class="itemleft">\u4ece\u8fd9\u91cc\u51fa\u53d1</div><div class="itemcon">\u51fa\u53d1\u5730\uff1a'+f+'<br/>\u76ee\u7684\u5730\uff1a<input type="text"  class="inptext" id="THinput" /><br/><input id="THbus" type="button" class="orng" value="\u516c\u4ea4\u65b9\u6848" onclick="tabDo.bus(\''+c+"',$('#THinput').val(),'"+e+'\',0)"/><input id="THdr" type="button" class="green" value="\u9a7e\u8f66\u5bfc\u822a" onclick="tabDo.dr(\''+c+"',$('#THinput').val(),'"+e+"',0)\"/></div></div></div>";a+='<div id="wyqTab2" class="tabcont" style="display:block;"><div class="tabitem" style="padding-top:10px"><b>\u5728"\u6b64\u70b9"\u9644\u8fd1\u67e5\u627e</b></div><div class="tabitem"><div class="itemcon2" style="margin-left:12px"><input type="text" class="inptext" id="tabSC"/><input id="tabSB" class="orng" style="margin-left:5px;" type="button" value="\u5468\u8fb9\u67e5\u8be2" onclick="tabDo.se($(\'#tabSC\').val());"/><br /></div><div class="c"></div></div><div class="pjitem"><div class="pjhead" style="margin-top:7px;"><h2>\u70ed\u95e8\u5173\u952e\u8bcd</h2></div><div class="pjcont"><ul id="suglxl">';for(var d=0;d<hotKW.length;d++){a+='<li><a href="javascript:void(0);" onclick="tabDo.se($(this).html())">'+hotKW[d]+"</a></li>"}a+="</ul></div></div></div></div>";if(uiee.sMk){maplet.removeOverlay(uiee.sMk)}uiee.sMk=new MMarker(new MPoint(maplet.fP),new MIcon(img_URL+"/biaozhu.gif",20,20),new MInfoWindow("\u5468\u8fb9\u641c\u7d22",a));maplet.addOverlay(uiee.sMk);uiee.sMk.openInfoWindow();$("#srchArnd").focus()},u4:function(){$("#infotitle span").html("\u641c\u7d22\u7ed3\u679c");$("#infofoot>.rspage").hide();var a="#tab=se&for=sr&q=&w="+$("#pjmap").width()+"&h="+$("#pjmap").height()+"&c="+maplet.fP+"&z="+maplet.getZoomLevel()+"&t=3";if($.browser.msie){$.locationHash(a)}else{location.hash=a}ajse.init(a)},u5:function(){maplet.zoomIn()},u6:function(){maplet.zoomOut()},u7:function(){maplet.setCenter(maplet.fP)},u8:function(){maplet.clearOverlays();if(uiee.wh=="dr"){ajse.jcqd="";ajse.jczd="";ajse.zName="";ajse.qName="";wDrive.wyqData="";$("#allprocess").html(drvDefault);uiee.dr.qMk=null;uiee.dr.zMk=null;uiee.sMk=null;uiee.hvD=0}else{if(uiee.wh=="bus"){userPoint.ysqd="";userPoint.yszd="";userPoint.pois="";userPoint.deName="";userPoint.orName="";uiee.bus.qMk=null;uiee.bus.zMk=null;poiArr.length=0;$("#bussrchDiv").html(busDefault);uiee.hvB=0}else{if(uiee.wh=="ln"){$("#linesrchDiv").html(lineDefault);uiee.hvL=0}else{if(uiee.wh=="sr"){$("#resultSrch").html(srchDefault);uiee.hvS=0}}}}elsize();maplet?maplet.clearOverlays():null;uiee.disable(8);uiee.resetQZ();document.title="\u666e\u52a0\u5730\u56fe"}};$(window).resize(function(){elsize(1)});bpp[1]=18;$("#topmb").mousedown(function(c){var a=$("#pjmapContainer").offset();if(mbCtrl.mdyn){mbCtrl.start(c.pageX-a.left,c.pageY-a.top)}});$("#topmb").mousemove(function(c){var a=$("#pjmapContainer").offset();mbCtrl.move(c.pageX-a.left,c.pageY-a.top)});$("#topmb").mouseup(function(c){if(mbCtrl.moyn){var a=$("#fdKeyword").val();if(!a||(a=="\u5982\uff1a\u9910\u9986\uff0c\u5bbe\u9986\uff0c\u80af\u5fb7\u57fa")){setTimeout(function(){hksel.noval()},0)}else{setTimeout(function(){hksel.normal()},0)}c.stopPropagation()}else{c.stopPropagation()}});$("#kSrch").click(function(){if(this.src.replace(/^.*\//,"")=="onmap.gif"){mbCtrl.init();this.src=img_URL+"/onmap1.gif";this.blur();showTip(pjtips.search.forhk)}else{mbCtrl.end();this.src=img_URL+"/onmap.gif";this.blur();$("#float_cue").hide();showTip(pjtips.search.forinit)}});$(document).mouseup(function(c){if(mbCtrl.moyn){var a=$("#fdKeyword").val();if(!a||(a=="\u5982\uff1a\u9910\u9986\uff0c\u5bbe\u9986\uff0c\u80af\u5fb7\u57fa")){setTimeout(function(){hksel.noval()},0)}else{setTimeout(function(){hksel.normal()},0)}}});$(document).click(function(){$("#sugview").hide()});var hksel={dd:null,normal:function(){this.dd=mbCtrl.end();this.sr()},noval:function(){this.dd=mbCtrl.end(1);var a=this.dd[5]+320;if(a+247>$(window).width()){a=$(window).width()-247}poiCtrl.setPoi("#float_cue",this.dd[4],a);$("#float_cue").show()},sr:function(){var a="#tab=se&for=sr&q="+encodeURIComponent($("#fdKeyword").val())+"&w="+this.dd[0]+"&h="+this.dd[1]+"&dw="+this.dd[2]+"&dh="+this.dd[3]+"&c="+mbattr.cn()+"&z="+mbattr.zl()+"&s=1";hashsend=0;if($.browser.msie){$.locationHash(a)}else{location.hash=a}$("#kSrch").attr("src",img_URL+"/onmap.gif");ajse.init(a)}};$("#cue_button").click(function(){var a=$("#cue_input").val();if(!a||(a=="\u5982\uff1a\u9910\u9986\uff0c\u5bbe\u9986\uff0c\u80af\u5fb7\u57fa")){alert("\u8bf7\u8f93\u5165\u8981\u641c\u7d22\u7684\u5185\u5bb9");return}$(".mb").hide();$("#centmb").hide();$("#topmb").hide();$("#float_cue").hide();$("#fdKeyword").val($("#cue_input").val());hksel.sr()});$("#cue_button").keypress(function(a){});$("#sugclose").click(function(){$("#sugview").hide()});$("#fdKeyword").focus(function(d){if(this.value=="\u5982\uff1a\u9910\u9986\uff0c\u5bbe\u9986\uff0c\u80af\u5fb7\u57fa"){this.value=""}this.style.color="#000";showTip(pjtips.search.forinit);var a=$(this).offset().left;var c=$(this).offset().top+20;$("#sugview").css({top:c,left:a});pjsug.init("fdKeyword","kw")});$("#fdKeyword").blur(function(){if(this.value==""){this.value="\u5982\uff1a\u9910\u9986\uff0c\u5bbe\u9986\uff0c\u80af\u5fb7\u57fa";this.style.color="#aaa"}else{this.style.color="#000"}pjsug.uninit()});$("#cue_input").focus(function(a){if(this.value=="\u5982\uff1a\u9910\u9986\uff0c\u5bbe\u9986\uff0c\u80af\u5fb7\u57fa"){this.value=""}this.style.color="#000"});$("#cue_input").blur(function(){if(this.value==""){this.value="\u5982\uff1a\u9910\u9986\uff0c\u5bbe\u9986\uff0c\u80af\u5fb7\u57fa"}this.style.color="#aaa"});$("#busOrig,#qdkeyword").val("\u8bf7\u8f93\u5165\u8d77\u70b9").focus(function(a){if(this.value=="\u8bf7\u8f93\u5165\u8d77\u70b9"){this.value=""}this.style.color="#000"}).blur(function(){if(this.value==""){this.value="\u8bf7\u8f93\u5165\u8d77\u70b9";this.style.color="#aaa"}else{this.style.color="#000"}});$("#busDest,#zdkeyword").val("\u8bf7\u8f93\u5165\u7ec8\u70b9").focus(function(a){if(this.value=="\u8bf7\u8f93\u5165\u7ec8\u70b9"){this.value=""}this.style.color="#000"}).blur(function(){if(this.value==""){this.value="\u8bf7\u8f93\u5165\u7ec8\u70b9";this.style.color="#aaa"}else{this.style.color="#000"}});$("#lineKey").val("\u8bf7\u8f93\u5165\u7ad9\u70b9\u6216\u7ebf\u8def\u540d\u79f0").focus(function(a){if(this.value=="\u8bf7\u8f93\u5165\u7ad9\u70b9\u6216\u7ebf\u8def\u540d\u79f0"){this.value=""}this.style.color="#000"}).blur(function(){if(this.value==""){this.value="\u8bf7\u8f93\u5165\u7ad9\u70b9\u6216\u7ebf\u8def\u540d\u79f0";this.style.color="#aaa"}else{this.style.color="#000"}});$("#tabBus").click(function(){if($("#tabBus a img").attr("src")==img_URL+"/bq_carno.gif"){return false}mbCtrl.end();$("#kSrch").attr("src",img_URL+"/onmap.gif");userPoint.tab($(this).attr("page"),$(this).attr("el"),$(this).attr("wID"));typeChange.goBus();xCity.rHide();$("#float_cue").hide();userPoint.clsChng();$("#drFloat").hide();if(typeof lxlPoi!="undefined"&&lxlWhi=="bu"){maplet.centerAndZoom(lxlPoi,12);maplet.addOverlay(lxlPoiM);lxlPoiM.openInfoWindow()}return false});$("#tabSearch").click(function(){if($("#tabSearch a img").attr("src")==img_URL+"/bq_serchno.gif"){return false}ajse.clsLineDt();srchBack();$("#drFloat").hide();xCity.rHide();userPoint.clsChng();typeChange.goSrch();if((typeof lxlPoi!="undefined"&&lxlWhi=="se")&&lxlWhi==""&&uiee.hvS){maplet.centerAndZoom(lxlPoi,12);maplet.addOverlay(lxlPoiM);lxlPoiM.openInfoWindow()}return false});$("#tabDrive").click(function(){if($("#tabSearch a img").attr("src")==img_URL+"/bq_navno.gif"){return false}mbCtrl.end();$("#kSrch").attr("src",img_URL+"/onmap.gif");userPoint.clsChng();ajse.clsLineDt();$("#float_cue").hide();xCity.rHide();wDrive.tab($(this).attr("page"),$(this).attr("el"),$(this).attr("wID"));typeChange.goDr();if(typeof lxlPoi!="undefined"&&lxlWhi=="dr"){maplet.centerAndZoom(lxlPoi,12);maplet.addOverlay(lxlPoiM);lxlPoiM.openInfoWindow()}return false});$("#buTagL").click(function(){setBuType(2)});$("#searchView").click(function(){var c=$("#fdKeyword").val();$("#cue_input").val($("#fdKeyword").val());if(!c||(c=="\u5982\uff1a\u9910\u9986\uff0c\u5bbe\u9986\uff0c\u80af\u5fb7\u57fa")){alert("\u8bf7\u8f93\u5165\u8981\u641c\u7d22\u7684\u5185\u5bb9");return}if($("#topmb").css("display")=="block"){$("#kSrch").click()}var a="#tab=se&for=sr&q="+encodeURIComponent($("#fdKeyword").val())+"&w="+$("#pjmap").width()+"&h="+$("#pjmap").height()+"&c="+mbattr.cn()+"&z="+mbattr.zl()+"&s=1";hashsend=0;if($.browser.msie){$.locationHash(a)}else{location.hash=a}ajse.init(a)});$("#searchView").mousedown(function(){$("#searchView").attr("src",img_URL+"/btnsr_on.gif")});$("#searchView").mouseup(function(){$("#searchView").attr("src",img_URL+"/btnsr.gif")});$("#searchView").mouseout(function(){$("#searchView").attr("src",img_URL+"/btnsr.gif")});var markers=new Array;var sMarkers=new Array;function addPoint(d,e,f,a){var g=d+1;markers[d]=new MMarker(new MPoint(e),new MIcon(img_URL+"/search/"+g+"r.png",19,26,0,26));if(f&&a){markers[d].setInfoWindow(new MInfoWindow(f,a))}maplet.addOverlay(markers[d]);MEvent.addListener(markers[d],"mouseover",function(){$(".sel_roadshop").children().removeClass("WYQh");if($(".sel_roadshop").children().eq(d).hasClass("ssOrig")||$(".sel_roadshop").children().eq(d).hasClass("ssDest")){return false}else{$(".sel_roadshop").children().eq(d).addClass("WYQh")}});MEvent.addListener(markers[d],"mouseout",function(){$(".sel_roadshop").children().removeClass("WYQh")})}function sPoint(d,e,f,c){var a=String.fromCharCode(d+65);sMarkers[d]=new MMarker(new MPoint(e),new MIcon(img_URL+"/search/"+a+"11.png",18,27,9,27));if(f&&c){sMarkers[d].setInfoWindow(new MInfoWindow(f,c))}maplet.addOverlay(sMarkers[d]);MEvent.addListener(sMarkers[d],"mouseover",function(){var g=$("#srchlist").scrollTop();var h=$("#resitem"+d).offset().top-$("#resitem"+d).parent().offset().top;if(g>h||h+$("#resitem"+d).height()>$("#srchlist").height()+g){$("#srchlist").stop().animate({scrollTop:h},Math.abs(g-h)*2)}itemOver(d,"wyq")})}function srchBack(){maplet.clearOverlays();if(sMarkers.length==0||uiee.hvS==0){return false}$.each(sMarkers,function(a,c){maplet.addOverlay(c)});if($("#tabSearch").attr("center")){maplet.centerAndZoom(new MPoint($("#tabSearch").attr("center")),$("#tabSearch").attr("zoom"))}}function itemOver(d){var e="#resitem"+d;var c="#resimg"+d;var a=String.fromCharCode(d+65);$(e).addClass("itemon");$(c).attr({src:img_URL+"/search/"+a+"2.png"});if(typeof(sMarkers[d])!="undefined"&&$("#resultSrch").css("display")=="block"){for(wyq=0;wyq<10;wyq++){if(wyq!=d){itemOut(wyq,"wyq",null)}}sMarkers[d].icon.updateImage(img_URL+"/search/"+a+"21.png",18,27);sMarkers[d].icon.hilite()}fixPng()}function itemOut(d,f,g){if(f.contains){if(f.contains(g.toElement)){return}}var h="#resitem"+d;var c="#resimg"+d;var a=String.fromCharCode(d+65);$(h).removeClass("itemon");$(c).attr({src:img_URL+"/search/"+a+"1.png"});if(typeof(sMarkers[d])!="undefined"&&$("#resultSrch").css("display")=="block"){sMarkers[d].icon.updateImage(img_URL+"/search/"+a+"11.png",18,27);sMarkers[d].icon.hilite()}fixPng()}function showBubble(a){sMarkers[a].openInfoWindow()}function showVideo(f){var a="http://video.pujia.com/player/html/FlowPlayer.php?video_url=http://video2.pujia.com/video/"+f;var h="\u89c6\u9891\u64ad\u653e";var c=508;var g=390;var e=(window.screen.availHeight-30-g)/2;var d=(window.screen.availWidth-10-c)/2;window.open(a,h,"height="+g+",innerHeight="+g+",width="+c+",innerWidth="+c+",top="+e+",left="+d+",toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no,directories=no,")}function showVideoHlp(a){var g="\u89c6\u9891\u64ad\u653e";var c=640;var f=490;var e=(window.screen.availHeight-30-f)/2;var d=(window.screen.availWidth-10-c)/2;window.open(a,g,"height="+f+",innerHeight="+f+",width="+c+",innerWidth="+c+",top="+e+",left="+d+",toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no,directories=no,")}function addLine(g,f,c,e){var a=new Array;for(j=0;j<=g.length;j++){a[j]=new MPoint(g[j])}var h=new MBrush(c,e);h.style=f;h.bgcolor=c;h.transparency=80;var d=new MPolyline(a,h);maplet.addOverlay(d);return d}function addZQ(l,g,e,d){var k=new MMarker(new MPoint(l),new MIcon(img_URL+"/orig.gif",34,30,0,30));var c=new MMarker(new MPoint(g),new MIcon(img_URL+"/dest.gif",34,30,0,30));maplet.addOverlay(k);maplet.addOverlay(c);var f=new MLabel(e,0,30);MEvent.addListener(k,"mouseover",function(){k.setLabel(f)});MEvent.addListener(k,"mouseout",function(){k.setLabel()});var h=new MLabel(d,0,30);MEvent.addListener(c,"mouseover",function(){c.setLabel(h)});MEvent.addListener(c,"mouseout",function(){c.setLabel()})}function addPoi(e,d,c,f){var a=new MMarker(new MPoint(e),new MIcon(img_URL+"/"+d,c,f,c/2,f));maplet.addOverlay(a)}function addStatn(f,d,e){var a=new MMarker(new MPoint(f),new MIcon(img_URL+"/pbus.gif",20,20));maplet.addOverlay(a);var c=new MLabel(d,0,-20);if(typeof(e)!="undefined"){ajse.stArr[e]=a;ajse.lbArr[e]=c}MEvent.addListener(a,"mouseover",function(){a.setLabel(c);a.icon.img.firstChild.src=img_URL+"/pbuson.gif";a.icon.hilite()});MEvent.addListener(a,"mouseout",function(){a.setLabel();a.icon.img.firstChild.src=img_URL+"/pbus.gif";a.icon.hilite()});MEvent.addListener(a,"click",function(){maplet.setCenter(a.pt);maplet.setZoomLevel(11);a.setLabel(c);a.icon.img.firstChild.src=img_URL+"/pbuson.gif";a.icon.hilite()})}var cityOn;var poiArr=new Array;var walkArr=new Array;var stArr=new Array;$("#btnBus").click(function(){if($("#busOrig").val()!="\u5730\u56fe\u6240\u793a\u8d77\u70b9"){userPoint.bqd=0;userPoint.origName=$.trim($("#busOrig").val())}if($("#busDest").val()!="\u5730\u56fe\u6240\u793a\u7ec8\u70b9"){userPoint.bzd=0;userPoint.destName=$.trim($("#busDest").val())}userPoint.city=$("#busCity").val();userPoint.panduanBu()});$("#btnBus").mousedown(function(){$("#btnBus").attr("src",img_URL+"/btnbu_on.gif")});$("#btnBus").mouseup(function(){$("#btnBus").attr("src",img_URL+"/btnbu.gif")});$("#btnBus").mouseout(function(){$("#btnBus").attr("src",img_URL+"/btnbu.gif")});function setBuType(f){var d=$("#buTypeB");var e=$("#buTypeL");var k=$("#buTagB");var c=$("#buTagL");var h=$("#bussrchDiv");var a=$("#linesrchDiv");var g=$("#hchlinelist .sortype");if(f==1){e.hide();ajse.clsLineDt();d.show();g.show();c.removeClass("on");k.addClass("on");a.hide();h.show();uiee.wh="bus";if(userPoint.ysqd!=""){uiee.enable(8,uiee.u8);userPoint.tab($("#tabBus").attr("page"),$("#tabBus").attr("el"),$("#tabBus").attr("wID"))}else{uiee.disable(8)}showTip(pjtips.bus.forinit)}else{typeChange.goBus();uiee.wh="ln";$("#linesrchDiv").css("height",parseInt($("#srchlist").height())-15+"px");d.hide();e.show();k.removeClass("on");c.addClass("on");h.hide();a.show();g.hide();if(uiee.hvL){uiee.enable(8,uiee.u8)}else{uiee.disable(8)}if(ajse.ifmove==0){$("#pointmb").hide();$("#linedt").hide();userPoint.tab(null,null,null)}showTip(pjtips.bus.forbusline)}}$("#btnLine").click(function(){$("#linedt").hide();if($("#lineKey").val()==""){alert("\u8bf7\u8f93\u5165\u8981\u67e5\u8be2\u7684\u5173\u952e\u8bcd");$("#lineKey").focus();return}userPoint.clsChng();var a="#tab=bu&for=bl&key="+encodeURIComponent($("#lineKey").val())+"&city="+encodeURIComponent($("#lineCity").val());hashsend=0;if($.browser.msie){$.locationHash(a)}else{location.hash=a}ajse.init(a)});function srchHotLS(a,d){userPoint.clsChng();var c="#tab=bu&for=bl&key="+encodeURIComponent(a)+"&city="+encodeURIComponent(d);hashsend=0;if($.browser.msie){$.locationHash(c)}else{location.hash=c}ajse.init(c)}function setMoveMode(){maplet.setMode("pan");$("#tips").hide()}function showTip(a){$("#tip").html(a);$("#tips").show();$("#showmorepoi").toggle(function(){$("#morepoi").show();this.innerHTML="\u9690\u85cf";$("#shrinktip").hide()},function(){$("#morepoi").hide();this.innerHTML="\u70b9\u6b64\u663e\u793a\u66f4\u591a";$("#shrinktip").show()});$("#morepoi>div[latlon]").each(function(){$(this).bind("click",function(){maplet.clearOverlays(true);var g=null;var e=null;var d=null;var f=null;var c=null;d=new MPoint($(this).attr("latlon"));e=new MIcon(img_URL+"/biaozhu.gif",20,20);c="\u7c7b\u578b\uff1a"+$(this).attr("type")+"<br />\u5730\u533a\uff1a"+$(this).attr("dist");if($(this).attr("address").search(/\{\{.*?\}\}/)==-1){c+="<br />\u5730\u5740\uff1a"+$(this).attr("address")}f=new MInfoWindow(this.innerHTML,c);g=new MMarker(d,e,f);maplet.addOverlay(g);maplet.centerAndZoom(d,12)})})}$("#shrinktip").click(function(){$("#tips").animate({width:80,left:"+=110px"},100);$("#tip").hide();$(this).hide();$("#expandtip").show()});$("#expandtip").click(function(){$("#tips").animate({width:300,left:"-=110px"},100);$("#tip").show();$(this).hide();$("#shrinktip").show()});$("#drCh").click(function(){wDrive.cIt()});ajse.init(location.hash);listener=MEvent.addListener(maplet,"pan",xCity.timer);$("#wprovince").click(function(c){$("#map_float").hide();$("#drFloat").hide();if($("#subchengshi").attr("what")=="province"&&$("#subchengshi").css("display")=="block"){$("#subchengshi").hide()}else{$("#subchengshi").attr("what","province");var a=poiCtrl.getPoi(this);var d=$("#province").html().length*5+26;poiCtrl.setPoi("#subchengshi",a.top+20,a.left-d);c.stopPropagation();xCity.what("province")}});$("#wcity").click(function(c){$("#map_float").hide();$("#drFloat").hide();if($("#subchengshi").attr("what")=="city"&&$("#subchengshi").css("display")=="block"){$("#subchengshi").hide()}else{$("#subchengshi").attr("what","city");var a=poiCtrl.getPoi(this);poiCtrl.setPoi("#subchengshi",a.top+20,a.left-36);c.stopPropagation();xCity.what("city")}});$("#wcounty").click(function(c){$("#map_float").hide();$("#drFloat").hide();if($("#subchengshi").attr("what")=="county"&&$("#subchengshi").css("display")=="block"){$("#subchengshi").hide()}else{$("#subchengshi").attr("what","county");var a=poiCtrl.getPoi(this);var d=$("#county").html().length*5+26;poiCtrl.setPoi("#subchengshi",a.top+20,a.left-d);c.stopPropagation();xCity.what("county")}});$("#qMove").click(function(a){xCity.rHide();xCity.qMove();$("#drFloat").hide();a.stopPropagation()});$("#map_float").click(function(a){a.stopPropagation()});$("a[latlon]").click(function(){if(this.id=="province"){var d=xCity.cityID();var c=xCity.showMe(d,city);$("#city").html(c[0][0]).attr({latlon:c[0][1],wyq:c[0][2],title:"\u663e\u793a"+c[0][0]+"\u5730\u56fe"});b=xCity.showMe(c[0][2],county);$("#county").html(b[0][0]).attr({latlon:b[0][1],wyq:b[0][2],title:"\u663e\u793a"+b[0][0]+"\u5730\u56fe"});MEvent.removeListener(listener);maplet.centerAndZoom($(this).attr("latlon"),5);listener=MEvent.addListener(maplet,"pan",xCity.timer)}if(this.id=="city"){MEvent.removeListener(listener);var d=xCity.countyID();c=xCity.showMe(d,county);$("#county").html(c[0][0]).attr({latlon:c[0][1],wyq:c[0][2],title:"\u663e\u793a"+c[0][0]+"\u5730\u56fe"});maplet.centerAndZoom($(this).attr("latlon"),8);listener=MEvent.addListener(maplet,"pan",xCity.timer)}if(this.id=="home"){MEvent.removeListener(listener);maplet.centerAndZoom($(this).attr("latlon"),2);listener=MEvent.addListener(maplet,"pan",xCity.timer);$("#province").html("\u9655\u897f\u7701").attr({latlon:"HCBDVGZURIDUIB",wyq:"27",title:"\u663e\u793a\u9655\u897f\u7701\u5730\u56fe"}).parent().show();$("#city").html("\u54b8\u9633\u5e02").attr({latlon:"HBJWBFZUREBEDJ",wyq:"383",title:"\u663e\u793a\u54b8\u9633\u5e02\u5730\u56fe"}).parent().show();$("#county").html("\u6cfe\u9633\u53bf").attr({latlon:"HBIGCGZURTCDAI",title:"\u663e\u793a\u6cfe\u9633\u53bf\u5730\u56fe"}).parent().show()}});$("#county").click(function(){MEvent.removeListener(listener);maplet.centerAndZoom($(this).attr("latlon"),10);listener=MEvent.addListener(maplet,"pan",xCity.timer)});$(".provin").hover(function(){$(this).parent().removeClass("subcity").addClass("chshslect")},function(){if($("#subchengshi").attr("what")!=""||$("#subchengshi").attr("what")!=$(this).parent().children().attr("id")){$(this).parent().removeClass("chshslect").addClass("subcity")}});$(".provin").mouseout(function(){if($("#subchengshi").attr("what")==$(this).parent().children().attr("id")&&$("#subchengshi").css("display")=="block"){$(this).parent().removeClass("subcity").addClass("chshslect")}});$("#driveB").click(function(){wDrive.panduan()});$("#drFloat").click(function(a){a.stopPropagation()});$(".xdr").click(function(g){xCity.rHide();$("#map_float").hide();g.stopPropagation();a0=this;var h="#"+a0.id;var f=poiCtrl.getPoi(h);var d=xCity.showMe(1,province);var c='<div id="hotcity"><div class="pleaseCity" >\u70ed\u95e8\u57ce\u5e02\uff1a </div><span class="closeImg" onclick="$(\'#drFloat\').hide()"><img  src="http://a.pojaaimg.cn/ditu/1/images/gb_x.gif"/></span><br/><span class="drcity" name="1" geo="HEUIDVZVVHUEEU">\u5317\u4eac\u5e02</span><span class="drcity" name="188" geo="IATIUCZVVSGITT">\u9752\u5c9b\u5e02</span><span class="drcity"  name="9" geo="IJUAFCZVIWCHCU">\u4e0a\u6d77\u5e02</span><span class="drcity"  name="126" geo="IEHJWFZVGCVHFH">\u5357\u4eac\u5e02</span><span class="drcity"  name="249" geo="IJRITJZUABUIWR">\u5e7f\u5dde\u5e02</span><span class="drcity" name="251" geo="ISTTBUZUAHSIHT">\u6df1\u5733\u5e02</span><span class="drcity" name="22" geo="HFJGGJZTWRVGSJ">\u91cd\u5e86\u5e02</span><span class="drcity" name="221" geo="HWUGBAZUUAIWIU">\u6b66\u6c49\u5e02</span><br/><span class="drcity" name="139" geo="IJEGDBZVFIIBHE">\u676d\u5dde\u5e02</span><span class="drcity" name="195" geo="HSRDHJZVJWASDR">\u6cf0\u5b89\u5e02</span><span class="drcity" name="187" geo="HRSDGJZVRHFFUS">\u6d4e\u5357\u5e02</span><span class="drcity" name="2" geo="HHDVGAZVVJDBGD">\u5929\u6d25\u5e02</span><span class="drcity" name="327" geo="HACDDEZTUJCFEC">\u6210\u90fd\u5e02</span><span class="drcity" name="71" geo="HTRVESZWTBVUBR">\u6c88\u9633\u5e02</span><span class="drcity" name="72" geo="HVFCCSZWEWAFWF">\u5927\u8fde\u5e02</span><span class="drcity" name="94" geo="HSJFDTZBAHARIGJ">\u54c8\u5c14\u6ee8\u5e02</span></div><div id="drw"><span style="float:left">\u5176\u4ed6\u57ce\u5e02\uff1a</span><br /><div id="w9"><select id="xpr" name="xpr"><option value="0" selected="selected">\u8bf7\u9009\u62e9\u7701\u4efd</option>';for(i=0;i<d.length;i++){c+='<option value="'+d[i][2]+'" name="'+d[i][2]+'">'+d[i][0]+"</option>"}c+='</select></div><div id="w00"></div></div>';poiCtrl.setPoi("#drFloat",f.top+25,f.left);$("#drFloat").empty().html(c).show().find(".drcity").click(function(){$(a0).parent().prev().val($(this).html());maplet.centerAndZoom(new MPoint($(this).attr("geo")),8);$("#drFloat").hide()});$("#xpr").change(function(){if($.inArray(this.value,["1","2","9","22","32","33","34"])!=-1){$(a0).parent().prev().val($("#xpr :selected").html());for(p in province[1][this.value]){maplet.centerAndZoom(new MPoint(province[1][this.value][p]),7)}$("#drFloat").hide()}else{var a=xCity.showMe(parseInt(this.value),city);var e='<select id="xcs"><option value="0" selected="selected">\u8bf7\u9009\u62e9\u5730\u5e02</option>';for(n=0;n<a.length;n++){e+='<option value="'+a[n][2]+'" name="'+a[n][2]+'">'+a[n][0]+"</option>"}e+="</select>";$("#w00").html(e);$("#xcs").change(function(){$(a0).parent().prev().val($("#xcs :selected").html());for(p in city[$("#xpr").val()][this.value]){maplet.centerAndZoom(new MPoint(city[$("#xpr").val()][this.value][p]),8)}$("#drFloat").hide()})}})});function showLineDet(c,a,e){var d="#tab=bu&for=bt&name="+encodeURI(a)+"&city="+encodeURI(e)+"&w="+$("#pjmap").width()+"&h="+$("#pjmap").height();hashsend=0;if($.browser.msie){$.locationHash(d)}else{location.hash=d}ajse.init(d)}function showBubBus(a){$("#all").queue(function(){showBubble(a);$(".wTabNav >li").eq(2).children().click();$(this).dequeue()})}setInterval(function(){$.ajax({type:"POST",data:"h=1",url:"/hash.php",success:cssHash})},180000);function cssHash(a){$("#hash").val(a)}uiee.init();
