var Fe=Fe||{version:"20080809",emptyFn:function(){}};Fe.Ajax=function(B){this.url="";this.data="";this.async=true;this.duration=-1;this.overtime=false;this.username="";this.password="";this.method="GET";if(typeof B=="object"&&B){for(var A in B){this[A]=B[A]}}};(function(){Fe.Ajax.prototype.request=function(D,J){var H=this,F=B(),K=F.xhr;F.active=true;H.url=D;if(typeof J=="string"&&J){H.data=J}if(typeof H.onexecute=="function"){H.onexecute(K)}try{if(!H.username){K.open(H.method,H.url,H.async)}else{K.open(H.method,H.url,H.async,H.username,H.password)}if(H.async){K.onreadystatechange=G}if(H.method.toUpperCase()=="POST"){K.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}H.beginTime=new Date().getTime();if(H.duration>0){I()}K.send(H.data)}catch(E){if(typeof H.onerror=="function"){H.onerror(E)}}if(!H.async){G()}function G(){if(K.readyState==4){try{K.status}catch(L){if(typeof H.ondisconnect=="function"){H.ondisconnect(K)}F.active=false;return }H.duration=-1;if(!H.overtime){if(typeof H["on"+K.status]=="function"){H["on"+K.status](K)}if(K.status==200&&K.statusText.toLowerCase()=="ok"){if(typeof H.onsuccess=="function"){H.onsuccess(K)}}else{if(typeof H.onfailure=="function"){H.onfailure(K)}}}F.active=false;K.onreadystatechange=function(){}}}function I(){if(H.duration==-1){return }if(new Date().getTime()-H.beginTime>H.duration){H.duration=-1;try{K.abort()}catch(L){}H.overtime=true;F.active=false;if(typeof H.ontimeout=="function"){H.ontimeout(K)}}setTimeout(function(){I()},10)}};var C=[];function B(){var F=C;for(var E=null,D=0;D<F.length;D++){E=F[D];if(!E.active){break}}if(D>=F.length){E={active:false,xhr:A()};F[F.length]=E}return E}function A(){if(window.XMLHttpRequest){var F=new XMLHttpRequest();Fe.on(window,"onunload",function(){F.abort()});return F}else{if(window.ActiveXObject){var G=["MSXML2.XMLHttp.6.0","MSXML2.XMLHttp.3.0","MSXML2.XMLHttp.5.0","MSXML2.XMLHttp.4.0","Msxml2.XMLHTTP","MSXML.XMLHttp","Microsoft.XMLHTTP"];for(var E=0;G[E];E++){try{var F=new ActiveXObject(G[E]);Fe.on(window,"onunload",function(){F.abort()});return F}catch(D){}}throw new Error("Your browser do not support XMLHttp")}}}})();Fe.Ajax.get=function(A,B){return this.request(A,B)};Fe.Ajax.request=function(B,C,A){if(typeof C=="object"&&C){A=C;C=null}else{if(typeof C=="function"){A=A||{};A.onsuccess=C;C=null}}var D=new Fe.Ajax(A);D.request(B,C);return D};(function(){Fe._log=[];var A=0;var B={};Fe.BaseClass=function(C){B[(this.hashCode=(C||Fe.BaseClass.guid()))]=this};Fe.BaseClass.guid=function(){return"mz_"+(A++).toString(36)};Fe.BaseClass.create=function(){var C=new Fe.BaseClass();C.decontrol();return C};window.Instance=Fe.instance=Fe.I=function(C){return B[C]};Fe.BaseClass.prototype.dispose=function(){if(this.hashCode){delete B[this.hashCode]}for(var C in this){if(typeof this[C]!="function"){delete this[C]}}};Fe.BaseClass.prototype.getHashCode=function(){if(!this.hashCode){B[(this.hashCode=Fe.BaseClass.guid())]=this}return this.hashCode};Fe.BaseClass.prototype.decontrol=function(){delete B[this.hashCode]};Fe.BaseClass.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};Fe.BaseClass.prototype._wlog=function(D,E){var C=Fe._log;if(C.length>100){C.reverse().length=50;C.reverse()}C[C.length]="["+D+"]["+(this._className||"Object")+" "+this.hashCode+"] "+E}})();Function.prototype.inherits=function(D,B){var A,E,G=this.prototype,F=function(){};F.prototype=D.prototype;E=this.prototype=new F();if(typeof (B)=="string"){E._className=B}for(A in G){E[A]=G[A]}this.prototype.constructor=G.constructor;G=F=null;return E};Fe.Browser=(function(){var C=navigator.userAgent;var G=0,A=0,F=0,E=0;var D=0,H=0,B=0;if(typeof (window.opera)=="object"&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(C)){A=parseFloat(RegExp.$2)}else{if(/MSIE (\d+(\.\d+)?)/.test(C)){G=parseFloat(RegExp.$1)}else{if(/Firefox(\s|\/)(\d+(\.\d+)?)/.test(C)){E=parseFloat(RegExp.$2)}else{if(navigator.vendor=="Netscape"&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(C)){B=parseFloat(RegExp.$2)}else{if(C.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(C)){F=parseFloat(RegExp.$1)}}}}}if(C.indexOf("Gecko")>-1&&C.indexOf("KHTML")==-1&&/rv\:(\d+(\.\d+)?)/.test(C)){H=parseFloat(RegExp.$1)}return{ie:G,firefox:E,gecko:H,netscape:B,opera:A,safari:F}})();window.FeBrowser=Fe.Browser;Fe.copy=function(B){var A=Fe.copy._node;if(!A){A=Fe.copy._node=document.createElement("DIV");A.style.position="absolute";A.style.top="-1000px";A.style.left="-1000px";document.body.appendChild(A)}A.innerHTML=["<embed ",'src="img/clipboard.swf" ','FlashVars="clipboard=',encodeURIComponent(String(B)),'" ','width="0" ','height="0" ','type="application/x-shockwave-flash"></embed>'].join("")};Fe.G=function(){for(var A=[],B=arguments.length-1;B>-1;B--){var C=arguments[B];A[B]=null;if(typeof C=="object"&&C&&C.dom){A[B]=C.dom}else{if((typeof C=="object"&&C&&C.tagName)||C==window||C==document){A[B]=C}else{if(typeof C=="string"&&(C=document.getElementById(C))){A[B]=C}}}}return A.length<2?A[0]:A};if(typeof (HTMLElement)!="undefined"&&!window.opera){HTMLElement.prototype.__defineGetter__("children",function(){for(var B=[],C=0,E,D=0,A=this.childNodes.length;D<A;D++){E=this.childNodes[D];if(E.nodeType==1){B[C++]=E;if(E.name){if(!B[E.name]){B[E.name]=[]}B[E.name][B[E.name].length]=E}if(E.id){B[E.id]=E}}}return B})}Fe.ac=function(A,B){if(!(A=this.G(A))){return }B=this.trim(B);if(!new RegExp("(^| )"+B.replace(/(\W)/g,"\\$1")+"( |$)").test(A.className)){A.className=A.className.split(/\s+/).concat(B).join(" ")}};Fe.addClassName=Fe.ac;Fe.extend=function(F,D){if(F&&D&&typeof (D)=="object"){for(var E in D){F[E]=D[E]}var C=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];for(var A=0,B;A<C.length;A++){B=C[A];if(Object.prototype.hasOwnProperty.call(D,B)){F[B]=D[B]}}}return F};Fe.on=function(C,B,A){if(!(C=Fe.G(C))){return C}B=B.replace(/^on/,"").toLowerCase();if(C.attachEvent){C[B+A]=function(){A.call(C,window.event)};C.attachEvent("on"+B,C[B+A])}else{C.addEventListener(B,A,false)}return C};Fe.un=function(C,B,A){if(!(C=Fe.G(C))){return C}B=B.replace(/^on/,"").toLowerCase();if(C.attachEvent){C.detachEvent("on"+B,C[B+A]);C[B+A]=null}else{C.removeEventListener(B,A,false)}return C};Fe.rc=function(A,B){if(!(A=this.G(A))){return }B=this.trim(B);var C=A.className.replace(new RegExp("(^| +)"+B.replace(/(\W)/g,"\\$1")+"( +|$)","g"),"$2");if(A.className!=C){A.className=C}};Fe.removeClassName=Fe.rc;Fe.trim=function(A){return A.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};Fe.copy=function(B){var A=Fe.copy._node;if(!A){A=Fe.copy._node=document.createElement("DIV");A.style.position="absolute";A.style.top="-1000px";A.style.left="-1000px";document.body.appendChild(A)}A.innerHTML=["<embed ",'src="img/clipboard.swf" ','FlashVars="clipboard=',encodeURIComponent(String(B)),'" ','width="0" ','height="0" ','type="application/x-shockwave-flash"></embed>'].join("")};Fe.Array={};Fe.Array.indexOf=function(D,A,B){var C=D.length,E=Number(B)||0;E=(E<0)?Math.ceil(E):Math.floor(E);if(E<0){E+=C}for(;E<C;E++){if(E in D&&D[E]===A){return E}}return -1};Fe.Array.contains=function(A,B){return Fe.Array.indexOf(A,B)>=0};Fe.Array.unique=function(B){var C=[];for(var A=0;A<B.length;A++){if(!Fe.Array.contains(C,B[A])){C.push(B[A])}}return C};Fe.Cookie=function(B){var A="";B=B||{};if(/https?:\/\/[^\/]+([^\?]+)/i.test(location.href)){A=RegExp.$1}this.path=(B.path||A||"/").replace(/(\/)[^\/]*$/,"$1");this.expires=B.expires||"";this.domain=B.domain||document.domain||"";this.secure=B.secure||""};Fe.Cookie.set=function(C,D,A){if(/;=/g.test(C)){throw new Error('Invalid cookie name "'+C+'"')}if(/;/g.test(D)){throw new Error('Invalid cookie value "'+D+'"')}var B=new Fe.Cookie(A);B.set(C,D);return B};Fe.Cookie.prototype.set=function(B,C){var A=new Date();if(typeof (this.expires)=="number"){A.setTime(A.getTime()+this.expires)}document.cookie=B+"="+escape(C)+";expires="+A.toGMTString()+";path="+this.path+(this.domain==""?"":("; domain="+this.domain))+(this.secure?"; secure":"")};Fe.Cookie.add=function(A,B,C){return Fe.Cookie.set(A,B,C)};Fe.Cookie.remove=function(A){return Fe.Cookie.set(A,"",{expires:-1*57005*57005})};Fe.Cookie.get=function(B){var C=new RegExp("(^| )"+B+"=([^;]*)(;|$)");var A=document.cookie.match(C);if(A){return unescape(A[2])}return null};Object.extend=function(A,C){for(var B in C){A[B]=C[B]}return A};Object.extend(Object,{clone:function(A){return Object.extend({},A)}});var Class=function(){var A=function(){this.initialize.apply(this,arguments)};for(var B=0;B<arguments.length;B++){var C=arguments[B];for(var D in C.prototype){A.prototype[D]=C.prototype[D]}}A.child=function(){return new Class(this)};A.extend=function(E){for(var F in E){A.prototype[F]=E[F]}};return A};Function.prototype.bindAsEventListener=function(B){var A=this;return function(C){A.call(B,C||window.event)}};function proxy(){var C=[];for(var B=0,A=arguments.length;B<A;B++){C[B]=arguments[B]}var D=C[0];C.shift();return function(){D.apply(null,C)}}function BMAddEvent(C,B,A){if(typeof (window.attachEvent)!="undefined"){C.attachEvent("on"+B,A)}else{if(window.addEventListener){C.addEventListener(B,A,true)}}}var bdMapSuggest=new Class();bdMapSuggest.prototype={GE:function(A){return document.getElementById(A)},C:function(A){return document.createElement(A)},clktr:function(tr){this.cs();addStat(STAT_SUGG_COUNT);var tmpBol=false;if(tr.id){var j=tr.id.split("__")[2];if(this.qType==0&&this.subFormName!=""&&j>-1&&this.SD!=null){var tmpStr=this.SD.s[j];if(tmpStr.split("$")[3]!=""){tmpBol=true;this.setValue(tr.cells[2].innerHTML);qSearch(eval("document."+this.subFormName),"loc")}}else{if(this.qType==0||this.qType==2){if(j>-1&&this.SD!=null){var tmpStr=this.SD.s[j];if(tmpStr.split("$")[3]!=""){tmpBol=true;this.setValue(tr.cells[2].innerHTML)}}}}}if(!tmpBol){this.sub(tr.cells[2].innerHTML)}},sub:function(A){this.I.value=A},csc:function(){this.cs();this.I.blur();this.I.focus();if(!!this.closeFunction){eval(this.closeFunction+"()")}if(this.closeTip==1){var offdiv=this.C("div");with(offdiv){id="sugoff";position="absolute";onselectstart="return false";style.zIndex="200"}offdiv.innerHTML="提示功能已关闭,您可以在高级搜索中再次启用";document.body.appendChild(offdiv);var iPos=this.getPos(this.I);offdiv.style.left=iPos[0]+this.offsetPos[0]+"px";offdiv.style.top=iPos[1]+this.offsetPos[1]+parseInt(this.I.offsetHeight)+"px";if(this.I.offsetWidth>=offdiv.offsetWidth){offdiv.style.width=this.I.offsetWidth+"px"}this.closeTime=setTimeout(this.closeTipHide.bindAsEventListener(this),3000)}if(navigator.cookieEnabled&&Fe.Cookie.get(this.cookieN)!="1"){Fe.Cookie.set(this.cookieN,"1",{domain:"map.baidu.com",expires:946080000000})}},closeTipHide:function(){clearTimeout(this.closeTime);if(this.GE("sugoff")){document.body.removeChild(this.GE("sugoff"))}},trMouseOver:function(A){this.ct();A.className="mo";this.mouseOnSug=true},trMouseDown:function(){this.E=true;if(!this.isIE){e.stopPropagation();return false}},trOnclick:function(A,B){this.clktr(A,B);this.I.focus()},setSug:function(){if(typeof (this.SD)!="object"||typeof (this.SD.s)=="undefined"){return }var tab=this.C("table");with(tab){id="bdmap_sugt_"+this.sgId;style.backgroundColor="#fff";cellSpacing=0;cellPadding=1;style.cursor="default"}var tb=this.C("tbody");tab.appendChild(tb);var reExp=new RegExp("("+this.I.value+")","g");var reExp1="<b>"+this.I.value+"</b>";var ifShowFLg=false;for(var i=0;i<this.SD.s.length;i++){if(this.SD.t==3&&(this.SD.s[i].split("$")[4].split(";")[0]!=eval(this.cityId)||this.SD.s[i].split("$")[3]==this.I.value)){continue}ifShowFLg=true;var tr=tb.insertRow(-1);tr.id="tr__"+this.sgId+"__"+i;tr.onmouseover=proxy(this.trMouseOver.bindAsEventListener(this),tr);tr.onmouseout=this.ct.bindAsEventListener(this);tr.onmousedown=this.trMouseDown.bindAsEventListener(this);tr.onclick=proxy(this.trOnclick.bindAsEventListener(this),tr,i);var td=tr.insertCell(-1);var td1=tr.insertCell(-1);var td2=tr.insertCell(-1);td2.style.display="none";var sdwords=this.SD.s[i].split("$");switch(this.SD.t){case 0:td1.style.display="none";if(sdwords[3]==""){if(sdwords[2].toLowerCase().indexOf(this.I.value.toLowerCase())>-1){td.innerHTML=sdwords[2].replace(reExp,reExp1)+'&nbsp;<span class="spoi1">'+sdwords[0]+sdwords[1]+"</span>"}else{if(sdwords[1].toLowerCase().indexOf(this.I.value.toLowerCase())>-1||(sdwords[1]+sdwords[2]).toLowerCase().indexOf(this.I.value.toLowerCase())>-1){td.innerHTML=(sdwords[1]+sdwords[2]).replace(reExp,reExp1)+'&nbsp;<span class="spoi1">'+sdwords[0]+"</span>"}else{td.innerHTML=(sdwords[0]+sdwords[1]+sdwords[2]).replace(reExp,reExp1)}}td2.innerHTML=sdwords[0]+sdwords[1]+sdwords[2]}else{td.innerHTML=sdwords[3].replace(reExp,reExp1)+'&nbsp;<span class="spoi1">'+(sdwords[0]+sdwords[1]).replace(reExp,reExp1)+"</span>";td2.innerHTML=sdwords[0]+sdwords[1]+sdwords[2]+sdwords[3]}break;case 1:td1.style.display="none";if(sdwords[1]!=""){td.innerHTML=(sdwords[0]+sdwords[1]).replace(reExp,reExp1);td2.innerHTML=sdwords[0]+sdwords[1]}break;case 2:td1.style.display="none";if(sdwords[3]==""){if(sdwords[2].toLowerCase().indexOf(this.I.value.toLowerCase())>-1){td.innerHTML=sdwords[2].replace(reExp,reExp1)+'&nbsp;<span class="spoi1">'+sdwords[0]+sdwords[1]+"</span>"}else{if(sdwords[1].toLowerCase().indexOf(this.I.value.toLowerCase())>-1||(sdwords[1]+sdwords[2]).toLowerCase().indexOf(this.I.value.toLowerCase())>-1){td.innerHTML=(sdwords[1]+sdwords[2]).replace(reExp,reExp1)+'&nbsp;<span class="spoi1">'+sdwords[0]+"</span>"}else{td.innerHTML=(sdwords[0]+sdwords[1]+sdwords[2]).replace(reExp,reExp1)}}td2.innerHTML=sdwords[0]+sdwords[1]+sdwords[2]}else{td.innerHTML=sdwords[3].replace(reExp,reExp1)+'&nbsp;<span class="spoi1">'+(sdwords[0]+sdwords[1]).replace(reExp,reExp1)+"</span>";td2.innerHTML=sdwords[0]+sdwords[1]+sdwords[2]+sdwords[3]}break;case 3:td.innerHTML=td2.innerHTML=sdwords[3];td.width=95;var tmpLineArr=sdwords[4].split(";");var lineArr=tmpLineArr[1].split(",");var lineStr="";for(var j=lineArr.length-1;j>=0;j--){lineStr+='<div class="sugg_l_'+tmpLineArr[0]+" sugg_"+tmpLineArr[0]+"_l"+lineArr[j]+'"></div>'}td1.innerHTML=lineStr;td1.width=55;break}}if(this.closeBol==0){var th=tb.insertRow(-1);var td=th.insertCell(-1);td.style.textAlign="right";var oa=this.C("A");oa.style.textDecoration="none";oa.style.color="#0100CC";oa.href="javascript:void(0)";oa.title="关闭";oa.innerHTML="关闭";oa.onclick=this.csc.bindAsEventListener(this);td.appendChild(oa);var td1=th.insertCell(-1);td1.style.display="none";var td2=th.insertCell(-1);td2.style.display="none"}this.S.innerHTML="";this.S.appendChild(tab);this.T=this.GE("bdmap_sugt_"+this.sgId);if(ifShowFLg||(this.SD.t==3&&this.SD.s.length==1&&this.SD.s[0].split("$")[3]==this.I.value)){this.setPos();if(this.GE("noResTip"+this.sgId)){this.GE("noResTip"+this.sgId).style.display="none"}this.ifSubmit=false}else{this.S.style.display="none";if(this.isIE){this.GE("bdmap_sugif_"+this.sgId).style.display="none"}if(this.GE("noResTip"+this.sgId)){var tmpRt=this.GE("noResTip"+this.sgId);var iPos=this.getPos(this.I);tmpRt.style.left=iPos[0]+this.offsetPos[0]+"px";tmpRt.style.top=iPos[1]+this.offsetPos[1]+parseInt(this.I.offsetHeight)+"px";tmpRt.innerHTML=this.nonResTip;tmpRt.style.display=""}this.ifSubmit=true}this.c=-1;this.s3=""},setPos:function(){this.S.style.top=(this.isGecko?this.I.offsetHeight-1:this.I.offsetHeight)+"px";var iPos=this.getPos(this.I);this.S.style.left=iPos[0]+this.offsetPos[0]+"px";this.S.style.top=iPos[1]+this.offsetPos[1]+parseInt(this.I.offsetHeight)+"px";this.S.style.display="block";if(this.I.offsetWidth>=(this.T.offsetWidth+2)){this.T.style.width=(this.I.offsetWidth-2)+"px"}if(this.isIE){var sug_if=this.GE("bdmap_sugif_"+this.sgId);with(sug_if.style){display="";position="absolute";left=iPos[0]+this.offsetPos[0]+"px";top=iPos[1]+this.offsetPos[1]+parseInt(this.I.offsetHeight)+"px";width=this.S.offsetWidth+"px";height=this.S.offsetHeight+"px"}}},resetPos:function(){if(this.S.style.display!="none"){this.setPos()}},ct:function(){var A=this.T.rows;for(var B=0;B<A.length;B++){A[B].className="ml"}},cs:function(){if(this.isIE&&this.GE("bdmap_sugif_"+this.sgId)){this.GE("bdmap_sugif_"+this.sgId).style.display="none"}if(this.S){this.S.style.display="none"}if(this.GE("noResTip"+this.sgId)){this.GE("noResTip"+this.sgId).style.display="none"}this.timer3=0},cb:function(){var B=true;var C=this.I.value;if(typeof (this.T)!="undefined"&&this.T!=null){var A=this.T.rows;for(var D=0;D<A.length;D++){if(A[D].className=="mo"){if(C==A[D].cells[2].innerHTML&&!this.mouseOnSug){B=false}}}}if(B&&!this.K&&this.S){if(this.ifSend){this.sendQuery()}else{this.ifSend=true}}},sendQuery:function(){var pars="/su?wd="+encodeURIComponent(this.I.value)+"&cid="+eval(this.cityId)+"&type="+this.qType+"&newmap=1&t="+new Date().getTime();Fe.Ajax.request(pars,this.sugCallBack.bindAsEventListener(this))},sugCallBack:function(originalRequest){if(!originalRequest||originalRequest.responseText==""){return }var jsonResults="("+originalRequest.responseText+")";var items=eval(jsonResults);if(typeof (items)=="object"&&typeof (items.s)!="undefined"&&typeof (items.s[0])!="undefined"){var singleRes=false;if(items.s.length==1){switch(items.t){case 0:case 1:case 2:if(items.s[0].replace(/\$/g,"")==this.I.value){singleRes=true}break;case 3:if(items.s[0].split("$")[3]==this.I.value){singleRes=true}break}}if((this.enterQuery||items.t==3)&&singleRes){this.cs();this.SD={};this.enterQuery=false;this.ifSubmit=true}else{this.SD=items;this.setSug()}}else{this.cs();this.SD={};if(this.GE("noResTip"+this.sgId)){var tmpRt=this.GE("noResTip"+this.sgId);var iPos=this.getPos(this.I);tmpRt.style.left=iPos[0]+this.offsetPos[0]+"px";tmpRt.style.top=iPos[1]+this.offsetPos[1]+parseInt(this.I.offsetHeight)+"px";tmpRt.innerHTML=this.nonResTip;tmpRt.style.display=""}this.ifSubmit=true}},setValue:function(A){this.cs();this.ifSend=false;this.I.value=A},f:function(){if(!this.GE(this.sgId)){this.disposeSug();return }var A=this.I.value;if(A==this.s1&&A!=""&&A!=this.s3){if(this.timer2==0){if(navigator.cookieEnabled&&Fe.Cookie.get(this.cookieN)!="1"){this.timer2=setTimeout(this.cb.bindAsEventListener(this),100)}else{this.s3=A}}}else{clearTimeout(this.timer2);this.timer2=0;this.s1=A;if(A==""){this.cs()}if(this.s3!=this.I.value){this.s3=""}}},resetSuggestion:function(){if(this.S.style.display!="none"){setTimeout(function(){this.cs();if(this.SD!=null){this.setSug(this.SD);this.I.focus()}},100)}},keyDownSuggest:function(E){e=E||window.event;this.K=false;var F;if(e.keyCode==27){if(this.isIE){e.returnValue=false}else{e.preventDefault()}this.I.blur();this.I.focus();return }if(e.keyCode==13){addStat(STAT_SUGG_COUNT);if(this.c==-1){this.cs();return true}if(!this.ifSubmit){this.cs();if(this.qType==0&&this.subFormName!=""&&this.c>-1&&this.SD!=null){var B=this.SD.s[this.c];if(B.split("$")[3]!=""){return true}}if(this.qType==0||this.qType==2){if(this.c>-1&&this.SD!=null){var B=this.SD.s[this.c];if(B.split("$")[3]!=""){this.c=-1;if(e.preventDefault){e.preventDefault()}else{e.returnValue=false}return false}}}this.enterQuery=true;this.sendQuery();if(e.preventDefault){e.preventDefault()}else{e.returnValue=false}return false}else{return true}}if(e.keyCode==38||e.keyCode==40){this.mouseOnSug=false;if(this.S.style.display!="none"){var A=this.T.rows;if(this.closeBol==0){var C=A.length-1}else{var C=A.length}for(var D=0;D<C;D++){if(A[D].className=="mo"){this.c=D;break}}this.ct();var F;if(e.keyCode==38){if(this.c==0){this.I.value=this.SD.q;this.c=-1;this.K=true}else{if(this.c==-1){this.c=C}F=A[--this.c];F.className="mo";this.I.value=F.cells[2].innerHTML}}if(e.keyCode==40){if(this.c==C-1){this.I.value=this.SD.q;this.c=-1;this.K=true}else{F=A[++this.c];F.className="mo";this.I.value=F.cells[2].innerHTML}}if(!this.isIE){e.preventDefault()}}}},docMouseDown:function(A){e=A||window.event;var B=e.target||e.srcElement;if(B==this.I){return }while(B=B.parentNode){if(B==this.S||B==this.I){this.isClkSug=true;return }}if(this.timer3==0){this.timer3=setTimeout(this.cs.bindAsEventListener(this),200)}},docKeyDown:function(A){if(this.isGecko){e=A||window.event;if(e.ctrlKey){if(e.keyCode==61||e.keyCode==107||e.keyCode==109||e.keyCode==96||e.keyCode==48){this.resetSuggestion()}}}},beforeDeaSuggest:function(){if(this.E){window.event.cancelBubble=true;window.event.returnValue=false;this.E=false}},keyBlurSuggest:function(){if(!this.isClkSug){if(this.timer3==0){this.timer3=setTimeout(this.cs.bindAsEventListener(this),200)}}this.isClkSug=false},creatSugDiv:function(){if(!this.GE("bdmap_sug_"+this.sgId)){var sugdiv=this.C("div");with(sugdiv){id="bdmap_sug_"+this.sgId;className="sug";position="absolute";onselectstart="return false";style.display="none";style.zIndex="200"}document.body.appendChild(sugdiv)}this.S=this.GE("bdmap_sug_"+this.sgId);if(this.isIE){var sug_if=this.C("IFRAME");sug_if.src="javascript:void(0)";sug_if.id="bdmap_sugif_"+this.sgId;with(sug_if.style){display="none";position="absolute"}this.S.parentNode.insertBefore(sug_if,this.S)}if(this.qType==3){var nrtdiv=this.C("div");with(nrtdiv){id="noResTip"+this.sgId;className="sugtip";position="absolute";onselectstart="return false";style.display="none";style.zIndex="200"}document.body.appendChild(nrtdiv)}},disposeSug:function(){clearTimeout(this.timer2);this.timer2=0;this.s1=this.I.value;clearInterval(this.timer1);if(this.GE("bdmap_sug_"+this.sgId)){document.body.removeChild(this.GE("bdmap_sug_"+this.sgId))}if(this.GE("noResTip"+this.sgId)){document.body.removeChild(this.GE("noResTip"+this.sgId))}if(this.isIE&&this.GE("bdmap_sugif_"+this.sgId)){document.body.removeChild(this.GE("bdmap_sugif_"+this.sgId))}if(this.isIE&&this.GE("imgLogo")){this.GE("imgLogo").style.display="block";this.GE("imgLogo").style.display=""}},getPos:function(A){var C=0,B=0;while(A!=null){C+=A.offsetLeft;B+=A.offsetTop;A=A.offsetParent}return[C,B]},initialize:function(B,A){this.sgId=B.inputid;this.cookieN=B.cookiename||"bdmapsug";this.cityId=B.cityid||"modelConfig.cityCode";this.closeBol=B.closeB||0;this.qType=B.qType||0;this.closeFunction=A;this.nonResTip="抱歉，未找到相关的车站";this.offsetPos=B.offset||[0,0];this.closeTip=B.closeTip||0;this.subFormName=B.formName||"";this.closeTime=null;this.mouseOnSug=false;this.ifSubmit=false;this.S=null;this.enterQuery=false;this.ifSend=true;this.I=this.GE(B.inputid);this.I.value="";this.SD;this.CS=null;this.c=-1;this.K=false;this.mouseOnSug=false;this.E=false;this.isIE=navigator.userAgent.indexOf("MSIE")!=-1&&!window.opera;this.isWebKit=(navigator.userAgent.indexOf("AppleWebKit/")>-1);this.isGecko=(navigator.userAgent.indexOf("Gecko")>-1)&&(navigator.userAgent.indexOf("KHTML")==-1);this.timer3=0;this.T=null;this.s1="";this.s3="";this.timer1;this.timer2=0;this.isClkSug=false;this.I.setAttribute("autocomplete","off");this.creatSugDiv();this.I.onblur=this.keyBlurSuggest.bindAsEventListener(this);this.I.onkeydown=this.keyDownSuggest.bindAsEventListener(this);document.onmousedown=this.docMouseDown.bindAsEventListener(this);document.onkeydown=this.docKeyDown.bindAsEventListener(this);this.I.onbeforedeactivate=this.beforeDeaSuggest.bindAsEventListener(this);this.s3=this.I.value;this.timer1=setInterval(this.f.bindAsEventListener(this),10);BMAddEvent(window,"resize",this.resetPos.bindAsEventListener(this))}};