var img_URL="http://a.pojaaimg.cn/ditu/1/images";String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")};String.prototype.ltrim=function(){return this.replace(/(^s*)/g,"")};String.prototype.rtrim=function(){return this.replace(/(s*$)/g,"")};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(e,c){c||(c=0);var d=this.length;if(c<0){c=d+c}for(;c<d;c++){if(this[c]===e){return c}}return -1}}var hotKW=["\u5bbe\u9986","\u996d\u5e97","\u5a31\u4e50","\u4f4f\u5bbf","ATM","\u94f6\u884c","\u4f11\u95f2","\u52a0\u6cb9\u7ad9","\u533b\u9662"];var listener=null;var timer=null;$(document).click(function(){xCity.rHide();$("#map_float").hide();$("#drFloat").hide()});function wyqTabs(c,d){$(".wyqTabs > div").hide();$(".wyqTabs > div").filter(c).show();$("ul.wTabNav span").removeClass("selected");$(d).addClass("selected")}var tabDo={dr:function(f,c,e,d){if(c==""||c==null){alert("\u8bf7\u586b\u5199\u5b8c\u6574\u67e5\u8be2\u5185\u5bb9");return}typeChange.goDr();maplet.clearOverlays();if(d){ajse.jczd=f;ajse.zName=e;$("#qdkeyword").val(c);$("#zdkeyword").val(e);wDrive.sOrig();wDrive.pd=1}else{ajse.jcqd=f;ajse.qName=e;$("#qdkeyword").val(e);$("#zdkeyword").val(c);wDrive.sDest()}},se:function(c){c=$.trim(c);if(c==""){alert("\u8bf7\u586b\u5199\u641c\u7d22\u5185\u5bb9");return}var d="#tab=se&for=sr&q="+encodeURIComponent(c)+"&w="+$("#pjmap").width()+"&h="+$("#pjmap").height()+"&c="+mbattr.cn()+"&z="+mbattr.zl()+"&s=1&t=1";hashsend=0;if($.browser.msie){$.locationHash(d)}else{location.hash=d}ajse.viewSrch=1;ajse.init(d);return},bus:function(f,c,e,d){if(c==""||c==null){alert("\u8bf7\u586b\u5199\u5b8c\u6574\u67e5\u8be2\u5185\u5bb9");return}userPoint.city=xCity.hideDiv();typeChange.goBus();setBuType(1);maplet.clearOverlays();if(d){$("#busOrig").val(c);$("#busDest").val(e);userPoint.origName=c;userPoint.deName=userPoint.destName=e;userPoint.yszd=f;userPoint.sOrig();userPoint.pd=1}else{$("#busOrig").val(e);$("#busDest").val(c);userPoint.orName=userPoint.origName=e;userPoint.destName=c;userPoint.ysqd=f;userPoint.sDest()}},wHtml:function(h,j,o,k,l,g,c,e){var f="";f+='<div class="wyqTabs"><ul class="wTabNav"><li><span class="selected" name="#wyqTab0" onclick="wyqTabs($(this).attr(\'name\'),this)">\u7b80\u4ecb</span></li><li><span 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>';f+="";f+='</ul><div id="wyqTab0" class="tabcont" ><div class="bubble">';if(h!=null){f+="<div class='bubblePic'><img src='"+h+"'/></div>"}f+="<div class='bubbleTxt'>"+j+"</div>";if(o){f+="<div class='bubbleDet'>\u5730\u5740:"+o+"</div>"}if(k){f+="<div class='bubbleDet'>\u7535\u8bdd:"+k+"</div>"}f+="</div>";if(c){f+="<a style='float:right' target='_blank' href='"+c+"'>\u8be6\u7ec6\u4fe1\u606f>></a>"}f+='</div><div id="wyqTab1" class="tabcont">';var m=l.substring(0,10)+(l.length>10?"...":"");f+='<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'+m+'<br/><input id="FHbus" type="button" class="orng" value="\u516c\u4ea4\u65b9\u6848" onclick="tabDo.bus(\''+g+"',$('#FHinput').val(),'"+l+'\',1)"/><input id="FHdr" type="button" class="green" value="\u9a7e\u8f66\u5bfc\u822a" onclick="tabDo.dr(\''+g+"',$('#FHinput').val(),'"+l+'\',1)"/></div><div class="c"></div></div>';f+='<div class="tabitem"><div class="itemleft">\u4ece\u8fd9\u91cc\u51fa\u53d1</div><div class="itemcon">\u51fa\u53d1\u5730\uff1a'+m+'<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(\''+g+"',$('#THinput').val(),'"+l+'\',0)"/><input id="THdr" type="button" class="green" value="\u9a7e\u8f66\u5bfc\u822a" onclick="tabDo.dr(\''+g+"',$('#THinput').val(),'"+l+"',0)\"/></div></div></div>";f+='<div id="wyqTab2" class="tabcont"><div class="tabitem" style="padding-top:10px"><b>\u5728"'+m+'"\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="\u89c6\u91ce\u5185\u641c\u7d22" 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++){f+='<li><a href="javascript:void(0);" onclick="tabDo.se($(this).html())">'+hotKW[d]+"</a></li>"}f+="</ul></div></div></div></div>";return f}};function setCookie(c,d){if(cookie_city[d]){var e=new Date();e.setDate(e.getDate()+30);document.cookie=c+"="+escape(cookie_city[d])+";expires="+e.toGMTString()+";path=/;domain=pujia.com"}}var xCity={qCity:"",timer:function(){if(timer){clearTimeout(timer)}timer=setTimeout(xCity.changeCity,700)},rHide:function(){$(".chshslect").removeClass("chshslect").addClass("subcity");$("#subchengshi").hide()},qMove:function(){xCity.qCity=xCity.hideDiv();var d=$('<div id="map_top"><p>\u5c06\u5730\u56fe\u79fb\u52a8\u81f3\uff1a<strong>'+xCity.qCity+'</strong></p><a href="javascript:void(0);" onclick="$(\'#map_float\').hide();" ><img src="/images/gb_x.gif"  alt="\u5173\u95ed"/></a></div><div id="map_bottom"><input type="text" id="mText" name="wyqMove" onkeypress="kp(event,this.id);" value="\u8bf7\u8f93\u5165\u5efa\u7b51/\u5730\u6807/\u9053\u8def"onfocus="if(value==\'\u8bf7\u8f93\u5165\u5efa\u7b51/\u5730\u6807/\u9053\u8def\') {value=\'\'}" onblur="if (value==\'\') {value=\'\u8bf7\u8f93\u5165\u5efa\u7b51/\u5730\u6807/\u9053\u8def\'}"/><div id="mbutton"><input type="button"  id="mButton" value="\u786e\u5b9a" /></div></div>');var c=poiCtrl.getPoi("#qMove");$("#map_float").empty().append(d).show();poiCtrl.setPoi("#map_float",c.top+18,c.left);$("#mButton").click(this.qMoveDo)},qMoveDo:function(){var c=$.trim($("#mText").val());if(c==""){alert("\u8bf7\u586b\u5199\u641c\u7d22\u4fe1\u606f");$("#mText").focus();return false}$("#map_float").hide();$.ajax({type:"POST",url:"/api/move.php",data:"ci="+encodeURI(xCity.qCity)+"&kw="+encodeURI(c),beforeSend:function(){showTip(pjtips.qMove.search)},success:xCity.movesucc})},movesucc:function(data){var temp=eval("("+data+")");if(!temp){return}if(!temp.cg){showTip(pjtips.qMove.forfail(temp.keyword));return}maplet.clearOverlays(true);if(temp.exact=="y"){for(var p=0;p<temp.pois.length;p++){xCity.markpoi(temp,p)}maplet.setAutoZoom();showTip(pjtips.qMove.forexact(temp.keyword))}else{xCity.markpoi(temp,0);maplet.setAutoZoom();showTip(pjtips.qMove.forsug(temp))}$(".mb").hide();$("#centmb").hide();$("#topmb").hide();$("#float_cue").hide();$("#kSrch").attr("src",img_URL+"/onmap.gif")},markpoi:function(e,h){var j=null;var f=null;var d=null;var g=null;var c=null;d=new MPoint(e.pois[h].latlon);f=new MIcon("http://a.pojaaimg.cn/ditu/1/images/biaozhu.gif",20,20);c="\u7c7b\u578b\uff1a"+e.pois[h].type;if(e.pois[h].dist.search(/\{\{.*?\}\}/)==-1){c+="<br />\u5730\u533a\uff1a"+e.pois[h].dist}if(e.pois[h].address.search(/\{\{.*?\}\}/)==-1){c+="<br />\u5730\u5740\uff1a"+e.pois[h].address}g=new MInfoWindow(e.pois[h].name,c);j=new MMarker(d,f,g);maplet.addOverlay(j)},showMe:function(d,g){var f=0;var e=new Array();for(i in g[d]){e[f]=new Array();for(n in g[d][i]){e[f][0]=n;e[f][1]=g[d][i][n];e[f][2]=i}f++}return e},changeCity:function(){$.ajax({type:"POST",url:"/api/inverse.php",data:"c="+mbattr.cn(),success:function(data){var temp=eval("("+data+")");if(!temp){return}if(temp.city){cityOn=temp.city}else{cityOn=""}if(!temp.province&&!temp.city&&!temp.county){$("#province").parent().show();$("#province").html("\u8bf7\u9009\u62e9\u7701");$("#city").parent().hide();$("#county").parent().hide()}else{$("#province").html(temp.province).attr({latlon:temp.pL,wyq:temp.prid,title:"\u663e\u793a"+temp.province+"\u5730\u56fe"});if(temp.city!=""){$("#city").html(temp.city).attr({latlon:temp.cL,wyq:temp.ciid,title:"\u663e\u793a"+temp.city+"\u5730\u56fe"});uiee.pdYh(parseInt(temp.ciid))}if(temp.county!=""){$("#county").html(temp.county).attr({latlon:temp.dL,wyq:temp.coid,title:"\u663e\u793a"+temp.county+"\u5730\u56fe"})}xCity.showDiv();xCity.hideDiv()}if(temp.county==""){$("#county").parent().hide()}}})},what:function(c){$(".chshslect").removeClass("chshslect").addClass("subcity");if(c=="city"){this.docity()}if(c=="province"){this.doprov()}if(c=="county"){this.docounty()}},doprov:function(){this.setShowDiv();$("#province").parent().removeClass("subcity").addClass("chshslect");var c=this.showMe(1,province);var d="";for(i=0;i<c.length;i++){d+="<div class='itemchsh'><a href='javascript:void(0);'   onClick='xCity.setCenter(this.id,\""+c[i][0]+'","prov","'+c[i][1]+"\")'    id='"+c[i][2]+"'>"+c[i][0]+"</a></div>"}$(".citylist").html(d);$(".close_city").click(function(){xCity.rHide()})},docity:function(){this.setShowDiv();$("#city").parent().removeClass("subcity").addClass("chshslect");var e=this.cityID();var c=this.showMe(e,city);var d="";for(i=0;i<c.length;i++){d+="<div class='itemchsh'><a href='javascript:void(0);'  onClick='xCity.setCenter(this.id,\""+c[i][0]+'","city","'+c[i][1]+"\")'   id='"+c[i][2]+"'>"+c[i][0]+"</a></div>"}$(".citylist").html(d);$(".close_city").click(function(){xCity.rHide()})},docounty:function(){var e=this.countyID();$("#county").parent().removeClass("subcity").addClass("chshslect");this.setShowDiv();var c=this.showMe(e,county);var d="";for(i=0;i<c.length;i++){d+="<div class='itemchsh'><a href='javascript:void(0);'   onClick='xCity.setCenter(this.id,\""+c[i][0]+'","county","'+c[i][1]+"\")'   id='"+c[i][2]+"'>"+c[i][0]+"</a></div>"}$(".citylist").html(d);$(".close_city").click(function(){xCity.rHide()})},setShowDiv:function(){$("#subchengshi").show().click(function(c){c.stopPropagation()})},cityID:function(){return $("#province").attr("wyq")},countyID:function(){return $("#city").attr("wyq")},hideDiv:function(){var d=this.cityID();var c=$("#province").html();if(d==="9"||d==="1"||d==="2"||d==="22"){$("#city").parent().hide();$("#lineCity").val(c);$("#busCity").val(c);return c}else{if(d==="34"||d==="32"||d==="33"){$("#wcounty").hide();$("#city").parent().hide();$("#lineCity").val(c);$("#busCity").val(c);return c}else{$("#lineCity").val($("#city").html());$("#busCity").val($("#city").html());return $("#city").html()}}},showDiv:function(){if($("#province").parent().css("display")=="none"){$("#province").parent().show()}if($("#city").parent().css("display")=="none"){$("#city").parent().show()}if($("#wcounty").css("display")=="none"){$("#wcounty").show()}if($("#county").html()!=""){$("#county").parent().show()}},setCenter:function(f,c,e,d){switch(e){case"prov":$("#province").html(c).attr({latlon:d,wyq:f,title:"\u663e\u793a"+c+"\u5730\u56fe"});a=this.showMe(f,city);$("#city").html(a[0][0]).attr({latlon:a[0][1],wyq:a[0][2],title:"\u663e\u793a"+a[0][0]+"\u5730\u56fe"});uiee.pdYh(parseInt(a[0][2]));b=this.showMe(a[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"});this.showDiv();this.hideDiv();MEvent.removeListener(listener);if($.inArray(f,["1","2","9","22","32","33","34"])!=-1){maplet.centerAndZoom(d,8)}else{maplet.centerAndZoom(d,5)}listener=MEvent.addListener(maplet,"pan",xCity.timer);if($.inArray(f,["1","2","9","22","32","33","34"])!=-1){setCookie("custom_domain",f)}break;case"city":$("#city").html(c).attr({latlon:d,wyq:f,title:"\u663e\u793a"+c+"\u5730\u56fe"});a=this.showMe(f,county);uiee.pdYh(parseInt(f));$("#county").html(a[0][0]).attr({latlon:a[0][1],wyq:a[0][2],title:"\u663e\u793a"+a[0][0]+"\u5730\u56fe"});this.showDiv();this.hideDiv();MEvent.removeListener(listener);maplet.centerAndZoom(d,8);listener=MEvent.addListener(maplet,"pan",xCity.timer);setCookie("custom_domain",f);break;case"county":$("#county").html(c).attr({latlon:d,wyq:f,title:"\u663e\u793a"+c+"\u5730\u56fe"});this.showDiv();this.hideDiv();MEvent.removeListener(listener);maplet.centerAndZoom(d,10);listener=MEvent.addListener(maplet,"pan",xCity.timer);break}xCity.rHide()}};pjtips={init:"\u6b22\u8fce\u4f7f\u7528\u666e\u52a0\u5730\u56fe",search:{forinit:"\u60a8\u53ef\u4ee5\u76f4\u63a5\u5728\u89c6\u91ce\u8303\u56f4\u5185\u641c\u7d22\u76f8\u5173\u5185\u5bb9\uff0c\u4e5f\u53ef\u4ee5\u5728\u5730\u56fe\u4e0a\u5212\u6846\u8fdb\u884c\u7cbe\u51c6\u641c\u7d22",forhk:"\u60a8\u73b0\u5728\u53ef\u4ee5\u5728\u5730\u56fe\u4e0a\u5212\u6846\uff0c\u641c\u7d22\u6846\u9009\u8303\u56f4\u5185\u7684\u76f8\u5173\u5185\u5bb9,\u6216\u8005<a href='javascript:void(0)' onclick='$(\"#kSrch\").click()'>\u53d6\u6d88</a>",forfail:function(c){return"<p style='font-weight:bold;padding:5px;'>\u62b1\u6b49\uff0c\u5728\u60a8\u9009\u62e9\u7684\u533a\u57df\u5185\u6ca1\u6709\u627e\u5230\u4e0e <span style='color:#f60;'>"+c+"</span> \u76f8\u5173\u7684\u4fe1\u606f\u3002</p><p style='padding:5px;'>\u666e\u52a0\u662f\u6c11\u751f\u4fe1\u606f\u4e92\u52a8\u5e73\u53f0\u3002\u4e3b\u8981\u6536\u5f55\u4e0e\u8001\u767e\u59d3\u751f\u6d3b\u606f\u606f\u76f8\u5173\u7684\u5b9e\u7528\u4fe1\u606f\u3002\u6db5\u76d6\u4e86\u9910\u996e\u4f4f\u5bbf\u3001\u4f11\u95f2\u5a31\u4e50\u3001\u8d2d\u7269\u65c5\u884c\u3001\u6253\u6298\u4f18\u60e0\u3001\u5de5\u519c\u4e1a\u7269\u54c1\u3001\u5de5\u5546\u4e1a\u670d\u52a1\u3001\u5b66\u6821\u3001\u533b\u9662\u3001\u94f6\u884c\u3001ATM\u3001\u82b1\u5e97\u3001\u5bb6\u653f\u3001\u7535\u5f71\u9662\u3001\u52a0\u6cb9\u7ad9\u7b49\u5404\u7c7b\u6c11\u751f\u4fe1\u606f\u3002\u6545\u666e\u52a0\u4e0d\u63d0\u4f9b\u4e0e\u6c11\u751f\u4fe1\u606f\u65e0\u5173\u7684\u4fe1\u606f\u68c0\u7d22\u670d\u52a1\u3002</p><p style='font-weight:bold;padding:5px;'>\u666e\u52a0\u5efa\u8bae\u60a8\uff1a</p><ul><li>\u68c0\u67e5\u67e5\u8be2\u7684\u5185\u5bb9\u662f\u5426\u5c5e\u4e8e\u6c11\u751f\u4fe1\u606f</li><li>\u67e5\u770b\u8f93\u5165\u7684\u6587\u5b57\u662f\u5426\u6709\u8bef</li><li>\u6269\u5927\u641c\u7d22\u5730\u533a\u7684\u8303\u56f4</li><li>\u53bb\u6389\u53ef\u80fd\u4e0d\u5fc5\u8981\u7684\u5b57\u8bcd\u6216\u6807\u70b9\uff0c\u5982\u201c\u7684\u201d\u3001\u201c\u548c\u201d\u7b49</li><li>\u53c2\u8003&nbsp;<a href='http://www.pujia.com/help' target='_blank'>\u5e2e\u52a9\u4e2d\u5fc3</a></li></ul>"}},bus:{forinit:"\u60a8\u53ef\u4ee5\u5728\u5de6\u4fa7\u8f93\u5165\u6846\u4e2d\u8f93\u5165\u8d77\u7ec8\u70b9\uff0c\u4e5f\u53ef\u4ee5\u76f4\u63a5\u5728\u5730\u56fe\u4e0a\u53f3\u952e\u9009\u62e9",forbusline:"\u60a8\u53ef\u4ee5\u5728\u5de6\u4fa7\u8f93\u5165\u6846\u4e2d\u8f93\u5165\u8981\u67e5\u8be2\u7684\u7ebf\u8def\u6216\u7ad9\u70b9<br />",forfail:function(c){for(p in pjblist){if(c==pjblist[p]){return"<p style='font-weight:bold;'>\u62b1\u6b49\uff0c\u5728\u60a8\u641c\u7d22\u7684\u533a\u57df\u5185\u6ca1\u6709\u627e\u5230\u5408\u9002\u7684\u516c\u4ea4\u7ebf\u8def\u3002</p><p style='font-weight:bold;'>\u666e\u52a0\u5efa\u8bae\u60a8\uff1a</p><ul><li>\u67e5\u770b\u8f93\u5165\u6587\u5b57\u662f\u5426\u6709\u8bef</li><li>\u68c0\u67e5\u8bbe\u7f6e\u7684\u8d77\u70b9\u3001\u7ec8\u70b9\u662f\u5426\u4f4d\u4e8e\u540c\u4e00\u57ce\u5e02</li><li>\u53bb\u6389\u53ef\u80fd\u4e0d\u5fc5\u8981\u7684\u5b57\u8bcd\u6216\u6807\u70b9\uff0c\u5982\u201c\u7684\u201d\u3001\u201c\u548c\u201d\u7b49</li><li>\u53c2\u8003&nbsp;<a href='http://www.pujia.com/help' target='_blank'>\u5e2e\u52a9\u4e2d\u5fc3</a></li><ul>"}}return"<p style='font-weight:bold;'>\u62b1\u6b49\uff0c\u201c<span style='color:#f60;'>"+c+"</span>\u201d\u7684\u516c\u4ea4\u4fe1\u606f\u7cfb\u7edf\u6682\u672a\u6536\u5f55\u3002\u666e\u52a0\u5efa\u8bae\u60a8\u5230<a href='http://liaozhai.pujia.com/forumdisplay.php?fid=3829' target='_blank'>\u666e\u52a0\u5730\u56fe\u658b</a>\uff0c\u54a8\u8be2\u60a8\u9700\u8981\u7684\u516c\u4ea4\u7ebf\u8def\u4fe1\u606f</p>"}},drive:{forinit:"\u60a8\u53ef\u4ee5\u5728\u5de6\u4fa7\u8f93\u5165\u6846\u4e2d\u8f93\u5165\u8d77\u7ec8\u70b9\uff0c\u4e5f\u53ef\u4ee5\u76f4\u63a5\u5728\u5730\u56fe\u4e0a\u53f3\u952e\u9009\u62e9",forfail:"<p style='font-weight:bold;'>\u62b1\u6b49\uff0c\u5728\u60a8\u641c\u7d22\u7684\u533a\u57df\u5185\u6ca1\u6709\u627e\u5230\u5408\u9002\u7684\u9a7e\u8f66\u65b9\u6848\u3002</p><p style='font-weight:bold;'>\u666e\u52a0\u5efa\u8bae\u60a8\uff1a</p><ul><li>\u67e5\u770b\u8f93\u5165\u6587\u5b57\u662f\u5426\u6709\u8bef</li><li>\u53bb\u6389\u53ef\u80fd\u4e0d\u5fc5\u8981\u7684\u5b57\u8bcd\u6216\u6807\u70b9\uff0c\u5982\u201c\u7684\u201d\u3001\u201c\u548c\u201d\u7b49</li><li>\u53c2\u8003&nbsp;<a href='http://www.pujia.com/help' target='_blank'>\u5e2e\u52a9\u4e2d\u5fc3</a></li><ul>"},qMove:{search:"\u6b63\u5728\u67e5\u627e\u2026\u2026",forfail:function(c){return"\u6ca1\u6709\u67e5\u627e\u5230\u4e0e<b>"+c+"</b>\u76f8\u5173\u7684\u4f4d\u7f6e"},forexact:function(c){return"\u56fe\u793a\u4e3a<b>"+c+"</b>\u7684\u4f4d\u7f6e"},forsug:function(c){if(c.cg==1){return"\u56fe\u793a\u4e3a\u4e0e<b>"+c.keyword+"</b>\u76f8\u5173\u7684\u4f4d\u7f6e"}else{var d="\u56fe\u793a\u4e3a\u4e0e<b>"+c.keyword+"</b>\u76f8\u5173\u7684\u4f4d\u7f6e<a href='javascript:void(0)' id='showmorepoi' style='margin-left:10px;'>\u70b9\u6b64\u663e\u793a\u66f4\u591a</a>"}d+="<div id='morepoi'>";for(var e=0;e<c.pois.length;e++){d+='<div latlon="'+c.pois[e].latlon+'" address="'+c.pois[e].address+'" dist="'+c.pois[e].dist+'" type="'+c.pois[e].type+'">'+c.pois[e].name+"</div>"}d+="<div style='clear:both;width:0;height:0;'/></div><br />";return d}},tools:{formea:"\u60a8\u53ef\u4ee5\u4f7f\u7528\u9f20\u6807\u5728\u5730\u56fe\u4e0a\u6d4b\u91cf\u4e24\u5730\u70b9\u95f4\u7684\u8def\u7ebf\u8ddd\u79bb<br/><a href='javascript:void(0)' onclick='setMoveMode()'>\u53d6\u6d88\u6d4b\u8ddd</a>",forsnap:"\u60a8\u53ef\u4ee5\u7528\u9f20\u6807\u5728\u5730\u56fe\u4e0a\u5212\u6846\u622a\u56fe\uff0c\u4fdd\u5b58\u60a8\u9700\u8981\u7684\u5730\u56fe\u4fe1\u606f<br/><a href='javascript:void(0)' onclick='setMoveMode()'>\u53d6\u6d88\u622a\u56fe</a>"}};var sqzd={geo:"",mark:"",qmark:"",zmark:"",qd:0,zd:0,ct:"",addqd:function(){this.qd=1;if($("#contDrive").css("display")=="block"){ajse.jcqd=this.geo;$("#qdkeyword").val("\u5730\u56fe\u6240\u793a\u8d77\u70b9");ajse.qName="\u5730\u56fe\u6240\u793a\u8d77\u70b9"}if($("#contBus").css("display")=="block"){var c=maplet.getZoomLevel();if(c<6){alert("\u5730\u56fe\u7f29\u653e\u7ea7\u522b\u592a\u5c0f\uff0c\u8bf7\u653e\u5927\u5730\u56fe\u518d\u6807\u70b9");return false}else{userPoint.ysqd=this.geo;userPoint.bqd=1;userPoint.origName="\u5730\u56fe\u6240\u793a\u8d77\u70b9";userPoint.orName="\u5730\u56fe\u6240\u793a\u8d77\u70b9";$("#busOrig").val("\u5730\u56fe\u6240\u793a\u8d77\u70b9")}}if(this.qmark!=""){maplet.removeOverlay(this.qmark)}this.qmark=new MMarker(new MPoint(this.geo),new MIcon("http://a.pojaaimg.cn/ditu/1/images/orig.gif",34,30,0,30));maplet.addOverlay(this.qmark);this.addol()},addzd:function(){this.zd=1;if($("#contDrive").css("display")=="block"){ajse.jczd=this.geo;$("#zdkeyword").val("\u5730\u56fe\u6240\u793a\u7ec8\u70b9");ajse.zName="\u5730\u56fe\u6240\u793a\u7ec8\u70b9"}if($("#contBus").css("display")=="block"){var c=maplet.getZoomLevel();if(c<6){alert("\u5730\u56fe\u7f29\u653e\u7ea7\u522b\u592a\u5c0f\uff0c\u8bf7\u653e\u5927\u5730\u56fe\u518d\u6807\u70b9");return false}else{userPoint.yszd=this.geo;userPoint.bzd=1;userPoint.destName="\u5730\u56fe\u6240\u793a\u7ec8\u70b9";userPoint.deName="\u5730\u56fe\u6240\u793a\u7ec8\u70b9";$("#busDest").val("\u5730\u56fe\u6240\u793a\u7ec8\u70b9")}}if(this.zmark!=""){maplet.removeOverlay(this.zmark)}this.zmark=new MMarker(new MPoint(this.geo),new MIcon("http://a.pojaaimg.cn/ditu/1/images/dest.gif",34,26,0,30));maplet.addOverlay(this.zmark);this.addol()},clear:function(){maplet.clearOverlays();if($("#allprocess").css("display")!="none"){menu.dr="1";$("#tabDrive").attr({page:"",el:"",wID:""});ajse.jcqd="";ajse.jczd="";$("#allprocess").html(drvDefault);$("#drresdiv").css("height",parseInt($("#srchlist").height())-15+"px");$("#allprocess .sortype").hide();$("#qdkeyword").val("\u8bf7\u8f93\u5165\u8d77\u70b9").css("color","#aaa");$("#zdkeyword").val("\u8bf7\u8f93\u5165\u7ec8\u70b9").css("color","#aaa")}if($("#buTypeB").css("display")!="none"){menu.bus="1";$("#tabBus").attr({page:"",el:"",wID:""});userPoint.yszd="";userPoint.ysqd="";userPoint.city="";$("#bussrchDiv").html(busDefault);$("#bussrchDiv").css("height",parseInt($("#srchlist").height())-15+"px");$("#bussrchDiv .sortype").hide();$("#busOrig").val("\u8bf7\u8f93\u5165\u8d77\u70b9").css("color","#aaa");$("#busDest").val("\u8bf7\u8f93\u5165\u7ec8\u70b9").css("color","#aaa")}if($("#buTypeL").css("display")!="none"){ajse.clsLineDt();$("#linesrchDiv").html(lineDefault)}},addol:function(){var e=sizeCtrl.getSize("#pjmap");if(($("#allprocess").css("display")!="none")&&ajse.jcqd&&ajse.jczd){var c="#tab=dr&for=dr&orig="+ajse.jcqd+"&dest="+ajse.jczd+"&qcity="+encodeURI($("#qdcity").val())+"&zcity="+encodeURI($("#zdcity").val())+"&qkeyword="+encodeURI($("#qdkeyword").val())+"&zkeyword="+encodeURI($("#zdkeyword").val())+"&q="+encodeURI(ajse.qName)+"&z="+encodeURI(ajse.zName)+"&width="+e.width+"&height="+e.height;hashsend=0;if($.browser.msie){$.locationHash(c)}else{location.hash=c}ajse.init(c)}else{if(($("#contBus").css("display")!="none")&&userPoint.ysqd&&userPoint.yszd){var d=maplet.measDistance([new MPoint(userPoint.ysqd),new MPoint(userPoint.yszd)]);if(d<=500){$("#bussrchDiv").html("\u60a8\u9009\u62e9\u7684\u8d77\u70b9\u548c\u7ec8\u70b9\u8ddd\u79bb\u5f88\u8fd1\uff0c\u6b65\u884c\u7ea6"+d+"\u7c73\u5373\u53ef\u5230\u8fbe\u3002");maplet.clearOverlays();addZQ(userPoint.ysqd,userPoint.yszd,userPoint.orName,userPoint.deName);addLine([userPoint.ysqd,userPoint.yszd],1,"#1f9b1d",4)}else{var c="#tab=bu&for=bu&p1="+userPoint.ysqd+"&p2="+userPoint.yszd+"&t1="+encodeURI(userPoint.origName)+"&t2="+encodeURI(userPoint.destName)+"&n1="+encodeURI(userPoint.orName)+"&n2="+encodeURI(userPoint.deName)+"&w="+$("#pjmap").width()+"&h="+$("#pjmap").height()+"&city="+encodeURI($("#busCity").val());hashsend=0;if($.browser.msie){$.locationHash(c)}else{location.hash=c}ajse.init(c)}}}},sarnd:function(){var c="#tab=bu&for=sa&poi="+this.geo+"&city="+encodeURIComponent($("#lineCity").val())+"&w="+$("#pjmap").width()+"&h="+$("#pjmap").height();hashsend=0;if($.browser.msie){$.locationHash(c)}else{location.hash=c}ajse.init(c)}};function kp(c,d){if(c.keyCode==13){switch(d){case"srch":$("#searchView").click();break;case"bcity":$("#busOrig").focus();break;case"borig":$("#busOrig").blur();$("#busDest").focus();break;case"bdest":$("#busDest").blur();$("#btnBus").click();break;case"lcity":$("#lineKey").focus();break;case"lkey":$("#lineKey").blur();$("#btnLine").click();break;case"mText":$("#mButton").click();break;case"cue_input":$("#cue_button").click();break;case"jcgorig":$("#jcgorig").click();break;case"jcgdest":$("#jcgdest").click();break;case"chngdest":$("#chngdest").click();break;case"chngorig":$("#chngorig").click();break}}}var ajse={srha:"",viewSrch:0,jcqd:"",jczd:"",zName:"",qName:"",jsonData:"",bSta:0,bEnd:5,stArr:new Array,lbArr:new Array,blcid:0,ifmove:0,init:function(e){sqzd.qd=0;sqzd.zd=0;this.srha=e;var c=e.substr(12,2);var d=e.substr(15);if(!e||e=="#"){return false}else{if("p"==e.charAt(1)){fromPCC(e)}else{if("w"==e.charAt(1)){fromWhere(e)}else{if("q"==e.charAt(1)){typeChange.goSrch();this._keysrch(e.substr(1)+"&c="+mbattr.cn()+"&z="+mbattr.zl()+"&ha="+$("#hash").val())}else{if("sr"==c){typeChange.goSrch();if(typeof srajax!="undefined"){srajax.abort()}this._keysrch(d+"&ha="+$("#hash").val())}else{if("dr"==c){typeChange.goDr();this.yd(d)}else{if("bu"==c){typeChange.goBus();this.bs(d)}else{if("bl"==c){typeChange.goBus();setBuType(2);this.bl(d)}else{if("bp"==c){this.bp(d)}else{if("bt"==c){typeChange.goBus();setBuType(2);this.bt(d)}else{if("sa"==c){typeChange.goBus();setBuType(2);this.sa(d)}}}}}}}}}}}},jq:function(){this.srha=(this.srha.lastIndexOf("&s=")==-1)?this.srha+"&s=1":this.srha;var c=this.srha.lastIndexOf("&s=")+3;return this.srha.substring(0,c)},_keysrch:function(c){srajax=$.ajax({type:"POST",url:"/api/nbs4index.php",data:c,loading:this.showLoad(),success:this.showResult})},bs:function(c){ajse.bSta=0;ajse.bEnd=5;$.ajax({type:"POST",url:"/api/bussearch.php",data:c,loading:this.showBusLoad(),success:this.showBus})},bl:function(c){$.ajax({type:"POST",url:"/api/linesearch.php",data:c,loading:this.lineSrchLoad(),success:this.lineSrch})},bt:function(str){$.ajax({type:"POST",url:"/api/linedetail.php",data:str,beforeSend:function(){$("#pointmb").height($("#srchlist").height()-42);$("#pointmb").html("<img src='http://a.pojaaimg.cn/ditu/1/images/loading.gif' />").show()},success:function(json){var htmlBack="";json=eval("("+json+")");if(json.pois.length==1){htmlBack+="<div class='xl_title'><b>\u7ebf\u8def\u4fe1\u606f: </b><a href='javascript:void(0)' onclick='ajse.clsLineDt()'>\u5173\u95ed</a></div><div class='bLine' style='height:"+(parseInt($("#srchlist").height())-75)+"px'>";htmlBack+="<div>\u6682\u65e0\u6570\u636e</div></div>";$("#linedt").show().html(htmlBack)}else{htmlBack+="<div class='xl_title'><b>\u7ebf\u8def\u4fe1\u606f: </b><a href='javascript:void(0)' onclick='ajse.clsLineDt()'>\u5173\u95ed</a></div><div class='bLine' style='height:"+(parseInt($("#srchlist").height())-75)+"px'><div class='item_xldetail'>";htmlBack+="<dl class='xlu_info'><dt>"+decodeURI(json.infos.name)+"</dt></dl>";htmlBack+="<dl class='xlu_info'><dt>\u7968\u5236\uff1a</dt><dd>"+json.infos.type+"</dd></dl>";htmlBack+="<dl class='xlu_info'><dt>\u5168\u7a0b\u7968\u4ef7\uff1a</dt><dd>"+json.infos.fee+"</dd></dl>";htmlBack+="<dl class='xlu_info'><dt>\u8d77\u70b9\u7ad9\u9996\u672b\u8f66\u65f6\u95f4\uff1a</dt><dd>"+json.infos.begin+"</dd></dl>";htmlBack+="<dl class='xlu_info'><dt>\u7ec8\u70b9\u7ad9\u9996\u672b\u8f66\u65f6\u95f4\uff1a</dt><dd>"+json.infos.finish+"</dd></dl></div>";htmlBack+="<div class='item_xldetail'><div class='xl_t0'><b>\u9014\u7ecf\u516c\u4ea4\u7ad9\u70b9\uff1a</b></div><div class='xlu_sitenum'><dl>";$.each(json.statns,function(i,statn){htmlBack+="<dt>"+(i+1)+"</dt><dd><a href='javascript:void(0)' alt="+statn.name+" title="+statn.name+" onclick='ajse.hoverSt("+i+")' onmouseover='ajse.onSt("+i+")'  onmouseout='ajse.outSt("+i+")'>"+statn.name+"</a></dd>"});htmlBack+="<div class='c'></div></dl><div class='c'></div></div><div class='c' style='height:5px'></div></div></div>";$("#linedt").show().html(htmlBack);maplet.clearOverlays(true);ajse.stArr.length=0;$.each(json.statns,function(k,st){addStatn(st.latlon,st.name,k)});maplet.setAutoZoom();addLine(json.pois,0,"#f92f0e",4);document.title="\u7ebf\u8def\u4fe1\u606f\uff1a"+decodeURI(json.infos.name)+"\u2014\u666e\u52a0\u5730\u56fe"}}})},sa:function(c){$.ajax({type:"POST",url:"/api/poiaround.php",data:c,loading:this.lineSrchLoad(),success:this.StatnAround})},yd:function(c){$.ajax({url:"/api/drive.php",data:c,beforeSend:function(){$("#drresdiv").html("<div class='srchload'>\u6b63\u5728\u52a0\u8f7d\u9a7e\u8f66\u4fe1\u606f\u2026\u2026</div>").show()},success:this.showdr})},showLoad:function(){$("#resultSrch").html("<div class='srchload'>\u6b63\u5728\u67e5\u627e...</div>")},showResult:function(json){if(json=="error"){$("#resultSrch").html("\u60a8\u77ed\u65f6\u95f4\u5185\u53d1\u9001\u4e86\u592a\u591a\u8bf7\u6c42,\u7a0b\u5e8f\u81ea\u52a8\u5224\u65ad\u60a8\u7684\u884c\u4e3a\u5c5e\u6076\u610f\u884c\u4e3a\u3002\u5982\u679c\u60a8\u786e\u5b9a\u60a8\u662f\u5728\u6b63\u5e38\u4f7f\u7528\uff0c\u8bf7\u60a8\u5230<a href='http://liaozhai.pujia.com/forumdisplay.php?fid=3829' target='_blank'>\u666e\u52a0\u5730\u56fe\u658b</a>\u54a8\u8be2\u76f8\u5173\u89e3\u51b3\u529e\u6cd5\uff0c\u7ed9\u60a8\u9020\u6210\u4e0d\u4fbf\uff0c\u8bf7\u539f\u8c05\u3002");return}json=eval("("+json+")");sMarkers=[];total=json.params.total;keyword=json.params.keyword;perpage=json.params.perpage;page=json.params.page;sMarkers.center=json.params.center;sMarkers.scale=json.params.scale;srchlist="";maplet.clearOverlays(true);$("#tips").hide();uiee.hvS=1;uiee.enable(8,uiee.u8);document.title="\u641c\u7d22["+keyword+"]\u7684\u7ed3\u679c\u2014\u666e\u52a0\u5730\u56fe";if(total>0){if(typeof lxlPoi!="undefined"&&(lxlWhi=="se"||lxlWhi=="")){delete lxlWhi;delete lxlPoiM;delete lxlPoi}if(json.params.type=="brief"){srchlist+="<div class='states'>\u4ee5\u4e0b\u662f\u666e\u52a0\u5728\u60a8\u9650\u5b9a\u7684\u8303\u56f4\u5185\u627e\u5230\u7684\u4e0e\u201c<b>"+keyword+"</b>\u201d\u76f8\u5173\u7684\u4fe1\u606f,\u5171"+total+"\u4e2a\u7ed3\u679c";if(total>10){if(total-(page-1)*10==1){srchlist+="\uff0c\u8fd9\u662f\u7b2c "+((page-1)*10+1)+" \u4e2a\u7ed3\u679c</div>"}else{if(total-(page-1)*10<=10){srchlist+="\uff0c\u8fd9\u662f\u7b2c "+((page-1)*10+1)+"-"+(total)+" \u4e2a\u7ed3\u679c</div>"}else{srchlist+="\uff0c\u8fd9\u662f\u7b2c "+((page-1)*10+1)+"-"+(page*10)+" \u4e2a\u7ed3\u679c</div>"}}}else{srchlist+="</div>"}$.each(json.results,function(i,result){var title=(result.name==null)?"\u65e0\u6807\u9898\u4fe1\u606f":result.name.substring(0,16)+(result.name.length>16?"...":"");var html=tabDo.wHtml(null,(result.contact?result.contact:"")+"<br />\u5730\u5740\uff1a"+result.address,null,null,title,result.latlon,null,result.mapurl4);if(result.latlon){sPoint(i,result.latlon,title,html)}var imgid=String.fromCharCode(i+65);srchlist+="<div class='item' id='resitem"+i+"' onmouseover='itemOver("+i+")' onmouseout='itemOut("+i+",this,event)' ><div class='resultitle'><span class='shopnum'><img id='resimg"+i+"' src='http://a.pojaaimg.cn/ditu/1/images/search/"+imgid+"1.png' alt='' /></span>";srchlist+="<span class='shopname'><a href='javascript:void(0)' onclick='showBubble("+i+")'>"+((result.name=="")?"\u65e0\u6807\u9898\u4fe1\u606f":result.name)+"</a></span>";srchlist+="</div>";srchlist+="<div class='shopdetail'>";srchlist+="<div class='shhadd'>\u5730\u5740\uff1a"+result.address+"</div>";srchlist+="</div></div>"})}else{srchlist+="<div class='states'>\u4ee5\u4e0b\u662f\u666e\u52a0\u5728\u60a8\u9650\u5b9a\u7684\u8303\u56f4\u5185\u627e\u5230\u7684\u4e0e\u201c<b>"+keyword+"</b>\u201d\u76f8\u5173\u7684\u4fe1\u606f";if(total>10){if(total-(page-1)*10==1){srchlist+="\uff0c\u8fd9\u662f\u7b2c "+((page-1)*10+1)+" \u4e2a\u7ed3\u679c</div>"}else{if(total-(page-1)*10<=10){srchlist+="\uff0c\u8fd9\u662f\u7b2c "+((page-1)*10+1)+"-"+(total)+" \u4e2a\u7ed3\u679c</div>"}else{srchlist+="\uff0c\u8fd9\u662f\u7b2c "+((page-1)*10+1)+"-"+(page*10)+" \u4e2a\u7ed3\u679c</div>"}}}else{srchlist+="</div>"}$.each(json.results,function(i,result){var title=(result.name==null)?"\u65e0\u6807\u9898\u4fe1\u606f":result.name.substring(0,16)+(result.name.length>16?"...":"");var shtitle=(result.name==null)?"\u65e0\u6807\u9898\u4fe1\u606f":result.name.substring(0,11)+(result.name.length>11?"...":"");var html=tabDo.wHtml(result.pic,result.desc,result.address,result.phone,title,result.latlon,result.url,result.mapurl4);if(result.latlon){sPoint(i,result.latlon,title,html)}var imgid=String.fromCharCode(i+65);var resArea=result.area?result.area:"";srchlist+="<div class='item' id='resitem"+i+"' onmouseover='itemOver("+i+")' onmouseout='itemOut("+i+",this,event)' ><div class='resultitle'><span class='shopnum'><img id='resimg"+i+"' src='http://a.pojaaimg.cn/ditu/1/images/search/"+imgid+"1.png' alt='' /></span>";srchlist+="<span class='shopname'><a href='javascript:void(0)'";srchlist+=(result.latlon)?" onclick='showBubble("+i+")'>":">";srchlist+=shtitle+"</a><span class='shopzone'>"+resArea+"</span></span></div>";srchlist+="<div class='shopdetail'>";if(result.pic){srchlist+="<div class='shhpic'><a href='javascript:void(0)' onclick='showBubble("+i+")'><img src='"+result.pic+"' alt='"+result.name+"' /></a></div><div class='shinfo'><div class='shhintro'>"}else{srchlist+="<div class='shinfo'><div class='notu_intro'>"}srchlist+=result.stdesc+"</div>";if(result.address){srchlist+="<div class='shhaddr'>\u5730\u5740\uff1a"+result.staddress+"</div></div>"}else{srchlist+="</div>"}if(result.video){srchlist+="<div class='shhadd'><span class='vidoepic'><a href='javascript:void(0)' onclick='showVideo(&quot;"+result.videopath+"&quot;)'><img src='http://a.pojaaimg.cn/ditu/1/images/iconVideo.gif' alt='\u67e5\u770b\u89c6\u9891' /></a></span>"}else{srchlist+="<div class='shhadd'>"}srchlist+="<span class='comtpic'><a target='_blank' href='"+result.url+"'>\u8be6\u7ec6\u4fe1\u606f&gt;&gt;</a></span>";srchlist+="<span class='comtpic ccom'>";if(result.review>0){srchlist+="<a target='_blank' href='"+result.reviewurl+"'>"+result.review+"\u6761\u8bc4\u8bba</a></span>"}else{srchlist+="<a target='_blank' href='"+result.reviewurl+"'>\u6211\u8981\u8bc4\u8bba</a></span>"}srchlist+="<span class='comtpic cbus'><a href='javascript:showBubBus("+i+");'>\u516c\u4ea4/\u9a7e\u8f66</a></span>";srchlist+="</div><div class='c'></div></div></div>"})}maplet.centerAndZoom(new MPoint(json.params.center),json.params.scale);if(json.params.auto){maplet.setAutoZoom()}$("#tabSearch").attr({center:mbattr.cn(),zoom:mbattr.zl()})}else{srchlist+=pjtips.search.forfail(keyword)}$("#fdKeyword").val(keyword);$("#fdKeyword").css("color","#000");if(total>perpage){page=parseInt(page);var pagelist="<div class='pagelist'>";var resPages=Math.ceil(total/perpage)>15?15:Math.ceil(total/perpage);pagelist+="<span id='pagelist'>";if(page!=1){pagelist+="<a id='pagepre' href='"+ajse.jq()+(page-1)+"'>\u4e0a\u4e00\u9875</a>"}var pagestart=(page>4)?(page-4):1;var pageend=(page+4)>resPages?resPages:(page+4);if(page<=4){pageend=resPages>9?9:resPages}for(index=pagestart;index<=pageend;index++){if(index==page){pagelist+="<span>"+index+"</span>"}else{pagelist+="<a href='"+ajse.jq()+index+"'>"+index+"</a>"}}if(page!=15&&page!=resPages){pagelist+=" <a id='pagenext' href='"+ajse.jq()+(page+1)+"'>\u4e0b\u4e00\u9875</a> "}pagelist+="</span>";pagelist+="</div>";srchlist+=pagelist}$("#resultSrch").html(srchlist);var opaa="http://www.pujia.com/noprowler/"+json.params.hash+".css";document.getElementsByTagName("link").item(0).setAttribute("href",opaa);$("#pagelist a").bind("click",function(){hashsend=0;var pstr="#"+this.href.replace(/^.*#/,"");if($.browser.msie){$.locationHash(pstr)}else{location.hash=pstr}ajse.init(pstr);return false});fixPng();uiee.sMk?maplet.removeOverlay(uiee.sMk):null},showBusLoad:function(){$("#bussrchDiv").html("<div class='srchload'>\u6b63\u5728\u67e5\u627e...</div>")},showBus:function(json){$("#tips").hide();uiee.hvB=1;uiee.enable(8,uiee.u8);ajse.jsonData=json;json=eval("("+json+")");$("#tabBus").attr({page:"-1",el:""});var bshtml="<div id='busScroll'>";document.title="\u4ece["+json.state.oword+"]\u5230["+json.state.dword+"]\u516c\u4ea4\u67e5\u8be2\u7ed3\u679c\u2014\u666e\u52a0\u5730\u56fe";userPoint.ysqd=json.state.orig;userPoint.yszd=json.state.dest;userPoint.bqd=1;userPoint.bzd=1;sqzd.qd=1;sqzd.zd=1;userPoint.origName=json.state.oword;userPoint.destName=json.state.dword;userPoint.orName=json.state.oname;userPoint.deName=json.state.dname;if(json.state.count>0){if(typeof lxlPoi!="undefined"&&lxlWhi=="bu"){delete lxlWhi;delete lxlPoiM;delete lxlPoi}$("#busOrig").val((json.state.oword=="")?"\u5730\u56fe\u6240\u793a\u8d77\u70b9":json.state.oword);$("#busDest").val((json.state.dword=="")?"\u5730\u56fe\u6240\u793a\u7ec8\u70b9":json.state.dword);$("#busCity").val(json.state.city);$("#busOrig,#busDest").css("color","#000");if(json.state.count<=5){ajse.bEnd=json.state.count}for(var index=ajse.bSta;index<ajse.bEnd;index++){var lnName=json.lines[index].name.substring(0,17)+(json.lines[index].name.length>17?"...":"");bshtml+="<div class='busline'><div name='wyq' class='buslinetit' id=wyq"+index+">";bshtml+="<span class='casenum'>\u65b9\u6848"+(index+1)+"</span><span class='casebtn'><img alt='\u5c55\u5f00' src='http://a.pojaaimg.cn/ditu/1/images/luout.gif'/></span>";bshtml+="<span class='caseroad'><span class='roadnum' alt='"+json.lines[index].name+"' title='"+json.lines[index].name+"'>"+lnName+"</span>";bshtml+="<span class='roadtime'>\u7ea6"+json.lines[index].time+"\u5206\u949f/"+json.lines[index].dist+"\u516c\u91cc</span>";bshtml+="<b> "+(json.lines[index].exch==0?"[\u76f4\u8fbe]":"[\u6362\u4e58"+json.lines[index].exch+"\u6b21]")+"</b>";bshtml+="</span><div class='c'/></div>";bshtml+="<div name='slide' class='lineover'><div class='linebegin'><span class='lineleft'>\u8d77\u70b9\uff1a</span><span class='whereform'>";if(userPoint.origName!=""&&userPoint.origName!="\u5730\u56fe\u6240\u793a\u8d77\u70b9"){bshtml+="<span class='dfleft'>"+userPoint.orName+"</span>"}else{bshtml+="<span class='dfleft'>\u5730\u56fe\u6807\u6ce8</span>"}bshtml+="<span class='dfright'/><div class='c'/></span><span class='chgpoint'><a href='javascript:void(0)' onclick='userPoint.chngPoi(1)'>\u4fee\u6539\u8d77\u70b9</a></span></div>";bshtml+=json.lines[index].html;bshtml+="<div class='c'></div><div class='linebegin'><span class='lineleft'>\u7ec8\u70b9\uff1a</span><span class='whereto'>";if(userPoint.destName!=""&&userPoint.destName!="\u5730\u56fe\u6240\u793a\u7ec8\u70b9"){bshtml+="<span class='dfleft'>"+userPoint.deName+"</span>"}else{bshtml+="<span class='dfleft'>\u5730\u56fe\u6807\u6ce8</span>"}bshtml+="<span class='dfright'/><div class='c'/></span><span class='chgpoint'><a href='javascript:void(0)' onclick='userPoint.chngPoi(2)'>\u4fee\u6539\u7ec8\u70b9</a></span></div><div class='c'></div></div><div class='buslinebot'></div></div>";poiArr[index]=json.lines[index].points;walkArr[index]=json.lines[index].walk;stArr[index]=json.lines[index].stations}if(json.lines.length>5){bshtml+="<div id='pages'>";for(pj=0;pj<(json.lines.length/5);pj++){if(ajse.bSta==pj*5){bshtml+="<span class='cur_num'>"+(pj+1)+"</span> "}else{var pageEnd=(json.lines.length<(pj*5+5))?json.lines.length:(pj*5+5);bshtml+="<a href='javascript:void(0)' onclick='ajse.busPage("+pj*5+","+pageEnd+")'>"+(pj+1)+"</a>"}}bshtml+="</div></div>"}$("#bussrchDiv").html(bshtml);$("#bussrchDiv").find("div[name='wyq']").each(function(i,n){$(n).click(function(){showLine(i+ajse.bSta);$("#tabBus").attr("wID",i+ajse.bSta);$("#tabBus").attr("el","")})});showLine(ajse.bSta);$("#tabBus").attr("wID",ajse.bSta);uiee.bus.qMk=null;uiee.bus.zMk=null}else{bshtml+=pjtips.bus.forfail(json.state.city);$("#bussrchDiv").html(bshtml)}$("#bussrchDiv").css("height",parseInt($("#srchlist").height())-40+"px");$("#hchlinelist .sortype").html("<span><a href='javascript:void(0)' onclick='userPoint.goDrive()'>\u67e5\u770b\u76f8\u5173\u9a7e\u8f66\u65b9\u6848</a></span>").show();uiee.change(0,"\u4fee\u6539\u8d77\u70b9\u5230\u6b64\u5904");uiee.change(1,"\u4fee\u6539\u7ec8\u70b9\u5230\u6b64\u5904");uiee.wh="bus"},busPage:function(c,d){ajse.bSta=c;ajse.bEnd=d;ajse.showBus(ajse.jsonData)},lineSrchLoad:function(){$("#linesrchDiv").html("<div class='srchload'>\u6b63\u5728\u67e5\u627e...</div>")},stLatArr:new Array,stmarkArr:new Array,stNameArr:new Array,lineSrch:function(json){$("#tips").hide();uiee.enable(8,uiee.u8);uiee.hvL=1;json=eval("("+json+")");var htmlLn="";var htmlSt="";document.title="\u5728["+json.state.city+"]\u641c\u7d22\u516c\u4ea4\u8def\u7ebf/\u7ad9\u70b9["+json.state.key+"]\u7684\u7ed3\u679c";$("#lineKey").val(json.state.key);$("#lineKey").css("color","#000");$("#lineCity").val(json.state.city);$("#linesrchDiv").empty();$("#linesrchDiv").css("overflow-y","hidden");if(json.state.lncount>0){htmlLn+="<div class='lnopen' id='lineSrchL'><div class='lntit'><span>\u627e\u5230 <b>"+json.state.lncount+"</b> \u6761\u76f8\u5173\u516c\u4ea4\u7ebf\u8def\uff0c\u70b9\u51fb\u7ebf\u8def\u67e5\u770b\u8be6\u60c5</span></div>";htmlLn+="<div class='lncont'>";$.each(json.lines,function(i,line){htmlLn+="<li><b class='dott'>\u00b7</b>";htmlLn+="<a href='javascript:void(0)' onclick='ajse.showLineDetail("+i+',"'+line+'","'+$("#lineCity").val()+"\")'>"+line+"</a></li>"});htmlLn+="</div></div>";$("#linesrchDiv").html(htmlLn)}if(json.state.stcount>0){htmlSt+="<div class='lnclose' id='lineSrchS'><div class='lntit'><span>\u627e\u5230 <b>"+json.state.stcount+"</b> \u4e2a\u76f8\u5173\u7ad9\u70b9\uff0c\u70b9\u51fb\u7ad9\u70b9\u67e5\u770b\u9014\u7ecf\u516c\u4ea4\u7ebf\u8def</span></div>";htmlSt+="<div class='lncont'>";ajse.stLatArr.length=0;ajse.stNameArr.length=0;$.each(json.st,function(i,line){htmlSt+="<div class='itemxl_no'><span class='xl_desc'>";var iconid=String.fromCharCode(i+65);htmlSt+="<a href='javascript:void(0)' id='sitefound"+i+"' name='sitefound' ><b>"+iconid+"</b> "+line.name+"</a></span>";htmlSt+="<div class='c'></div></div>";htmlSt+="<div id='sitedetail"+i+"' class='stlines' style='display:none'>";ajse.stNameArr[i]=line.name;ajse.stLatArr[i]=line.latlon;$.each(line.lines,function(i,ln){var where=ln.indexOf("(");var lnName=ln.substring(0,where);htmlSt+="<a href='javascript:void(0)' onclick='ajse.showLineDetail("+i+',"'+ln+'","'+$("#lineCity").val()+"\")'>"+lnName+"</a>  "});htmlSt+="</div>"});htmlSt+="</div></div>";if(json.state.type=="ln"){maplet.clearOverlays(true);$("#linesrchDiv").append(htmlSt)}else{$("#linesrchDiv").prepend(htmlSt);$("#lineSrchL").removeClass("lnopen").addClass("lnclose");$("#lineSrchS").removeClass("lnclose").addClass("lnopen");ajse.showStPois()}}if(json.state.stcount==0&&json.state.lncount==0){var empHtml="<p style='font-weight:bold;'>\u62b1\u6b49\uff0c\u5728\u6b64\u533a\u57df\u5185\u6ca1\u6709\u627e\u5230\u76f8\u5173\u7684\u7ebf\u8def\u6216\u7ad9\u70b9\u3002</p><p style='font-weight:bold;'>\u666e\u52a0\u5efa\u8bae\u60a8\uff1a</p><ul><li>\u67e5\u770b\u8f93\u5165\u6587\u5b57\u662f\u5426\u6709\u8bef</li><li>\u68c0\u67e5\u9009\u62e9\u7684\u57ce\u5e02\u662f\u5426\u6b63\u786e</li><li>\u53bb\u6389\u53ef\u80fd\u4e0d\u5fc5\u8981\u7684\u5b57\u8bcd\u6216\u6807\u70b9\uff0c\u5982\u201c\u7684\u201d\u3001\u201c\u548c\u201d\u7b49</li><li>\u53c2\u8003&nbsp;<a href='http://www.pujia.com/help' target='_blank'>\u5e2e\u52a9\u4e2d\u5fc3</a></li><ul>";$("#linesrchDiv").html(empHtml).show()}$("#linesrchDiv .lncont").css("height",parseInt($("#srchlist").height())-70+"px");$(".lnclose .lncont").hide();$("#linesrchDiv .lntit").click(function(){if($(this).parent().attr("class")=="lnopen"){}else{$("#linesrchDiv .lnopen .lncont").slideToggle("fast");$("#linesrchDiv .lnopen").toggleClass("lnopen").toggleClass("lnclose");$("#linesrchDiv .lnopen").css("top","");$(this).next().slideToggle("fast");$(this).parent().toggleClass("lnopen").toggleClass("lnclose")}});$("#lineSrchS .lntit").click(function(){ajse.showStPois()});$.each($("a[name='sitefound']").parent(),function(k,a){$(a).click(function(){ajse.showStPois();ajse.overStPois(k);$(this).toggleClass("xl_open");ajse.showStLine(k)}).mouseover(function(){ajse.overStPois(k)}).mouseout(function(){ajse.outStPois(k)})})},StatnAround:function(json){maplet.clearOverlays();uiee.enable(8,uiee.u8);uiee.hvL=1;$("#linesrchDiv").empty();$("#linesrchDiv").css("overflow-y","hidden");if(json=="null"){$("#linesrchDiv").html("\u62b1\u6b49\uff0c\u5728\u9644\u8fd1500\u7c73\u5185\u672a\u627e\u5230\u516c\u4ea4\u7ad9\u70b9\uff0c\u8bf7\u66f4\u6362\u5730\u70b9\u518d\u8bd5\u3002");return}json=eval("("+json+")");document.title="\u5728\u5468\u56f4500\u7c73\u8303\u56f4\u5185\u627e\u5230\u7684\u516c\u4ea4\u7ad9\u70b9";if(json.length>0){var htmlSt="";htmlSt+="<div class='lnopen' id='lineSrchS'><div class='lntit'><span>500\u7c73\u5185\u627e\u5230<b>"+json.length+"</b>\u4e2a\u7ad9\u70b9\uff0c\u70b9\u51fb\u7ad9\u70b9\u67e5\u770b\u9014\u7ecf\u516c\u4ea4\u7ebf\u8def</span></div>";htmlSt+="<div class='lncont'>";ajse.stLatArr.length=0;ajse.stNameArr.length=0;$.each(json,function(i,statn){htmlSt+="<div class='itemxl_no'><span class='xl_desc'>";var iconid=String.fromCharCode(i+65);htmlSt+="<a href='javascript:void(0)' id='sitefound"+i+"' name='sitefound' ><b>"+iconid+"</b> "+statn.nam+"</a></span>";htmlSt+="<div class='c'></div></div>";htmlSt+="<div id='sitedetail"+i+"' class='stlines' style='display:none'>";ajse.stNameArr[i]=statn.nam;ajse.stLatArr[i]=statn.geo;$.each(statn.add,function(i,ln){var where=ln.indexOf("(");var lnName=ln.substring(0,where);htmlSt+="<a href='javascript:void(0)' onclick='ajse.showLineDetail("+i+',"'+ln+'","'+$("#lineCity").val()+"\")'>"+lnName+"</a>  "});htmlSt+="</div>"});htmlSt+="</div></div>";$("#linesrchDiv").append(htmlSt);ajse.showStPois();$("#linesrchDiv .lncont").css("height",parseInt($("#srchlist").height())-50+"px");$("#lineSrchS .lntit").click(function(){ajse.showStPois()});$.each($("a[name='sitefound']").parent(),function(k,a){$(a).click(function(){ajse.showStPois();ajse.overStPois(k);$(this).toggleClass("xl_open");ajse.showStLine(k)}).mouseover(function(){ajse.overStPois(k)}).mouseout(function(){ajse.outStPois(k)})})}else{$("#linesrchDiv").html("\u62b1\u6b49\uff0c\u5728\u9644\u8fd1500\u7c73\u5185\u672a\u627e\u5230\u516c\u4ea4\u7ad9\u70b9\uff0c\u8bf7\u66f4\u6362\u5730\u70b9\u518d\u8bd5\u3002")}},showStPois:function(){maplet.clearOverlays();ajse.stmarkArr.length=0;$.each(ajse.stLatArr,function(e,d){var c=String.fromCharCode(e+65);ajse.stmarkArr[e]=new MMarker(new MPoint(d),new MIcon("http://a.pojaaimg.cn/ditu/1/images/search/"+c+"2.png",19,25));maplet.addOverlay(ajse.stmarkArr[e]);MEvent.addListener(ajse.stmarkArr[e],"mouseover",function(){ajse.overStPois(e)});MEvent.addListener(ajse.stmarkArr[e],"mouseout",function(){ajse.outStPois(e)})});maplet.setAutoZoom();fixPng()},overStPois:function(d){var c=String.fromCharCode(d+65);ajse.stmarkArr[d].icon.updateImage("http://a.pojaaimg.cn/ditu/1/images/search/"+c+"1.png",19,25);ajse.stmarkArr[d].setLabel(new MLabel(ajse.stNameArr[d]));ajse.stmarkArr[d].icon.hilite();fixPng()},outStPois:function(d){var c=String.fromCharCode(d+65);ajse.stmarkArr[d].icon.updateImage("http://a.pojaaimg.cn/ditu/1/images/search/"+c+"2.png",19,25);ajse.stmarkArr[d].setLabel();fixPng()},showLineDetail:function(i,name,city){var htmlBack="";$.ajax({type:"POST",url:"/api/linedetail.php",data:"name="+encodeURI(name)+"&city="+encodeURI(city)+"&w="+$("#pjmap").width()+"&h="+$("#pjmap").height(),beforeSend:function(){$("#pointmb").height(parseInt($("#srchlist").height())-42);$("#pointmb").html("<img src='http://a.pojaaimg.cn/ditu/1/images/loading.gif' />").show()},success:function(json){json=eval("("+json+")");if(json.pois.length==1){htmlBack+="<div class='xl_title'><b>\u7ebf\u8def\u4fe1\u606f: </b><a href='javascript:void(0)' onclick='ajse.clsLineDt()'>\u5173\u95ed</a></div><div class='bLine' style='height:"+(parseInt($("#srchlist").height())-75)+"px'>";htmlBack+="<div>\u6682\u65e0\u6570\u636e</div></div>";$("#linedt").show().html(htmlBack)}else{htmlBack+="<div class='xl_title'><b>\u7ebf\u8def\u4fe1\u606f: </b><a href='javascript:void(0)' onclick='ajse.clsLineDt()'>\u5173\u95ed</a></div><div class='bLine' style='height:"+(parseInt($("#srchlist").height())-75)+"px'><div class='item_xldetail'>";htmlBack+="<dl class='xlu_info'><dt>"+name+"</dt></dl>";htmlBack+="<dl class='xlu_info'><dt>\u7968\u5236\uff1a</dt><dd>"+json.infos.type+"</dd></dl>";htmlBack+="<dl class='xlu_info'><dt>\u5168\u7a0b\u7968\u4ef7\uff1a</dt><dd>"+json.infos.fee+"</dd></dl>";htmlBack+="<dl class='xlu_info'><dt>\u8d77\u70b9\u7ad9\u9996\u672b\u8f66\u65f6\u95f4\uff1a</dt><dd>"+json.infos.begin+"</dd></dl>";htmlBack+="<dl class='xlu_info'><dt>\u7ec8\u70b9\u7ad9\u9996\u672b\u8f66\u65f6\u95f4\uff1a</dt><dd>"+json.infos.finish+"</dd></dl></div>";htmlBack+="<div class='item_xldetail'><div class='xl_t0'><b>\u9014\u7ecf\u516c\u4ea4\u7ad9\u70b9\uff1a</b></div><div class='xlu_sitenum'><dl>";$.each(json.statns,function(i,statn){htmlBack+="<dt>"+(i+1)+"</dt><dd><a href='javascript:void(0)' alt="+statn.name+" title="+statn.name+" onclick='ajse.hoverSt("+i+")' onmouseover='ajse.onSt("+i+")'  onmouseout='ajse.outSt("+i+")'>"+statn.name+"</a></dd>"});htmlBack+="<div class='c'></div></dl><div class='c'></div></div><div class='c' style='height:5px'></div></div></div>";$("#linedt").show().html(htmlBack);maplet.clearOverlays(true);ajse.stArr.length=0;$.each(json.statns,function(k,st){addStatn(st.latlon,st.name,k)});maplet.setAutoZoom();addLine(json.pois,0,"#f92f0e",4)}}})},clsLineDt:function(){$("#pointmb").html("").hide();$("#linedt").html("").hide();ajse.stArr.length=0},hoverSt:function(c){$.each(ajse.stArr,function(d,e){e.icon.img.firstChild.src=img_URL+"/pbus.gif";e.icon.hilite();e.setLabel()});ajse.stArr[c].icon.img.firstChild.src=img_URL+"/pbuson.gif";ajse.stArr[c].icon.hilite();ajse.stArr[c].setLabel(ajse.lbArr[c]);maplet.setCenter(ajse.stArr[c].pt);maplet.setZoomLevel(11)},onSt:function(c){ajse.stArr[c].icon.img.firstChild.src=img_URL+"/pbuson.gif";ajse.stArr[c].icon.hilite();ajse.stArr[c].setLabel(ajse.lbArr[c])},outSt:function(c){ajse.stArr[c].icon.img.firstChild.src=img_URL+"/pbus.gif";ajse.stArr[c].icon.hilite();ajse.stArr[c].setLabel()},showStLine:function(c){if($("#sitedetail"+c).css("display")=="block"){$("#sitedetail"+c).slideUp("fast")}else{$("#sitedetail"+c).slideDown("fast")}},showdr:function(data){$("#tips").hide();uiee.enable(8,uiee.u8);uiee.hvD=1;maplet.clearOverlays(true);wDrive.lineA=[];wDrive.wyqData=data=eval("("+data+")");$("#tabDrive").attr({page:"-1",el:"",wID:""});if(data.cg){if(typeof lxlPoi!="undefined"&&lxlWhi=="dr"){delete lxlWhi;delete lxlPoiM;delete lxlPoi}document.title="\u4ece["+data.qd+"]\u5230["+data.zd+"]\u9a7e\u8f66\u7ed3\u679c\u2014\u666e\u52a0\u5730\u56fe";wDrive.type=data.type;var str="";$.each(data.wyq,function(i,l){wDrive.lineA[i]=l});$.each(data.routes,function(i,item){str+='<li class="showTurn" wyqid="'+i+'">'+item.guide+"</li>"});addZQ(data.orig,data.dest,data.qd,data.zd);maplet.setAutoZoom();addLine(wDrive.lineA,0,"#f92f0e",4);if(data.qd.length>12){data.qd=wStr(data.qd,13)}if(data.zd.length>12){data.zd=wStr(data.zd,13)}$("#qdkeyword").val(data.qk);$("#qdcity").val(data.qcity);$("#zdcity").val(data.zcity);$("#zdkeyword").val(data.zk);$("#qdkeyword,#zdkeyword").css("color","#000");var drhtml='<div class="jcpx"><div class="paixu">\u6392\u5e8f\uff1a<select id="jctype" name="jc"><option value="0">\u6700\u5feb\u7ebf\u8def</option><option value="1">\u6700\u77ed\u7ebf\u8def</option><option value="2">\u907f\u5f00\u9ad8\u901f</option></select></div><span class="lulength">\u5168\u957f\u7ea6\uff1a'+data.distance+'\u516c\u91cc</span></div><div class="c"/><div class="roadform" ><span class="roadst">\u8d77\u70b9\uff1a<span>'+data.qd+'</span></span><a href="javascript:void(0)" onclick="userPoint.chngPoi(3);" class="cOD">\u4fee\u6539\u8d77\u70b9</a><div class="c"></div></div><ul class="roadpor">'+str+'</ul><div class="roadform"><span class="roadst">\u7ec8\u70b9\uff1a<span>'+data.zd+'</span></span><a href="javascript:void(0)" onclick="userPoint.chngPoi(4);" class="cOD">\u4fee\u6539\u7ec8\u70b9</a><div class="c"></div></div>';$("#drresdiv").html(drhtml).find("#jctype").change(function(){var os=sizeCtrl.getSize("#pjmap");hashsend=0;var pstr="#tab=dr&for=dr&orig="+data.orig+"&dest="+data.dest+"&qcity="+encodeURI(data.qcity)+"&zcity="+encodeURI(data.zcity)+"&qkeyword="+encodeURI(data.qk)+"&zkeyword="+encodeURI(data.zk)+"&q="+encodeURI(data.qd)+"&z="+encodeURI(data.zd)+"&width="+os.width+"&height="+os.height+"&style="+this.value;if($.browser.msie){$.locationHash(pstr)}else{location.hash=pstr}ajse.init(pstr)});if(data.qcity==data.zcity){$("#drresdiv").css("height",parseInt($("#srchlist").height())-40+"px");$("#allprocess .sortype").html('<span><a href="javascript:void(0)" onclick="wDrive.goBus()">\u67e5\u770b\u76f8\u5173\u516c\u4ea4\u65b9\u6848</a></span>').show()}else{$("#drresdiv").css("height",parseInt($("#srchlist").height())-15+"px");$("#allprocess .sortype").hide()}$(".showTurn").hover(function(){wDrive.showTurn($(this).attr("wyqid"));$(".showTurn").removeClass("turnOn");$(this).addClass("turnOn")},function(){if(wDrive.turnID!=""){maplet.removeOverlay(wDrive.turnID)}});$("#jctype").attr("selectedIndex",wDrive.type);uiee.dr.qMk=null;uiee.dr.zMk=null}else{var empHtml="<p style='font-weight:bold;'>\u62b1\u6b49\uff0c\u6ca1\u6709\u627e\u5230\u7b26\u5408\u60a8\u8981\u6c42\u7684\u9a7e\u8f66\u7ebf\u8def\u3002</p><p style='font-weight:bold;'>\u666e\u52a0\u5efa\u8bae\u60a8\uff1a</p><ul><li>\u68c0\u67e5\u8d77\u70b9\u3001\u7ec8\u70b9\u662f\u5426\u8bbe\u7f6e\u6709\u8bef</li><li>\u53c2\u8003&nbsp;<a href='http://www.pujia.com/help' target='_blank'>\u5e2e\u52a9\u4e2d\u5fc3</a></li><ul>";$("#drresdiv").html(empHtml).show()}ajse.jcqd=wDrive.ysqd=data.orig;ajse.jczd=wDrive.yszd=data.dest;ajse.qName=data.qd;ajse.zName=data.zd;uiee.change(0,"\u4fee\u6539\u8d77\u70b9\u5230\u6b64\u5904");uiee.change(1,"\u4fee\u6539\u7ec8\u70b9\u5230\u6b64\u5904");uiee.wh="dr"}};var mbattr={cn:function(){return maplet.getCenter()},zl:function(){return maplet.getZoomLevel()},cz:function(e,d){maplet.centerAndZoom(new MPoint(e),d)}};var typeChange={goSrch:function(){$("#contBus").hide();$("#contDrive").hide();$("#contSearch").show();$("#tabBus a img").attr({src:img_URL+"/bq_car.gif"});$("#tabSearch a img").attr({src:img_URL+"/bq_serchno.gif"});$("#tabDrive a img").attr({src:img_URL+"/bq_nav.gif"});$("#hchlinelist").hide();$("#allprocess").hide();$("#resultSrch").show();$("#srchlist").css("overflow-y","scroll");showTip(pjtips.search.forinit);uiee.wh="sr";if(uiee.hvS){uiee.enable(8,uiee.u8)}else{uiee.disable(8)}ajse.jcqd?uiee.change(0,"\u4fee\u6539\u8d77\u70b9\u5230\u6b64\u5904"):uiee.change(0,"\u4ee5\u6b64\u4e3a\u8d77\u70b9");ajse.jczd?uiee.change(1,"\u4fee\u6539\u7ec8\u70b9\u5230\u6b64\u5904"):uiee.change(1,"\u4ee5\u6b64\u4e3a\u7ec8\u70b9");uiee.dr.qMk?maplet.addOverlay(uiee.dr.qMk):null;uiee.dr.zMk?maplet.addOverlay(uiee.dr.zMk):null;uiee.sMk?maplet.removeOverlay(uiee.sMk):null},goBus:function(){$("#contDrive").hide();$("#contSearch").hide();$("#contBus").show();$("#tabBus a img").attr({src:img_URL+"/bq_carno.gif"});$("#tabSearch a img").attr({src:img_URL+"/bq_serch.gif"});$("#tabDrive a img").attr({src:img_URL+"/bq_nav.gif"});$("#allprocess").hide();$("#resultSrch").hide();$("#hchlinelist").show();$("#srchlist").css("overflow-y","hidden");showTip(pjtips.bus.forinit);if($("#linesrchDiv").css("display")!="none"){uiee.wh="ln";if(uiee.hvL){uiee.enable(8,uiee.u8)}else{uiee.disable(8)}}else{uiee.wh="bus";if(uiee.hvB){uiee.enable(8,uiee.u8)}else{uiee.disable(8)}}if(uiee.bus.qMk){uiee.change(0,"\u4fee\u6539\u8d77\u70b9\u5230\u6b64\u5904");maplet.addOverlay(uiee.bus.qMk)}else{uiee.change(0,"\u4ee5\u6b64\u4e3a\u8d77\u70b9")}if(uiee.bus.zMk){uiee.change(1,"\u4fee\u6539\u7ec8\u70b9\u5230\u6b64\u5904");maplet.addOverlay(uiee.bus.zMk)}else{uiee.change(1,"\u4ee5\u6b64\u4e3a\u7ec8\u70b9")}uiee.sMk?maplet.removeOverlay(uiee.sMk):null},goDr:function(){$("#contBus").hide();$("#contSearch").hide();$("#contDrive").show();$("#tabBus a img").attr({src:img_URL+"/bq_car.gif"});$("#tabSearch a img").attr({src:img_URL+"/bq_serch.gif"});$("#tabDrive a img").attr({src:img_URL+"/bq_navno.gif"});$("#hchlinelist").hide();$("#resultSrch").hide();$("#allprocess").show();$("#srchlist").css("overflow-y","hidden");showTip(pjtips.drive.forinit);uiee.wh="dr";if(uiee.hvD){uiee.enable(8,uiee.u8)}else{uiee.disable(8)}if(uiee.dr.qMk){uiee.change(0,"\u4fee\u6539\u8d77\u70b9\u5230\u6b64\u5904");maplet.addOverlay(uiee.dr.qMk)}else{uiee.change(0,"\u4ee5\u6b64\u4e3a\u8d77\u70b9")}if(uiee.dr.zMk){uiee.change(1,"\u4fee\u6539\u7ec8\u70b9\u5230\u6b64\u5904");maplet.addOverlay(uiee.dr.zMk)}else{uiee.change(1,"\u4ee5\u6b64\u4e3a\u7ec8\u70b9")}uiee.sMk?maplet.removeOverlay(uiee.sMk):null}};var mbCtrl={drag:false,mdyn:false,moyn:false,wcint:0,hcint:0,tcint:0,lcint:0,init:function(){this.topmb=$("#topmb");this.pjmap=$("#pjmap");this.centmb=$("#centmb");this.div3=$("#pjmapContainer > div:nth-child(3)");this.div4=$("#pjmapContainer > div:nth-child(4)");this.div5=$("#pjmapContainer > div:nth-child(5)");this.div6=$("#pjmapContainer > div:nth-child(6)");this.mwth=this.pjmap.width();this.mhht=this.pjmap.height();this.mwthint=parseInt(this.mwth);this.mhhtint=parseInt(this.mhht);this.topmb.width(this.mwth);this.topmb.height(this.mhht);this.topmb.css("opacity","0.5");this.topmb.css("filter","alpha(opacity=50)");this.topmb.show();this.mdyn=true},start:function(d,c){if(this.mdyn){this.sex=this.nwx=d+"px";this.sey=this.nwy=c+"px";this.sexint=this.nwxint=d;this.seyint=this.nwyint=c;this.drag=true;this.centmb.css({top:this.nwy,left:this.nwx,width:"0",height:"0"})}},move:function(q,o){if(this.drag){this.moyn=true;this.sex=q+"px";this.sey=o+"px";this.sexint=q;this.seyint=o;this.wcint=Math.abs(this.sexint-this.nwxint);this.hcint=Math.abs(this.seyint-this.nwyint);this.lcint=(this.sexint>this.nwxint)?this.nwxint:this.sexint;this.tcint=(this.seyint>this.nwyint)?this.nwyint:this.seyint;var h=this.wcint+"px";var k=this.hcint+"px";var e=this.lcint+"px";var j=this.tcint+"px";var d=this.mhhtint-this.tcint+"px";var g=this.tcint+this.hcint+"px";var c=this.mwthint-this.lcint+"px";var m=this.mhhtint-this.tcint-this.hcint+"px";var f=this.lcint+this.wcint+"px";var l=this.mwthint-this.lcint-this.wcint+"px";this.topmb.css("opacity","0");this.topmb.css("filter","alpha(opacity=0)");this.div3.css({top:"0",left:"0",width:this.mwth,height:j,display:"block"});this.div4.css({top:j,left:"0",width:e,height:d,display:"block"});this.div5.css({top:g,left:e,width:c,height:m,display:"block"});this.div6.css({top:j,left:f,width:l,height:k,display:"block"});this.centmb.css({top:j,left:e,width:h,height:k,display:"block"})}},end:function(e){this.moyn=false;this.drag=false;this.mdyn=false;var c=this.tcint+this.hcint/2;var f=this.lcint+this.wcint/2;var d=f-this.mwth/2;var g=c-this.mhht/2;if(!e){$(".mb").hide();$("#centmb").hide();$("#topmb").hide()}return[this.wcint,this.hcint,d,g,c,f]},rse:function(){}};var sizeCtrl={init:function(c){this.elems=c;this.len=c.length},getAllSize:function(){var c=[];for(var d=0;d<this.len;d++){var e={width:0,height:0};e.width=$(this.elems[d]).width();e.height=$(this.elems[d]).height();c[this.elems[d]]=e}return c},setAllSize:function(c){for(p in c){$(p).css(c[p])}},getSize:function(c){var d={width:0,height:0};d.width=$(c).width();d.height=$(c).height();return d},setSize:function(e,c,d){if(typeof c!="object"){if(c){$(e).width(c)}if(d){$(e).height(d)}}else{$(e).css(c)}}};var poiCtrl={init:function(c){this.elems=c;this.len=c.length},getAllPoi:function(){var c=[];for(var d=0;d<this.len;d++){var e={top:0,left:0};e.top=$(this.elems[d]).offset().top;e.left=$(this.elems[d]).offset().left;c[this.elems[d]]=e}return c},getPoi:function(c){var d={top:0,left:0};d.top=$(c).offset().top;d.left=$(c).offset().left;return d},setPoi:function(e,c,d){if(typeof c!="object"){$(e).css({top:c,left:d})}else{$(e).css(c)}}};var userPoint={city:"",origName:"",destName:"",orName:"",deName:"",bqd:0,bzd:0,pois:"",fenye:false,pd:0,ysqd:"",yszd:"",qID:0,temp:null,w:"",panduanBu:function(){if(this.origName=="\u8bf7\u8f93\u5165\u8d77\u70b9"||this.origName==""){alert("\u8bf7\u586b\u5199\u51fa\u53d1\u5730\u6216\u5728\u5730\u56fe\u4e0a\u9009\u62e9\u8d77\u70b9");$("#busOrig").focus()}else{if(this.destName=="\u8bf7\u8f93\u5165\u7ec8\u70b9"||this.destName==""){alert("\u8bf7\u586b\u5199\u76ee\u7684\u5730\u6216\u5728\u5730\u56fe\u4e0a\u9009\u62e9\u7ec8\u70b9");$("#busDest").focus()}else{if(userPoint.bqd==1&&this.origName=="\u5730\u56fe\u6240\u793a\u8d77\u70b9"){if(userPoint.bzd==1&&this.origName=="\u5730\u56fe\u6240\u793a\u8d77\u70b9"){this.pd=1;this.s()}else{uiee.bus.qMk=null;this.sDest()}$("#tips").hide()}else{this.sOrig();$("#tips").hide()}}}},sOrig:function(){this.pd=0;this.w=0;$("#busOrig").val(this.origName);$.ajax({type:"GET",url:"/api/drive.select.php",data:"city="+encodeURI(this.city)+"&keyword="+encodeURI(this.origName),beforeSend:function(){$("#hchlinelist .sortype").empty().hide();$("#bussrchDiv").css("height",parseInt($("#srchlist").height())-15+"px");$("#bussrchDiv").html("<div class='srchload'>\u6b63\u5728\u52a0\u8f7d\u8d77\u70b9\u4fe1\u606f\u2026\u2026</div>").show()},success:function(data){userPoint.pois=eval("("+data+")");if(userPoint.pois.cg){if(userPoint.pois.num!="0"){userPoint.page(1,"\u8d77\u70b9","sOrig")}else{$("#bussrchDiv").html(pjtips.bus.forfail(userPoint.pois.city)).show()}}else{var empHtml="<p style='font-weight:bold;'>\u62b1\u6b49\uff0c\u5728\u6b64\u533a\u57df\u5185\u6ca1\u6709\u627e\u5230\u5408\u9002\u7684\u51fa\u53d1\u5730\u4fe1\u606f\u3002</p><p style='font-weight:bold;'>\u666e\u52a0\u5efa\u8bae\u60a8\uff1a</p><ul><li>\u67e5\u770b\u8f93\u5165\u6587\u5b57\u662f\u5426\u6709\u8bef</li><li>\u68c0\u67e5\u9009\u62e9\u7684\u57ce\u5e02\u662f\u5426\u6b63\u786e</li><li>\u53bb\u6389\u53ef\u80fd\u4e0d\u5fc5\u8981\u7684\u5b57\u8bcd\u6216\u6807\u70b9\uff0c\u5982\u201c\u7684\u201d\u3001\u201c\u548c\u201d\u7b49</li><li>\u53c2\u8003&nbsp;<a href='http://www.pujia.com/help' target='_blank'>\u5e2e\u52a9\u4e2d\u5fc3</a></li><ul>";$("#bussrchDiv").html(empHtml).show()}}})},sDest:function(){this.pd=1;this.w=1;$("#busDest").val(this.destName);$.ajax({type:"GET",url:"/api/drive.select.php",data:"city="+encodeURI(this.city)+"&keyword="+encodeURI(this.destName),beforeSend:function(){$("#hchlinelist .sortype").empty().hide();$("#bussrchDiv").css("height",parseInt($("#srchlist").height())-15+"px");$("#bussrchDiv").html("<div class='srchload'>\u6b63\u5728\u52a0\u8f7d\u7ec8\u70b9\u4fe1\u606f\u2026\u2026</div>").show()},success:function(data){userPoint.pois=eval("("+data+")");if(userPoint.pois.cg){if(userPoint.pois.num!="0"){userPoint.page(1,"\u7ec8\u70b9","sDest")}else{$("#bussrchDiv").html(pjtips.bus.forfail(userPoint.pois.city)).show()}}else{var empHtml="<p style='font-weight:bold;'>\u62b1\u6b49\uff0c\u5728\u6b64\u533a\u57df\u5185\u6ca1\u6709\u627e\u5230\u5408\u9002\u7684\u76ee\u7684\u5730\u4fe1\u606f\u3002</p><p style='font-weight:bold;'>\u666e\u52a0\u5efa\u8bae\u60a8\uff1a</p><ul><li>\u67e5\u770b\u8f93\u5165\u6587\u5b57\u662f\u5426\u6709\u8bef</li><li>\u68c0\u67e5\u9009\u62e9\u7684\u57ce\u5e02\u662f\u5426\u6b63\u786e</li><li>\u53bb\u6389\u53ef\u80fd\u4e0d\u5fc5\u8981\u7684\u5b57\u8bcd\u6216\u6807\u70b9\uff0c\u5982\u201c\u7684\u201d\u3001\u201c\u548c\u201d\u7b49</li><li>\u53c2\u8003&nbsp;<a href='http://www.pujia.com/help' target='_blank'>\u5e2e\u52a9\u4e2d\u5fc3</a></li><ul>";$("#bussrchDiv").html(empHtml).show()}}})},exchng:function(){if($("#busOrig").val()=="\u8bf7\u8f93\u5165\u8d77\u70b9"||$("#busDest").val()=="\u8bf7\u8f93\u5165\u7ec8\u70b9"){return false}if(sqzd.qmark!=""){sqzd.qmark.icon.updateImage(img_URL+"/dest.gif")}if(sqzd.zmark!=""){sqzd.zmark.icon.updateImage(img_URL+"/orig.gif")}var c=userPoint.ysqd;userPoint.ysqd=userPoint.yszd;userPoint.yszd=c;if(($("#busOrig").val()!="\u5730\u56fe\u6240\u793a\u8d77\u70b9")&&($("#busDest").val()!="\u5730\u56fe\u6240\u793a\u7ec8\u70b9")){var d=$("#busDest").val();$("#busDest").val($("#busOrig").val());$("#busOrig").val(d);d=userPoint.origName;userPoint.origName=userPoint.destName;userPoint.destName=d;d=userPoint.orName;userPoint.orName=userPoint.deName;userPoint.deName=d}else{if(($("#busOrig").val()=="\u5730\u56fe\u6240\u793a\u8d77\u70b9")&&($("#busDest").val()!="\u5730\u56fe\u6240\u793a\u7ec8\u70b9")){$("#busOrig").val($("#busDest").val());$("#busDest").val("\u5730\u56fe\u6240\u793a\u7ec8\u70b9");userPoint.origName=userPoint.destName;userPoint.destName="\u5730\u56fe\u6240\u793a\u7ec8\u70b9";userPoint.orName=userPoint.deName;userPoint.deName="\u5730\u56fe\u6240\u793a\u7ec8\u70b9"}else{if(($("#busOrig").val()!="\u5730\u56fe\u6240\u793a\u8d77\u70b9")&&($("#busDest").val()=="\u5730\u56fe\u6240\u793a\u7ec8\u70b9")){$("#busDest").val($("#busOrig").val());$("#busOrig").val("\u5730\u56fe\u6240\u793a\u8d77\u70b9");userPoint.destName=userPoint.origName;userPoint.origName="\u5730\u56fe\u6240\u793a\u8d77\u70b9";userPoint.deName=userPoint.orName;userPoint.orName="\u5730\u56fe\u6240\u793a\u8d77\u70b9"}}}sqzd.addol()},chngPoi:function(d){$("#jctype").hide();var c;if(d==1){c=this.chhtml("\u8d77\u70b9","chngorig","chngorigname",1)}if(d==2){c=this.chhtml("\u7ec8\u70b9","chngdest","chngdestname",1)}if(d==3){c=this.chhtml("\u8d77\u70b9","jcgorig","jcgorigname",0)}if(d==4){c=this.chhtml("\u7ec8\u70b9","jcgdest","jcgdestname",0)}$("#pointmb").height(parseInt($("#srchlist").height())-42);$("#pointmb").show();$("#pmbcont").css("top",parseInt($("#srchlist").height())/2-100);$("#pmbcont").html(c).show();$("#pmbcont input:first").focus();$("#chngorig").click(function(){userPoint.origName=$("#chngorigname").val();$("#busOrig").val(userPoint.origName);userPoint.city=$(".wBusOD").html();userPoint.sOrig();userPoint.pd=1;userPoint.clsChng()});$("#chngdest").click(function(){userPoint.destName=$("#chngdestname").val();$("#busDest").val(userPoint.destName);userPoint.city=$(".wBusOD").html();userPoint.sDest();userPoint.clsChng()});$("#jcgdest").click(function(){$("#zdkeyword").val($("#jcgdestname").val());$("#zdcity").val($("#wDrODD").val());wDrive.sDest();userPoint.clsChng()});$("#jcgorig").click(function(){$("#qdkeyword").val($("#jcgorigname").val());$("#qdcity").val($("#wDrODO").val());wDrive.sOrig();userPoint.clsChng()})},clsChng:function(){$("#pointmb").hide();$("#jctype").show();$("#pmbcont").hide()},chhtml:function(f,e,j,h){var g="";if(h){g+="<div class='pmbtop'><span>\u8bf7\u8f93\u5165\u65b0\u7684<b>"+f+"</b>\u5730\u5740\uff1a</span>";g+="<a href='javascript:void(0);' class='closepmb' alt='\u5173\u95ed' onclick='userPoint.clsChng()'></a></div><div>";g+="<div class='pmbmid'><span class='wBusOD'>"+xCity.hideDiv()+"</span><input type='text'  class='pinput' id='"+j+"' onkeypress='kp(event,\""+e+"\");'/></div>";g+="<center><input type='button' value='\u786e\u5b9a"+f+"' id='"+e+"' /> <input type='button' value='\u53d6\u6d88' onclick='userPoint.clsChng()' /></center></div>";return g}else{g+="<div class='pmbtop'><span>\u8bf7\u8f93\u5165\u65b0\u7684<b>"+f+"</b>\u5730\u5740\uff1a</span>";g+="<a href='javascript:void(0);' class='closepmb' alt='\u5173\u95ed' onclick='userPoint.clsChng()'></a></div><div>";g+="<div class='pmbmid'><input class='wDrOD' type='text'  id='"+((e=="jcgorig")?"wDrODO":"wDrODD")+"'  value='"+((e=="jcgorig")?$("#qdcity").val():$("#zdcity").val())+"'><input type='text'  class='pinput' id='"+j+"' onkeypress='kp(event,\""+e+"\");'/></div>";g+="<center><input type='button' value='\u786e\u5b9a"+f+"' id='"+e+"' /> <input type='button' value='\u53d6\u6d88' onclick='userPoint.clsChng()' /></center></div>";return g}},tab:function(d,c,e){if(typeof(maplet)!="undefined"){if(menu.bus=="1"){if($("#bussrchDiv").css("display")=="block"){uiee.wh=="bus"}else{uiee.wh=="line"}}if(menu.bus=="2"){uiee.wh=="bus"}}if($("#buTagL").hasClass("on")&&$("#lineSrchS").hasClass("lnopen")){ajse.showStPois()}else{if(typeof(d)!="undefined"&&typeof(c)!="undefined"&&typeof(e)!="undefined"&&uiee.hvB){e=String(e);if(d=="-1"&&e!=""){showBsLine(e)}else{if(c=="sOrig"){this.page(d,"\u8d77\u70b9",c);$("#bussrchDiv .sOrig").eq(e).click()}else{if(c=="sDest"){this.page(d,"\u7ec8\u70b9",c);$("#bussrchDiv .sDest").eq(e).click()}}}}else{maplet.clearOverlays()}}},page:function(f,c,d){if(this.pois.page>1){this.fenye=true}else{this.fenye=false}userPoint.temp=null;maplet.clearOverlays();var e="";if(d=="sOrig"){$.each(this.pois.pois[f],function(h,k){var l=h;var j=(k.pt!="")?"[ "+k.pt+" ]":"";var g="<b>\u5730\u5740\uff1a</b>"+k.address+"<br/><b>\u5730\u6807\u70b9\u7c7b\u578b\uff1a</b>"+k.type;h=parseInt(h)-1;addPoint(h,k.latlon,k.name,g);e+='<div  id="'+k.latlon+'" class="sOrig"  wID="'+h+'"><span class="num">'+l+"\u3001</span><span>"+k.name+"</span><span> "+j+" </span></div>"})}else{$.each(this.pois.pois[f],function(h,k){var l=h;var j=(k.pt!="")?"[ "+k.pt+" ]":"";var g="<b>\u5730\u5740\uff1a</b>"+k.address+"<br/><b>\u5730\u6807\u70b9\u7c7b\u578b\uff1a</b>"+k.type;h=parseInt(h)-1;addPoint(h,k.latlon,k.name,g);e+='<div  id="'+k.latlon+'" class="sDest"  wID="'+h+'"><span class="num">'+l+"\u3001</span><span>"+k.name+"</span><span> "+j+" </span></div>"})}$("#tabBus").attr({page:f,el:d,wID:userPoint.qID});this.sHTML(c,e,d,f)},goDrive:function(){ajse.jcqd=userPoint.ysqd;ajse.jczd=userPoint.yszd;ajse.qName=userPoint.origName==""?"\u5730\u56fe\u6240\u793a\u8d77\u70b9":userPoint.origName;ajse.zName=userPoint.destName==""?"\u5730\u56fe\u6240\u793a\u7ec8\u70b9":userPoint.destName;$("#qdcity").val($("#busCity").val());$("#zdcity").val($("#busCity").val());$("#qdkeyword").val(userPoint.origName==""?"\u5730\u56fe\u6240\u793a\u8d77\u70b9":userPoint.origName);$("#zdkeyword").val(userPoint.destName==""?"\u5730\u56fe\u6240\u793a\u7ec8\u70b9":userPoint.destName);typeChange.goDr();wDrive.pd=1;wDrive.s()},s:function(){if(this.pd||this.bzd==1){var c=maplet.measDistance([new MPoint(userPoint.ysqd),new MPoint(userPoint.yszd)]);if(c<=500){$("#bussrchDiv").html("\u60a8\u9009\u62e9\u7684\u8d77\u70b9\u548c\u7ec8\u70b9\u8ddd\u79bb\u5f88\u8fd1\uff0c\u6b65\u884c\u7ea6"+c+"\u7c73\u5373\u53ef\u5230\u8fbe\u3002");maplet.clearOverlays();addZQ(userPoint.ysqd,userPoint.yszd,userPoint.orName,userPoint.deName);maplet.setAutoZoom();addLine([userPoint.ysqd,userPoint.yszd],1,"#1f9b1d",4)}else{var d="#tab=bu&for=bu&p1="+userPoint.ysqd+"&p2="+userPoint.yszd+"&t1="+encodeURI(userPoint.origName)+"&t2="+encodeURI(userPoint.destName)+"&n1="+encodeURI(userPoint.orName)+"&n2="+encodeURI(userPoint.deName)+"&w="+$("#pjmap").width()+"&h="+$("#pjmap").height()+"&city="+encodeURI(userPoint.city);hashsend=0;if($.browser.msie){$.locationHash(d)}else{location.hash=d}ajse.init(d)}}else{this.sDest()}},sHTML:function(d,c,h,j){var g="s"+h;var f="."+g;var e="."+h;$("#bussrchDiv").html('<div class="carnav"><div class="roadsec">\u6709\u591a\u4e2a[<span class="moredots">'+d+'</span>]\u4e0e\u60a8\u7684\u8981\u6c42\u76f8\u8fd1\uff0c\u8bf7\u9009\u62e9\u5e76\u786e\u5b9a\uff1a</div><div id="selwh" class="sel_roadshop">'+c+'<div id="wyqPage" class="poipage"></div></div></div><div class="street_slok"><input type="submit" name="button2" id="button2" value="\u786e\u5b9a'+d+'" onclick="userPoint.s()"></div>').show();$("#bussrchDiv").find(e).click(function(){if($(this).hasClass("ssOrig")||$(this).hasClass("ssDest")){return}else{var k=parseInt($(this).attr("wID"));var l=k+1;markers[k].icon.updateImage(img_URL+"/search/"+l+"b.png",19,26);markers[k].icon.hilite();if(userPoint.w){userPoint.yszd=this.id;userPoint.deName=$(this).find("span:eq(1)").html()}else{userPoint.ysqd=this.id;userPoint.orName=$(this).find("span:eq(1)").html()}$("#tabBus").attr("wID",k);userPoint.qID=k;$(this).addClass(g).removeClass("WYQh");$(f).not(this).removeClass(g);if(userPoint.temp!=null){var l=userPoint.temp+1;markers[userPoint.temp].icon.updateImage(img_URL+"/search/"+l+"r.png",19,26);userPoint.temp=k}else{userPoint.temp=k}}}).dblclick(function(){userPoint.s()}).hover(function(){if(userPoint.qID!=$(this).attr("wID")){$(this).addClass("WYQh")}markers[$(this).attr("wID")].icon.hilite()},function(){$(this).removeClass("WYQh")});if(userPoint.w){$("#bussrchDiv .street_slok").before('<p><input id="odShow0" type="checkbox" checked />\u540c\u65f6\u663e\u793a\u8d77\u70b9\u7ec8\u70b9</p>');userPoint.ppp=new MMarker(new MPoint(userPoint.ysqd),new MIcon(img_URL+"/orig.gif",34,26,0,30));maplet.addOverlay(userPoint.ppp);maplet.setAutoZoom();$("#bussrchDiv #odShow0").click(function(){if(document.getElementById("odShow0").checked){maplet.addOverlay(userPoint.ppp);maplet.setAutoZoom()}else{maplet.removeOverlay(userPoint.ppp);maplet.setAutoZoom()}})}if(userPoint.fenye){if(j>1){$("#bussrchDiv #wyqPage").prepend('<span class="preP" wyq="'+j+'">\u4e0a\u4e00\u9875</span>')}else{$("#bussrchDiv #wyqPage").prepend('<span class="preP0" wyq="'+j+'">\u4e0a\u4e00\u9875</span>')}if(j==userPoint.pois.page){$("#bussrchDiv #wyqPage").append('<span class="nextP0" wyq="'+j+'">\u4e0b\u4e00\u9875</span>')}else{$("#bussrchDiv #wyqPage").append('<span class="nextP" wyq="'+j+'">\u4e0b\u4e00\u9875</span>')}}else{$("#bussrchDiv #wyqPage").hide()}$("#bussrchDiv .nextP").click(function(){var k=parseInt($(this).attr("wyq"))+1;userPoint.temp=null;userPoint.page(k,d,h)});$("#bussrchDiv .preP").click(function(){var k=parseInt($(this).attr("wyq"))-1;userPoint.temp=null;userPoint.page(k,d,h)});$("#bussrchDiv  .sel_roadshop").children().eq(0).click();maplet.setAutoZoom()},hotBusLine:function(f,g,c,e,d){userPoint.ysqd=g;userPoint.yszd=c;sqzd.qd=1;sqzd.zd=1;$("#busCity").val(f);userPoint.origName=e;userPoint.destName=d;userPoint.orName=e;userPoint.deName=d;$("#busOrig").val(e);$("#busDest").val(d);sqzd.addol()}};var wDrive={pois:"",fenye:false,pd:0,qID:0,qkw:"",zkw:"",w:0,temp:null,type:"",lineA:[],ysqd:"",yszd:"",wyqData:"",turnID:"",qcity:"",zcity:"",cIt:function(){if($("#zdkeyword").val()=="\u8bf7\u8f93\u5165\u7ec8\u70b9"||$("#qdkeyword").val()=="\u8bf7\u8f93\u5165\u8d77\u70b9"){return false}var c=$("#qdcity").val();$("#qdcity").val($("#zdcity").val());$("#zdcity").val(c);if(sqzd.qmark!=""){sqzd.qmark.icon.updateImage(img_URL+"/dest.gif")}if(sqzd.zmark!=""){sqzd.zmark.icon.updateImage(img_URL+"/orig.gif")}var d=ajse.jcqd;ajse.jcqd=ajse.jczd;ajse.jczd=d;if(($("#zdkeyword").val()!="\u5730\u56fe\u6240\u793a\u7ec8\u70b9")&&$("#qdkeyword").val()!="\u5730\u56fe\u6240\u793a\u8d77\u70b9"){var e=$("#zdkeyword").val();$("#zdkeyword").val($("#qdkeyword").val());$("#qdkeyword").val(e);e=ajse.zName;ajse.zName=ajse.qName;ajse.qName=e}else{if(($("#zdkeyword").val()=="\u5730\u56fe\u6240\u793a\u7ec8\u70b9")&&$("#qdkeyword").val()!="\u5730\u56fe\u6240\u793a\u8d77\u70b9"){$("#zdkeyword").val($("#qdkeyword").val());$("#qdkeyword").val("\u5730\u56fe\u6240\u793a\u8d77\u70b9");ajse.zName=ajse.qName;ajse.qName="\u5730\u56fe\u6240\u793a\u8d77\u70b9"}else{if(($("#zdkeyword").val()!="\u5730\u56fe\u6240\u793a\u7ec8\u70b9")&&$("#qdkeyword").val()=="\u5730\u56fe\u6240\u793a\u8d77\u70b9"){$("#qdkeyword").val($("#zdkeyword").val());$("#zdkeyword").val("\u5730\u56fe\u6240\u793a\u7ec8\u70b9");ajse.qName=ajse.zName;ajse.zName="\u5730\u56fe\u6240\u793a\u7ec8\u70b9"}}}if(ajse.jcqd!=""&&ajse.jczd!=""){this.pd=1;this.s()}else{$("#driveB").click()}},zKP:function(c){if(c.keyCode==13){wDrive.panduan()}},qKP:function(c){if(c.keyCode==13){wDrive.panduan()}},baseclick:function(d){var e=sizeCtrl.getSize("#pjmap");var c=d+"&width="+e.width+"&height="+e.height;hashsend=0;if($.browser.msie){$.locationHash(c)}else{location.hash=c}ajse.init(c)},showTurn:function(e){var d=parseInt(e)+1;var g=wDrive.wyqData.routes[e].latlon;var f=e==wDrive.wyqData.count?"":wDrive.wyqData.routes[d].latlon;var c=new Array();c=(this.findSectByPois(g,f)).split(",");if(this.turnID!=""){maplet.removeOverlay(this.turnID)}this.turnID=addLine(c,0,"#0036ff",4)},findSectByPois:function(e,d){var c=0;if(d==""){c=wDrive.wyqData.routelatlon.length}else{c=wDrive.wyqData.routelatlon.indexOf(d)+d.length}return wDrive.wyqData.routelatlon.substring(wDrive.wyqData.routelatlon.indexOf(e),c)},goBus:function(){userPoint.ysqd=ajse.jcqd;userPoint.yszd=ajse.jczd;userPoint.city=$("#qdcity").val();userPoint.origName=userPoint.orName=ajse.qName;userPoint.destName=userPoint.deName=ajse.zName;typeChange.goBus();setBuType(1);userPoint.pd=1;userPoint.s()},panduan:function(){var c=$.trim($("#qdkeyword").val());var d=$.trim($("#zdkeyword").val());if(c=="\u8bf7\u8f93\u5165\u8d77\u70b9"||d=="\u8bf7\u8f93\u5165\u7ec8\u70b9"||c==""||d==""){alert("\u8bf7\u586b\u5199\u5b8c\u6574\u641c\u7d22\u4fe1\u606f")}else{if(d=="\u5730\u56fe\u6240\u793a\u7ec8\u70b9"&&c=="\u5730\u56fe\u6240\u793a\u8d77\u70b9"&&ajse.jcqd!=""&&ajse.jczd!=""){this.pd=1;this.s();$("#tips").hide()}else{if(d!="\u5730\u56fe\u6240\u793a\u7ec8\u70b9"&&ajse.jazd!=""&&c=="\u5730\u56fe\u6240\u793a\u8d77\u70b9"){uiee.dr.qMk=null;this.sDest();$("#tips").hide()}else{if(d=="\u5730\u56fe\u6240\u793a\u7ec8\u70b9"&&c!="\u5730\u56fe\u6240\u793a\u8d77\u70b9"&&ajse.jcqd!=""){this.sOrig();this.pd=1;$("#tips").hide()}else{this.sOrig();$("#tips").hide()}}}}},sOrig:function(){if($("#qdcity").val()==""){$("#qdcity").val(xCity.hideDiv())}if($("#pointmb").css("display")=="none"){this.pd=0;this.w=0;this.qkw=$("#qdkeyword").val();this.qcity=$("#qdcity").val()}else{this.pd=1;this.w=0;this.qcity=$("#wDrODO").val();$("#qdcity").val(this.qcity);this.qkw=$("#jcgorigname").val()}$.ajax({type:"GET",url:"/api/drive.select.php",data:"city="+encodeURI(this.qcity)+"&keyword="+encodeURI(this.qkw),beforeSend:function(){$("#allprocess .sortype").empty().hide();$("#drresdiv").css("height",parseInt($("#srchlist").height())-15+"px");$("#drresdiv").html("<div class='srchload'>\u6b63\u5728\u52a0\u8f7d\u8d77\u70b9\u4fe1\u606f\u2026\u2026</div>").show()},success:function(data){wDrive.pois=eval("("+data+")");if(wDrive.pois.cg){if(wDrive.pois.num!="0"){wDrive.page(1,"\u8d77\u70b9","sOrig")}else{$("#drresdiv").html(pjtips.drive.forfail).show()}}else{var empHtml="<p style='font-weight:bold;'>\u62b1\u6b49\uff0c\u5728\u6b64\u533a\u57df\u5185\u6ca1\u6709\u627e\u5230\u5408\u9002\u7684\u51fa\u53d1\u5730\u4fe1\u606f\u3002</p><p style='font-weight:bold;'>\u666e\u52a0\u5efa\u8bae\u60a8\uff1a</p><ul><li>\u67e5\u770b\u8f93\u5165\u6587\u5b57\u662f\u5426\u6709\u8bef</li><li>\u68c0\u67e5\u9009\u62e9\u7684\u57ce\u5e02\u662f\u5426\u6b63\u786e</li><li>\u53bb\u6389\u53ef\u80fd\u4e0d\u5fc5\u8981\u7684\u5b57\u8bcd\u6216\u6807\u70b9\uff0c\u5982\u201c\u7684\u201d\u3001\u201c\u548c\u201d\u7b49</li><li>\u53c2\u8003&nbsp;<a href='http://www.pujia.com/help' target='_blank'>\u5e2e\u52a9\u4e2d\u5fc3</a></li><ul>";$("#drresdiv").html(empHtml).show()}}})},sDest:function(){this.pd=1;this.w=1;if($("#zdcity").val()==""){$("#zdcity").val(xCity.hideDiv())}if($("#pointmb").css("display")=="none"){this.zkw=$("#zdkeyword").val();this.zcity=$("#zdcity").val()}else{this.zcity=$("#wDrODD").val();$("#zdcity").val(this.zcity);this.zkw=$("#jcgdestname").val()}$.ajax({type:"GET",url:"/api/drive.select.php",data:"city="+encodeURI(this.zcity)+"&keyword="+encodeURI(this.zkw),beforeSend:function(){$("#allprocess .sortype").empty().hide();$("#drresdiv").css("height",parseInt($("#srchlist").height())-15+"px");$("#drresdiv").html("<div class='srchload'>\u6b63\u5728\u52a0\u8f7d\u7ec8\u70b9\u4fe1\u606f\u2026\u2026</div>").show()},success:function(data){wDrive.pois=eval("("+data+")");if(wDrive.pois.cg){if(wDrive.pois.num!="0"){wDrive.page(1,"\u7ec8\u70b9","sDest")}else{$("#drresdiv").html(pjtips.drive.forfail).show()}}else{var empHtml="<p style='font-weight:bold;'>\u62b1\u6b49\uff0c\u5728\u6b64\u533a\u57df\u5185\u6ca1\u6709\u627e\u5230\u5408\u9002\u7684\u76ee\u7684\u5730\u4fe1\u606f\u3002</p><p style='font-weight:bold;'>\u666e\u52a0\u5efa\u8bae\u60a8\uff1a</p><ul><li>\u67e5\u770b\u8f93\u5165\u6587\u5b57\u662f\u5426\u6709\u8bef</li><li>\u68c0\u67e5\u9009\u62e9\u7684\u57ce\u5e02\u662f\u5426\u6b63\u786e</li><li>\u53bb\u6389\u53ef\u80fd\u4e0d\u5fc5\u8981\u7684\u5b57\u8bcd\u6216\u6807\u70b9\uff0c\u5982\u201c\u7684\u201d\u3001\u201c\u548c\u201d\u7b49</li><li>\u53c2\u8003&nbsp;<a href='http://www.pujia.com/help' target='_blank'>\u5e2e\u52a9\u4e2d\u5fc3</a></li><ul>";$("#drresdiv").html(empHtml).show()}}})},tab:function(d,c,e){uiee.wh="dr";if(typeof(d)!="undefined"&&typeof(c)!="undefined"&&typeof(e)!="undefined"&&uiee.hvD){if(d=="-1"){maplet.clearOverlays();addZQ(wDrive.ysqd,wDrive.yszd,ajse.qName,ajse.zName);maplet.setAutoZoom();addLine(wDrive.lineA,0,"#f92f0e",4)}else{if(c=="sOrig"){this.page(d,"\u8d77\u70b9",c);$("#allprocess .sOrig").eq(e).click()}else{if(c=="sDest"){this.page(d,"\u7ec8\u70b9",c);$("#allprocess .sDest").eq(e).click()}}}}else{maplet.clearOverlays()}},page:function(f,c,d){if(this.pois.page>1){this.fenye=true}else{this.fenye=false}wDrive.temp=null;maplet.clearOverlays();var e="";if(d=="sOrig"){$.each(this.pois.pois[f],function(h,k){var l=h;var j=(k.pt!="")?"[ "+k.pt+" ]":"";if(k.address!=""){var g="<b>\u5730\u5740\uff1a</b>"+k.address+"<br/>"}if(k.type!=""){g+="<b>\u5730\u6807\u70b9\u7c7b\u578b\uff1a</b>"+k.type}h=parseInt(h)-1;addPoint(h,k.latlon,k.name,g);e+='<div  id="'+k.latlon+'" class="sOrig"  wID="'+h+'"><span class="num">'+l+"\u3001</span><span>"+k.name+"</span><span> "+j+" </span></div>"})}else{$.each(this.pois.pois[f],function(h,k){var l=h;var j=(k.pt!="")?"[ "+k.pt+" ]":"";if(k.address!=""){var g="<b>\u5730\u5740\uff1a</b>"+k.address+"<br/>"}if(k.type!=""){g+="<b>\u5730\u6807\u70b9\u7c7b\u578b\uff1a</b>"+k.type}h=parseInt(h)-1;addPoint(h,k.latlon,k.name,g);e+='<div  id="'+k.latlon+'" class="sDest"  wID="'+h+'"><span class="num">'+l+"\u3001</span><span>"+k.name+"</span><span> "+j+" </span></div>"})}$("#tabDrive").attr({page:f,el:d,wID:wDrive.qID});this.sHTML(c,e,d,f)},s:function(){if(this.pd){var c=this.str(ajse.jcqd,ajse.jczd);hashsend=0;if($.browser.msie){$.locationHash(c)}else{location.hash=c}ajse.init(c)}else{this.sDest()}},sHTML:function(d,c,h,j){var g="s"+h;var f="."+g;var e="."+h;$("#drresdiv").html('<div class="carnav"><div class="roadsec">\u6709\u591a\u4e2a[<span class="moredots">'+d+'</span>]\u4e0e\u60a8\u7684\u8981\u6c42\u76f8\u8fd1\uff0c\u8bf7\u9009\u62e9\u5e76\u786e\u5b9a\uff1a</div><div id="selwh" class="sel_roadshop">'+c+'<div id="wPage" class="poipage"></div></div></div><div class="street_slok"><input type="submit" name="button2" id="button2" value="\u786e\u5b9a'+d+'" onclick="wDrive.s()"></div>').show();$("#drresdiv").find(e).click(function(){if($(this).hasClass("ssOrig")||$(this).hasClass("ssDest")){return}else{var k=parseInt($(this).attr("wID"));var l=k+1;markers[k].icon.updateImage(img_URL+"/search/"+l+"b.png",19,26);markers[k].icon.hilite();if(wDrive.w){ajse.jczd=this.id;ajse.zName=$(this).find("span:eq(1)").html()}else{ajse.jcqd=this.id;ajse.qName=$(this).find("span:eq(1)").html()}$("#tabDrive").attr("wID",k);wDrive.qID=k;$(this).addClass(g).removeClass("WYQh");$(f).not(this).removeClass(g);if(wDrive.temp!=null){var l=wDrive.temp+1;markers[wDrive.temp].icon.updateImage(img_URL+"/search/"+l+"r.png",19,26);wDrive.temp=k}else{wDrive.temp=k}}}).dblclick(function(){wDrive.s()}).hover(function(){if(wDrive.qID!=$(this).attr("wID")){$(this).addClass("WYQh")}markers[$(this).attr("wID")].icon.hilite()},function(){$(this).removeClass("WYQh")});if(wDrive.w){$("#drresdiv .street_slok").before('<p><input id="odShow" type="checkbox" checked />\u540c\u65f6\u663e\u793a\u8d77\u70b9\u7ec8\u70b9</p>');wDrive.ppp=new MMarker(new MPoint(ajse.jcqd),new MIcon(img_URL+"/orig.gif",34,30,0,30));maplet.addOverlay(wDrive.ppp);maplet.setAutoZoom();$("#drresdiv #odShow").click(function(){if(document.getElementById("odShow").checked){maplet.addOverlay(wDrive.ppp);maplet.setAutoZoom()}else{maplet.removeOverlay(wDrive.ppp);maplet.setAutoZoom()}})}if(wDrive.fenye){if(j>1){$("#drresdiv #wPage").prepend('<span class="preP" wyq="'+j+'">\u4e0a\u4e00\u9875</span>')}else{$("#drresdiv #wPage").prepend('<span class="preP0" wyq="'+j+'">\u4e0a\u4e00\u9875</span>')}if(j==wDrive.pois.page){$("#drresdiv #wPage").append('<span class="nextP0" wyq="'+j+'">\u4e0b\u4e00\u9875</span>')}else{$("#drresdiv #wPage").append('<span class="nextP" wyq="'+j+'">\u4e0b\u4e00\u9875</span>')}}else{$("#drresdiv #wPage").hide()}$("#drresdiv .nextP").click(function(){var k=parseInt($(this).attr("wyq"))+1;wDrive.page(k,d,h)});$("#drresdiv .preP").click(function(){var k=parseInt($(this).attr("wyq"))-1;wDrive.page(k,d,h)});$("#drresdiv .sel_roadshop").children().eq(0).click();maplet.setAutoZoom()},str:function(e,c){var d=sizeCtrl.getSize("#pjmap");return"#tab=dr&for=dr&orig="+e+"&dest="+c+"&qcity="+encodeURI($("#qdcity").val())+"&zcity="+encodeURI($("#zdcity").val())+"&qkeyword="+encodeURI($("#qdkeyword").val())+"&zkeyword="+encodeURI($("#zdkeyword").val())+"&q="+encodeURI(ajse.qName)+"&z="+encodeURI(ajse.zName)+"&width="+d.width+"&height="+d.height}};function wStr(c,d){return c.substring(0,d)+"..."}function showLine(e){$(".casebtn > img").attr({src:img_URL+"/luout.gif",alt:"\u5c55\u5f00"});var c=$("#wyq"+e);if(c.next().css("display")=="block"){if($.browser.msie){$("#bussrchDiv .transitpoint").hide()}$("div[name='slide']:visible").slideUp("slow",function(){$("#bussrchDiv > div").removeClass("on");c.parent().addClass("on");c.find(".casebtn > img").attr({src:img_URL+"/luout.gif",alt:"\u5c55\u5f00"});$("#tabBus").attr("el",1)})}else{var d=$("div[name='slide']:visible");if($.browser.msie){$("#bussrchDiv .transitpoint").hide()}d.slideUp("slow",function(){d.parent().removeClass("itemexpand").addClass("itemclosed");d.find(".casebtn > img").attr({src:img_URL+"/luout.gif",alt:"\u5c55\u5f00"});$("#tabBus").attr("el",1)});$("#busScroll > div").removeClass("on");c.parent().addClass("on");c.find(".casebtn > img").attr({src:img_URL+"/luon.gif",alt:"\u95ed\u5408"});c.next().slideDown("slow",function(){if($.browser.msie){$("#bussrchDiv .transitpoint").show()}var f=c.offset().top-$("#busScroll").offset().top-4;$("#bussrchDiv").animate({scrollTop:f},"fast",function(){showBsLine(e)})})}return false}function showBsLine(d){maplet.clearOverlays();$.each(stArr[d],function(g,f){$.each(stArr[d][g],function(h,j){addStatn(j[1],j[0],j[1])})});addZQ(userPoint.ysqd,userPoint.yszd,userPoint.orName,userPoint.deName);maplet.setAutoZoom();for(var c=0;c<poiArr[d].length;c++){addLine(poiArr[d][c],0,"#f92f0e",4);if(c>0){addPoi(poiArr[d][c][0],"hc.gif",34,26)}}for(var e=0;e<walkArr[d].length;e++){addLine(walkArr[d][e],1,"#1f9b1d",4)}}function showLineZQ(c){ajse.stArr[c].setLabel(ajse.lbArr[c]);maplet.setCenter(ajse.stArr[c].pt);maplet.setZoomLevel(11)}pjsug={init:function(d,f,g,c,e){if(!d||!f){return}this.currentInput=(typeof d=="string")?document.getElementById(d):d;this.what=f;if(g){this.nextInput=(typeof g=="string")?document.getElementById(g):g}else{this.nextInput=null}if(c){this.SGV=(typeof c=="string")?document.getElementById(c):c}else{this.SGV=document.getElementById("sugview")}this.SGV.style.display="none";if(e){this.SG=(typeof e=="string")?document.getElementById(e):e}else{this.SG=document.getElementById("sugcont")}this.JP=document.getElementById("jsonp");this.jca={kw:[],ci:[]};this.vca={kw:"",ci:"",hc:"\u5982\uff1a\u9910\u9986\uff0c\u5bbe\u9986\uff0c\u80af\u5fb7\u57fa"};this.changeif=true;this.selindex=-1;mybrowser={version:(navigator.userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/i.test(navigator.userAgent),opera:/opera/i.test(navigator.userAgent),msie:/msie/i.test(navigator.userAgent)&&!/opera/.test(navigator.userAgent),mozilla:/mozilla/i.test(navigator.userAgent)&&!/(compatible|webkit)/.test(navigator.userAgent)};this.jshq=null;if(this.currentInput.addEventListener){this.currentInput.addEventListener("input",this.domstart,false);if(mybrowser.opera){this.currentInput.addEventListener("keypress",this.keyctrl,false)}else{this.currentInput.addEventListener("keydown",this.keyctrl,false)}}else{this.currentInput.attachEvent("onpropertychange",this.iestart);this.currentInput.attachEvent("onkeydown",this.keyctrl)}},G:function(c){return document.getElementById(c)},C:function(c){return document.createElement(c)},iestart:function(c){if(c.propertyName!="value"){return}pjsug.start()},domstart:function(){pjsug.start()},keyctrl:function(c){pjsug.swh(c,pjsug.what)},uninit:function(){if(this.currentInput.removeEventListener){this.currentInput.removeEventListener("input",this.domstart,false);if(mybrowser.opera){this.currentInput.removeEventListener("keypress",this.keyctrl,false)}else{this.currentInput.removeEventListener("keydown",this.keyctrl,false)}}else{this.currentInput.detachEvent("onpropertychange",this.iestart);this.currentInput.detachEvent("onkeydown",this.keyctrl)}},start:function(){if(this.currentInput.value==this.vca.hc){return}if(!this.JP){this.JP=this.C("div");this.JP.id="jsonp";document.body.appendChild(this.JP)}if(this.what=="ci"){if(this.currentInput.value.trim()==""){this.vca.ci="";this.SGV.style.display="none";return}if(this.changeif){this.JP.innerHTML="";var c=this.jca.ci.length;if(c>100){this.jca.ci.splice(99)}for(var d=0;d<c;d++){if(this.currentInput.value==this.jca.ci[d][0]){area(this.jca.ci[d],true);return}}var e=this.C("script");e.id="cisc";e.src="http://suggestion.pujia.com/areasearch?q="+encodeURIComponent(this.currentInput.value.trim());this.JP.appendChild(e);this.vca.ci=this.currentInput.value}}else{if(this.currentInput.value.trim()==""){this.vca.kw="";this.SGV.style.display="none";return}if(this.changeif){this.JP.innerHTML="";var c=this.jca.kw.length;if(c>100){this.jca.kw.splice(99)}for(var d=0;d<c;d++){if(this.currentInput.value==this.jca.kw[d][0]){xxs(this.jca.kw[d],true);return}}var e=this.C("script");e.id="kwsc";e.src="http://suggestion.pujia.com/itemsearch?q="+encodeURIComponent(this.currentInput.value.trim());this.JP.appendChild(e);this.vca.kw=this.currentInput.value}}},pack:function(d){var f=this.C("div");f.innerHTML="\u60a8\u662f\u4e0d\u662f\u8981\u627e\uff1a";f.className="cai";f.onclick=function(h){h=h||window.event;if(h.stopPropagation){h.stopPropagation()}else{h.cancelBubble=true}};this.SG.appendChild(f);var c=this;for(var g in d[1]){var e=this.C("div");e.innerHTML=g;e.className="nosel";e.onmouseover=function(){c.scn();this.className="sel"};e.onclick=function(h){h=h||window.event;if(h.stopPropagation){h.stopPropagation()}else{h.cancelBubble=true}if(c.currentInput){c.changeif=false;c.currentInput.value=this.innerHTML}if(c.nextInput){c.nextInput.focus()}$("#searchView").click();c.SGV.style.display="none"};e.onmouseout=function(){c.scn()};if(d[1][g]=="normal"){this.SG.insertBefore(e,f)}else{this.SG.appendChild(e)}}if(!f.nextSibling){this.SG.removeChild(f)}if(this.SG.childNodes.length){this.SGV.style.display="block"}else{this.SGV.style.display="none"}},scn:function(){var e=this.SG.childNodes;var c=e.length;for(var d=0;d<c;d++){if(e[d].className!="cai"){e[d].className="nosel"}}},swh:function(g,f){if(g.keyCode==13){this.SGV.style.display="none";if(this.nextInput){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}this.nextInput.focus()}}if(g.keyCode==38||g.keyCode==40){this.movs=false;this.changeif=false;if(this.SGV.style.display!="none"){var h=this.SG.childNodes;var c=h.length;for(var d=0;d<c;d++){if(h[d].className=="sel"){this.selindex=d;break}}this.scn();if(g.keyCode==38){if(this.selindex==0){this.vca.hc=this.vca[f];this.currentInput.value=this.vca[f];this.selindex=-1}else{if(this.selindex==-1){this.selindex=c}if(h[this.selindex-1].className=="cai"&&this.selindex==1){this.vca.hc=this.vca[f];this.currentInput.value=this.vca[f];this.selindex=-1}else{if(h[this.selindex-1].className=="cai"){h[this.selindex-2].className="sel";this.vca.hc=h[this.selindex-2].innerHTML;this.currentInput.value=h[this.selindex-2].innerHTML}else{h[this.selindex-1].className="sel";this.vca.hc=h[this.selindex-1].innerHTML;this.currentInput.value=h[this.selindex-1].innerHTML}}}}else{if(g.keyCode==40){if(this.selindex==(c-1)){this.vca.hc=this.vca[f];this.currentInput.value=this.vca[f];this.selindex=-1}else{if(h[this.selindex+1].className=="cai"){h[this.selindex+2].className="sel";this.vca.hc=h[this.selindex+2].innerHTML;this.currentInput.value=h[this.selindex+2].innerHTML}else{h[this.selindex+1].className="sel";this.vca.hc=h[this.selindex+1].innerHTML;this.currentInput.value=h[this.selindex+1].innerHTML}}}}if(g.preventDefault){g.preventDefault();g.stopPropagation()}else{g.returnValue=false;g.cancelBubble=true}}}else{this.changeif=true}}};function xxs(c,d){pjsug.selindex=-1;pjsug.SG.innerHTML="";if(!d){pjsug.jca.kw.unshift(c)}pjsug.pack(c)}function area(c,d){pjsug.selindex=-1;pjsug.SG.innerHTML="";if(!d){pjsug.jca.ci.unshift(c)}pjsug.pack(c)}function parLo(h){var e={};var g=h.substr(1);var d=g.split("&");for(var c=0;c<d.length;c++){var f=d[c].split("=");e[f[0]]=f[1]}return e}function fromPCC(e){var c,d=parLo(e);if(d.co){for(var f in county[d.ci][d.co]){c=county[d.ci][d.co][f]}mbattr.cz(c,10)}else{if(d.ci){for(var f in city[d.pr][d.ci]){c=city[d.pr][d.ci][f]}mbattr.cz(c,8)}else{for(var f in province[1][d.pr]){c=province[1][d.pr][f]}mbattr.cz(c,4)}}xCity.changeCity();if(d.ci&&d.tab=="bus"){typeChange.goBus()}else{if(d.tab=="drive"){typeChange.goDr()}}}function fromWhere(e){var d=parLo(e);var c=!d.ci?"\u5317\u4eac\u5e02":d.ci;if(!d.w){return}$.ajax({type:"POST",url:"/api/move.php",data:"ci="+c+"&kw="+d.w,beforeSend:function(){showTip(pjtips.qMove.search)},success:xCity.movesucc})}(function(g){g.fn.extend({hashchange:function(j){this.bind("hashchange",j)},openOnClick:function(j){if(j===undefined||j.length==0){j="#"}return this.click(function(k){if(j&&j.charAt(0)=="#"){window.setTimeout(function(){g.locationHash(j)},0)}else{window.location(j)}k.stopPropagation();return false})}});if(g.browser.msie&&document.documentMode&&document.documentMode>=8){g.extend({locationHash:function(j){if(!j){j="#"}else{if(j.charAt(0)!="#"){j="#"+j}}location.hash=j}});return}var f;var e;g.extend({locationHash:function(j){if(f===undefined){return}if(!j){j="#"}else{if(j.charAt(0)!="#"){j="#"+j}}location.hash=j;if(f==j){return}f=j;if(g.browser.msie){c(j)}g.event.trigger("hashchange")}});g(document).ready(function(){f=location.hash;if(g.browser.msie){if(f==""){f="#"}e=g("<iframe />").hide().get(0);g("body").prepend(e);c(location.hash);setInterval(h,100)}else{setInterval(d,100)}});g(window).unload(function(){e=null});function d(){var j=location.hash;if(j!=f){f=j;g.event.trigger("hashchange")}}function h(){var j=e.contentDocument||e.contentWindow.document;var k=j.location.hash;if(k==""){k="#"}if(k!=f){if(location.hash!=k){location.hash=k}f=k;g.event.trigger("hashchange")}}function c(k){if(k=="#"){k=""}var j=e.contentWindow.document;j.open();j.close();if(j.location.hash!=k){j.location.href=k;j.location.hash=k}}})(jQuery);function floatwin(j,l,d,c,g,k,f){var e=new operate();document.getElementById(l).innerHTML="";e.createDom("iframe",d,"shoucang","shoucPage",c,g);e.floatDom("shoucang",j,c,g,k,f);document.getElementById(l).style.display=""}function closeiframe(d){var c=document.getElementById(d);c.innerHTML="";c.style.cssText="";c.style.display="none"}var operate=function(){this.floatDom=function(c,m,o,d,e,k){var f=document.getElementById(c);var g=this.getElementPos(m);var l=g.x;var j=g.y;f.style.width=o+"px";f.style.height=d+"px";f.style.position="absolute";f.style.zIndex=999;f.style.border="solid 4px #ffac1b";f.style.background="#fefbde";f.style.left=l+e+"px";f.style.top=j+k+"px"};this.createDom=function(g,c,l,f,d,j){var k=document.createElement(g);k.id=f;k.name=f;k.src=c;k.style.width=d+"px";k.style.height=j+"px";k.style.border="none";k.scrolling="no";k.frameBorder="0px";var e=document.getElementById(l);e.appendChild(k)};this.getElementPos=function(k){var c=navigator.userAgent.toLowerCase();var d=(c.indexOf("opera")!=-1);var g=(c.indexOf("msie")!=-1&&!d);var f=document.getElementById(k);if(f.parentNode==null||f.style.display=="none"){return false}var q=null;var o=[];var l;if(f.getBoundingClientRect){l=f.getBoundingClientRect();var e=Math.max(document.documentElement.scrollTop,document.body.scrollTop);var h=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft);return{x:l.left+h,y:l.top+e}}else{if(document.getBoxObjectFor){l=document.getBoxObjectFor(f);var m=(f.style.borderLeftWidth)?parseInt(f.style.borderLeftWidth):0;var j=(f.style.borderTopWidth)?parseInt(f.style.borderTopWidth):0;o=[l.x-m,l.y-j]}else{o=[f.offsetLeft,f.offsetTop];q=f.offsetParent;if(q!=f){while(q){o[0]+=q.offsetLeft;o[1]+=q.offsetTop;q=q.offsetParent}}if(c.indexOf("opera")!=-1||(c.indexOf("safari")!=-1&&f.style.position=="absolute")){o[0]-=document.body.offsetLeft;o[1]-=document.body.offsetTop}}}if(f.parentNode){q=f.parentNode}else{q=null}while(q&&q.tagName!="BODY"&&q.tagName!="HTML"){o[0]-=q.scrollLeft;o[1]-=q.scrollTop;if(q.parentNode){q=q.parentNode}else{q=null}}return{x:o[0],y:o[1]}}};function fixPng(){var k=navigator.appVersion.split("MSIE");var d=parseFloat(k[1]);if((d>=5.5&&d<7)&&(document.body.filters)){for(var g=0;g<document.images.length;g++){var e=document.images[g];var f=e.src;if(f.indexOf("images/search")>0){var h=e.width;var c=e.height;var j=(e.className.toLowerCase().indexOf("scale")>=0)?"scale":"image";e.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e.src.replace("%23","%2523").replace("'","%27")+"', sizingMethod='"+j+"')";e.src=img_URL+"/blank.gif";e.width=h;e.height=c}}}};
