/**
 * MapQuest tiled map toolkit.
 * Copyright 2008, MapQuest INC.  All Rights Reserved.
 * Copying, reverse engineering, or modification is strictly prohibited.
 */
if(!window.Key){Key="GsX"}MQA={PIXERSPERLATDEGREE:315552459.661917,PIXERSPERLNGDEGREE:250344597.90989706,TILESIZE:256,SLIDESTEPS:9,SLIDEDELAY:11,SCALES:new Array(0,88011773,29337258,9779086,3520471,1504475,701289,324767,154950,74999,36000,18000,9000,4700,2500,1500,1000),MODS:new Array(0,4,12,36,100,234,502,1084,2272,4694,9778,19558,39116,74900,140818,234698,352047),VENDORLIST:new Array("","mz1copy.gif","mz4copy.gif","mz7copy.gif","mz0copy.gif"),MAPVENDORS:new Array(0,1,1,1,2,2,2,3,3,3,4,4,4,4,4,4,4),RESOURCES:"http://"+RESSERVER+"/res/",STATICRESOURCES:"http://"+STATICSERVER+"/tileprint.php",CORNER_TOPLEFT:0,CORNER_TOPRIGHT:1,CORNER_BOTTOMLEFT:2,CORNER_BOTTOMRIGHT:3,LOGO_MQ_LOGO:0,LOGO_MQ_SCALES:1,LOGO_MQ_COPY:2,LOGO_NT_COPY:3,LOGO_I3_COPY:4,LOGO_MAP_COPY:3,LOGO_SAT_COPY:4,EVENT_NONE:-1,EVENT_CLICK:0,EVENT_DBLCLICK:1,OPER_RECENTER:0,OPER_RECENTERZOOM:1,MAXMAPHEIGHT:7168,MAXMAPWIDTH:7168,BUTTON_MQ_LEFT:0,BUTTON_MQ_MIDDLE:1,BUTTON_MQ_RIGHT:2,MASTER_BROKER:null,SAFARI_BROWSER:(navigator.userAgent.indexOf("Safari")>=0),PAN_NORTH:0,PAN_SOUTH:1,PAN_EAST:2,PAN_WEST:3,CONTROL_PANZOOM:0,CONTROL_PAN:1,CONTROL_ZOOM:2,CONTROL_TYPE:3,CONTROL_TRAFFIC:4,IE_URL_LEN:2048,DEF_URL_LEN:65536,APACHE_URL_LEN:8190};MQA.SURFACE_OFFSET=2*MQA.TILESIZE;MQA.NOTHING=MQA.RESOURCES+"nothing.gif";MQA.MAP_TYPE={MAP:"map",SAT:"sat",HYB:"hyb",NONE:"none"};MQA.TILE_LAYER_ID={MAP:"mqmaptilediv",SAT:"mqsattilediv",HYB:"mqhybtilediv"};MQA.TILE_LAYER_TYPE={MAP:1,SAT:2,STRLBL:3,HOODPOLY:4,PARCEL:5};MQA._jsEval=function(s){return eval(s)};(function(AH){var y=function(AM){};var u=function(){};AH.Log={debug:y,handleError:u};function AK(){}function t(){return function(){}}function AD(AN,AO){var AP={};for(var AM in AO){if(!AP[AM]){AN[AM]=AO[AM]}}return AN}function i(AM){var AN=function(){var AO,AP,AR=arguments.callee,AQ;AO=AR.__before__;if(AO){for(AP=AO.length-1;AP>=0;AP--){AO[AP].apply(this,arguments)}}AQ=AM.apply(this,arguments);AO=AR.__after__;if(AO){for(AP=0;AP<AO.length;AP++){AO[AP].apply(this,arguments)}}return AQ};AN.__aopwrapper__=true;return AN}function K(AM){var AN=AM.indexOf("$");if(AN>0){return{name:AM.substring(0,AN),advice:AM.substring(AN+1).toLowerCase()}}else{return{name:AM}}}function D(AP,AQ,AO,AR){var AM=AR[AP],AN;if(AM===undefined){AM=AK}if(!AR.hasOwnProperty(AP)||!AM.__aopwrapper__){AN=i(AM);AR[AP]=AN}else{AN=AM}switch(AQ){case"before":if(!AN.__before__){AN.__before__=[AO]}else{AN.__before__.push(AO)}break;case"after":if(!AN.__after__){AN.__after__=[AO]}else{AN.__after__.push(AO)}break}}function B(AN,AO){var AS,AP={},AM,AR,AQ;for(AS in AO){if(AP[AS]){continue}AQ=K(AS);AM=AO[AS];if(!AQ.advice){AN[AS]=AM}else{D(AQ.name,AQ.advice,AM,AN)}}return AN}function AI(AN,AM,AP,AO){D(AM,AP.toLowerCase(),AO,AN)}function m(AN,AQ,AS,AO,AP){var AR,AM=[];for(AR=5;AR<arguments.length;AR++){AM.push(arguments[AR])}AI(AN,AQ,AS,function(){var AT=AM.concat();for(AR=0;AR<arguments.length;AR++){AT.push(arguments[AR])}return AO[AP].apply(AO,AT)})}AH.extend=AD;AH.mixin=B;AH.attach=AI;AH.connect=m;var v,H,z;function M(AM){return typeof (AM)=="function"}function Y(AM){return typeof (AM)=="undefined"}function a(AM){if(typeof AM!="string"){return false}return !!AM.match(/^\$id\$/)}function J(AO){var AM=0,AN=0;do{AM+=AO.offsetTop||0;AN+=AO.offsetLeft||0;AO=AO.offsetParent}while(AO);return{x:AN,y:AM}}function AE(AO,AQ){var AP=J(AO),AM=0,AN=0;if(AQ.pageX||AQ.pageY){AM=AQ.pageX;AN=AQ.pageY}else{if(AQ.clientX||AQ.clientY){AM=AQ.clientX+(document.body.scrollLeft||0)+(document.documentElement.scrollLeft||0);AN=AQ.clientY+(document.body.scrollTop||0)+(document.documentElement.scrollTop||0)}}AP.x=AM-AP.x;AP.y=AN-AP.y;return AP}function n(AN,AM){var AO=t();AO.prototype=AN.prototype;if(AM){return B(new AO(),AM)}else{return new AO()}}function A(AM){if(v.ie6){return AM.replace(".png",".gif")}return AM}function L(AM){if(v.ie6){AM.className=AM.className+" mqaie6"}return AM}function E(AN){var AM=0;if(AN.offsetWidth){if(AN.scrollWidth&&(AN.offsetWidth!=AN.scrollWidth)){AM=AN.scrollWidth}else{AM=AN.offsetWidth}}else{if(AN.clip&&AN.clip.width){AM=AN.clip.width}else{if(AN.style&&AN.style.pixelWidth){AM=AN.style.pixelWidth}}}return parseInt(AM)}function N(AN){var AM=0;if(AN.offsetHeight){AM=AN.offsetHeight}else{if(AN.clip&&AN.clip.height){AM=AN.clip.height}else{if(AN.style&&AN.style.pixelHeight){AM=AN.style.pixelHeight}}}return parseInt(AM)}function q(AN,AO){if(AN.type!="mouseout"&&AN.type!="mouseover"){return false}var AM=AN.relatedTarget?AN.relatedTarget:AN.type=="mouseout"?AN.toElement:AN.fromElement;while(AM&&AM!=AO){AM=AM.parentNode}return(AM!=AO)}function c(AM){function AN(AO){var AP=String(AO).toUpperCase();return AP.length==1?"0"+AP:AP}if(!AM){return"#000000"}if(typeof (AM)=="object"){return"#"+AN(AM[0])+AN(AM[1])+AN(AM[2])}else{return AM}}AH.Util={};(function(){var AN=1;H=function(AQ){if(AQ.guid){return AQ.guid}var AP=AQ["$mqa.id$"];if(!AP){AP=("$id$"+(AN++));AQ["$mqa.id$"]=AP}return AP};z=function(){var AP,AQ;if(arguments.length==1){AP=arguments[0];AQ=(typeof AP=="string")?AH._jsEval("("+AP+")"):AP;return AM(AQ[0],AQ[1])}else{if(arguments.length==2){return AM.apply(null,arguments)}else{return{}}}};function AM(AU,AQ,AP){var AX,AY,AS,AW,AT,AR=arguments.callee,AV;if(!AP){AP={}}function AZ(Ad){var Aa,Ac=Ad.match(/^([^\#\.]+)(\#([^\.]+))?(\.(.+))?$/),Ab;Aa=Ac[3];Ab=Ac[5];elt=document.createElement(Ac[1]);if(Aa){AP[Aa]=elt}if(Ab){elt.className=Ab}return elt}if(typeof (AU)=="string"){AU=AZ(AU);AP.root=AU}for(AY=0;AY<AQ.length;AY++){AT=AQ[AY];AW=typeof (AT);if(AW=="number"&&AT==0){AU.appendChild(document.createTextNode(" "))}else{AX=AQ[++AY];AS=typeof (AX);if(AS=="undefined"){continue}if(AS=="object"){AV=AZ(AT);AR(AV,AX,AP);AU.appendChild(AV)}else{(AT=="text"||AT=="t")?AU.appendChild(document.createTextNode(AX)):(AT=="style"||AT=="s")?AU.style.cssText=AX:(AT=="i")?AU.setAttribute("src",A(AX)):(AT.charAt(0)=="@")?AU.setAttribute(AT.substring(1),AX):AU[AT]=AX}}}return AP}AD(AH.Util,{objectId:H,isObjectId:a,isFunction:M,isUndefined:Y,getParentOffset:J,getLocalCoords:AE,_getRandomGUID:function(){return"$id$"+(AN++)},subClass:n,html:z,ie6Image:A,ie6Class:L,getDomWidth:E,getDomHeight:N,isMouseLeaveOrEnter:q});function AO(){var AS=new Object();AS.name=AS.version=AS.os="unknown";var AQ=(navigator.userAgent||"").toLowerCase();var AR=new Array("firefox","msie","netscape","opera","safari");var AT=new Array("linux","mac","windows","x11");for(var AU=0,AW=AR.length;AU<AW;AU++){var AP=AQ.indexOf(AR[AU])+1;if(AP>0){AS.name=AR[AU];var AV=AP+AS.name.length;var AX=((AS.name=="safari")||(AQ.charAt(AV+4)>0&&AQ.charAt(AV+4)<9))?5:3;AS.version=AQ.substring(AV,AV+AX)}}for(var AU=0,AW=AT.length;AU<AW;AU++){var AP=AQ.indexOf(AT[AU])+1;if(AP>0){AS.os=AT[AU]}}if(AS.name=="msie"&&AS.version<7){AS.ie6=true}return AS}v=AO();AH.browser=v;AH.Util.getBrowserInfo=function(){return v}})();var k,O,G;(function(){var AN={removeAll:function(AS,AQ){var AR,AT=0,AP=AQ||0,AU=AS;if(!M(AS)){AU=function(AV){return AV==AS}}for(AR=AQ||0;AR<this.length;AR++){if(AU(this[AR],AR)){AT++}else{if(AR!=AP){this[AP]=this[AR]}AP++}}this.length-=AT},removeAt:function(AQ){var AP,AR=this[AQ];for(AP=AQ+1;AP<this.length;AP++){this[AP-1]=this[AP]}this.length-=1;return AR},insert:function(AP,AR){var AQ;if(AR>=this.length){this[AR]=AP;return }for(AQ=this.length;AQ>AR;AQ--){this[AQ]=this[AQ-1]}this[AR]=AP},each:function(AQ){for(var AR=0;AR<this.length;AR++){try{AQ(this[AR],AR)}catch(AP){if(AP===G){return }throw AP}}}};function AM(AP){var AQ=typeof (AP);if(AQ=="string"||AQ=="number"){return"@$"+AP}else{return"@#"+H(AP)}}function AO(){}AO.prototype={get:function(AP){return this[AM(AP)]},put:function(AQ,AP){AQ=AM(AQ);var AR=this[AQ];this[AQ]=AP;return AR},remove:function(AP){AP=AM(AP);var AQ=this[AP];delete this[AP];return AQ},each:function(AP){var AR,AS;for(AR in this){if(AR.charAt(0)=="@"){AS=this[AR];if(AR.charAt(1)=="$"){AR=AR.substring(2)}try{AP(AS,AR)}catch(AQ){if(AQ==G){return }throw AQ}}}}};k=function(AP){if(!AP){AP=[]}AD(AP,AN);return AP};O=function(AP){if(!AP){return new AO()}AD(AP,AO.prototype);return AP}})();AH.Collection={list:k,map:O};var w;(function(){var AX={traffic:{depends:["fullUtil","shapes","jsondeserializer","remotecollection"]},jsondeserializer:{depends:["basedeserializer"]}};if(window.mqaConfig&&window.mqaConfig.modules){AD(AX,window.mqaConfig.modules)}var AN;function AU(AY,AZ){AN=AY;AH.Loader.resourcePath=w=AZ}function AS(AY){var AZ=AX[AY];if(!AZ){AZ={};AX[AY]=AZ}return AZ}function AQ(AY){var AZ=document.createElement("script");AZ.src=AY;var Aa=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];Aa.appendChild(AZ)}function AP(){var Aa,Ab,Ac=[],AY,AZ=[];for(Aa=0;Aa<arguments.length;Aa++){Ab=arguments[Aa];if(typeof Ab=="string"){if(AX[Ab]&&AX[Ab].loaded){continue}Ac.push(Ab);AZ.push(Ab)}else{if(typeof Ab=="function"){AY=Ab}break}}AZ.push(AY);if(Ac.length==0){AY();return true}else{AV(Ac[0],function(){AP.apply(null,AZ)})}}function AV(Aa,AY){var Ae=AS(Aa),Ac,Ad,Ab,AZ;if(Ae.loaded){AY();return true}Ac=Ae.depends;if(Ac){for(Ab=0;Ab<Ac.length;Ab++){Ad=AX[Ac[Ab]];if(!Ad){Ad={};AX[Ac[Ab]]=Ad}if(!Ad.loaded){AP(Ac[Ab],function(){AP(Aa,AY)});return false}}}if(Ae.waiters){Ae.waiters.push(AY);return false}else{Ae.waiters=[AY];Ae.requestTime=new Date().getTime();AZ=Ae.uri?Ae.uri:AN(Aa,"js");AQ(AZ,true);return false}}function AO(Aa){var Ac=AX[Aa],Ad,AZ,Ab,Ae;if(!Ac){Ac={};AX[Aa]=Ac}Ad=Ac.waiters;delete Ac.waiters;Ac.loaded=true;if(!Ad){return }for(Ab=0;Ab<Ad.length;Ab++){Ae=Ad[Ab];if(typeof (Ae)=="function"){try{Ae()}catch(AY){AZ=AY}}}if(AZ){throw AZ}}function AR(AY){var AZ=document.createElement("style"),Aa=document.getElementsByTagName("head")[0];if(!Aa){return }if(v.name=="msie"){AZ.setAttribute("type","text/css");AZ.styleSheet.cssText=AY}else{AZ.appendChild(document.createTextNode(AY))}if(Aa.firstChild){Aa.insertBefore(AZ,Aa.firstChild)}else{Aa.appendChild(AZ)}}function AM(AY){var AZ=document.createElement("link"),Aa=document.getElementsByTagName("head")[0];AZ.setAttribute("rel","stylesheet");AZ.setAttribute("href",AY);if(!Aa){return }if(Aa.firstChild){Aa.insertBefore(AZ,Aa.firstChild)}else{Aa.appendChild(AZ)}}function AW(Ac,Aa){var Ad=AS(Ac),AZ,Ab,AY;if(Ad.cssLoaded){return }if(Ad.cssText){AR(Ad.cssText)}else{AM(AN(Ac,"css"))}if(Aa&&!Ad.cssText){AR(Aa)}Ad.cssLoaded=true}function AT(AZ,AY){AS(AZ).cssText=AY}AH.Loader={_initialize:AU,_moduleLoaded:AO,withModule:AP,requireCss:AW,registerCss:AT,resourcePath:w,isLoaded:function(AY){var AZ=AX[AY];return AZ||AZ.loaded},registerModules:function(AY){AD(AX,AY)}};AH.withModule=AP})();(function(){var AS,AN="",AO,AP,AM,AT=document.getElementsByTagName("script");for(AS=0;AS<AT.length;AS++){AO=AT[AS];AP=AO.src;if(!AP){continue}AM=AP.indexOf("mqa.");if(AM>=0&&AP.lastIndexOf("/")<AM){AN=AP.substring(0,AM);break}}function AQ(AV,AU){return AN+"mqa.module."+AV+"."+AU}function AR(AU){return AN+AU}AH.Loader._initialize(AQ,AR)})();(function(){function Ad(Ag,Ah){var Ae=(Ag+90)*(AH.PIXERSPERLATDEGREE/Ah);var Af=parseInt(Ae/AH.TILESIZE);return Af}function AM(Ag,Ah){var Ae=(Ag+90)*(AH.PIXERSPERLATDEGREE/Ah);var Af=parseInt(Ae/AH.TILESIZE);return ret=(Ae-Af*AH.TILESIZE)}function AP(Ag,Ae){var Ah=(Ag+180)*(AH.PIXERSPERLNGDEGREE/Ae);var Af=parseInt(Ah/AH.TILESIZE);return Af}function AZ(Ag,Ae){var Ah=(Ag+180)*(AH.PIXERSPERLNGDEGREE/Ae);var Af=parseInt(Ah/AH.TILESIZE);return(Ah-Af*AH.TILESIZE)}function AX(Ai,Ah,Af){var Ae=Ai*AH.TILESIZE+Ah;var Ag=Ae/(AH.PIXERSPERLATDEGREE/Af)-90;Ag=parseInt(Ag*1000000)/1000000;return Ag}function AS(Ag,Af,Ae){var Ah=Ag*AH.TILESIZE+Af;var Ai=Ah/(AH.PIXERSPERLNGDEGREE/Ae)-180;Ai=parseInt(Ai*1000000)/1000000;while(Ai>180){Ai-=360}while(Ai<-180){Ai+=360}return Ai}__nextId=0;function AW(Af){this.display=Af;var Ae=document.createElement("div");Ae.style.position="absolute";Ae.style.backgroundImage="url("+AH.RESOURCES+"loading.gif)";Ae.style.backgroundRepeat="repeat";Af.zlevel("background").appendChild(Ae);this.div=Ae}AW.prototype={setViewport:function(Ah,Ae,Ag,Ai){if(Ah>=this.ulX&&Ae>=this.ulY&&(Ah+Ag)<=(this.ulX+this.width)&&(Ae+Ai)<=(this.ulY+this.height)){return }var Af=this.display.transform.displayToGridCoord(Ah,Ae);this.ulX=Af.ulX-2*Af.gridSize;this.ulY=Af.ulY-2*Af.gridSize;this.width=Ag+4*Af.gridSize;this.height=Ai+4*Af.gridSize;this.div.style.left=this.ulX+"px";this.div.style.top=this.ulY+"px";this.div.style.width=this.width+"px";this.div.style.height=this.height+"px"}};function AQ(Ae,Ag,Af){return Ae+":"+Af+":"+Ag}function Aa(Ae){}Aa.prototype={initialize:function(Ae){this.parent=Ae},dispose:function(){},setup:function(Ae,Ag,Aj,Af,Ah,Al,Ak,Ai){},hide:function(){}};function AN(){}AN.prototype=new Aa();AN.prototype.initialize=function(Ae){this.parent=Ae;var Af=document.createElement("img");Af.style.position="absolute";Af.style.visibility="hidden";Af.style.display="block";Af.setAttribute("unselectable","on");Af.setAttribute("galleryimg","no");Af.style.MozUserSelect="none";this.parent.elt.appendChild(Af);this.elt=Af};AN.prototype.dispose=function(){this.elt.parentNode.removeChild(this.elt)};AN.prototype.hide=function(){this.elt.style.visibility="hidden";this.elt.style.display="none"};AN.prototype.setup=function(Ae,Ag,Aj,Af,Ah,Al,Ak,Ai){this.key=Ae;if(Ag>=0&&Aj>=0){this.setupImage(this.elt,Ag,Aj,Al,Ak);this.elt.style.left=Af+"px";this.elt.style.top=Ah+"px";this.elt.style.width=Ai+"px";this.elt.style.height=Ai+"px";this.elt.style.visibility="";this.elt.style.display="block"}else{this.elt.display="none"}};AN.prototype.setupImage=function(Ah,Ai,Ae,Ag,Af){Ah.src=AH.RESOURCES+"loading.gif"};function AR(Af,Ae){return function(Ao,Ag,Ak,Al,Ap){var Ah=Ag,Ai=Ak,Am,An;while(Ah<0){Ah+=AH.MODS[Al]}while(Ah>=AH.MODS[Al]){Ah-=AH.MODS[Al]}Am=Math.floor(Ah/1000);An=Math.floor(Ai/1000);var Aj=["http://",MAPSERVER[Ag%MAPSERVER.length],"/",Af,"/Scale",Ap,"/",An,"/",Ai-An*1000,"/",Am,"/",Ah-Am*1000,".",Ae].join("");if(Ao.src){Ao.src=AH.RESOURCES+"loading.gif"}Ao.src=Aj}}function AU(){}AU.prototype=new AN();AU.prototype.setupImage=AR("map","gif");function Ab(){}Ab.prototype=new AN();Ab.prototype.setupImage=AR("sat","jpg");function Ac(){}Ac.prototype=new AN();Ac.prototype.setupImage=AR("hyb","gif");function AV(Af,Ae){this.display=Af;this.tileCtor=Ae||Aa;var Ag=document.createElement("div");Ag.style.position="absolute";Af.zlevel("tiles").appendChild(Ag);this.elt=Ag;this.tileBucket={};this.extraTiles=[];this.enabled=false}AV.prototype={dispose:function(){this.elt.parentNode.removeChild(this.elt)},enable:function(){if(this.enabled){return }this.enabled=true;this.display.invalidateLayer(this);this.elt.style.display="block"},disable:function(){if(!this.enabled){return }this.enabled=false;this.elt.style.display="none"},resetTransform:function(){var Af,Ag,Ah=this.tileBucket,Ae=this.extraTiles;this.tileBucket={};this.extraTiles=[];for(var Af in Ah){var Ag=Ah[Af];if(Ag&&(Ag instanceof Aa)){Ag.dispose()}}for(Af=0;Af<Ae.length;Af++){Ae[Af].dispose()}},setViewport:function(Az,A3,Av,A2){if(!this.enabled){return }var A5=this.display.transform,An=A5.displayToGridCoord(Az,A3),Aw=Az+Av,Ay=A3+A2,A1=Math.ceil((Aw-Az)/An.gridSize),A7=Math.ceil((Ay-A3)/An.gridSize),A9,Au,A4,Ah,Ap,Ak,Al=A5.zoom,Am=A5.scale,Ae,BA,Aq,Ar,A0,Ag,Af,Ai=this.extraTiles,As=this.tileBucket,A8={},Ax=0,Ao=0;function Aj(){var BD=A0,BC=0;while(A8[A0]){A0=BD+":"+(BC++)}var BB=As[A0];if(!BB||A5.zoom==1){BB=Ai.pop();if(!BB){BB=new this.tileCtor();BB.initialize(this);Ax+=1}else{Ao+=1}BB.setup(A0,Ag,Af,Aq,Ar,Al,Am,An.gridSize)}else{delete As[A0]}A8[A0]=BB}A9=An.row+1;Au=A9-A7-1;A4=An.col-1;Ah=A4+A1+1;Ap=An.ulX-An.gridSize*1;Ak=An.ulY-An.gridSize*1;for(var Ae=A4;Ae<=Ah;Ae++){Ag=A5.normalizeCol(Ae);Aq=Ap+(Ae-A4)*An.gridSize;for(var BA=A9;BA>=Au;BA--){Af=BA;Ar=Ak+(A9-BA)*An.gridSize;A0=AQ(Am,Ag,Af);Aj.call(this)}}this.tileBucket=A8;for(var At in As){var A6=As[At];if(A6&&(A6 instanceof Aa)){if(Ai.length<32){Ai.push(A6)}else{A6.dispose()}}}}};function AT(Af,Aj,Ag,Ai,Ae,Ah){this.zoom=Af;this.scale=Aj;this.refLat=Ag;this.refLng=Ai;this.leftOffset=Ae;this.topOffset=Ah;this.ulXRefGrid=-Math.round(AZ(Ai,Aj));this.ulYRefGrid=-(AH.TILESIZE-Math.round(AM(Ag,Aj)));this.colRefGrid=AP(Ai,Aj);this.rowRefGrid=Ad(Ag,Aj);this.colMax=AP(180,Aj);this.rowMax=Ad(90,Aj)}AT.prototype={displayToGridCoord:function(Ag,Ah){var Am=Ag-this.ulXRefGrid,Af=Ah-this.ulYRefGrid,Aj=Math.floor((Math.abs(Am)/256)*(Am>=0?1:-1)),Ak=Math.floor((Math.abs(Af)/256)*(Af>=0?1:-1)),Al=this.ulXRefGrid+Aj*256,Ae=this.ulYRefGrid+Ak*256;var Ai={ulX:Al,ulY:Ae,dx:Am,dy:Af,x:Ag-Al,y:Ah-Ae,nx:Aj,ny:Ak,col:this.normalizeCol(this.colRefGrid+Aj),row:(this.rowRefGrid-Ak),gridSize:256};return Ai},normalizeCol:function(Ae){while(Ae<0){Ae+=this.colMax+1}while(Ae>this.colMax){Ae-=this.colMax+1}return Ae},displayToLatLng:function(Ag,Ae){var Af=this.displayToGridCoord(Ag,Ae);return{lat:AX(Af.row,AH.TILESIZE-Af.y,this.scale),lng:AS(Af.col,Af.x,this.scale)}},latLngToDisplay:function(Ai,Ag){var Aj=this.scale,Ak=-Math.round(AZ(Ag,Aj)),Al=-(AH.TILESIZE-Math.round(AM(Ai,Aj))),Ae=AP(Ag,Aj),Am=Ad(Ai,Aj),Af=(Ae-this.colRefGrid)*AH.TILESIZE+this.ulXRefGrid-Ak,Ah=(this.rowRefGrid-Am)*AH.TILESIZE+this.ulYRefGrid-Al;return{x:Af,y:Ah}}};function AY(Ae,Af){this.map=Ae;this.elt=Af;this.layers={};this.zlevels=[]}AY.prototype={zlevel:function(Ae,Ag){var Ah,Af=this.zlevels,Ai;Ae=p(Ae)||0;for(Ah=0;Ah<Af.length;Ah++){Ai=Af[Ah];if(Ai._z==Ae&&Ai._f==!!Ag){return Ai}}Ai=document.createElement("div");Ai._z=Ae;Ai._f=!!Ag;Ai.style.position="absolute";Ai.style.zIndex=Ae;if(!Ag&&this._inited){Ai.style.left=this.left+"px";Ai.style.top=this.top+"px"}Af.push(Ai);this.elt.appendChild(Ai);return Ai},findParent:function(Ae){while(Ae){if(Ae.parentNode===this.elt){return Ae}Ae=Ae.parentNode}return null},ancestorEventCoords:function(Af){var Ae=AE(this.elt,Af);dspX=this.ulX+Ae.x,dspY=this.ulY+Ae.y;return{screen:Ae,display:{x:dspX,y:dspY},latLng:this.transform.displayToLatLng(dspX,dspY)}},addLayer:function(Af,Ag){this.removeLayer(Af);this.layers[Af]=Ag;try{if(Ag.resetTransform){Ag.resetTransform(this.transform)}if(Ag.setViewport){Ag.setViewport(this.ulX,this.ulY,this.width,this.height)}}catch(Ae){u("setViewport layer "+Af,Ae)}},removeLayer:function(Ag){var Af=this.layers[Ag];if(Af&&Af.dispose){try{Af.dispose()}catch(Ae){u("dispose layer "+Ag,Ae)}delete this.layers[Ag]}},eachLayer:function(Ag){var Ae,Af;for(Ae in this.layers){Af=this.layers[Ae];if(Af&&typeof (Af)=="object"){Ag(Af,Ae)}}},invalidateLayer:function(Ae){if(typeof (Ae)=="string"){Ae=this.layers[Ae]}if(!Ae){return }Ae.setViewport(this.ulX,this.ulY,this.width,this.height)},initTransform:function(Am,Aj,Ai,Ah,Al,Ae){var Ag=Al/2,Af=Ae/2,Ak=new AT(Am,Aj,Ai,Ah,Ag,Af);this.cancelDrag();this.transform=Ak;this.eachLayer(function(An){if(An.resetTransform){An.resetTransform(Ak)}});this.setViewport(-Ag,-Af,Al,Ae,true)},setViewport:function(Ag,Aj,Ae,Ah){var Af,Ak=this.zlevels,Ai;this._inited=true;if(typeof (Ae)=="undefined"){Ae=this.width}if(typeof (Ah)=="undefined"){Ah=this.height}this.width=Ae;this.height=Ah;this.ulX=Ag;this.ulY=Aj;this.left=-Ag;this.top=-Aj;for(Af=0;Af<Ak.length;Af++){Ai=Ak[Af];if(!Ai._f){Ai.style.left=this.left+"px";Ai.style.top=this.top+"px"}}this.eachLayer(function(Am,An){try{if(Am.setViewport){Am.setViewport(Ag,Aj,Ae,Ah)}}catch(Al){}})},startDrag:function(Ae,Ag){var Ak=this,Ah=this.ancestorEventCoords(Ae);this.cancelDrag();var Af=Ah.display;Ae=null;Ag.startXY=Af;Ag.startLatLng=Ah.latLng;Ag.dragXY=Af;Ag.dragLatLng=Ag.startLatLng;function Ai(Am){if(!Am){Am=window.event}var An=Am.type,Al=Ak.ancestorEventCoords(Am);Ag.dragXY=Al.display;Ag.dragLatLng=Al.latLng;if(An=="mousemove"){if(Ag.dragMove){Ag.dragMove()}}else{if(An=="mouseup"){Aj();if(Ag.dragEnd){Ag.dragEnd()}}}P(Am)}AB(document,"mousemove",Ai);AB(document,"mouseup",Ai);function Aj(){C(document,"mousemove",Ai);C(document,"mouseup",Ai);Ak.currentDrag=null}Ag.display=this;Ag.cancelDrag=function(){Aj();if(Ag.dragCancelled){Ag.dragCancelled()}};this.currentDrag=Ag;if(Ag.dragStart){Ag.dragStart()}},cancelDrag:function(){if(this.currentDrag){this.currentDrag.cancelDrag()}}};function AO(Ai,Af,Ae){if(arguments.length==0){return }var Ah;Ah=document.createElement("div");Ah.style.width=Ai.style.width;Ah.style.height=Ai.style.height;Ah.style.zIndex=0;Ah.style.overflow="hidden";Ah.style.background="#FFFFFF";Ah.style.position="relative";Ah.style.top="0px";Ah.style.left="0px";Ai.style.position="relative";Ai.appendChild(Ah);this.parent=Ah;this.width=parseInt(Ah.style.width);this.height=parseInt(Ah.style.height);this.zoom=(Af>16)?16:parseInt(Af);this.scale=AH.SCALES[this.zoom];this.tilesize=256;this.centerlat=Ae.lat;this.centerlng=Ae.lng;var Ag=document.createElement("div");Ag.style.position="absolute";Ag.style.zIndex=0;Ah.appendChild(Ag);this.display=new AY(this,Ag);this.display.initTransform(this.zoom,this.scale,Ae.lat,Ae.lng,this.width,this.height)}AO.prototype={};AH.Kernel={CoreMap:AO,LoadingLayer:AW,Tile:Aa,ImageTile:AN,MqMapImageTile:AU,MqSatImageTile:Ab,MqStrlblImageTile:Ac,TileLayer:AV,debug:y,handleError:u}})();var I={background:0,tiles:5,logo:10,shape:20,traffic_flow:30,route_ribbon:40,poi_shadow:50,poi_leader:60,route_dragdot:65,route_poi:70,poi:80,traffic_poi:90,control:100,window:1000,poi_drag:2000,route_ribbon_drag:2000};function p(AM){var AN;if(!AM){return 0}if(typeof AM=="string"){AN=I[AM];if(!AN){return 0}AM=AN}else{AM=parseInt(AM)||0}return AM}function X(AM,AN){if(AM){AM.style.zIndex=p(AN)}}AH.ZIndex={absolutize:p,set:X,Registry:I};var R,AF,AB,C,S,l,h,F,V,P,s,o,AJ=AK,U,AL,AA,r,d,Z,W,b,AG,g;(function(){AF={};var AP=false,AT=false,AV=[],AS=[],AW=false;function AU(){if(!AW&&document.body){AW=true;if(document.body.attachEvent){document.body.attachEvent("onunload",AO)}else{document.body.addEventListener("onunload",AO,false)}}}function AN(){AP=true;AU();for(var AY=0;AY<AV.length;AY++){AV[AY]()}}function AO(){}AF._onUnload=function(){if(AT){return }if(window.detachEvent){window.detachEvent("onload",AN);window.detachEvent("onunload",AO);if(document.body){document.body.detachEvent("onunload",AO)}}for(var AZ=0;AZ<AS.length;AZ++){var Aa=AS[AZ];try{AS[AZ]();if(Aa){AS[AZ]()}}catch(AY){}}AT=true};AF.addOnUnload=h=function(AY){AS.push(AY)};AF.observe=AB=function(AY,AZ,Aa){if(typeof AY=="string"){AY=document.getElementById(AY)}if(AZ=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||AY.attachEvent)){AZ="keydown"}AF._observe(AY,AZ,Aa);return Aa};AF.stopObserving=C=function(AY,AZ,Aa){if(typeof AY=="string"){AY=document.getElementById(AY)}if(AZ=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||AY.attachEvent)){AZ="keydown"}AF._stopObserving(AY,AZ,Aa)};var AR=navigator.appVersion;var AM;if(AR.match(/\bMSIE\b/)&&window.attachEvent){AM=parseFloat(AR.split("MSIE ")[1].split(";")[0]);if(AM){var AX=[];AF._observe=function(AY,AZ,Ab){AY.attachEvent("on"+AZ,Ab);var Aa=AX.length;AX[Aa]=[AY,AZ,Ab];Ab["__ie6_"+AZ]=Aa};AF._stopObserving=function(AZ,Aa,Ac){try{AZ.detachEvent("on"+Aa,Ac)}catch(AY){}var Ab=Ac["__ie6_"+Aa];if(Ab){delete AX[Ab]}};h(AF._evUnloadFcn=function(){for(var AZ in AX){var Aa=AX[AZ];if(typeof Aa=="object"&&Aa.length==3){delete AX[AZ];try{Aa[0].detachEvent("on"+Aa[1],Aa[2])}catch(AY){}}}})}else{AF._observe=function(AY,AZ,Aa){AY.attachEvent("on"+AZ,Aa)};AF._stopObserving=function(AZ,Aa,Ab){try{AZ.detachEvent("on"+Aa,Ab)}catch(AY){}}}}else{AM=false;AF._observe=function(AY,AZ,Aa){AY.addEventListener(AZ,Aa,false)};AF._stopObserving=function(AY,AZ,Aa){AY.removeEventListener(AZ,Aa,false)}}var AQ=[];AF.addDtor=S=function(AY,Aa){var AZ=AQ.length,Ab;if(arguments.length>1){Ab=[AY,Aa]}else{Ab=[AY]}AQ[AZ]=Ab;return AZ};AF.delDtor=l=function(AY){delete AQ[AY]};AF._dtorHandler=function(){AF._inGlobalDtor=true;var AZ,Aa;for(AZ in AQ){Aa=AQ[AZ];if(Aa&&(typeof Aa=="object")&&Aa.length){try{if(Aa.length==1){Aa[0].call(null)}else{Aa[0][Aa[1]].call(Aa[0])}}catch(AY){}try{delete AQ[AZ]}catch(AY){}}}};AB(window,"unload",AF._onUnload);h(AF._dtorHandler)})();R=AF;AH.EventUtil=R;AH._prEvent=R;AF.element=F=function(AM){return AM.target||AM.srcElement};AF.isLeftClick=V=function(AM){return((AM.which&&(AM.which==1))||(AM.button&&(AM.button==1)))};AF.stop=P=function(AM){try{AM.cancelBubble=true;if(AM.preventDefault){AM.preventDefault();AM.stopPropagation()}else{AM.returnValue=false}}catch(AN){}};AF.falseFunction=s=function(){return false};AF.unselectable=o=function(AM){AM.onselectstart=s;AM.unselectable=true;AM.style.MozUserSelect="none"};AF.hitch=U=function(AO,AN){var AM=[];for(var AP=2;AP<arguments.length;AP++){AM.push(arguments[AP])}return function(){var AQ=[];for(var AR=0;AR<arguments.length;AR++){AQ.push(arguments[AR])}return AO[AN].apply(AO,AM.concat(AQ))}};AF.bind=AL=function(AM,AN){return function(){return AM[AN].apply(AM,arguments)}};d=AF.EventCallback=function(AO,AN){var AM=AO;return function(AP){if(AM.turnEventsOff||(AM.map&&AM.map.turnEventsOff)){return }if(!AP){AP=window.event}AM[AN](AP)}};AF.AddDOMEventProtocol=AA=function(AM){B(AM,{addDOMEvent:function(){if(!this._domSubs){this._domSubs=[]}var AP,AN=this._domWired,AO,AQ,AS,AR=this._domSubs;outer:for(AO=0;AO<arguments.length;AO++){AP=arguments[AO];for(AS=0;AS<AR.length;AS++){if(AR[AS]==AP){continue outer}}AR.push(AP);if(AN){for(AQ=0;AQ<AN.length;AQ++){AB(AN[AQ],AP,AN._h)}}}},_wireDOMEvents:function(AO){var AN=this._domWired,AQ=this._domSubs,AP;if(!AN){AN=this._domWired=k();AN._h=d(this,"_onDOMEvent")}AN.push(AO);if(AQ){for(AP=0;AP<AQ.length;AP++){AB(AO,AQ[AP],AN._h)}}},_unwireDOMEvents:function(AO){var AN=this._domWired,AQ=this._domSubs,AP,AR;if(arguments.length==0){if(AN&&AQ){for(AP=0;AP<AN.length;AP++){for(AR=0;AR<AQ.length;AR++){C(AN[AP],AQ[AR],AN._h)}}}this._domWired=null}else{if(AN){AN.removeAll(function(AS){if(AS===AO){for(AR=0;AR<AQ.length;AR++){C(AS,AQ[AR],AN._h)}}})}}},dispose$Before:function(){this._unwireDOMEvents()}});if(!AM._onDOMEvent){AM._onDOMEvent=function(){}}AM=null};AH.Event=r=function(AM,AN){this.type="event";this.srcObject=AN;if(arguments.length){this.eventName=AM}else{this.eventName="unnamed event"}};AH.EventManager=Z=new function(){var AM={};function AN(AO){var AP=H(AO),AQ=AM[AP];if(!AQ){AQ={};AM[AP]=AQ}return AQ}this.addListener=W=function(AQ,AT,AS,AO){AT=AT.toLowerCase();var AP=AN(AQ),AR=AP[AT];if(!AR){AR=[];AP[AT]=AR}AR.push([AS,AO]);return AS};this.removeListener=b=function(AP,AW,AQ,AT){AW=AW.toLowerCase();var AO=AN(AP),AS=AO[AW],AV=[],AU,AR;if(!AS){return }for(AU=0;AU<AS.length;AU++){AR=AS[AU];if(AR[0]!==AQ&&AR[1]!==AT){AV.push(AS[AU])}}AO[AW]=AV};this.clearListeners=AG=function(AP,AQ){AQ=AQ.toLowerCase();var AO=AN(AP);delete AO[AQ]};this.clearAllListeners=EventManager_clearAllListeners=function(AO){var AP=H(AO);delete AM[AP]};this.trigger=g=function(AP,AU,AR){AU=AU.toLowerCase();var AO=AN(AP),AQ=AO[AU],AV,AS,AT;if(AQ){for(AV=0;AV<AQ.length;AV++){AS=AQ[AV];AT=AS[0];if(AT){AT.call(AS[1],AR)}}}if(typeof AP.onEvent=="function"){AP.onEvent(AU,AR)}}};var f;(function(){var AT=window.MQA,AO=AT.Kernel.debug;AT.MapLogo={MAPQUEST:0,SCALES:1,MAPQUEST_COPYRIGHT:2,NAVTEQ_COPYRIGHT:3,ICUBED_COPYRIGHT:4};AT.MapCorner={TOP_LEFT:AT.CORNER_TOPLEFT,TOP_RIGHT:AT.CORNER_TOPRIGHT,BOTTOM_LEFT:AT.CORNER_BOTTOMLEFT,BOTTOM_RIGHT:AT.CORNER_BOTTOMRIGHT};function AN(AZ,Aa,AY){AZ.display.addLayer(Aa,new AT.Kernel.TileLayer(AZ.display,AY))}function AM(AZ,AY){return function(Aa){if(typeof (Aa)=="undefined"){Aa=100}this.slideMapToPoint(this.display.width/2+AZ*this.display.width*Aa/100,this.display.height/2+AY*this.display.height*Aa/100)}}function AR(AZ,AY){var Aa,Ab=AZ.getZoomLevel(),Ac=new r("MQA.TileMap.zoomStart");Ac.zoom=Ab;AZ.onZoomStart(Ac);Aa=AY.call(AZ);Ac=new r("MQA.TileMap.zoomEnd");Ac.prevZoom=Ab;Ac.zoom=AZ.getZoomLevel();AZ.onZoomEnd(Ac);return Aa}function AP(AY,AZ){var Aa=new r();Aa.eventName="MQA.TileMap."+AZ.toLowerCase();AY["on"+AZ].call(AY,Aa)}function AQ(AZ){var AY=AZ.srcElement||AZ.target;AZ.cancelBubble=true;if(AZ.stopPropagation){AZ.stopPropagation()}}function AX(An,Aj,Ao,Ab,AY){var Al,Ag,Am=Aj.ul,Ad=Aj.lr,Aq,AZ,Ah,Ak,Af,Ai=An.getScale(),Aa,Ac=An.bestFitMargin,Ae,Ap;if(!Ab||Ab<1||Ab>15){Al=1}else{Al=Ab+1}if(!AY){Ag=16}else{if(AY<1||AY>16){Ag=16}else{Ag=AY}if(Ag<Al){Ag=Al+1}}if(typeof (Am.x)=="number"){Am=An.pixToLL(Am);Ad=An.pixToLL(Ad)}if(Ao){Ah=An.getCenter();Ak=Math.max(Math.abs(Ah.lng-Am.lng),Math.abs(Ah.lng-Ad.lng));Af=Math.max(Math.abs(Ah.lat-Am.lat),Math.abs(Ah.lat-Ad.lat));Aq=(Ak*2)*(AT.PIXERSPERLNGDEGREE/Ai);AZ=(Af*2)*(AT.PIXERSPERLATDEGREE/Ai)}else{Aq=Math.abs(Ad.lng-Am.lng)*(AT.PIXERSPERLNGDEGREE/Ai);AZ=Math.abs(Ad.lat-Am.lat)*(AT.PIXERSPERLATDEGREE/Ai)}Aa=(Ac<(An.width/2)&&Ac<(An.height/2))?Ac:Math.round(Math.min((An.width/2)-1,((An.height/2)-1)));Ae=Math.max((Ai*(Aq/(An.width-(Aa*2)))),Ai*(AZ/(An.height-(Aa*2))));while(Ae<AT.SCALES[Al]&&Al<=Ag){Al++}Al-=1;if(Ao){An.setZoom(Al)}else{Ap={lat:(Am.lat+Ad.lat)/2,lng:(Am.lng+Ad.lng)/2};An.setCenter(Ap,Al)}}function AV(Aj,Ad,Ao,Ae,AZ,Ab,Ac){var Al,Ah;if(!Ae||Ae<1||Ae>15){Al=1}else{Al=Ae+1}if(!AZ){Ah=16}else{if(AZ<1||AZ>16){Ah=16}else{Ah=AZ}if(Ah<Al){Ah=Al+1}}var Ar=new AT.PointFloatXY((Aj.ul.lng+180)*(AT.PIXERSPERLNGDEGREE/AT.SCALES[Al]),(Aj.ul.lat+90)*(AT.PIXERSPERLATDEGREE/AT.SCALES[Al]));var Ai=new AT.PointFloatXY((Aj.lr.lng+180)*(AT.PIXERSPERLNGDEGREE/AT.SCALES[Al]),(Aj.lr.lat+90)*(AT.PIXERSPERLATDEGREE/AT.SCALES[Al]));var Am=new AT.LatLng(Aj.ul.lat,Aj.ul.lng);var Af=new AT.LatLng(Aj.lr.lat,Aj.lr.lng);var AY=Math.abs(Af.lng-Am.lng)*(AT.PIXERSPERLNGDEGREE/AT.SCALES[Al]);var Aa=Math.abs(Af.lat-Am.lat)*(AT.PIXERSPERLATDEGREE/AT.SCALES[Al]);if(Ao){var Ap=new AT.PointFloatXY((Ad.lng+180)*(AT.PIXERSPERLNGDEGREE/AT.SCALES[Al]),(Ad.lat+90)*(AT.PIXERSPERLATDEGREE/AT.SCALES[Al]));var Ak=Math.max(Math.abs(Ap.x-Ar.x),Math.abs(Ap.x-Ai.x));var Ag=Math.max(Math.abs(Ap.y-Ar.y),Math.abs(Ap.y-Ai.y));AY=Ak*2;Aa=Ag*2}var Aq=(Ac<(Ab.width/2)&&Ac<(Ab.height/2)?Ac:Math.round(Math.min(((Ab.width/2)-1),((Ab.height/2)-1))));var An=Math.max((AT.SCALES[Al]*(AY/(Ab.width-(Aq*2)))),(AT.SCALES[Al]*(Aa/(Ab.height-(Aq*2)))));if(An>AT.SCALES[Al]){return Al}while(An<AT.SCALES[Al]&&Al<=AZ){Al++}return Al-1}function AU(AZ){var AY=false;this.dragStart=function(){AZ.parent.style.cursor=AZ._grabbing_mousecursor};this.dragMove=function(){if(!AY){AP(AZ,"DragStart");AP(AZ,"MoveStart");AY=true}var Aa=AZ.display,Ab=this.dragXY.x-this.startXY.x,Ac=this.dragXY.y-this.startXY.y;Aa.setViewport(Aa.ulX-Ab,Aa.ulY-Ac);AP(AZ,"Drag");AP(AZ,"Move")};this.dragEnd=function(){if(!AY){AZ.handleClickEvent(this.startXY.x-AZ.display.ulX,this.startXY.y-AZ.display.ulY)}this.dragCancelled()};this.dragCancelled=function(){if(AY){AP(AZ,"DragEnd");AP(AZ,"MoveEnd")}AZ.parent.style.cursor=AZ._grab_mousecursor}}f=function(Ac,Aa,Ah,Ag,AZ){if(AZ){this.bestFitMargin=(typeof (AZ.bestFitMargin)!="number")?0:AZ.bestFitMargin||0;if(AZ.bestFitRect){var AY={width:E(Ac),height:N(Ac)};if(!AZ.keepCenter){Aa=AV(AZ.bestFitRect,Ah,false,AZ.minZoom||1,AZ.maxZoom||16,AY,this.bestFitMargin);var Ae=AZ.bestFitRect;var Af=new AT.LatLng(Ae.ul.lat,Ae.ul.lng);var Ad=new AT.LatLng(Ae.lr.lat,Ae.lr.lng);Ah=new AT.LatLng(((Af.lat+Ad.lat)/2),((Af.lng+Ad.lng)/2))}else{this.setCenter(Ah);Aa=AV(AZ.bestFitRect,Ah,true,AZ.minZoom||1,AZ.maxZoom||16,AY,this.bestFitMargin)}}}if(!Ah){Ah={lat:38.134557,lng:-98.4375}}if(!Aa){Aa=1}AT.Kernel.CoreMap.call(this,Ac,Aa,Ah);var Ab=this.display.zlevel("control",true);Ab.style.cursor="default";function Ai(){var Aj=document.createElement("div");Aj.style.position="absolute";Ab.appendChild(Aj);return Aj}this.controlParent=this.parent2=Ab;this.controlAnchors=[Ab,Ai(),Ai(),Ai()];this._placeControlAnchors();this._grab_mousecursor=this.parent.attachEvent?AT.RESOURCES+"grab.cur":"-moz-grab";this._grabbing_mousecursor=this.parent.attachEvent?AT.RESOURCES+"grabbing.cur":"-moz-grabbing";this.parent.style.cursor=this._grab_mousecursor;this.bestFitMargin=0;this.display.addLayer("loading",new AT.Kernel.LoadingLayer(this.display));AN(this,AT.TILE_LAYER_ID.MAP,AT.Kernel.MqMapImageTile);AN(this,AT.TILE_LAYER_ID.SAT,AT.Kernel.MqSatImageTile);AN(this,AT.TILE_LAYER_ID.HYB,AT.Kernel.MqStrlblImageTile);this._initLogos();this.setMapType(Ag||"map");this.addDOMEvent("mousedown");this._wireDOMEvents(this.display.elt);this.saveState();this.onMapInit();this._dtorHandle=S(this,"dispose")};f.prototype=new AT.Kernel.CoreMap();AA(f.prototype);AD(f.prototype,{dispose:function(){l(this._dtorHandle)},_onDOMEvent:function(AZ){try{var Aa=AZ.type,Ab=this.display.findParent(F(AZ));if(Ab._f){return }if(Aa=="mousedown"&&V(AZ)){var Ac=new AU(this);this.display.startDrag(AZ,Ac);P(AZ)}}catch(AY){return }},connectSuppressEvents:function(AY){AB(AY,"mousedown",AQ);AB(AY,"click",AQ)},disconnectSuppressEvents:function(AY){C(AY,"mousedown",AQ);C(AY,"click",AQ)},_initLogos:function(){function Ac(){var Ad=document.createElement("div");Ad.corner=AT.CORNER_TOPRIGHT;Ad.offset={x:0,y:0};Ad.style.position="absolute";Ad.style.display="block";Ad.style.zIndex=22;Ad.width="124";Ad.height="18";Ad.style.overflow="hidden";Ad.style.width="124px";Ad.style.height="18px";Ad.innerHTML="<img style='-moz-user-select:none;' unselectable='on' src='http://"+RESSERVER+"/scales/scalebar.gif' />";return Ad}function AY(Af,Aj,Ai,Ag,Ad,Al,Ak,Ae){var Ah=document.createElement("img");Ah.src=Al;Ah.style.MozUserSelect="none";Ah.unselectable="no";Ah.corner=Af;Ah.offset=Aj;Ah.style.position=Ai;Ah.style.display=Ag;Ah.style.zIndex=Ad;Ah.width=Ak;Ah.height=Ae;Ah.style.width=Ak+"px";Ah.style.height=Ae+"px";return Ah}var AZ=this.logos=[AY(AT.CORNER_TOPLEFT,{x:0,y:0},"absolute","block",22,AT.RESOURCES+"mqlogo.gif",95,15),Ac(),AY(AT.CORNER_BOTTOMLEFT,{x:0,y:0},"absolute","block",22,AT.RESOURCES+"mqcopy.gif",103,12),AY(AT.CORNER_BOTTOMRIGHT,{x:0,y:0},"absolute","none",22,AT.RESOURCES+AT.VENDORLIST[1],190,12),AY(AT.CORNER_BOTTOMRIGHT,{x:0,y:13},"absolute","none",22,AT.RESOURCES+"sz1copy.gif",115,12)],Ab,Aa=this.display.zlevel("logo",true);for(Ab=0;Ab<AZ.length;Ab++){Aa.appendChild(AZ[Ab])}this._updateLogoPositions()},_updateLogoPositions:function(){var Ac,AY=this.logos,AZ,Aa=0,Ab=0;for(Ac=0;Ac<AY.length;Ac++){AZ=AY[Ac];Aa=0;Ab=0;if(AZ.corner==AT.CORNER_BOTTOMRIGHT||AZ.corner==AT.CORNER_TOPRIGHT){Aa=this.width-parseInt(AZ.style.width)-AZ.offset.x}else{Aa=AZ.offset.x}if(AZ.corner==AT.CORNER_BOTTOMRIGHT||AZ.corner==AT.CORNER_BOTTOMLEFT){Ab=this.height-parseInt(AZ.style.height)-AZ.offset.y}else{Ab=AZ.offset.y}AZ.style.left=Aa+"px";AZ.style.top=Ab+"px"}AY[AT.LOGO_MQ_SCALES].childNodes[0].style.marginTop=-((this.zoom-1)*parseInt(AY[AT.LOGO_MQ_SCALES].height))+"px";AY[AT.LOGO_MAP_COPY].src=AT.RESOURCES+AT.VENDORLIST[AT.MAPVENDORS[this.zoom]]},setLogoPlacement:function(AY,AZ){var Aa=this.logos[AY];Aa.corner=AZ.mapCorner;Aa.offset={x:AZ.offsetSize.width,y:AZ.offsetSize.height};this._updateLogoPositions()},handleClickEvent:function(Aa,AY){var AZ=new r("MQA.TileMap.click");this.onClick(AZ);this.slideMapToPoint(Aa,AY)},slideMapToPoint:function(Aa,Ad){if(typeof (Aa)=="object"){Ad=Aa.y;Aa=Aa.x}if(this._slideKey){clearTimeout(this._slideKey)}this._slideKey=null;var Ae=this.display;Aa+=Ae.ulX;Ad+=Ae.ulY;var Ab=(Ae.ulX+Ae.width/2),Ac=(Ae.ulY+Ae.height/2),Ag=Aa-Ab,Af=Ad-Ac,AY=Ae.ulX+Ag,AZ=Ae.ulY+Af;AP(this,"MoveStart");this._doSlide(AY,AZ,Ag/AT.SLIDESTEPS,Af/AT.SLIDESTEPS,AT.SLIDESTEPS)},_doSlide:function(AZ,Aa,Ab,Ac,Ad){var AY=this.display;AY.setViewport(AY.ulX+Ab,AY.ulY+Ac);AP(this,"Move");if(Ad==0){this._slideKey=null;AY.setViewport(AZ,Aa);AP(this,"MoveEnd")}else{this._slideKey=setTimeout(U(this,"_doSlide",AZ,Aa,Ab,Ac,Ad-1),AT.SLIDEDELAY)}},setMapType:function(Af){var Ae=false,AY=Ae,Ad=Ae,Ac=false,AZ=false,Ab=this.mapType,Aa;switch(Af){case"map":Ae=true;Ac=true;break;case"sat":AY=true;AZ=true;break;case"hyb":AY=true;Ad=true;Ac=true;AZ=true;break}function Ag(Ah,Ai){if(Ai){Ah.enable()}else{Ah.disable()}}Ag(this.display.layers[AT.TILE_LAYER_ID.MAP],Ae);Ag(this.display.layers[AT.TILE_LAYER_ID.SAT],AY);Ag(this.display.layers[AT.TILE_LAYER_ID.HYB],Ad);this.logos[AT.MapLogo.NAVTEQ_COPYRIGHT].style.display=(Ac?"block":"none");this.logos[AT.MapLogo.ICUBED_COPYRIGHT].style.display=(AZ?"block":"none");this.mapType=Af;Aa=new r("MQA.TileMap.mapTypeChanged");Aa.prevMapType=Ab;Aa.mapType=Af;this.onMapTypeChanged(Aa)},getMapType:function(){return this.mapType},panNorth:AM(0,-1),panSouth:AM(0,1),panEast:AM(1,0),panWest:AM(-1,0),panNorthWest:AM(-1,-1),panSouthWest:AM(-1,1),panNorthEast:AM(1,-1),panSouthEast:AM(1,1),setZoomLevel:function(AY){AY=parseInt(AY);if(AY<1){AY=1}if(AY>16){AY=16}if(this.zoom==AY){return }var AZ=this.getCenter();this.zoom=AY;this.scale=AT.SCALES[AY];AR(this,function(){this.display.initTransform(this.zoom,this.scale,AZ.lat,AZ.lng,this.width,this.height)});this._updateLogoPositions()},getZoomLevel:function(){return this.zoom},getScale:function(){return this.scale},getCenter:function(){var Aa=Math.floor(this.display.width/2)+this.display.ulX,AY=Math.floor(this.display.height/2)+this.display.ulY,AZ=this.display.transform.displayToLatLng(Aa,AY);return new AT.LatLng(AZ.lat,AZ.lng)},setCenter:function(AY,AZ){var Aa=this.display;if(AZ&&AZ!=this.zoom){this.zoom=AZ;this.scale=AT.SCALES[AZ];AR(this,function(){Aa.initTransform(this.zoom,this.scale,AY.lat,AY.lng,this.width,this.height)});this._updateLogoPositions()}else{var Ab=Aa.transform.latLngToDisplay(AY.lat,AY.lng);AP(this,"MoveStart");Aa.setViewport(Ab.x-Aa.width/2,Ab.y-Aa.height/2);AP(this,"MoveEnd")}},getBounds:function(){var AZ=this.pixToLL(new AT.Point(0,0));var AY=this.pixToLL(new AT.Point(this.getSize().width,this.getSize().height));return new AT.RectLL(AZ,AY)},pixToLL:function(Aa){var AZ=this.display,AY=AZ.transform.displayToLatLng(AZ.ulX+Aa.x,AZ.ulY+Aa.y);return new AT.LatLng(AY.lat,AY.lng)},llToPix:function(AY){var AZ=this.display,Aa=AZ.transform.latLngToDisplay(AY.lat,AY.lng);return new AT.Point(Aa.x-AZ.ulX,Aa.y-AZ.ulY)},llToDisplay:function(AY){return this.display.transform.latLngToDisplay(AY.lat,AY.lng)},pixToDisplay:function(AZ){var AY=this.display;return new AT.PointXY(AY.ulX+AZ.x,AY.ulY+AZ.y)},getDragOffset:function(){var AY=this.display;return new AT.Point(AY.ulX,AY.ulY)},getSize:function(){return new AT.Size(this.width,this.height)},saveState:function(){this.savedCenter=this.getCenter();this.savedZoomLevel=this.getZoomLevel();this.savedMapType=this.getMapType()},restoreState:function(){this.setCenter(this.savedCenter);this.setZoomLevel(this.savedZoomLevel);this.setMapType(this.savedMapType)},getSize:function(){return new AT.Size(this.width,this.height)},setSize:function(AY){var Ah,Aa,Ac=this.parent,Ae=this.parent2,Ad=this.display,Af,Ag,Ai,AZ,Ab;Ad.cancelDrag();if(AY){Ah=AY.width;Aa=AY.height}else{Ah=E(Ae);Aa=N(Ae)}Af=(Ad.ulX+Ad.width/2);Ag=(Ad.ulY+Ad.height/2);this.width=Ah;this.height=Aa;Ad.width=Ah;Ad.height=Aa;Ac.style.width=Ah+"px";Ac.style.height=Aa+"px";Ai=Af-Ah/2;AZ=Ag-Aa/2;Ad.setViewport(Ai,AZ,Ah,Aa);this._updateLogoPositions();this._placeControlAnchors();Ab=new r("MQA.TileMap.sizeChanged");Ab.width=Ah;Ab.height=Aa;this.onSizeChanged(Ab)},_placeControlAnchors:function(){var AY=this.controlAnchors,AZ=this.width+"px",Aa=this.height+"px";AY[1].style.left=AZ;AY[2].style.top=Aa;AY[3].style.left=AZ;AY[3].style.top=Aa},zoomToRect:function(Aa,AZ,AY,Ab){AX(this,Aa,AZ,AY||1,Ab||16)},bestFit:function(Ae,Ac,Ag){var Ab=this.getZoomLevel();if(Ae==null){Ae=false}if(Ac==null){Ac=1}if(Ag==null){Ag=16}var AY=new AT.Event("MQA.TileMap.zoomStart");AY.zoom=Ab;this.onZoomStart(AY);var AZ=this._getAllShapes(true).getBoundingRect();var Af=this.getShapeCollections(true,false);for(var Aa=1;Aa<Af.length;Aa++){var Ah=Af[Aa];if(Ah.getBoundingRect()!=null){if(!AZ){AZ=new AT.RectLL(Ah.getAt(0).getValue("latLng"),Ah.getAt(0).getValue("latLng"))}AZ.extend(Ah.getBoundingRect().ul);AZ.extend(Ah.getBoundingRect().lr)}}AX(this,AZ,Ae,Ac,Ag);var Ad=new AT.Event("MQA.TileMap.zoomEnd");Ad.prevZoom=Ab;Ad.zoom=this.getZoomLevel();this.onZoomEnd(Ad)},_getAllShapes:function(Ag,AZ){AZ=(typeof (Ag)!="undefined"?AZ:true);Ag=(typeof (Ag)!="undefined"?Ag:false);var Ac=new AT.ShapeCollection;var Ab=this.getShapeCollections(true,AZ);for(var Aa=0;Aa<Ab.length;Aa++){for(var Ae=0,Af=Ab[Aa].getSize();Ae<Af;Ae++){var AY=Ab[Aa].getAt(Ae);var Ad=((Ag&&(AY instanceof AT.Poi||AY instanceof AT.BasePoi))||!Ag);if(Ad){Ac.add(AY,false)}}}return Ac}});function AS(AZ){var AY=AZ.toLowerCase();return function(Aa){g(this,AY,Aa)}}function AW(AY,AZ){for(var Aa=0;Aa<AZ.length;Aa++){AY["on"+AZ[Aa]]=AS(AZ[Aa])}}AW(f.prototype,["MapInit","LayerDrawn","LayerAdded","LayerRemoved","Click","DoubleClick","ZoomStart","ZoomEnd","MapTypeChanged","ShapeAdded","ShapeRemoved","MapCleared","InfoWindowOpen","InfoWindowClose","MoveStart","Move","MoveEnd","DragStart","Drag","DragEnd","TKMouseDown","TKMouseUp","SizeChanged"]);AT.TileMap=f})();(function(){var AN=window.MQA;function AO(AP,AQ){var AR=AQ?H(AQ):"";return"w:"+AR+":"+AP}function AM(AP){this.map=AP;this.registry={};var AR=document.createElement("div");AR.style.position="absolute";AR.style.zIndex="1000";AR.style.left="0px";AR.style.top="0px";AP.display.zlevel("window",true).appendChild(AR);this.screenSurface=AR;var AQ=document.createElement("div");AQ.style.position="absolute";AQ.style.zIndex="1000";AP.display.zlevel("window").appendChild(AQ);this.globalSurface=AQ;AP.display.addLayer("global-window",this)}AM.prototype={resetTransform:function(AP){this.each(function(AQ){if(AQ.resetTransform){AQ.resetTransform(AP)}})},each:function(AP){var AR,AS=this.registry,AQ;for(AR in AS){if(AR.match(/^w\:/)){AQ=AP(AS[AR]);if(AQ){return AQ}}}},open:function(AP,AQ,AR){var AU=this.registry,AT=AO(AP,AQ),AS=AU[AT];this.close(AQ,AP);AR.opener=AQ;AR.id=AP;AU[AT]=AR;if(AR.resetTransform){AR.resetTransform(this.map.display.transform)}AR.onOpen(this);if(AQ&&AQ.onWindowOpen){AQ.onWindowOpen(AR)}},find:function(AP,AQ){return this.registry[AO(AP,AQ)]},close:function(AP,AQ){var AT=this.registry,AS=AO(AP,AQ),AR=AT[AS];if(AR){if(AQ&&AQ.onWindowClose){AQ.onWindowClose(AR)}AR.dispose();delete AT[AS]}},closeAll:function(AP,AQ){var AR=this;this.each(function(AS){if((AP&&AP!=AS.id)||(AQ&&AQ!==AS.opener)){return }AR.close(AS.id,AS.opener)})}};B(AN.TileMap.prototype,{onMapInit$After:function(){this.windowManager=new AM(this)}});AN.WindowManager=AM})();(function(){var AT=window.MQA,AS="http://"+LOGSERVER+"/tilelog/transaction";function AQ(AZ,Ab,AW,AX,Ac){AW=parseInt(AW*1000000)/1000000;AX=parseInt(AX*1000000)/1000000;var AY=AZ.display.transform.scale,Aa=AZ.getCenter(),AV;AV=AS+"?transaction=log&t="+Ab+"&c="+AW+"&c2="+AX+"&s="+Ac+"&lat="+Aa.lat+"&lng="+Aa.lng+"&key="+Key+"&rand="+Math.floor(Math.random()*99991);AT.Log.debug("TranLog: "+AV);return AV}function AP(AV){var AY=AV._tranLayer,AX,AW=AY.lastScale;if(AY.mapaccum1>0){AV.maptiler.src=AQ(AV,"m",AY.mapaccum1,AY.mapaccum2,AW);AX=true}if(AY.sataccum1>0){AV.sattiler.src=AQ(AV,"a",AY.sataccum1,AY.sataccum2,AW);AX=true}if(AY.hybaccum1>0){AV.hybtiler.src=AQ(AV,"h",AY.hybaccum1,AY.hybaccum2,AW);AX=true}AY.resetStats(true);return AX}function AM(AV){var AW=document.createElement("img");AW.src=AT.NOTHING;AW.unselectable="on";AW.style.MozUserSelect="none";AW.style.display="none";AV.appendChild(AW);return AW}function AR(AV){var AW=AV.display,AX=AW.layers;return{map:AX[AT.TILE_LAYER_ID.MAP].enabled,sat:AX[AT.TILE_LAYER_ID.SAT].enabled,hyb:AX[AT.TILE_LAYER_ID.HYB].enabled}}function AU(AV){this.map=AV;this.resetStats(true);this.resetStats(false);this.lastScale=AV.display.transform.scale}AU.prototype={resetStats:function(AV){if(AV){this.mapaccum1=0;this.sataccum1=0;this.hybaccum1=0;this.mapaccum2=0;this.sataccum2=0;this.hybaccum2=0}else{var AW=AR(this.map);if(AW.map){this.mapaccum1+=1;this.mapaccum2+=1}if(AW.sat){this.sataccum1+=1;this.sataccum2+=1}if(AW.hyb){this.hybaccum1+=1;this.hybaccum2+=1}}this.diffaccum=0;this.tileOffsetX=0;this.tileOffsetY=0},resetTransform:function(){AP(this.map);this.tileOffsetX=0;this.tileOffsetY=0;this._lastTileCoords=null;this.lastScale=this.map.display.transform.scale},setViewport:function(Ak,AV,Ag,AW){var Aj=this.map,AX=Aj.display,Af=AX.transform,Ae,AY=0,Aa,Ab=AN(Af,Ak,AV,Ag,AW),AZ=this._lastTileCoords,Ah,Ac,Ad,Ai;if(AZ){Ah=AZ.ul[0]-Ab.ul[0];Ac=AO(Ab.lr[0]-AZ.lr[0]);Ad=Ab.ul[1]-AZ.ul[1];Ai=AO(AZ.lr[1]-Ab.lr[1]);this.tileOffsetX+=Ah;this.tileOffsetY+=Ad;Ah=AO(Ah);Ad=AO(Ad);AY+=(Ah+Ac)*Ab.rowcount;AY+=(Ad+Ai)*Ab.colcount;if(AY>0){Aa=AY/(Ab.rowcount*Ab.colcount*9);Ae=AR(this.map);if(Ae.map){this.mapaccum1+=Aa}if(Ae.sat){this.sataccum1+=Aa}if(Ae.hyb){this.hybaccum1+=Aa}if(Math.abs(this.tileOffsetX)>4||Math.abs(this.tileOffsetY)>4){AP(this.map)}}}this._lastTileCoords=Ab}};function AO(AV){return AV<0?0:AV}function AN(AV,AW,AY,Ab,AX){var Ac=AV.displayToGridCoord(AW,AY),AZ,Aa;ret;AZ=Math.floor((Ab+Math.abs(AW-Ac.ulX))/Ac.gridSize);Aa=Math.floor((AX+Math.abs(AY-Ac.ulY))/Ac.gridSize);ret={ul:[Ac.col,Ac.row],lr:[Ac.col+AZ,Ac.row-Aa],colcount:AZ+1,rowcount:Aa+1};return ret}B(AT.TileMap.prototype,{onMapInit$After:function(){var AW=this.parent2,AV;this.maptiler=AM(AW);this.sattiler=AM(AW);this.hybtiler=AM(AW);AV=new AU(this);this._tranLayer=AV;this.display.addLayer("tran-"+H(AV),AV)},dispose$Before:function(){var AV=AP(this);if(AV&&AT.EventUtil._inGlobalDtor){var AW=new Date().getTime()+250;while(new Date().getTime()<AW){}}},onMapTypeChanged$After:function(){var AV=this._tranLayer;if(AV){AP(this);this._tranLayer.resetStats(false)}},setCenter$Before:function(){var AV=this._tranLayer;if(AV){AP(this);AV.resetTransform();AV.resetStats(false)}},onMoveStart$After:function(){var AV=this._tranLayer,AW=this.display;if(AV){AV.startx=AW.ulX;AV.starty=AW.ulY}},onMoveEnd$After:function(){var AY=this._tranLayer,AZ=this.display,AV,AW,Aa,Ac,Ab,AX;if(AY){AV=AY.startx,AW=AY.starty;Aa=Math.abs(AZ.ulX-AV);Ac=Math.abs(AZ.ulY-AW);AY.diffaccum+=((Aa*Ac)+((this.width-Aa)*Ac)+((this.height-Ac)*Aa));Ab=((AY.diffaccum/(this.width*this.height))>=0.4);if(Ab){AX=AR(this);if(AX.map){AY.mapaccum2+=1}if(AX.sat){AY.sataccum2+=1}if(AX.hyb){AY.hybaccum2+=1}AY.diffaccum=0}AY.startx=null;AY.starty=null}},onZoomEnd$After:function(){var AV=this._tranLayer;AV.resetStats(false)}})})();var AC;(function(){var AT=window.MQA;function AP(){this.items=[];this.guid=AT.Util._getRandomGUID(10);this.collectionName="";this.setName=function(Ab){this.collectionName=Ab};this.getName=function(){return this.collectionName};this.add=function(Ab){var Ac=this.items.length;this.items.push(Ab);if(this._onAdd){this._onAdd(Ab,Ac)}return Ac+1};this.getSize=function(){return this.items.length};this.getAt=function(Ab){return this.items[Ab]};this.remove=function(Ac){var Ad,Ae=this.items,Ab=Ae[Ac];if(Ac>=Ae.length){return }for(Ad=Ac;Ad<Ae.length;Ad++){Ae[Ad]=Ae[Ad+1]}Ae.length-=1;if(this._onRemove){this._onRemove(Ab)}return Ab};this.removeAll=function(){var Ac=this.items;this.items=[];if(this._onRemove){for(var Ab=0;Ab<Ac.length;Ab++){this._onRemove(Ac[Ab])}}};this.contains=function(Ab){var Ad=this.items;for(var Ac=0;Ac<Ad.length;Ac++){if(Ad[Ac]===Ab){return true}}};this.getById=function(Ab){};this.removeItem=function(Ab){var Ad=this.items;for(var Ac=Ad.length-1;Ac>=0;Ac--){if(Ad[Ac]===Ab){this.remove(Ac);return }}};this.append=function(Ab){for(var Ac=0;Ac<Ab.getSize();Ac++){this.add(Ab.getAt(Ac))}};this.getItemIndex=function(Ab){var Ad=this.items;for(var Ac=0;Ac<Ad.length;Ac++){if(Ad[Ac]===Ab){return Ac}}return false}}function AO(Ab,Ac){this.ul=Ab?new AT.LatLng(Ab.lat,Ab.lng):new AT.PointLL(0,0);this.lr=Ac?new AT.LatLng(Ac.lat,Ac.lng):new AT.PointLL(0,0);this.extend=function(Ad){if(Ad.lat>this.ul.lat){this.ul.lat=Ad.lat}if(Ad.lng<this.ul.lng){this.ul.lng=Ad.lng}if(Ad.lat<this.lr.lat){this.lr.lat=Ad.lat}if(Ad.lng>this.lr.lng){this.lr.lng=Ad.lng}}}function AW(){this.guid=AT.Util._getRandomGUID(10);this.className="MQA.base";this.reservedProperties="guid,className,parentCollections";this.parentCollections=[];this.setValue=function(Ab,Ac){if(typeof (this[Ab])!="undefined"){if(this.reservedProperties.search(Ab)!=-1){return false}this[Ab]=Ac;if(typeof (this[Ab+"_override"])=="undefined"){this._facio(Ab,this[Ab])}this.facio(Ab,this[Ab]);return true}else{return false}};this.getValue=function(Ab){var Ac;if(typeof (this[Ab])!="undefined"){Ac=this.duco(Ab);if(typeof (Ac)=="undefined"){Ac=this._duco(Ab);if(typeof (Ac)=="undefined"){Ac=this[Ab]}}return Ac}};this.setValues=function(Ac){var Ab=0;for(key in Ac){if(typeof (this[key])!="undefined"){if(this.setValue(key,Ac[key])){Ab++}}}return Ab};this.override=function(Ab){if(!(Ab instanceof Array)){Ab=[Ab]}for(var Ac=0;Ac<Ab.length;Ac++){this[Ab[Ac]+"_override"]=1}};this._facio=function(Ac,Ab){};this.facio=function(Ac,Ab){};this._duco=function(Ab){};this.duco=function(Ab){};this.draw=function(){};this.dispose=function(){}}function Aa(Ab){return(typeof (Ab)=="function")?Ab:undefined}function AQ(Ab,Ad){var Ac=Ad.substring(0,1).toUpperCase()+Ad.substring(1);return Aa(Ab["get"+Ac])||Aa(Ab["is"+Ac])||function(){return Ab[Ad]}}function AU(Ab,Ad,Ae){var Ac=Ad.substring(0,1).toUpperCase()+Ad.substring(1);return Aa(Ab["set"+Ac])||(!Ae&&function(Af){return Ab[Ad]=Af})}var AN={setValue:function(Ac,Ab){AU(this,Ac).call(this,Ab)},getValue:function(Ab){return AQ(this,Ab).call(this)},setValues:function(Ad){var Ae={},Ac,Ab=0;for(key in Ad){if(Ae[key]){continue}Ac=AU(this,key,true);if(Ac){Ac.call(this,Ad[key]);Ab++}}return Ab},dispose:function(){},defineProperty:function(Ak,Aj,Ad,Ab){var Ae=Ak.substring(0,1).toUpperCase()+Ak.substring(1),Ah="set"+Ae,Ai=function(Am){var Al=Ab;if(Aj&&Am!==null&&Am!==undefined){Am=Aj(Am)}if(this[Ak]!==Am){this[Ak]=Am;if(typeof (Al)=="string"){Al=this[Al]}if(typeof (Al)=="function"){Al.call(this)}}},Ac="get"+Ae,Ag="is"+Ae,Af=function(){return this[Ak]};if(!this[Ah]){this[Ah]=Ai}if(!this[Ac]){this[Ac]=Af}if(Aj===Boolean&&!this[Ag]){this[Ag]=Af}if(typeof (Ad)!="undefined"){this[Ak]=Ad}}};function AR(){}AR.prototype=AN;function AX(Ab,Ac){this.setLatLng(Ab,Ac)}AX.prototype={setLatitude:function(Ab){this.lat=parseFloat(Ab)},getLatitude:function(){return this.lat},setLongitude:function(Ab){this.lng=parseFloat(Ab)},getLongitude:function(){return this.lng},setLatLng:function(Ab,Ac){this.lat=parseFloat(Ab);this.lng=parseFloat(Ac)}};function AV(Ac,Ab){this.x=Ac;this.y=Ab}AV.prototype={setX:function(Ab){this.x=Ab},setY:function(Ab){this.y=Ab},getX:function(){return this.x},getY:function(){return this.y},setXY:function(Ac,Ab){this.x=Ac;this.y=Ab}};function AY(Ac,Ab){this.width=parseInt(Ac||0);this.height=parseInt(Ab||0)}AY.prototype={getWidth:function(){return this.width},getHeight:function(){return this.height},setWidth:function(Ab){this.width=parseInt(Ab)},setHeight:function(Ab){this.height=parseInt(Ab)},toString:function(){return this.width+","+this.height}};function AS(Ac,Ab){if(Ac==null){Ac=AT.MapCorner.TOP_LEFT}if(Ab==null){Ab=new AT.Size(0,0)}this.mapCorner=Ac;this.offsetSize=new AT.Size(Ab.width,Ab.height)}AS.prototype={getMapCorner:function(){return this.mapCorner},getOffsetSize:function(){return new AT.Size(this.offsetSize.getWidth(),this.offsetSize.getHeight())}};function AZ(Ab){return function(Ac,Ad){this.x=Ab(Ac);this.y=Ab(Ad)}}function AM(){var Ab=document.createElement("img");Ab.setAttribute("unselectable","on");Ab.style.MozUserSelect="none";Ab.style.display="block";Ab.setAttribute("galleryimg","no");return Ab}AC=AT.Icon=function(Ad,Ac,Ab){this.imageURL=Ad;this.width=parseInt(Ac);this.height=parseInt(Ab)};AC.prototype={createElement:function(){var Ac,Ad=this.imageURL,Ab=this.width,Af=this.height,Ae;if(v.ie6&&Ad.indexOf(".png")>=0&&Ab&&Af){Ac=document.createElement("div");Ac.style.width=Ab+"px";Ac.style.height=Af+"px";Ae=document.createElement("v:image");Ae.setAttribute("src",Ad);Ae.style.width=Ab+"px";Ae.style.height=Af+"px";Ac.insertAdjacentElement("beforeEnd",Ae)}else{Ac=AM();Ac.src=Ad;Ac.setAttribute("width",this.width);Ac.setAttribute("height",this.height)}return Ac}};AT.LatLng=window.MQLatLng=AX;AT.Point=window.MQPoint=AV;AT.LatLngCollection=AP;AT.RectLL=AO;AT.Size=AY;AT.Component=AR;AT.Base=AW;AT.MapCornerPlacement=AS;AT.PointXY=AZ(parseInt);AT.PointFloatXY=AZ(parseFloat);AT.PointLL=AZ(parseFloat);AT.TKObjectCollection=AP;AT.Icon=AC})();var T;(function(){var AO=1;function AN(){AH.TKObjectCollection.call(this)}AN.prototype={_onAdd:function(AS){var AR=this._peer;if(AR){AR.addShape(AS)}},_onRemove:function(AS){var AR=this._peer;if(AR){AR.removeShape(AS)}},isOnMap:function(){return !!this._peer},getDeclutter:function(){return this.declutter},setDeclutter:function(AR){this.declutter=AR;if(this.map&&this.map.declutter){this.map.declutter.invalidate()}},setMinZoomLevel:function(AR){this.minZoomLevel=AR},getMinZoomLevel:function(){return this.minZoomLevel||1},setMaxZoomLevel:function(AR){this.maxZoomLevel=AR},getMaxZoomLevel:function(){return this.maxZoomLevel||16},inZoomWindow:function(){if(!this.map){return }var AR=this.map.getZoomLevel();return(AR>=this.getMinZoomLevel()&&AR<=this.getMaxZoomLevel())},getBoundingRect:function(){if(this.getSize()==0){return null}var AV=null;var AS=[];for(var AT=0;AT<this.getSize();AT++){AV=this.getAt(AT);if((AV instanceof AH.Poi)||(AV instanceof AH.BasePoi)){if(AV.getValue("latLng")){AS.push(AV.getValue("latLng"))}}else{if(AV instanceof AH.RibbonOverlay){for(var AU=0;AU<AV.getValue("shapePoints").length;AU++){AS.push(AV.getValue("shapePoints")[AU])}}else{for(var AU=0;AU<AV.getValue("shapePoints").getSize();AU++){AS.push(AV.getValue("shapePoints").getAt(AU))}}}}var AR=new AH.RectLL(AS[0],AS[0]);for(var AT=0;AT<AS.length;AT++){AR.extend(AS[AT])}return AR}};T=function(AS,AR){this.display=AS;this.collection=AR;var AT=AS.zlevel("shape");this.elt=AT;this.shapes={};this._initCollection();this.resetTransform()};T.prototype={_initCollection:function(){var AT,AS,AR=this.collection;AR._peer=this;AR.map=this.display.map;for(AS=0;AS<AR.getSize();AS++){AT=AR.getAt(AS);this.addShape(AT)}},dispose:function(){this.eachShapePeer(function(AR){AR.dispose()});this.shapes={}},resetTransform:function(){var AR=this.collection,AS=this.display,AU=AS.transform,AT=AU.zoom,AV=this.elt;this.eachShapePeer(function(AW){AW.resetTransform(AS.transform)})},eachShapePeer:function(AT){var AR,AS;for(AR in this.shapes){if(a(AR)){AS=this.shapes[AR];AT(AS)}}},addShape:function(AU){var AR=H(AU),AT;try{AT=AU.createPeer();this._addPeer(AT,AR)}catch(AS){}return AR},removeShape:function(AT){var AR=H(AT),AS=this.shapes[AR];if(AS){this._removePeer(AS,AR)}},_addPeer:function(AS,AR){this.shapes[AR]=AS;AS.layerInit(this,this.display.map);AS.resetTransform(this.display.transform)},_removePeer:function(AS,AR){delete this.shapes[AR];if(AS.dispose){AS.dispose()}}};var AQ="shape.default";function AP(AS){var AU,AT=AS.display,AR=AS._defaultShapeCollection;if(!AR){AR=new AN();AS._defaultShapeCollection=AR;AU=new T(AT,AR);AT.addLayer(AQ,AU)}return AR}function AM(AR){var AT="_shapeCollectionRegistry",AS=AR[AT];if(!AS){AS=new AH.TKObjectCollection();AR[AT]=AS}return AS}AD(AH.TileMap.prototype,{addShape:function(AR){AP(this).add(AR);return AR},removeAllShapes:function(){AP(this).removeAll()},removeShape:function(AR){AP(this).removeItem(AR)},getShapes:function(AR){},getByKey:function(AR){},addShapes:function(AR){},replaceShapes:function(AR){},addShapeCollection:function(AV){var AT="custom.shape.layer."+(AO++),AR=this.display,AU,AS=AM(this);if(AS.contains(AV)){return }try{if(this.declutter){this.declutter.suspend()}AU=new T(AR,AV);AU.key=AT;AR.addLayer(AT,AU);AS.add(AV)}finally{if(this.declutter){this.declutter.resume()}}},removeShapeCollection:function(AU){var AT,AR=this.getShapeCollection(AU),AS=AM(this);if(!AR){return }AT=AR._peer;if(!AT){return }try{if(this.declutter){this.declutter.suspend()}AR.removeAll();this.display.removeLayer(AT.key)}finally{if(this.declutter){this.declutter.resume()}}AS.removeItem(AR);delete AR._peer;delete AR.map},replaceShapeCollection:function(AS,AR){},getShapeCollection:function(AU){var AT,AR,AS=AM(this);for(AT=0;AT<AS.getSize();AT++){AR=AS.getAt(AT);if(AR&&AR.collectionName==AU){return AR}}},getShapeCollections:function(){var AS,AT=[],AR=AM(this);for(AS=0;AS<AR.getSize();AS++){AT.push(AR.getAt(AS))}return AT},getShapeCollectionNames:function(){var AS,AT,AU=[],AR=AM(this);for(AS=0;AS<AR.getSize();AS++){AT=AR.getAt(AS);if(AT&&AT.collectionName){AU.push(AT.collectionName)}}return AU},getShapeCollectionCount:function(){return AM(this).getSize()}});AH.TileMap.prototype.getShapeByKey=AH.TileMap.getByKey;AH.TileMap.prototype.addPoi=AH.TileMap.addShape;AH.TileMap.prototype.removePoi=AH.TileMap.removePoi;AH.ShapeCollection=AN})();var x;(function(){x=function(AZ){var AU,AV,Aa;for(AU=0;AU<AZ.length;AU++){Aa=AZ[AU].bounds;Aa.w=Math.abs(Aa.ulX-Aa.lrX);Aa.h=Math.abs(Aa.ulY-Aa.lrY);Aa.ix=Aa.ulX;Aa.iy=Aa.ulY}AZ.sort(AS);var AX=AN(AZ);AQ(AX,AZ);var AY=[],AW=[AY];for(AU=0;AU<AZ.length;AU++){if(AZ[AU].bounds.bias){AY.push(AZ[AU])}else{AW.push(AZ[AU])}}return AW};function AR(AU,AW){for(var AV=0;AV<AU.length;AV++){if(AU[AV]==AW){return AV}}return -1}function AN(AZ){var AX=[],AU=[],Aa=0,AY;for(var AV=0;AV<AZ.length;AV++){if(AR(AX,AV)>=0){continue}AY=false;for(var AW=AV+1;AW<AZ.length;AW++){if(AR(AX,AW)>=0){continue}if(AP(AZ[AV].bounds,AZ[AW].bounds)){if(!AY){AU[Aa]=[AV];AX.push(AV);AY=true}AU[Aa].push(AW);AX.push(AW)}}if(AU[Aa]&&AU[Aa].length>0){Aa++}}return AU}function AQ(Aj,An){var AZ={ulX:0,ulY:0,lrX:0,lrY:0};var AX=3.14;var Ah,Ag;var Ap,Aq;var Aa,Ai;var Am;var Ao;var AW;var Al;var Ab=false;var Af;if(Aj.length==1&&Aj[0].length==An.length){Ab=true;Ah=360/Aj[0].length;Ag=1350/Ah;Ag=(Ag<75)?75:Ag}else{Ah=10;Ag=75}var Ak;var Ar,As;for(var AU=0,Ac=Aj.length;AU<Ac;AU++){Aa=-180;Ai=AT(Aj[AU],An);Am=1;Ak=Ag;for(var AV=0,Ad=Aj[AU].length;AV<Ad;AV++){Ao=An[Aj[AU][AV]];Ar=Math.ceil(Ao.bounds.w/2);As=Math.ceil(Ao.bounds.h/2);if(!Ao.moveable){continue}for(var At=Aa;;At+=Ah){if(At>=180){++Am;At-=360;if(Am>2){Ak+=30}}if(Am>4){break}Ap=Math.round(Ak*Math.cos(AX*At/180));Aq=-Math.round(Ak*Math.sin(AX*At/180));AZ.ulX=Ai.x+Ap-Ar;AZ.ulY=Ai.y+Aq-As;AZ.lrY=AZ.ulY+Ao.bounds.h;AZ.lrX=AZ.ulX+Ao.bounds.w;AW=false;for(var AY=0,Ae=An.length;AY<Ae;AY++){Af=AR(Aj[AU],AY);if(!An[AY].moveable||(An[AY].bounds.ix!=An[AY].bounds.ulX)||(An[AY].bounds.iy!=An[AY].bounds.ulY)){if(AO(An[AY].bounds.ix+Ar,An[AY].bounds.iy+As,An[AY].bounds.ulX+Ar,An[AY].bounds.ulY+As,Ao.bounds.ix+Ar,Ao.bounds.iy+As,AZ.ulX+Ar,AZ.ulY+As)){AW=true;break}}if(Af<0){if((AP(AZ,An[AY].bounds))||((Am<2)&&AM((Ao.bounds.ix+Ar),(Ao.bounds.iy+As),AZ.ulX+Ar,AZ.ulY+As,An[AY].bounds))){AW=true;break}else{if((Am<2)&&(!An[AY].moveable||(An[AY].bounds.ix!=An[AY].bounds.ulX)||(An[AY].bounds.iy!=An[AY].bounds.ulY))){if(AM(An[AY].bounds.ix+(An[AY].bounds.w/2),An[AY].bounds.iy+(An[AY].bounds.h/2),An[AY].bounds.ulX+Ar,An[AY].bounds.ulY+As,AZ)){AW=true;break}}}}else{if((Af>=0)&&(Af<AV)&&(AP(AZ,An[AY].bounds))){AW=true;break}}}if(AW){continue}Aa=At+Ah;Al=Ao;Ao.bounds.ulX=AZ.ulX;Ao.bounds.ulY=AZ.ulY;Ao.bounds.lrX=AZ.ulX+Ao.bounds.w;Ao.bounds.lrY=AZ.ulY+Ao.bounds.h;Ao.bounds.bias={x:AZ.ulX-Ao.bounds.ix,y:AZ.ulY-Ao.bounds.iy};if(!Ao.bounds.bias.x&&!Ao.bounds.bias.y){Ao.bounds.bias=null}break}}}}function AP(Ac,Ad){var Aa=Ac.ulX,AU=Ac.ulY,AV=Ac.lrX,AY=Ac.lrY,Ab=Ad.ulX,AW=Ad.ulY,AX=Ad.lrX,AZ=Ad.lrY;return !(Ab>=AV||AX<=Aa||AW>=AY||AZ<=AU)}function AT(AW,Aa){var AY=0;var AZ=0;var AU;var AV=AW.length;for(var AX=0;AX<AV;AX++){AU=Aa[AW[AX]].bounds;AY+=AU.ix+AU.w/2;AZ+=AU.iy+AU.h/2}return{x:Math.round(AY/AV),y:Math.round(AZ/AV)}}function AO(Ae,AY,Ah,Aa,Ad,AX,Af,AZ){var AU=(Ah-Ae==0)?(Aa-AY)/1e-8:(Aa-AY)/(Ah-Ae);var Ag=AY-AU*Ae;var AW=(Af-Ad==0)?(AZ-AX)/1e-8:(AZ-AX)/(Af-Ad);var Ai=AX-AW*Ad;var Ab,Ac;Ab=Math.round(0-(Ag-Ai)/(AU-AW));Ac=(Math.abs(AU)<Math.abs(AW))?Math.round(Ag+AU*Ab):Math.round(Ai+AW*Ab);if(((Ae<=Ab&&Ah>=Ab)||(Ae>=Ab&&Ah<=Ab))&&((Ad<=Ab&&Af>=Ab)||(Ad>=Ab&&Af<=Ab))&&((AY<=Ac&&Aa>=Ac)||(AY>=Ac&&Aa<=Ac))&&((AX<=Ac&&AZ>=Ac)||(AX>=Ac&&AZ<=Ac))){var AV=3;if(((Math.abs(Ae-Ab)<=AV)&&(Math.abs(AY-Ac)<=AV))||((Math.abs(Ad-Ab)<=AV)&&(Math.abs(AX-Ac)<=AV))||((Math.abs(Ah-Ab)<=AV)&&(Math.abs(Aa-Ac)<=AV))||((Math.abs(Af-Ab)<=AV)&&(Math.abs(AZ-Ac)<=AV))){return(false)}return(true)}return(false)}function AM(Ag,AW,Ai,AY,Ak){var AU=(Ai-Ag==0)?(AY-AW)/1e-8:(AY-AW)/(Ai-Ag);var Af=AW-AU*Ag;var Ab=0;var Aa=Ak.h/1e-8;var Ae,AV,Ah,AX;var Aj,AZ,Ad;for(var Ac=1;Ac<=4;Ac++){switch(Ac){case 1:Ae=Ak.ulX;AV=Ak.ulY;Ah=Ak.lrX;AX=Ak.lrY;break;case 2:Ae=Ak.lrX;AV=Ak.ulY;Ah=Ak.lrX;AX=Ak.lrY;break;case 3:Ae=Ak.ulX;AV=Ak.lrY;Ah=Ak.lrX;AX=Ak.lrY;break;case 4:Ae=Ak.ulX;AV=Ak.ulY;Ah=Ak.ulX;AX=Ak.lrY;break}if(Ac%2==1){Aj=AV;AZ=Math.round(0-(Af-Aj)/AU);Ad=Aj}else{Aj=AV-Aa*Ae;AZ=Math.round(0-(Af-Aj)/(AU-Aa));Ad=(Math.abs(AU)<Math.abs(Aa))?Math.round(Af+AU*AZ):Math.round(Aj+Aa*AZ)}if(((Ag<=AZ&&Ai>=AZ)||(Ag>=AZ&&Ai<=AZ))&&((Ae<=AZ&&Ah>=AZ)||(Ae>=AZ&&Ah<=AZ))&&((AW<=Ad&&AY>=Ad)||(AW>=Ad&&AY<=Ad))&&((AV<=Ad&&AX>=Ad)||(AV>=Ad&&AX<=Ad))){return(true)}}return(false)}function AS(AU,AV){return AU.bounds.ulX-AV.bounds.ulX}})();(function(){function AM(AN){this.map=AN;this._enabled=0;this._markers=O()}AM.prototype={register:function(AN){if(!AN.getNeededBounds||!AN.setBias||!AN.shouldDeclutter){return }if(!this._markers.put(AN,AN)&&AN.shouldDeclutter()){this.invalidate()}},unregister:function(AN){if(this._markers.remove(AN)){this.invalidate()}},invalidate:function(){this._invalid=true;if(this._enabled==0){this._execute()}},suspend:function(){this._enabled++},resume:function(){if(this._enabled>0){if(--this._enabled==0&&this._invalid){this._execute()}}},withSuspended:function(AO,AN){this.suspend();try{if(arguments.length>1){return AN.call(AO)}else{return AO()}}finally{this.resume()}},_execute:function(){this._invalid=false;var AO=this.map.display.transform,AT=[];this._markers.each(function(AW){AT.push({marker:AW,bounds:AW.getNeededBounds(AO),moveable:AW.shouldDeclutter()=="moveable"})});var AR,AP,AQ,AS,AU,AN,AV=x(AT);for(AU=0;AU<AV.length;AU++){AS=AV[AU];if(AS.marker){AS.marker.setBias(null)}else{for(AN=0;AN<AS.length;AN++){AR=AS[AN];AP=AR.marker.bias;AQ=AR.bounds.bias;if(!AP||!AQ||AP.x!=AQ.x||AP.y!=AQ.y){AR.marker.setBias(AQ)}}}}}};B(f.prototype,{onMapInit$After:function(){this.declutter=new AM(this)},getDeclutter:function(){return this.declutter},onZoomEnd$After:function(){this.declutter.invalidate()}});B(T.prototype,{_addPeer$After:function(AN){if(typeof AN.shouldDeclutter=="function"&&AN.shouldDeclutter()){var AO=this.display.map.declutter;AN._declutterCnt=AO;AO.register(AN)}},_removePeer$After:function(AN){if(AN._declutterCnt){this.display.map.declutter.unregister(AN)}}})})();var j;(function(){j=function(){this._cnts=O();this._pxX=0;this._pxY=0};var AP=AD(new AH.Component(),{createPeer:function(){return this},layerInit:function(AS,AR){this.map=AR;this.layer=AS;var AQ=this;this._cnts.each(function(AT){AO(AQ,AT)})},dispose:function(){var AQ=this;this._cnts.each(function(AR){AM(AQ,AR);if(AR.parentNode){AR.parentNode.removeChild(AR)}})},_onDOMEvent:function(AQ){},resetTransform:function(AQ){this._updatePosition()},_updatePosition:function(){if(!this.map){return }if(!this._updateVisibility()){return }var AT=this.map.display.transform,AQ=AT.latLngToDisplay(this.latLng.lat,this.latLng.lng),AR,AS,AV=this.bias,AU=this._elt;if(AV&&(AV.x||AV.y)){AR=AQ.x+AV.x;AS=AQ.y+AV.y;this._updateBias(AQ.x,AQ.y,AV.x,AV.y)}else{AR=AQ.x;AS=AQ.y;this._updateBias(AR,AS,0,0)}if(this._pxX!=AR||this._pxY!=AS){this._pxX=AR;this._pxY=AS;this._cnts.each(function(AW){var AX=AW._poiOfs;AW.style.top=(AX.y+AS)+"px";AW.style.left=(AX.x+AR)+"px"});g(this,"move",new r("Poi.move",this))}},_updateBias:function(AT,AQ,AR,AS){},_actIsVisible:function(){if(!this.layer){return false}var AQ=(this.map?this.map.zoom:0),AR=this.layer.collection;return this.visible&&this.latLng&&AQ>=Math.max(this.minZoomLevel,AR.getMinZoomLevel())&&AQ<=Math.min(this.maxZoomLevel,AR.getMaxZoomLevel())},_updateVisibility:function(){var AQ=this._actIsVisible();this._cnts.each(function(AR){AR.style.display=((AQ&&AR._poiV)?"block":"none")});return AQ},setContent:function(AR,AU,AV,AW,AX,AQ){var AT=this._cnts,AY=AT.remove(AR),AS;if(AY){AM(this,AY);if(AY.parentNode){AY.parentNode.removeChild(AY)}}if(AU){o(AU);AU.style.position="absolute";AU._poiOfs={x:AV,y:AW};AU._poiZ=AQ;AU._poiV=true;AT.put(AR,AU);if(AY&&AY.parentNode){AY.parentNode.removeChild(AY)}AO(this,AU);AN(this,AU,AX)}},setContentOffset:function(AS,AR,AT){var AQ=this._cnts.get(AS);if(AQ){AQ._poiOfs={x:AR,y:AT};AO(this,AQ)}},getContent:function(AQ){return this._cnts.get(AQ)},setContentZIndex:function(AR,AS){var AQ=this._cnts.get(AR);if(AQ){AQ._poiZ=AS;AO(this,AQ)}},setContentVisible:function(AS,AQ){var AR=this._cnts.get(AS);if(AR){AR._poiV=AQ;AR.style.display=(this._actIsVisible()&&AQ)?"block":"none"}}});j.prototype=AP;AA(AP);function AN(AR,AS,AQ){AS._eventGroup=AQ;if(AQ){AR._wireDOMEvents(AS)}}function AM(AQ,AR){if(!AR||!AR._eventGroup){return }if(AR._eventGroup){AQ._unwireDOMEvents(AR)}AR._eventGroup=null}function AO(AQ,AR){var AU=AQ.layer,AT,AV=AR._poiZ,AS=AR._poiOfs;if(!AU){return }AT=AU.display.zlevel(AV||I.poi);AR.style.top=(AS.y+AQ._pxY)+"px";AR.style.left=(AS.x+AQ._pxX)+"px";if(AT!==AR.parentNode){AT.appendChild(AR)}}AP.defineProperty("key",null,"");AP.defineProperty("visible",null,true,"_updateVisibility");AP.defineProperty("latLng",function(AQ){return{lat:AQ.lat,lng:AQ.lng}},null,"_updatePosition");AP.defineProperty("bias",function(AQ){return{x:AQ.x,y:AQ.y}},null,"_updatePosition");AP.defineProperty("minZoomLevel",parseInt,1,"_updateVisibility");AP.defineProperty("maxZoomLevel",parseInt,16,"_updateVisibility")})();AH.BasePoi=j;AH.Poi=j;var e;(function(){function AO(AQ){var AT,AV,AU,AR,AS;this.dragStart=function(){AT=AQ.getLatLng();AV=this.display.transform.latLngToDisplay(AT.lat,AT.lng);AU=AQ.getBias();AR=AQ.getZIndex();AQ.setZIndex("poi_drag");AQ.snapback=false};this.dragMove=function(){if(!AS){g(AQ,"dragstart",new r("StdPoi.dragstart",AQ));AS=true;AQ._dragging=true}if(AQ.draggable=="bias"||(AQ.declutter&&!AQ.draggable)){AQ.setBias({x:this.dragXY.x-AV.x,y:this.dragXY.y-AV.y})}else{AQ.setBias(null);AQ.setLatLng(this.dragLatLng)}g(AQ,"drag",new r("StdPoi.drag",AQ))};this.dragCancelled=function(){AQ.setLatLng(AT);AQ.setBias(AU);AQ.setZIndex(AR);var AW=new r("StdPoi.dragend",AQ);AW.cancelled=true;g(AQ,"dragend",AW)};this.dragEnd=function(){AQ.setZIndex(AR);if(AS){AQ._dragging=false;if(AQ.snapback){this.dragCancelled()}else{g(AQ,"dragend",new r("StdPoi.dragend",AQ))}}}}function AM(AQ,AR){this.stateName=AQ;this.cursor="pointer";if(AR){this.icon=new AC(w("images/poi/star.png"),29,29)}this.shadow=new AC(w("images/poi/shadow.png"),23,7)}AM.prototype={isValid:function(){return !!this.icon},activate:function(){var AQ=this.poi;AQ.setContentVisible(this.stateName+"-icon",true);AQ.setContentVisible(this.stateName+"-shadow",true);this.activated=true;if(!this.inited){this.applyIcon();this.applyShadow();this.inited=true}},deactivate:function(){var AQ=this.poi;AQ.setContentVisible(this.stateName+"-icon",false);AQ.setContentVisible(this.stateName+"-shadow",false);this.activated=false},shadowAnchor:function(){var AR=this.getIconOffset(),AS=this.icon,AQ=(AS&&AS.height)||0;return{x:AR.x,y:AR.y+AQ}},getIconOffset:function(){var AQ=this.iconOffset,AR=this.icon;if(!AQ){AQ=AR?{x:-parseInt(AR.width/2),y:-parseInt(AR.height/2)}:{x:0,y:0}}return AQ},setIconOffset:function(AQ){this.iconOffset=AQ;this.applyIcon(true);this.applyShadow(true)},getIcon:function(){return this.icon},setIcon:function(AQ){this.icon=AQ;this.applyIcon();this.applyShadow(true)},applyIcon:function(AU){var AQ=this.poi,AS=this.icon,AR=this.getIconOffset()||{x:0,y:0},AT;if(AQ){if(AU){AQ.setContentOffset(this.stateName+"-icon",AR.x,AR.y)}else{AT=AS&&AS.createElement();if(AT){AT.style.cursor=this.cursor}AQ.setContent(this.stateName+"-icon",AT,AR.x,AR.y,"icon",AQ.zIndex);AQ.setContentVisible(this.stateName+"-icon",this.activated)}}},getCursor:function(){return this.cursor},setCursor:function(AQ){this.cursor=AQ;var AR=this.poi,AS;if(AR){AS=AR.getContent(this.stateName+"-icon");if(AS){AS.style.cursor=AQ}}},getShadow:function(){return this.icon},setShadow:function(AQ){this.shadow=AQ;this.applyShadow()},getShadowOffset:function(){return this.shadowOffset||{x:6,y:0}},setShadowOffset:function(AQ){this.shadowOffset=AQ;this.applyShadow()},applyShadow:function(AW){var AS=this.poi,AQ=this.shadow,AT=this.getShadowOffset(),AU=this.shadowAnchor(),AX=AU.x+AT.x,AR=AU.y+AT.y;if(AS){if(AW){AS.setContentOffset(this.stateName+"-shadow",AX,AR)}else{var AV=AQ&&AQ.createElement();if(AV){AV._zbg=true}AS.setContent(this.stateName+"-shadow",AV,AX,AR,null,"poi_shadow");AS.setContentVisible(this.stateName+"-shadow",this.activated)}}},getBounds:function(AU,AW){var AV=this.getIconOffset(),AT=this.icon,AR=this.getShadowOffset(),AS=this.shadow,AQ=this.shadowAnchor(),AY;AY={x:AU,y:AW,anchorX:AU,anchorY:AW,width:0,height:0,icon:{x:AV.x,y:AV.y,width:(AT&&AT.width)||0,height:(AT&&AT.height)||0},shadow:{x:AR.x+AQ.x,y:AR.y+AQ.y,width:(AS&&AS.width)||0,height:(AS&&AS.height)||0}};function AX(Ab){Ab.offsetX=Ab.x;Ab.offsetY=Ab.y;Ab.x+=AU;Ab.y+=AW;var AZ=Ab.x+Ab.width,Aa=Ab.y+Ab.height;lrX=AY.x+AY.width,lrY=AY.y+AY.height;if(AY.x>Ab.x){AY.x=Ab.x}if(AY.y>Ab.y){AY.y=Ab.y}if(lrX<AZ){AY.width+=(AZ-lrX)}if(lrY<Aa){AY.height+=(Aa-lrY)}}AX(AY.icon);AX(AY.shadow);return AY}};e=function(AR,AQ){j.call(this);this.zIndex="poi";this._dspStates={"":new AM("",true)};this.stateStack=[""];if(AR){this.setLatLng(AR)}if(AQ){this.setIcon(AQ)}this.draggable=false;this.addDOMEvent("mousedown","mouseup","dblclick","mouseover","mouseout")};var AN=n(j,{_onDOMEvent:function(AR){if(AR.type=="click"){return }var AS=new r("MQA.Poi."+AR.type,this),AQ;AS.button=V(AR)?AH.BUTTON_MQ_LEFT:AH.BUTTON_MQ_RIGHT;AS.domEvent=AR;g(this,AR.type,AS);AQ=this["_onDOM"+AR.type];if(AQ){AQ.call(this,AR)}},_fakeClick:function(AR){var AS=new r("MQA.Poi.click"),AQ;AS.button=V(AR)?AH.BUTTON_MQ_LEFT:AH.BUTTON_MQ_RIGHT;AS.domEvent=AR;AS.srcObject=this;g(this,"click",AS)},_onDOMmousedown:function(AQ){if(this.draggable||this.declutter){this.map.display.startDrag(AQ,new AO(this))}P(AQ)},_onDOMmouseup:function(AQ){if(!this._dragging){this._fakeClick(AQ)}else{}},_onDOMclick:function(AQ){},layerInit$After:function(){this._activated=true;this.setState(this.state);this.setBias(this.bias)},getDisplayState:function(AQ){var AR=this._dspStates[AQ||""];if(!AR){AR=this._dspStates[AQ||""]=new AM(AQ)}return AR},setIcon:function(AR,AQ){this.getDisplayState(AQ).setIcon(AR)},getIcon:function(AQ){return this.getDisplayState(AQ).icon},setIconOffset:function(AQ,AR){this.getDisplayState(AR).setIconOffset(AQ)},getIconOffset:function(AQ){return this.getDisplayState(AQ).iconOffset||{x:0,y:0}},setShadow:function(AQ,AR){this.getDisplayState(AR).setShadow(AQ)},getShadow:function(AQ){return this.getDisplayState(AQ).getShadow()},setShadowOffset:function(AR,AQ){this.getDisplayState(AQ).setShadowOffset(AR)},getShadowOffset:function(AQ){return this.getDisplayState(AQ).getShadowOffset()},getCursor:function(AQ){return this.getDisplayState(AQ).getCursor()},setCursor:function(AQ,AR){this.getDisplayState(AR).setCursor(AQ)},setState:function(AQ){this.stateStack=[AQ];return this._applyState(AQ)},_applyState:function(AR){if(this._activated){var AS=this._dspStates[AR||""],AQ=this._curDspState;if(AS&&AS.isValid()){if(AQ){AQ.deactivate()}AS.poi=this;AS.activate();this._curDspState=AS;return true}else{return false}}else{return false}},getState:function(){return this.stateStack[this.stateStack.length-1]||""},pushState:function(AQ){this.stateStack.push(AQ);this._applyState(AQ)},popState:function(){if(this.stateStack.length>1){var AQ=this.stateStack.pop();this._applyState(AQ)}else{this.stateStack=[""];this._applyState("")}},_updateBias:function(AV,AW,Ab,Ae){if(!this._activated){return }var AU,AZ,Aa;if(!Ab&&!Ae){if(this.getState()!=""){this.setState("")}this.setContent("leader",null);return }else{if(!this.draggable){this.draggable="bias"}if(this.getState()!="bias"){this.setState("bias")}}if(Q){var Af=Math.abs(Ab),AS=Math.abs(Ae),Ac=6,Ad,AR,AT,AX,AY,AQ,Ag;AU=Q.createSurface(Af+2*Ac,AS+2*Ac);Ad=AU.element();if(Ab>0){AR=Ac;AX=Af+Ac;AZ=(-Ab-Ac)}else{AR=Af+Ac;AX=Ac;AZ=(-Ac)}if(Ae>0){AT=Ac;AY=AS+Ac;Aa=(-Ae-Ac)}else{AT=AS+Ac;AY=Ac;Aa=(-Ac)}AQ=AU.line();AQ.setPoints([{x:AR,y:AT},{x:AX,y:AY}]);AQ.setColor("#000000");AQ.setBorderWidth(2);AQ.add();Ag=AU.ellipse();Ag.setPoints([{x:AR-Ac/2,y:AT-Ac/2},{x:AR+Ac/2,y:AT+Ac/2}]);Ag.setFillColor("#000000");Ag.add();this.setContent("leader",Ad,AZ,Aa,null,"poi_leader")}},shouldDeclutter:function(){var AQ=this.layer;if(this.declutter||(AQ&&AQ.collection.declutter)){return this.declutterFixed?"fixed":"moveable"}else{return false}},getNeededBounds:function(AU){var AT=this.getIcon(),AR=(AT&&AT.width)||0,AQ=(AT&&AT.height)||0,AS=(AU||this.map.display.transform).latLngToDisplay(this.latLng.lat,this.latLng.lng);return{xy:AS,ulX:AS.x-AR/2,ulY:AS.y-AQ/2,lrX:AS.x+AR/2,lrY:AS.y+AQ/2}},getCurrentBounds:function(){var AS=this._elt,AQ=this._dspStates[this.getState()],AT=this.bias,AR=AQ.getBounds(this._pxX,this._pxY);AR.biasX=(AT&&AT.x)||0;AR.biasY=(AT&&AT.y)||0;return AR},getDeclutterMode:function(){return this.declutter},setDeclutterMode:function(AQ){this.setDeclutter(AQ)},_applyZIndex:function(){var AR=this.zIndex,AQ=this;this._cnts.each(function(AT,AS){if(AS.match(/\-icon/)){AQ.setContentZIndex(AS,AR)}})}});e.prototype=AN;AN.defineProperty("declutter");AN.defineProperty("declutterFixed");AN.defineProperty("infoTitleHTML");AN.defineProperty("infoContentHTML");AN.defineProperty("rolloverContent");AN.defineProperty("draggable");AN.defineProperty("snapback");AN.defineProperty("zIndex",null,"poi","_applyZIndex");function AP(AR,AS){var AQ=e.prototype;AQ["get"+AS+"Icon"]=function(){return this.getIcon(AR)};AQ["set"+AS+"Icon"]=function(AT){this.setIcon(AT,AR)};AQ["get"+AS+"Shadow"]=function(){return this.getIcon(AR)};AQ["set"+AS+"Shadow"]=function(AT){this.setIcon(AT,AR)};AQ["get"+AS+"IconOffset"]=function(){return this.getIconOffset(AR)};AQ["set"+AS+"IconOffset"]=function(AT){this.setIconOffset(AT,AR)};AQ["get"+AS+"ShadowOffset"]=function(){return this.getIconOffset(AR)};AQ["set"+AS+"ShadowOffset"]=function(AT){this.setShadowOffset(AT,AR)}}AP("bias","Bias");AP("bias","Declutter");AP("alt","Alt")})();AH.StdPoi=e;AH.Poi=e;var Q;(function(){var AT="http://www.w3.org/2000/svg";function AR(){}var AS=new AH.Component();AR.prototype=AS;AD(AS,{init:function(AZ,Aa){this.surface=AZ;this.elt=document.createElementNS(AT,Aa)},add:function(){this.surface.elt.appendChild(this.elt)},remove:function(){var AZ=this.elt;if(AZ.parentNode){AZ.parentNode.removeChild(AZ)}},dispose:function(){if(this.elt){this.remove()}this.elt=null},element:function(){return this.elt}});function AP(Ad,Ac,Aa,Ab,AZ){Ad.defineProperty(Ac,null,AZ,function(){var Ae=this[Ac];if(Ab){Ae=Ab(Ae)}if(!this["_no"+Aa]){this.elt.setAttribute(Aa,Ae)}})}AP(AS,"color","stroke",c);AP(AS,"colorAlpha","stroke-opacity",null,"1.0");AP(AS,"borderWidth","stroke-width",null,"0");AP(AS,"fillColor","fill",c);AP(AS,"fillColorAlpha","fill-opacity",null,"1.0");function AY(AZ){this.init(AZ,"rect")}var AO=new AR();AY.prototype=AO;AO.defineProperty("points",null,null,function(){var Ae=this.points,Ab=Ae[0].x,Ad=Ae[0].y,AZ=Ae[1].x,Ac=Ae[1].y,Aa=this.elt;Aa.setAttribute("x",Ab);Aa.setAttribute("y",Ad);Aa.setAttribute("width",AZ-Ab);Aa.setAttribute("height",Ac-Ad)});function AU(AZ){this.init(AZ,"path")}var AN=new AR();AU.prototype=AN;AN.defineProperty("points",null,null,function(){var Ab=this.points,Aa,AZ=[];for(Aa=0;Aa<Ab.length;Aa++){AZ.push(Aa==0?"M":"L");AZ.push(Ab[Aa].x);AZ.push(Ab[Aa].y)}AZ.push("z");this.elt.setAttribute("d",AZ.join(" "))});function AQ(AZ){this.init(AZ,"polyline");this.elt.setAttribute("fill","none");this["_nofill"]=true;this["_nofill-opacity"]=true}var AW=new AR();AQ.prototype=AW;AW.defineProperty("points",null,null,function(){var Ab=this.points,Aa,AZ=[];for(Aa=0;Aa<Ab.length;Aa++){AZ.push(Ab[Aa].x+","+Ab[Aa].y)}this.elt.setAttribute("points",AZ.join(" "))});function AX(AZ){this.init(AZ,"ellipse")}var AM=new AR();AX.prototype=AM;AM.defineProperty("points",null,null,function(){var Ai=this.points,Ab=Ai[0].x,Ah=Ai[0].y,AZ=Ai[1].x,Af=Ai[1].y,Aa=AZ-Ab,Aj=Af-Ah,Ag=parseInt(Aa/2),Ad=parseInt(Aj/2),Ac=AZ-Ag,Ae=Af-Ad;elt=this.elt;elt.setAttribute("cx",Ac);elt.setAttribute("cy",Ae);elt.setAttribute("rx",Ag);elt.setAttribute("ry",Ad)});function AV(Ab,AZ){var Aa=document.createElementNS(AT,"svg");this.elt=Aa;Aa.setAttribute("height",AZ);Aa.setAttribute("width",Ab);Aa.setAttribute("xmlns",AT);Aa.setAttribute("version","1.1");Aa.setAttribute("viewBox","0 0 "+Ab+" "+AZ);Aa.appendChild(document.createElement("defs"));this.width=Ab;this.height=AZ}AV.prototype={element:function(){return this.elt},rect:function(){return new AY(this)},polygon:function(){return new AU(this)},ellipse:function(){return new AX(this)},line:function(){return new AQ(this)},dispose:function(){var AZ=this.elt;if(AZ){AZ.parentNode.removeChild(AZ)}this.elt=null}};AH.Graphics_SVG={name:"svg",initialize:function(){},createSurface:function(Aa,AZ){return new AV(Aa,AZ)},supportsSVG:function(){if(!document.createElementNS){return false}var AZ=document.createElementNS(AT,"svg");return typeof (AZ.width!="undefined")}}})();(function(){function AV(Aa){var AZ=Infinity,Ac=Infinity,Ab;for(Ab=0;Ab<Aa.length;Ab++){if(AZ>Aa[Ab].x){AZ=Aa[Ab].x}if(Ac>Aa[Ab].y){Ac=Aa[Ab].y}}return{x:AZ,y:Ac}}function AQ(){}var AR=new AH.Component();AQ.prototype=AR;AD(AR,{init:function(AZ,Ab){this.surface=AZ;var Aa=document.createElement(Ab);this.elt=Aa},add:function(){this.surface.elt.appendChild(this.elt)},remove:function(){var AZ=this.elt;if(AZ.parentNode){AZ.parentNode.removeChild(AZ)}},dispose:function(){if(this.elt){this.remove()}this.elt=null},element:function(){return this.elt}});function AW(Ad,Ac,Aa,Ab,AZ){Ad.defineProperty(Ac,null,AZ,function(){var Ae=this[Ac];if(Ab){Ae=Ab(Ae)}y("Setting attribute "+Aa+" on "+this.elt.tagName);this.elt.setAttribute(Aa,Ae)})}AR.defineProperty("color");AR.defineProperty("colorAlpha",null,"1.0");AR.defineProperty("borderWidth",null,"0");AR.defineProperty("fillColor");AR.defineProperty("fillColorAlpha",null,"1.0");function AY(AZ){this.init(AZ,"v:rect");var Aa=this.elt,Ac,Ab;this.elt.style.position="absolute";this.elt.setAttribute("stroked","true");Ac=document.createElement("v:fill");Aa.appendChild(Ac);this.fill=Ac;Ab=document.createElement("v:stroke");Ab.setAttribute("miterlimit","8.0");Ab.setAttribute("joinstyle","miter");Ab.setAttribute("endcap","flat");this.stroke=Ab;Aa.appendChild(Ab)}var AO=new AQ();AY.prototype=AO;AO.defineProperty("points",null,null,function(){var Ae=this.points,Ab=Ae[0].x,Ad=Ae[0].y,AZ=Ae[1].x,Ac=Ae[1].y,Aa=this.elt;Aa.style.left=Ab+"px";Aa.style.top=Ad+"px";Aa.style.width=(AZ-Ab)+"px";Aa.style.height=(Ac-Ad)+"px"});AD(AO,{setColor:function(AZ){this.color=AZ;this.stroke.setAttribute("color",AZ)},setColorAlpha:function(AZ){this.colorAlpha=AZ;this.stroke.setAttribute("opacity",AZ)},setBorderWidth:function(AZ){this.borderWidth=AZ;this.stroke.setAttribute("weight",AZ)},setFillColor:function(AZ){this.fillColor=AZ;this.fill.setAttribute("color",AZ)},setFillColorAlpha:function(AZ){this.fillColorAlpha=AZ;this.fill.setAttribute("opacity",AZ)}});function AS(AZ){this.init(AZ,"v:shape");var Aa=this.elt,Ad,Ac,Ab;Aa.style.width=AZ.width;Aa.style.height=AZ.height;Aa.style.position="absolute";Aa.setAttribute("stroked","true");Aa.setAttribute("coordsize",AZ.width+" "+AZ.height);Aa.setAttribute("coordorigin","0 0");Ad=document.createElement("v:fill");Aa.appendChild(Ad);this.fill=Ad;Ac=document.createElement("v:stroke");Ac.setAttribute("miterlimit","8.0");Ac.setAttribute("joinstyle","miter");Ac.setAttribute("endcap","flat");this.stroke=Ac;Aa.appendChild(Ac);Ab=document.createElement("v:path");Aa.appendChild(Ab);this.path=Ab}var AN=new AQ();AS.prototype=AN;AN.defineProperty("points",null,null,function(){var Ab=this.points,Aa,AZ=[];for(Aa=0;Aa<Ab.length;Aa++){AZ.push(Aa==0?"M":"l");AZ.push(Aa==0?(Ab[Aa].x+" "+Ab[Aa].y):(Ab[Aa].x+","+Ab[Aa].y))}AZ.push("x e");this.path.setAttribute("v",AZ.join(" "))});AD(AN,{setColor:function(AZ){this.color=AZ;this.stroke.setAttribute("color",AZ)},setColorAlpha:function(AZ){this.colorAlpha=AZ;this.stroke.setAttribute("opacity",AZ)},setBorderWidth:function(AZ){this.borderWidth=AZ;this.stroke.setAttribute("weight",AZ)},setFillColor:function(AZ){this.fillColor=AZ;this.fill.setAttribute("color",AZ)},setFillColorAlpha:function(AZ){this.fillColorAlpha=AZ;this.fill.setAttribute("opacity",AZ)}});function AP(AZ){this.init(AZ,"v:polyline");var Aa=this.elt,Ab;Aa.style.width=AZ.width+"px";Aa.style.height=AZ.height+"px";Aa.style.position="absolute";Aa.style.top="0px";Aa.style.left="0px";Aa.setAttribute("stroked","true");Aa.setAttribute("coordsize",AZ.width+" "+AZ.height);Aa.setAttribute("filled","false");Ab=document.createElement("v:stroke");Ab.setAttribute("miterlimit","8.0");Ab.setAttribute("joinstyle","round");Ab.setAttribute("endcap","round");Ab.setAttribute("weight","0px");this.stroke=Ab;Aa.appendChild(Ab)}var AU=new AQ();AP.prototype=AU;AU.defineProperty("points",null,null,function(){var Ac=this.points,Ab,Aa=[],Ad=AV(Ac),AZ=this.elt;for(Ab=0;Ab<Ac.length;Ab++){Aa.push((Ac[Ab].x-Ad.x)+","+(Ac[Ab].y-Ad.y))}AZ.setAttribute("points",Aa.join(" "));AZ.style.left=Ad.x+"px";AZ.style.top=Ad.y+"px"});AD(AU,{setColor:function(AZ){this.color=AZ;this.stroke.setAttribute("color",AZ)},setColorAlpha:function(AZ){this.colorAlpha=AZ;this.stroke.setAttribute("opacity",AZ)},setBorderWidth:function(AZ){this.borderWidth=AZ;this.stroke.setAttribute("weight",AZ+"px")}});function AX(AZ){this.init(AZ,"v:oval");var Aa=this.elt,Ac,Ab;Aa.style.position="absolute";Aa.setAttribute("stroked","true");Ac=document.createElement("v:fill");Aa.appendChild(Ac);this.fill=Ac;Ab=document.createElement("v:stroke");Ab.setAttribute("miterlimit","8.0");Ab.setAttribute("joinstyle","miter");Ab.setAttribute("endcap","flat");this.stroke=Ab;Aa.appendChild(Ab)}var AM=new AQ();AX.prototype=AM;AM.defineProperty("points",null,null,function(){var Ag=this.points,Ac=Ag[0].x,Af=Ag[0].y,Aa=Ag[1].x,Ad=Ag[1].y,Ae=Aa-Ac,AZ=Ad-Af,Ab=this.elt;Ab.style.left=Ac+"px";Ab.style.top=Af+"px";Ab.style.width=Ae;Ab.style.height=AZ});AD(AM,{setColor:function(AZ){this.color=AZ;this.stroke.setAttribute("color",AZ)},setColorAlpha:function(AZ){this.colorAlpha=AZ;this.stroke.setAttribute("opacity",AZ)},setBorderWidth:function(AZ){this.borderWidth=AZ;this.stroke.setAttribute("weight",AZ)},setFillColor:function(AZ){this.fillColor=AZ;this.fill.setAttribute("color",AZ)},setFillColorAlpha:function(AZ){this.fillColorAlpha=AZ;this.fill.setAttribute("opacity",AZ)}});function AT(Ab,AZ){var Aa=document.createElement("div");Aa.style.width=Ab+"px";Aa.style.height=AZ+"px";this.elt=Aa;this.width=Ab;this.height=AZ}AT.prototype={element:function(){return this.elt},rect:function(){return new AY(this)},polygon:function(){return new AS(this)},ellipse:function(){return new AX(this)},line:function(){return new AP(this)},dispose:function(){var AZ=this.elt;if(AZ){AZ.parentNode.removeChild(AZ)}this.elt=null}};AH.Graphics_VML={name:"vml",initialize:function(AZ){if(AZ){AH.Graphics=Q=this}if(this._inited){return }this._inited=true;document.namespaces.add("v","urn:schemas-microsoft-com:vml");var Aa;if(document.styleSheets.length==0){document.getElementsByTagName("head")[0].appendChild(document.createElement("style"))}Aa=document.styleSheets[0];Aa.addRule("v\\:*","behavior: url(#default#VML);display: inline-block;")},createSurface:function(Aa,AZ){return new AT(Aa,AZ)}}})();if(v.name=="msie"){Q=AH.Graphics_VML}else{if(AH.Graphics_SVG&&AH.Graphics_SVG.supportsSVG()){Q=AH.Graphics_SVG}else{Q=null}}AH.Graphics=Q;if(Q){y("Using graphics engine: "+Q&&Q.name);Q.initialize()}else{y("NO GRAPHICS SUPPORT DETECTED")}(function(){var AO=window.MQA;function AM(AS){return function(){var AU,AV=[],AT=this;for(AU=0;AU<arguments.length;AU++){AV.push(arguments[AU])}AO.withModule("basicwindow",function(){AS.apply(AT,AV)})}}function AQ(AS,AT){if(AS.rolloverContent){AT.setContent(AS.rolloverContent)}else{AT.setTitle(AS.infoTitleHTML||"");AT.setTitleBackgroundColor(AS.titleBackgroundColor||"");AT.setContent(AS.infoContentHTML||"")}}function AN(AS,AT){AT.setTitle(AS.infoTitleHTML||"");AT.setTitleBackgroundColor(AS.titleBackgroundColor||"");AT.setContent(AS.infoContentHTML||"")}function AP(AT,AZ,AV){var AU=AZ.getCurrentBounds();AV.setPosition({lat:AZ.latLng.lat,lng:AZ.latLng.lng,offsetX:AU.biasX,offsetY:AU.biasY+AU.icon.offsetY,iconHeight:AU.icon.height,iconWidth:AU.icon.width});var AY=AT.windowManager.maxSizeDivisor||2,AS=AV.getNaturalDimensions(),AW=AV.maxWidth||AT.width/AY,AX=AV.maxHeight||AT.height/AY;y("Natural dimensions: ("+AS.width+","+AS.height+")");if(AV.settings.titleVisible){AS.width+=20}if(AS.width>AW){AS.width=AW}if(AS.height>AX){AS.height=AX}AV.setDimensions(AS.width,AS.height)}function AR(AT,AV){var AU=AT.display,AY=AV.getBounds(),AX=AT.windowManager,AW={x1:AU.ulX+(AX.scrollBorderLeft||50),y1:AU.ulY+(AX.scrollBorderTop||50),x2:AU.ulX+AU.width-(AX.scrollBorderRight||50),y2:AU.ulY+AU.height-(AX.scrollBorderBottom||50)},AZ=0,AS=0;y("Map bounds: ("+AW.x1+","+AW.y1+","+AW.x2+","+AW.y2+")");y("Wnd bounds: ("+AY.x1+","+AY.y1+","+AY.x2+","+AY.y2+")");y("Wnd (width,height): ("+AV.settings.width+","+AV.settings.height+")");if(AY.x1<AW.x1){AZ=AY.x1-AW.x1}else{if(AY.x2>AW.x2){AZ=AY.x2-AW.x2}}if(AY.y1<AW.y1){AS=AY.y1-AW.y1}else{if(AY.y2>AW.y2){AS=AY.y2-AW.y2}}y("Map slide (deltax, deltay)=("+AZ+","+AS+")");if(AZ||AS){AT.slideMapToPoint(AU.width/2+AZ,AU.height/2+AS)}}AO.extend(AO.WindowManager.prototype,{onPoiMouseOver:function(AS,AT){var AU=this;if(AS.infoWindow){return }if(!AS._isRollover){AS._isRollover=0}y("WindowManager.onPoiMouseOver("+AT+") - counter="+AS._isRollover);if(!AT){setTimeout(function(){AS._isRollover-=1;if(AS._isRollover<=0){AU.close("rolloverwindow",AS);AS._isRollover=0;var AV=new r("MQA.DotcomWindowManager.closePoiRollover");AV.srcObject=AS;g(AS,"rolloverclose",AV)}},50)}else{AS._isRollover+=1;if(AS._isRollover==1){if(AS.infoContentHTML||AS.infoTitleHTML){this.closeAll("rolloverwindow");this.openPoiRollover(AS)}}}},onPoiActivate:function(AS,AU){if(!AS.infoContentHTML||!AS.infoTitleHTML){return }this.closeAll("rolloverwindow");var AT=AS.infoWindow;if(AT){y("Bring poi infowindow to front.");AT.bringToFront();return }this.openPoiWindow(AS,AU)},openPoiRollover:AM(function(AS){if(AS.infoWindow||!AS._isRollover){return }var AU=this,AV=new AO.BasicWindow();AV.settings.titleVisible=false;AV.settings.rollover=true;AS.rolloverWindow=AV;m(AV,"onEvent","after",this,"_onRolloverEvent",AS);AQ(AS,AV);AV.setCloseVisible(false);this.open("rolloverwindow",AS,AV);AP(this.map,AS,AV);AV.setVisible(true);var AT=new r("MQA.DotcomWindowManager.openPoiRollover",AS);g(AS,"rolloveropen",AT)}),_onRolloverEvent:function(AS,AU,AT){y("[dotcomwm] _onRolloverEvent "+AU);switch(AU){case"mouseoverstate":this.onPoiMouseOver(AS,AT.isOver);break;case"click":this.onPoiActivate(AS,true);break}},openPoiWindow:AM(function(AS,AV){if(AS.infoWindow){return }AO.Log.debug("Open info window for poi");y("Open rollover window for poi");if(AS.actionId){$a("MQ08"+AS.actionId+"AlertDetails")}var AU;AU=new AO.BasicWindow();AS.infoWindow=AU;AN(AS,AU);this.closeAll("infowindow");this.open("infowindow",AS,AU);AP(this.map,AS,AU);AU.setVisible(true);if(!AV){AR(this.map,AU)}var AT=new AO.Event("MQA.DotcomWindowManager.infoWindowOpen");AT.srcObject=AS;AO.EventManager.trigger(AS,"infowindowopen",AT)}),resizePoiWindow:function(AT,AV,AS){var AU=this.find("infowindow",AT);AU.setDimensions(AU.settings.width+AV,AU.settings.height+AS)}});B(AO.TileMap.prototype,{onZoomStart$After:function(){this.windowManager.closeAll()}});B(AO.Poi.prototype,{dispose$Before:function(){if(!this.map){return }var AS=this.map.windowManager;AS.close("rolloverwindow",this);AS.close("infowindow",this)},onEvent$After:function(AU,AS){var AT=this.map.windowManager;switch(AU){case"mouseover":if(this._isMouseOver||this._dragging){return }this._isMouseOver=true;AT.onPoiMouseOver(this,true);break;case"mouseout":if(this._isMouseOver){this._isMouseOver=false;AT.onPoiMouseOver(this,false)}break;case"click":AT.onPoiActivate(this,true);break;case"dragstart":AT.close("rolloverwindow",this);AT.close("infowindow",this);break;case"move":AT.close("rolloverwindow",this);if(this.infoWindow){AP(this.map,this,this.infoWindow)}break}},onWindowClose:function(AS){AO.Log.debug("POI notified of window close.");if(AS===this.infoWindow){delete this.infoWindow}if(AS===this.rolloverWindow){delete this.rolloverWindow;this._isRollover=0}}});AO.Loader._moduleLoaded("dotcomwindowmanager")})();AH.Loader.registerCss("basicwindow",".mqabasicwnd{position:absolute;font-family:arial,verdana,helvetica,sans-serif;font-size:11px;color:#000;cursor:default;}.mqabasicwnd-client{position:relative;background-color:white;overflow:hidden;padding-bottom:2px;}.mqabasicwnd-border{position:absolute;top:0;left:0;}.mqabasicwnd-edge div{background-image:url(http://img.mqcdn.com/mqtoolkit/infobox2.png);}.mqaie6 .mqabasicwnd-edge div{background-image:url(http://img.mqcdn.com/mqtoolkit/infobox2.gif);}.mqabasicwnd-pointer-bottom{position:absolute;width:13px;height:20px;bottom:-20px;background-position:-256px -334px;}.mqabasicwnd-pointer-top{position:absolute;width:13px;height:20px;top:-24px;background-position:-302px -334px;}.mqabasicwnd-pointer-left{position:absolute;width:13px;height:20px;bottom:-20px;background-position:-279px -332px;}.mqabasicwnd-pointer-right{position:absolute;width:13px;height:20px;bottom:-20px;background-position:-324px -334px;}.mqabasicwnd-btop div{position:absolute;top:-10px;height:10px;background-position:top center;}.mqabasicwnd-bbottom div{position:absolute;height:21px;bottom:-20px;left:0;background-position:bottom center;}.mqabasicwnd-bleft div{position:absolute;width:10px;left:-10px;background-position:center left;}.mqabasicwnd-bright div{position:absolute;width:21px;right:-20px;top:0;background-position:center right;}.mqabasicwnd-corner div{background-image:url(http://img.mqcdn.com/mqtoolkit/infobox2.png);background-repeat:no-repeat;}.mqaie6 .mqabasicwnd-corner div{background-image:url(http://img.mqcdn.com/mqtoolkit/infobox2.gif);background-repeat:no-repeat;}.mqabasicwnd-bul{position:absolute;width:10px;height:10px;top:-10px;left:-10px;}.mqabasicwnd-bur{position:absolute;top:-10px;right:-20px;width:20px;height:10px;background-position:top right;}.mqabasicwnd-bll{position:absolute;left:-10px;bottom:-20px;width:10px;height:20px;background-position:bottom left;}.mqabasicwnd-blr{position:absolute;bottom:-20px;right:-20px;width:20px;height:20px;background-position:bottom right;}.mqabasicwnd-titlebar{white-space:nowrap;overflow:hidden;margin-bottom:5px;}.mqabasicwnd-titletext{font-size:12px;font-weight:bold;margin:0 18px 0 0;padding-left:3px;line-height:18px;background-color:#E2EAF1;vertical-align:middle;margin-right:20px;}.mqabasicwnd-content{overflow:hidden;}.mqabasicwnd-close{position:absolute;width:17px;height:17px;background-image:url(http://img.mqcdn.com/mqtoolkit/infobox2.png);background-repeat:no-repeat;background-position:-384px -330px;cursor:pointer;}.mqaie6 .mqabasicwnd-close{background-image:url(http://img.mqcdn.com/mqtoolkit/infobox2.gif);}");(function(){AH.Loader.requireCss("basicwindow");var AP="['div#root.mqabasicwnd',[0,'div#border.mqabasicwnd-border',[0,'div.mqabasicwnd-edge',[0,'div#topEdge.mqabasicwnd-btop',[],0,'div#bottomEdge.mqabasicwnd-bbottom',[],0,'div#leftEdge.mqabasicwnd-bleft',[],0,'div#rightEdge.mqabasicwnd-bright',[],0,'div#pointer.mqabasicwnd-pointer-bottom',[],0],0,'div.mqabasicwnd-corner',[0,'div.mqabasicwnd-bul',[],0,'div.mqabasicwnd-bll',[],0,'div.mqabasicwnd-bur',[],0,'div.mqabasicwnd-blr',[],0],0],0,'div#client.mqabasicwnd-client',[0,'div#titlebar.mqabasicwnd-titlebar',[0,'div#close.mqabasicwnd-close',[],0,'h1#titletext.mqabasicwnd-titletext',[],0],0,'div#content.mqabasicwnd-content',[],0],0]]";function AM(Ac,AV){var Aa=AV.width,AR=AV.height,AW=Ac.pointer,AS=AV.pointerOffset,AQ,AY,AZ,AT=AV.iconHeight||0,AU=AV.iconWidth||0;function Ab(Ad,Af,Ae){Ac[Ad].style[Af]=Ae}Ab("border","display","none");Ab("client","width",Aa+"px");Ab("client","height",AR+"px");Ab("border","width",Aa+"px");Ab("border","height",AR+"px");if(AV.titleVisible){Ab("titlebar","display","block");if(AV.closeVisible){Ab("close","display","block");Ab("close","left",(Aa>17?(Aa-17):0)+"px");Ab("titletext","width",(Aa>17?(Aa-17):0)+"px")}else{Ab("close","display","none");Ab("titletext","width",Aa+"px")}}else{Ab("titlebar","display","none")}function AX(Ai,Ad,Ae,Ag,Aj){var Ak=Ai.firstChild,Af=0,Al,Ah;while(Ad>0){if(!Ak){Ak=document.createElement("div");Ai.appendChild(Ak)}Al=Ad;if(Al>Ae){Al=Ae}Ak.style[Aj]=Af+"px";Ak.style[Ag]=Al+"px";Af+=Al;Ad-=Al;Ak=Ak.nextSibling}while(Ak){Ah=Ak;Ak=Ak.nextSibling;Ai.removeChild(Ah)}}AX(Ac.topEdge,Aa,600,"width","left");AX(Ac.bottomEdge,Aa,600,"width","left");AX(Ac.leftEdge,AR,600,"height","top");AX(Ac.rightEdge,AR,600,"height","top");switch(AV.pointerEdge){case"bottomLeft":AQ="bottom";AW.style.left=AS+"px";AY=AS+7;AZ=AR+20;break;case"bottomRight":AQ="bottom";AW.style.left=(Aa-AS-20)+"px";AY=Aa-(AS+7);AZ=AR+20;break;case"topLeft":AQ="top";AW.style.left=AS+"px";AY=AS+7;AZ=-(20+AT);break;case"topRight":AQ="top";AW.style.left=(Aa-AS-20)+"px";AY=Aa-(AS+7);AZ=-(20+AT);break;case"middleLeft":AQ="left";AW.style.top=(AR/2)+"px";AW.style.left=(-20)+"px";AY=-(20+(AU/2));AZ=AR/2;break;case"middleRight":AQ="right";AW.style.top=(AR/2)+"px";AW.style.left=(Aa+9)+"px";AY=Aa+20+(AU/2);AZ=AR/2;break;default:AQ="none";AY=0;AZ=0}AV.offsetLeft=AY;AV.offsetTop=AZ;AW.className="mqabasicwnd-pointer-"+AQ;Ab("content","display",AV.contentVisible?"block":"none");Ab("border","display","block")}function AN(AR,AQ){while(AR.lastChild){AR.removeChild(AR.lastChild)}if(typeof (AQ)=="string"){AR.innerHTML=AQ}else{AR.appendChild(AQ)}}function AO(){if(typeof (AP)=="string"){AP=AH._jsEval(AP)}var AQ=AH.Util.html(AP);this.elements=AQ;AH.Util.ie6Class(AQ.root);this.addDOMEvent("click","mouseover","mouseout");this.position={x:0,y:0};this._constraintsChanged=true;this._positionChanged=true;this.zIndex="window";this.settings={width:0,height:0,pointerOffset:0,pointerEdge:"bottomLeft",titleVisible:true,closeVisible:true,contentVisible:true}}AO.prototype={onOpen:function(AR){var AQ=this.elements;this.wm=AR;AR.map.connectSuppressEvents(AQ.root);this._wireDOMEvents(AQ.root);this._setupPosition();this.draw();this._applyZIndex()},bringToFront:function(){var AR=this.elements.root,AQ=AR.parentNode;if(AQ&&!AR.nextSibling){AQ.appendChild(AR)}},setVisible:function(AR){var AQ=!this.visible;this.visible=AR;if(AQ){this.draw()}this.elements.root.style.visibility=(AR?"":"hidden")},getVisible:function(){return this.visible},getNaturalDimensions:function(){function AW(Ag){return{elt:Ag,overflow:Ag.style.overflow,width:Ag.style.width,height:Ag.style.height}}function AY(Ag){var Ah=Ag.elt;Ah.style.overflow=Ag.overflow;Ah.style.width=Ag.width;Ah.style.height=Ag.height}function Aa(Ag){Ag.style.overflow="visible";Ag.style.width="auto";Ag.style.height="auto"}var Ae=this.elements,Ab=Ae.client,AU=Ae.titlebar,AV=Ae.titletext,AX=Ae.content,AS=Ae.root,Ac=AW(Ab),Af=AW(AU),AQ=AW(AV),AT=AW(AX),Ad,AR,AZ=this.visible;if(!AZ){AH.Log.debug("Making window visible to measure natural dimensions");this.visible=true;AS.style.visibility="hidden";this.draw()}Aa(Ab);Aa(AU);Aa(AV);Aa(AX);Ad=Ab.offsetWidth;Ab.style.width=Ad+"px";AR=Ab.offsetHeight;AY(Ac);AY(AT);AY(AQ);AY(Af);if(!AZ){AH.Log.debug("Making window invisible again.");this.visible=false}return{width:Ad,height:AR}},setPosition:function(AQ){this.position=AQ;this._positionChanged=true;this.draw()},_setupPosition:function(){var AS=this.transform,AT=this.position,AR,AQ;if(typeof (AT.lat)!="number"||typeof (AT.lng)!="number"){AT.global=false;return false}else{AT.global=true}if(!AS){return false}AR=AS.latLngToDisplay(AT.lat,AT.lng);AQ=(AR.x!=AT.x||AR.y!=AT.y);AT.x=AR.x;AT.y=AR.y;AH.Log.debug("Translate window position from ("+AT.lat+","+AT.lng+") -> ("+AT.x+","+AT.y+"), changed="+AQ);return AQ},setDimensions:function(AQ,AR){this.settings.width=AQ;this.settings.height=AR;this._constraintsChanged=true;this.draw()},setCloseVisible:function(AQ){this.settings.closeVisible=AQ;this.draw()},setPointerVisible:function(AQ,AR){this.settings.pointerVisible=AQ;if(AR){this.settings.pointerEdge=AR}this._constraintsChanged=true;this.draw()},draw:function(){var AW,AT=this.position,AX=this.dimensions,AV=this.settings,AQ=this.wm,AY=this.elements,AR=AY.root,AS=AY.content,AU=AY.border;if(!AQ||!this.visible){return }AW=AT.global?AQ.globalSurface:AQ.screenSurface;if(AW!==AR.parentNode){if(AR.parentNode){AR.parentNode.removeChild(AR)}AW.appendChild(AR)}AH.Log.debug("Position window at: ("+AT.x+","+AT.y+")");if(this._positionChanged){this._setupPosition();this._positionChanged=false}AV.pointerEdge=this.determineWindowDirection();AV.iconHeight=AT.iconHeight;AV.iconWidth=AT.iconWidth;if(this._constraintsChanged){AH.Log.debug(" --> Resetting constraints.");AM(AY,AV);this._constraintsChanged=false}AV.left=(parseInt(AT.x)-AV.offsetLeft+(AT.offsetX||0));AV.top=(parseInt(AT.y)-AV.offsetTop+(AT.offsetY||0));AH.Log.debug(" --> Setting window (left,top)=("+AV.left+","+AV.top+") dimOffset=("+AV.offsetLeft+","+AV.offsetTop+") posOffset=("+AT.offsetX+","+AT.offsetY+")");AR.style.left=AV.left+"px";AR.style.top=AV.top+"px"},determineWindowDirection:function(){var AW=this.position,AS=this.wm,AT=this.settings;var AQ,AR=AS.map.llToPix(new AH.LatLng(AW.lat,AW.lng));var AU=(AT.height+AW.iconHeight-AW.offsetY);if(AU<AR.y){AQ="bottom"}else{if(AU>AR.y&&AU<(AS.map.getSize().height-AR.y)){AQ="top"}else{AQ="middle"}}var AV=(AT.width+AW.offsetX);if(AV>AS.map.getSize().width-AR.x){AQ+="Right"}else{AQ+="Left"}return AQ},getBounds:function(){var AS=this.elements.root,AQ=this.settings,AR={x1:AQ.left-20,y1:AQ.top-20};AR.x2=AR.x1+AQ.width+40;AR.y2=AR.y1+AQ.height+40;return AR},_onDOMEvent:function(AR){var AQ=this._mouseOverState,AS;switch(AR.type){case"mouseover":if(!AQ){this._mouseOverState=true;AS=new r("BasicWindow.mouseoverstate",this);AS.isOver=true;g(this,"mouseoverstate",AS)}break;case"mouseout":if(AQ){this._mouseOverState=false;AS=new r("BasicWindow.mouseoverstate",this);AS.isOver=false;g(this,"mouseoverstate",AS)}break;case"click":if(F(AR)===this.elements.close){P(AR);if(this.wm&&!this.disposed){AS=new r("BasicWindow.clickclosewindow");AS.srcObject=this.opener;g(this.opener,"infowindowclose",AS);this.wm.close(this.id,this.opener)}return }break}AS=new r("BasicWindow."+AR.type,this);AS.domEvent=AR;g(this,AR.type,AS)},dispose:function(){if(this.disposed){return }var AQ=this.elements,AR=AQ.root;this.wm.map.disconnectSuppressEvents(AQ.root);AR.parentNode.removeChild(AR);this.disposed=true},resetTransform:function(AQ){this.transform=AQ;AH.Log.debug("BasicWindow.resetTransform zoom="+AQ.zoom);this._positionChanged=true;this.draw()},setTitle:function(AQ){AN(this.elements.titletext,AQ||"")},setTitleBackgroundColor:function(AQ){this.elements.titletext.style.backgroundColor=AQ},setContent:function(AQ){AN(this.elements.content,AQ||"")},getZIndex:function(){return this.zIndex},setZIndex:function(AQ){if(AQ!=this.zIndex){this.zIndex=AQ;this._applyZIndex()}},_applyZIndex:function(){if(this.wm){X(this.elements.root,this.zIndex)}}};AA(AO.prototype);AH.BasicWindow=AO;AH.Loader._moduleLoaded("basicwindow")})();(function(){var AN=window.MQA;function AM(AO){if(!AO.controls){AO.controls=[]}}AN.mixin(AN.TileMap.prototype,{addControl:function(AO,AS){AM(this);if(AS){AO.position=AS}if(AO.controlVersion=="1.0"){AO.initialize(this);this.controls.push(AO);var AR=AO.position,AP=(AR&&AR.mapCorner)||0;this.controlAnchors[AP].appendChild(AO.elem);this.placeControl(AO);var AQ=AO.elem;AQ.style.display="block";AQ.style.zIndex=0}else{AO.map=this;this.controls.push(AO);AO.draw()}},removeControl:function(AO){AM(this);var AR,AQ=this.controls;for(var AP=0;AP<AQ.length;AP++){AR=AQ[AP];if(AR&&AR===AO){delete AQ[AP];if(AR.controlVersion=="1.0"){if(AR.destructor){AR.destructor()}}else{if(AR.dispose){AR.dispose(false)}}}}},placeControl:function(AP){if(AP.positionWithCSS){return }var AO=AP.position;if(AP.controlVersion=="2.0"){AP.setValue("position",AO)}else{var AT=AO.getMapCorner();var AQ;var AR;if(AT==AN.MapCorner.TOP_LEFT){AQ=0;AR=0}else{if(AT==AN.MapCorner.TOP_RIGHT){AQ=this.width-AP.getWidth();AR=0;var AS=arguments;if(typeof AS[1]=="undefined"){AO.offsetSize.width*=-1}}else{if(AT==AN.MapCorner.BOTTOM_LEFT){AQ=0;AR=this.height-AP.getHeight();var AS=arguments;if(typeof AS[1]=="undefined"){AO.offsetSize.height*=-1}}else{if(AT==AN.MapCorner.BOTTOM_RIGHT){AQ=this.width-AP.getWidth();AR=this.height-AP.getHeight();var AS=arguments;if(typeof AS[1]=="undefined"){AO.offsetSize.width*=-1;AO.offsetSize.height*=-1}}}}}AQ+=AO.offsetSize.width;AR+=AO.offsetSize.height;AP.elem.style.left=AQ+"px";AP.elem.style.top=AR+"px"}AN.ZIndex.set(AP.elem,AP.zIndex||"control")},_eachControl:function(AO){var AP,AQ,AR=this.controls;for(AP in AR){AQ=AR[AP];if(AQ&&String(AP).match(/[0-9]+/)){AO.call(this,AQ)}}},onZoomEnd$After:function(AO){this._eachControl(function(AP){if(AP.setZoom){AP.setZoom(AO.zoom)}if(AP.unselectZoom){AP.unselectZoom(0)}})},onMapTypeChanged$After:function(AO){this._eachControl(function(AP){if(AP.type==AN.CONTROL_TYPE&&AP.updateControl){AP.updateControl(AO.mapType)}else{}})},onSizeChanged$After:function(AP){var AO=this;this._eachControl(function(AQ){AO.placeControl(AQ)})}});AN.Control=function(){this.controlVersion="1.0"};AN.Control.prototype={initialize:function(AO){this.map=AO},getPosition:function(){return this.position},getHeight:function(){return this.getHeightInternal(this.elem)},getHeightInternal:function(AO){var AP=AO.childNodes;var AS=0;for(var AQ=0,AR=AP.length;AQ<AR;AQ++){if(AP[AQ].childNodes.length>0&&AP[AQ].style.overflow!="hidden"){childHeight=this.getHeightInternal(AP[AQ]);if(childHeight>AS){AS=childHeight}}if(AP[AQ].offsetHeight>AS){AS=AP[AQ].offsetHeight}}return AS},getWidth:function(){return this.getWidthInternal(this.elem)},getWidthInternal:function(AO){var AQ=AO.childNodes;var AP=0;for(var AR=0,AS=AQ.length;AR<AS;AR++){if(AQ[AR].childNodes.length>0&&AQ[AR].style.overflow!="hidden"){childWidth=this.getWidthInternal(AQ[AR]);if(childWidth>AP){AP=childWidth}}if(AQ[AR].offsetWidth>AP){AP=AQ[AR].offsetWidth}}return AP}}})();AH.Loader._moduleLoaded("controlbase");AH.Loader.registerCss("zoomcontrol",".mqazoomctrl{position:absolute;width:60px;}.mqazoomctrl ul{list-style:none;margin:0;padding:0;}.mqazoomctrl li{display:block;margin:0;padding:0;width:60px;height:50px;}.mqazoomctrl-bg{position:relative;width:60px;height:45px;margin:0;padding:0;background-color:transparent;background-image:url(http://img.mqcdn.com/mqtoolkit/zoom-bg-tilemap.png);background-position:0 0;background-repeat:no-repeat;}.mqaie6 .mqazoomctrl-bg{background-image:url(http://img.mqcdn.com/mqtoolkit/zoom-bg-tilemap.gif);}.mqazoomctrl-btn1{position:absolute;left:7px;top:8px;width:22px;}.mqazoomctrl-btn2{position:absolute;left:30px;top:8px;width:22px;}.mqazoomctrl img{display:block;cursor:pointer;_cursor:hand;}.mqazoomctrl-sprt-cont{overflow:hidden;z-index:98;width:22px;height:21px;}img.mqazoomctrl-over{margin-left:-22px;}");AH.withModule("controlbase",function(){AH.Loader.requireCss("zoomcontrol");var AM="['div#root.mqazoomctrl screen',[0,'div.mqazoomctrl-bg',[],0,'ul',[0,'li',[0,'div.mqazoomctrl-btn1 mqazoomctrl-sprt-cont',[0,'img#zoominimg',['@border','0','i','http://img.mqcdn.com/mqtoolkit/z-in2.png','@title','Zoom In','@alt','Zoom In'],0],0,'div.mqazoomctrl-btn2 mqazoomctrl-sprt-cont',[0,'img#zoomoutimg',['@border','0','i','http://img.mqcdn.com/mqtoolkit/z-out2.png','@title','Zoom Out','@alt','Zoom Out'],0],0],0],0]]";function AN(){var AO=AH.Util.html(AM);this.elements=AO;AH.Util.ie6Class(AO.root);var AP=d(this,"onDOMEvent");this._eDOM=AP;AB(AO.zoominimg,"click",AP);AB(AO.zoominimg,"mouseover",AP);AB(AO.zoominimg,"mouseout",AP);AB(AO.zoomoutimg,"click",AP);AB(AO.zoomoutimg,"mouseover",AP);AB(AO.zoomoutimg,"mouseout",AP)}AN.prototype={draw:function(){var AO=this.elements.root;this.map.parent2.appendChild(AO);this.elem=AO;this.map.placeControl(this)},getWidth:function(){return 62},getHeight:function(){return 40},onDOMEvent:function(AP){var AO=F(AP);switch(AP.type){case"mouseover":if(!AO.className){AO.className="mqazoomctrl-over"}break;case"mouseout":if(AO.className){AO.className=""}break;case"click":if(AO===this.elements.zoominimg){this.onZoomIn()}else{this.onZoomOut()}break}},dispose:function(){var AO=this.elements,AQ=this._eDOM,AP=AO.root;C(AO.zoominimg,"click",AQ);C(AO.zoominimg,"mouseover",AQ);C(AO.zoominimg,"mouseout",AQ);C(AO.zoomoutimg,"click",AQ);C(AO.zoomoutimg,"mouseover",AQ);C(AO.zoomoutimg,"mouseout",AQ);if(AP.parentNode){AP.parentNode.removeChild(AP)}},onZoomIn:function(){var AO=this.map;AO.setZoomLevel(AO.zoom+1)},onZoomOut:function(){var AO=this.map;AO.setZoomLevel(AO.zoom-1)}};AH.ZoomControl=AN;AH.Loader._moduleLoaded("zoomcontrol")})})(MQA);
