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