Key = "Dmjtd|lu612007nq,20=o5-50zah";
if(window.MQPROTOCOL===undefined)MQPROTOCOL=window.location.protocol=='http:'?'http://':'https://';
SATSERVER=HYBSERVER=MAPSERVER="tile21.mqcdn.com,tile22.mqcdn.com,tile23.mqcdn.com,tile24.mqcdn.com".split(",");
COVSERVER="coverage.mqcdn.com";
RESSERVER="tile21.mqcdn.com";
LOGSERVER="platform.beta.mapquest.com";
STATICSERVER="btileprint.access.mapquest.com";
TRAFFSERVER="btraffic.access.mapquest.com";
GASSERVER="gasdata.web.mapquest.com";
MQPLATFORMSERVER=MQPROTOCOL+"platform.beta.mapquest.com";
MQLOGURL=MQPLATFORMSERVER+"/logger/v1";
MQROUTEURL=MQPLATFORMSERVER+"/directions/v1";
MQGEOCODEURL=MQPLATFORMSERVER+"/geocoding/v1";
MQSEARCHURL=MQPLATFORMSERVER+"/search/v1";
MQLONGURL=MQPLATFORMSERVER+"/longurl/v1";
MQCDN=MQPROTOCOL+"platform.beta.mapquest.com/sdk/js/v6.0.0/";
function $pv() {}; function $a() {};

/**
 * 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,CONTROL_STREETVIEW360:5,CONTROL_TRANSIT:6,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(AJ){var AA=function(AO){};var v=function(){};if(window.console&&window.console.log&&!window.console.debug){window.console.debug=window.console.log;window.console.error=window.console.log}if(window.console&&window.console.debug){AA=function(AO){try{window.console.debug(AO)}catch(AP){}};v=function(AO,AP){try{window.console.error(AO+": "+AP)}catch(AP){}}}AJ.Log={debug:AA,handleError:v};function AM(){}function u(){return function(){}}function AF(AP,AQ){var AR={};for(var AO in AQ){if(!AR[AO]){AP[AO]=AQ[AO]}}return AP}function i(AO){var AP=function(){var AQ,AR,AT=arguments.callee,AS;AQ=AT.__before__;if(AQ){for(AR=AQ.length-1;AR>=0;AR--){AQ[AR].apply(this,arguments)}}AS=AO.apply(this,arguments);AQ=AT.__after__;if(AQ){for(AR=0;AR<AQ.length;AR++){AQ[AR].apply(this,arguments)}}return AS};AP.__aopwrapper__=true;return AP}function K(AO){var AP=AO.indexOf("$");if(AP>0){return{name:AO.substring(0,AP),advice:AO.substring(AP+1).toLowerCase()}}else{return{name:AO}}}function D(AR,AS,AQ,AT){var AO=AT[AR],AP;if(AO===undefined){AO=AM}if(typeof (AO)!="function"){throw new Error("Internal Error.  Function advice applied to non-function ("+AR+")")}if(!AT.hasOwnProperty(AR)||!AO.__aopwrapper__){AP=i(AO);AT[AR]=AP;AJ.Log.debug("Replaced "+AR+" with aop wrapper")}else{AP=AO}switch(AS){case"before":if(!AP.__before__){AP.__before__=[AQ]}else{AP.__before__.push(AQ)}AJ.Log.debug("Added function to before advice list for "+AR);break;case"after":if(!AP.__after__){AP.__after__=[AQ]}else{AP.__after__.push(AQ)}AJ.Log.debug("Added function to after advice list for "+AR);break;default:throw new Error("Unknown advice type "+AS+" for "+AR)}}function B(AP,AQ){var AU,AR={},AO,AT,AS;for(AU in AQ){if(AR[AU]){continue}AS=K(AU);AO=AQ[AU];if(!AS.advice){AP[AU]=AO}else{D(AS.name,AS.advice,AO,AP)}}return AP}function AK(AP,AO,AR,AQ){D(AO,AR.toLowerCase(),AQ,AP)}function n(AP,AS,AU,AQ,AR){var AT,AO=[];for(AT=5;AT<arguments.length;AT++){AO.push(arguments[AT])}AK(AP,AS,AU,function(){var AV=AO.concat();for(AT=0;AT<arguments.length;AT++){AV.push(arguments[AT])}return AQ[AR].apply(AQ,AV)})}AJ.extend=AF;AJ.mixin=B;AJ.attach=AK;AJ.connect=n;var x,H,AB;function M(AO){return typeof (AO)=="function"}function Y(AO){return typeof (AO)=="undefined"}function a(AO){return typeof AO!="string"?false:!!AO.match(/^\$id\$/)}function J(AQ){var AO=0,AP=0;do{AO+=AQ.offsetTop||0;AP+=AQ.offsetLeft||0;AQ=AQ.offsetParent}while(AQ);return{x:AP,y:AO}}function AG(AQ,AS){var AR=J(AQ),AO=0,AP=0;if(AS.pageX||AS.pageY){AO=AS.pageX;AP=AS.pageY}else{if(AS.clientX||AS.clientY){AO=AS.clientX+(document.body.scrollLeft||0)+(document.documentElement.scrollLeft||0);AP=AS.clientY+(document.body.scrollTop||0)+(document.documentElement.scrollTop||0)}}AR.x=AO-AR.x;AR.y=AP-AR.y;return AR}function o(AP,AO){var AQ=u();AQ.prototype=AP.prototype;return(AO)?B(new AQ(),AO):new AQ()}function A(AO){return(x.ie6)?AO.replace(".png",".gif"):AO}function L(AO){if(x.ie6){AO.className=AO.className+" mqaie6"}return AO}function E(AP){var AO=0;if(AP.offsetWidth){if(AP.scrollWidth&&(AP.offsetWidth!=AP.scrollWidth)){AO=AP.scrollWidth}else{AO=AP.offsetWidth}}else{if(AP.clip&&AP.clip.width){AO=AP.clip.width}else{if(AP.style&&AP.style.pixelWidth){AO=AP.style.pixelWidth}}}return parseInt(AO,10)}function N(AP){var AO=0;if(AP.offsetHeight){AO=AP.offsetHeight}else{if(AP.clip&&AP.clip.height){AO=AP.clip.height}else{if(AP.style&&AP.style.pixelHeight){AO=AP.style.pixelHeight}}}return parseInt(AO,10)}function r(AP,AQ){if(AP.type!="mouseout"&&AP.type!="mouseover"){return false}var AO=AP.relatedTarget?AP.relatedTarget:AP.type=="mouseout"?AP.toElement:AP.fromElement;while(AO&&AO!=AQ){AO=AO.parentNode}return(AO!=AQ)}function c(AO){function AP(AQ){var AR=String(AQ).toUpperCase();return AR.length==1?"0"+AR:AR}if(!AO){return"#000000"}if(typeof (AO)=="object"){return"#"+AP(AO[0])+AP(AO[1])+AP(AO[2])}else{return AO}}AJ.Util={};(function(){var AP=1;H=function(AS){if(AS.guid){return AS.guid}var AR=AS["$mqa.id$"];if(!AR){AR=("$id$"+(AP++));AS["$mqa.id$"]=AR}return AR};AB=function(){var AR,AS;if(arguments.length==1){AR=arguments[0];AS=(typeof AR=="string")?AJ._jsEval("("+AR+")"):AR;return AO(AS[0],AS[1])}else{if(arguments.length==2){return AO.apply(null,arguments)}else{throw new Error("Illegal arguments to html() function")}}};function AO(AW,AS,AR){var AZ,Aa,AU,AY,AV,AT=arguments.callee,AX;if(!AR){AR={}}function Ab(Ao){var Ak=Ao.match(/^([^\#\.]+)(\#([^\.]+))?(\.(.+))?$/),An=Ak[3],Ah=Ak[5],Ac,Ad=[],Al,Af,Ag,Ae,Am,Aj,Ai;Ao=Ak[1];if(Ao=="input"&&AJ.browser.name=="msie"){for(Al=0;Al<AZ.length;Al++){Ag=AZ[Al];Ae=AZ[++Al];if(Ag=="@type"&&(Ae=="radio"||Ae=="checkbox")){Ac=true}if(Ag.charAt(0)=="@"){Ad[Ad.length]=[Ag.substring(1),Ae]}}if(Ac){Am=[];Aj=' {field}="{value}"';Ai="<input {attrs}/>";for(Af=0;Af<Ad.length;Af++){Am[Am.length]=Aj.replace("{field}",Ad[Af][0]).replace("{value}",Ad[Af][1])}Ao=Ai.replace("{attrs}",Am.join(""))}}elt=document.createElement(Ao);if(An){AR[An]=elt}if(Ah){elt.className=Ah}return elt}if(typeof (AW)=="string"){AW=Ab(AW);AR.root=AW}for(Aa=0;Aa<AS.length;Aa++){AV=AS[Aa];AY=typeof (AV);if(AY=="number"&&AV===0){AW.appendChild(document.createTextNode(" "))}else{AZ=AS[++Aa];AU=typeof (AZ);if(AU=="undefined"){continue}if(AU=="object"){AX=Ab(AV);AT(AX,AZ,AR);AW.appendChild(AX)}else{(AV=="text"||AV=="t")?AW.appendChild(document.createTextNode(AZ)):(AV=="style"||AV=="s")?AW.style.cssText=AZ:(AV=="i")?AW.setAttribute("src",A(AZ)):(AV=="@domid"||AV=="@domId")?AW.id=AZ:(AV.charAt(0)=="@")?AW.setAttribute(AV.substring(1),AZ):AW[AV]=AZ}}}return AR}AF(AJ.Util,{objectId:H,isObjectId:a,isFunction:M,isUndefined:Y,getParentOffset:J,getLocalCoords:AG,_getRandomGUID:function(){return"$id$"+(AP++)},subClass:o,html:AB,ie6Image:A,ie6Class:L,getDomWidth:E,getDomHeight:N,isMouseLeaveOrEnter:r});function AQ(){var AU={},AS=(navigator.userAgent||"").toLowerCase(),AT=["firefox","msie","netscape","opera","safari","iphone","ipod","android"],AV=["linux","mac","windows","x11"],AW,AY,AR,AX,AZ;AU.name=AU.version=AU.os="unknown";for(AW=0,AY=AT.length;AW<AY;AW++){AR=AS.indexOf(AT[AW])+1;if(AR>0){AU.name=AT[AW];AX=AR+AU.name.length;AZ=((AU.name=="safari")||(AS.charAt(AX+4)>0&&AS.charAt(AX+4)<9))?5:3;AU.version=AS.substring(AX,AX+AZ)}}for(AW=0,AY=AV.length;AW<AY;AW++){AR=AS.indexOf(AV[AW])+1;if(AR>0){AU.os=AV[AW]}}if(AU.name=="android"&&AU.version<1.5){AU.name="safari"}if(AU.name=="msie"&&AU.version<7){AU.ie6=true}return AU}x=AQ();AJ.browser=x;AJ.Util.getBrowserInfo=function(){return x};AJ.Util.distanceBetween=function(AT,AV,AS){var AS=AS||"MI",AU=(AT.lat-AV.lat)*Math.PI/180,AW=(AT.lng-AV.lng)*Math.PI/180,AR=Math.sin(AU/2)*Math.sin(AU/2)+Math.cos(AT.lat*Math.PI/180)*Math.cos(AV.lat*Math.PI/180)*Math.sin(AW/2)*Math.sin(AW/2),AX=2*Math.atan2(Math.sqrt(AR),Math.sqrt(1-AR));km=6371;var AY=(AS=="KM"?km:(km/1.609));return AY*AX}})();var k,O,G;(function(){var AP={removeAll:function(AU,AS){var AT,AV=0,AR=AS||0,AW=AU;if(!M(AU)){AW=function(AX){return AX==AU}}for(AT=AS||0;AT<this.length;AT++){if(AW(this[AT],AT)){AV++}else{if(AT!=AR){this[AR]=this[AT]}AR++}}this.length-=AV},removeAt:function(AS){var AR,AT=this[AS];for(AR=AS+1;AR<this.length;AR++){this[AR-1]=this[AR]}this.length-=1;return AT},insert:function(AR,AT){var AS;if(AT>=this.length){this[AT]=AR;return }for(AS=this.length;AS>AT;AS--){this[AS]=this[AS-1]}this[AT]=AR},each:function(AS){for(var AT=0;AT<this.length;AT++){try{AS(this[AT],AT)}catch(AR){if(AR===G){return }throw AR}}}};function AO(AR){var AS=typeof (AR);if(AS=="string"||AS=="number"){return"@$"+AR}else{return"@#"+H(AR)}}function AQ(){}AQ.prototype={get:function(AR){return this[AO(AR)]},put:function(AS,AR){AS=AO(AS);var AT=this[AS];this[AS]=AR;return AT},remove:function(AR){AR=AO(AR);var AS=this[AR];delete this[AR];return AS},each:function(AR){var AT,AU;for(AT in this){if(AT.charAt(0)=="@"){AU=this[AT];if(AT.charAt(1)=="$"){AT=AT.substring(2)}try{AR(AU,AT)}catch(AS){if(AS==G){return }throw AS}}}}};k=function(AR){if(!AR){AR=[]}AF(AR,AP);return AR};O=function(AR){if(!AR){return new AQ()}AF(AR,AQ.prototype);return AR}})();AJ.Collection={list:k,map:O};var y;(function(){var AZ={traffic:{depends:["fullUtil","shapes","jsondeserializer","remotecollection"]},jsondeserializer:{depends:["basedeserializer"]}};if(window.mqaConfig&&window.mqaConfig.modules){AF(AZ,window.mqaConfig.modules)}var AP;function AW(Aa,Ab){AP=Aa;AJ.Loader.resourcePath=y=Ab}function AU(Aa){var Ab=AZ[Aa];if(!Ab){Ab={};AZ[Aa]=Ab}return Ab}function AS(Aa){var Ab=document.createElement("script");Ab.src=Aa;var Ac=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];if(!Ac){throw new Error("Document has no head or body")}Ac.appendChild(Ab)}function AR(){var Ac,Ad,Ae=[],Aa,Ab=[];for(Ac=0;Ac<arguments.length;Ac++){Ad=arguments[Ac];if(typeof Ad=="string"){if(AZ[Ad]&&AZ[Ad].loaded){continue}Ae.push(Ad);Ab.push(Ad)}else{if(typeof Ad=="function"){Aa=Ad}break}}Ab.push(Aa);if(Ae.length==0){Aa();return true}else{AX(Ae[0],function(){AR.apply(null,Ab)})}}function AX(Ac,Aa){var Ag=AU(Ac),Ae,Af,Ad,Ab;if(Ag.loaded){Aa();return true}Ae=Ag.depends;if(Ae){for(Ad=0;Ad<Ae.length;Ad++){Af=AZ[Ae[Ad]];if(!Af){Af={};AZ[Ae[Ad]]=Af}if(!Af.loaded){AR(Ae[Ad],function(){AR(Ac,Aa)});return false}}}if(Ag.waiters){Ag.waiters.push(Aa);return false}else{Ag.waiters=[Aa];Ag.requestTime=new Date().getTime();Ab=Ag.uri?Ag.uri:AP(Ac,"js");AS(Ab,true);return false}}function AQ(Ac){AJ.Log.debug("Module reported as loaded: "+Ac);var Ae=AZ[Ac],Af,Ab,Ad,Ag;if(!Ae){Ae={};AZ[Ac]=Ae}Af=Ae.waiters;delete Ae.waiters;Ae.loaded=true;if(!Af){return }for(Ad=0;Ad<Af.length;Ad++){Ag=Af[Ad];if(typeof (Ag)=="function"){Ag();continue;try{Ag()}catch(Aa){Ab=Aa}}}if(Ab){throw Ab}}function AT(Aa){var Ab=document.createElement("style"),Ac=document.getElementsByTagName("head")[0];if(!Ac){return }if(x.name=="msie"){Ab.setAttribute("type","text/css");Ab.styleSheet.cssText=Aa}else{Ab.appendChild(document.createTextNode(Aa))}if(Ac.firstChild){Ac.insertBefore(Ab,Ac.firstChild)}else{Ac.appendChild(Ab)}}function AO(Aa){var Ab=document.createElement("link"),Ac=document.getElementsByTagName("head")[0];Ab.setAttribute("rel","stylesheet");Ab.setAttribute("href",Aa);if(!Ac){return }if(Ac.firstChild){Ac.insertBefore(Ab,Ac.firstChild)}else{Ac.appendChild(Ab)}}function AY(Ae,Ac){var Af=AU(Ae),Ab,Ad,Aa;if(Af.cssLoaded){return }if(Af.cssText){AT(Af.cssText)}else{AO(AP(Ae,"css"))}if(Ac&&!Af.cssText){AT(Ac)}Af.cssLoaded=true}function AV(Ab,Aa){AU(Ab).cssText=Aa}AJ.Loader={_initialize:AW,_moduleLoaded:AQ,withModule:AR,requireCss:AY,registerCss:AV,prependCss:AT,resourcePath:y,isLoaded:function(Aa){var Ab=AZ[Aa];return Ab||Ab.loaded},registerModules:function(Aa){AF(AZ,Aa)}};AJ.withModule=AR})();(function(){var AU,AP="",AQ,AR,AO,AV=document.getElementsByTagName("script");for(AU=0;AU<AV.length;AU++){AQ=AV[AU];AR=AQ.src;if(!AR){continue}AO=AR.indexOf("mqa.");if(AO>=0&&AR.lastIndexOf("/")<AO){AP=AR.substring(0,AO);break}}AJ.Log.debug("Using module loader root="+AP);function AS(AX,AW){return AP+"mqa.module."+AX+"."+AW}function AT(AW){return AP+AW}AJ.Loader._initialize(AS,AT)})();(function(){function Af(Ai,Aj){var Ag=(Ai+90)*(AJ.PIXERSPERLATDEGREE/Aj);var Ah=parseInt(Ag/AJ.TILESIZE);return Ah}function AO(Ai,Aj){var Ag=(Ai+90)*(AJ.PIXERSPERLATDEGREE/Aj);var Ah=parseInt(Ag/AJ.TILESIZE);return ret=(Ag-Ah*AJ.TILESIZE)}function AR(Ai,Ag){var Aj=(Ai+180)*(AJ.PIXERSPERLNGDEGREE/Ag);var Ah=parseInt(Aj/AJ.TILESIZE);return Ah}function Ab(Ai,Ag){var Aj=(Ai+180)*(AJ.PIXERSPERLNGDEGREE/Ag);var Ah=parseInt(Aj/AJ.TILESIZE);return(Aj-Ah*AJ.TILESIZE)}function AZ(Ak,Aj,Ah){var Ag=Ak*AJ.TILESIZE+Aj;var Ai=Ag/(AJ.PIXERSPERLATDEGREE/Ah)-90;Ai=parseInt(Ai*1000000)/1000000;return Ai}function AU(Ai,Ah,Ag){var Aj=Ai*AJ.TILESIZE+Ah;var Ak=Aj/(AJ.PIXERSPERLNGDEGREE/Ag)-180;Ak=parseInt(Ak*1000000)/1000000;while(Ak>180){Ak-=360}while(Ak<-180){Ak+=360}return Ak}__nextId=0;function AY(Ah){this.display=Ah;var Ag=document.createElement("div");Ag.style.position="absolute";Ag.style.backgroundImage="url("+AJ.RESOURCES+"loading.gif)";Ag.style.backgroundRepeat="repeat";Ah.zlevel("background").appendChild(Ag);this.div=Ag}AY.prototype={setViewport:function(Aj,Ag,Ai,Ak){if(Aj>=this.ulX&&Ag>=this.ulY&&(Aj+Ai)<=(this.ulX+this.width)&&(Ag+Ak)<=(this.ulY+this.height)){return }var Ah=this.display.transform.displayToGridCoord(Aj,Ag);this.ulX=Ah.ulX-2*Ah.gridSize;this.ulY=Ah.ulY-2*Ah.gridSize;this.width=Ai+4*Ah.gridSize;this.height=Ak+4*Ah.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 AS(Ag,Ai,Ah){return Ag+":"+Ah+":"+Ai}function Ac(Ag){}Ac.prototype={initialize:function(Ag){this.parent=Ag},dispose:function(){},setup:function(Ag,Ai,Al,Ah,Aj,An,Am,Ak){},hide:function(){}};function AP(){}AP.prototype=new Ac();AP.prototype.initialize=function(Ag){this.parent=Ag;var Ah=document.createElement("img");Ah.style.position="absolute";Ah.style.visibility="hidden";Ah.style.display="block";Ah.setAttribute("unselectable","on");Ah.setAttribute("galleryimg","no");Ah.style.MozUserSelect="none";this.parent.elt.appendChild(Ah);this.elt=Ah};AP.prototype.dispose=function(){this.elt.parentNode.removeChild(this.elt)};AP.prototype.hide=function(){this.elt.style.visibility="hidden";this.elt.style.display="none"};AP.prototype.setup=function(Ag,Ai,Al,Ah,Aj,An,Am,Ak){this.key=Ag;if(Ai>=0&&Al>=0){this.setupImage(this.elt,Ai,Al,An,Am);this.elt.style.left=Ah+"px";this.elt.style.top=Aj+"px";this.elt.style.width=Ak+"px";this.elt.style.height=Ak+"px";this.elt.style.visibility="";this.elt.style.display="block"}else{this.elt.display="none"}};AP.prototype.setupImage=function(Aj,Ak,Ag,Ai,Ah){Aj.src=AJ.RESOURCES+"loading.gif"};function AT(Ah,Ag){return function(Aq,Ai,Am,An,Ar){var Aj=Ai,Ak=Am,Ao,Ap;while(Aj<0){Aj+=AJ.MODS[An]}while(Aj>=AJ.MODS[An]){Aj-=AJ.MODS[An]}Ao=Math.floor(Aj/1000);Ap=Math.floor(Ak/1000);var Al=["http://",MAPSERVER[Ai%MAPSERVER.length],"/",Ah,"/Scale",Ar,"/",Ap,"/",Ak-Ap*1000,"/",Ao,"/",Aj-Ao*1000,".",Ag].join("");if(typeof (LOTL_STATE)!="undefined"&&LOTL_STATE==1){if(Ah=="sat"&&Ar==1000&&Ap==152&&(Ak-Ap*1000)==923&&Ao==60&&(Aj-Ao*1000)==282){Al="http://img.mqcdn.com/mqtoolkit/lotl-tile.jpg"}}if(Aq.src){Aq.src=AJ.RESOURCES+"loading.gif"}Aq.src=Al}}function AW(){}AW.prototype=new AP();AW.prototype.setupImage=AT("map","gif");function Ad(){}Ad.prototype=new AP();Ad.prototype.setupImage=AT("sat","jpg");function Ae(){}Ae.prototype=new AP();Ae.prototype.setupImage=AT("hyb","gif");function AX(Ah,Ag){this.display=Ah;this.tileCtor=Ag||Ac;var Ai=document.createElement("div");Ai.style.position="absolute";Ah.zlevel("tiles").appendChild(Ai);this.elt=Ai;this.tileBucket={};this.extraTiles=[];this.enabled=false}AX.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 Ah,Ai,Aj=this.tileBucket,Ag=this.extraTiles;this.tileBucket={};this.extraTiles=[];for(var Ah in Aj){var Ai=Aj[Ah];if(Ai&&(Ai instanceof Ac)){Ai.dispose()}}for(Ah=0;Ah<Ag.length;Ah++){Ag[Ah].dispose()}},setViewport:function(A1,A5,Ax,A4){if(!this.enabled){return }var A7=this.display.transform,Ap=A7.displayToGridCoord(A1,A5),Ay=A1+Ax,A0=A5+A4,A3=Math.ceil((Ay-A1)/Ap.gridSize),A9=Math.ceil((A0-A5)/Ap.gridSize),BB,Aw,A6,Aj,Ar,Am,An=A7.zoom,Ao=A7.scale,Ag,BC,As,At,A2,Ai,Ah,Ak=this.extraTiles,Au=this.tileBucket,BA={},Az=0,Aq=0;function Al(){var BF=A2,BE=0;while(BA[A2]){A2=BF+":"+(BE++)}var BD=Au[A2];if(!BD||A7.zoom==1){BD=Ak.pop();if(!BD){BD=new this.tileCtor();BD.initialize(this);Az+=1}else{Aq+=1}BD.setup(A2,Ai,Ah,As,At,An,Ao,Ap.gridSize)}else{delete Au[A2]}BA[A2]=BD}BB=Ap.row+1;Aw=BB-A9-1;A6=Ap.col-1;Aj=A6+A3+1;Ar=Ap.ulX-Ap.gridSize*1;Am=Ap.ulY-Ap.gridSize*1;for(var Ag=A6;Ag<=Aj;Ag++){Ai=A7.normalizeCol(Ag);As=Ar+(Ag-A6)*Ap.gridSize;for(var BC=BB;BC>=Aw;BC--){Ah=BC;At=Am+(BB-BC)*Ap.gridSize;A2=AS(Ao,Ai,Ah);Al.call(this)}}this.tileBucket=BA;for(var Av in Au){var A8=Au[Av];if(A8&&(A8 instanceof Ac)){if(Ak.length<32){Ak.push(A8)}else{A8.dispose()}}}}};function AV(Ah,Al,Ai,Ak,Ag,Aj){this.zoom=Ah;this.scale=Al;this.refLat=Ai;this.refLng=Ak;this.leftOffset=Ag;this.topOffset=Aj;this.ulXRefGrid=-Math.round(Ab(Ak,Al));this.ulYRefGrid=-(AJ.TILESIZE-Math.round(AO(Ai,Al)));this.colRefGrid=AR(Ak,Al);this.rowRefGrid=Af(Ai,Al);this.colMax=AR(180,Al);this.rowMax=Af(90,Al)}AV.prototype={displayToGridCoord:function(Ai,Aj){var Ao=Ai-this.ulXRefGrid,Ah=Aj-this.ulYRefGrid,Al=Math.floor((Math.abs(Ao)/256)*(Ao>=0?1:-1)),Am=Math.floor((Math.abs(Ah)/256)*(Ah>=0?1:-1)),An=this.ulXRefGrid+Al*256,Ag=this.ulYRefGrid+Am*256;var Ak={ulX:An,ulY:Ag,dx:Ao,dy:Ah,x:Ai-An,y:Aj-Ag,nx:Al,ny:Am,col:this.normalizeCol(this.colRefGrid+Al),row:(this.rowRefGrid-Am),gridSize:256};return Ak},normalizeCol:function(Ag){while(Ag<0){Ag+=this.colMax+1}while(Ag>this.colMax){Ag-=this.colMax+1}return Ag},displayToLatLng:function(Ai,Ag){var Ah=this.displayToGridCoord(Ai,Ag);return{lat:AZ(Ah.row,AJ.TILESIZE-Ah.y,this.scale),lng:AU(Ah.col,Ah.x,this.scale)}},latLngToDisplay:function(Ak,Ai){if(Ak&&(typeof Ak=="string")){Ak=parseFloat(Ak)}if(Ai&&(typeof Ai=="string")){Ai=parseFloat(Ai)}var Al=this.scale,Am=-Math.round(Ab(Ai,Al)),An=-(AJ.TILESIZE-Math.round(AO(Ak,Al))),Ag=AR(Ai,Al),Ao=Af(Ak,Al),Ah=(Ag-this.colRefGrid)*AJ.TILESIZE+this.ulXRefGrid-Am,Aj=(this.rowRefGrid-Ao)*AJ.TILESIZE+this.ulYRefGrid-An;return{x:Ah,y:Aj}}};function Aa(Ag,Ah){this.map=Ag;this.elt=Ah;this.layers={};this.zlevels=[]}Aa.prototype={zlevel:function(Ag,Ai){var Aj,Ah=this.zlevels,Ak;Ag=q(Ag)||0;for(Aj=0;Aj<Ah.length;Aj++){Ak=Ah[Aj];if(Ak._z==Ag&&Ak._f==!!Ai){return Ak}}Ak=document.createElement("div");Ak._z=Ag;Ak._f=!!Ai;Ak.style.position="absolute";Ak.style.zIndex=Ag;if(!Ai&&this._inited){Ak.style.left=this.left+"px";Ak.style.top=this.top+"px"}Ah.push(Ak);this.elt.appendChild(Ak);return Ak},findParent:function(Ag){while(Ag){if(Ag.parentNode===this.elt){return Ag}Ag=Ag.parentNode}return null},ancestorEventCoords:function(Ah){var Ag=AG(this.elt,Ah);dspX=this.ulX+Ag.x,dspY=this.ulY+Ag.y;return{screen:Ag,display:{x:dspX,y:dspY},latLng:this.transform.displayToLatLng(dspX,dspY)}},addLayer:function(Ah,Ai){this.removeLayer(Ah);Ai.__layerKey=Ah;this.layers[Ah]=Ai;try{if(Ai.resetTransform){Ai.resetTransform(this.transform)}if(Ai.setViewport){Ai.setViewport(this.ulX,this.ulY,this.width,this.height)}}catch(Ag){v("setViewport layer "+Ah,Ag)}},removeLayer:function(Ai){var Ah=this.layers[Ai];if(Ah&&Ah.dispose){try{Ah.dispose()}catch(Ag){v("dispose layer "+Ai,Ag)}delete this.layers[Ai]}},eachLayer:function(Ai){var Ag,Ah;for(Ag in this.layers){Ah=this.layers[Ag];if(Ah&&typeof (Ah)=="object"){Ai(Ah,Ag)}}},invalidateLayer:function(Ag){if(typeof (Ag)=="string"){Ag=this.layers[Ag]}if(!Ag){return }Ag.setViewport(this.ulX,this.ulY,this.width,this.height)},initTransform:function(Ao,Al,Ak,Aj,An,Ag){var Ai=An/2,Ah=Ag/2,Am=new AV(Ao,Al,Ak,Aj,Ai,Ah);this.cancelDrag();this.transform=Am;this.eachLayer(function(Ap){if(Ap.resetTransform){Ap.resetTransform(Am)}});this.setViewport(-Ai,-Ah,An,Ag,true)},setViewport:function(Ai,Al,Ag,Aj){var Ah,Am=this.zlevels,Ak;this._inited=true;if(typeof (Ag)=="undefined"){Ag=this.width}if(typeof (Aj)=="undefined"){Aj=this.height}this.width=Ag;this.height=Aj;this.ulX=Ai;this.ulY=Al;this.left=-Ai;this.top=-Al;for(Ah=0;Ah<Am.length;Ah++){Ak=Am[Ah];if(!Ak._f){Ak.style.left=this.left+"px";Ak.style.top=this.top+"px"}}this.eachLayer(function(Ao,Ap){try{if(Ao.setViewport){Ao.setViewport(Ai,Al,Ag,Aj)}}catch(An){v("layer "+Ap+" setViewport",An)}})},startDrag:function(Ag,Ai){var Am=this,Aj=this.ancestorEventCoords(Ag);this.cancelDrag();var Ah=Aj.display;Ag=null;Ai.startXY=Ah;Ai.startLatLng=Aj.latLng;Ai.dragXY=Ah;Ai.dragLatLng=Ai.startLatLng;function Ak(Ao){AA("[drag] eventHandler("+Ao.type+")");if(!Ao){Ao=window.event}var Ap=Ao.type,An=Am.ancestorEventCoords(Ao);Ai.dragXY=An.display;Ai.dragLatLng=An.latLng;if(Ap=="mousemove"){if(Ai.dragMove){Ai.dragMove()}}else{if(Ap=="mouseup"){Al();if(Ai.dragEnd){Ai.dragEnd()}}}P(Ao)}AD(document,"mousemove",Ak);AD(document,"mouseup",Ak);function Al(){C(document,"mousemove",Ak);C(document,"mouseup",Ak);Am.currentDrag=null}Ai.display=this;Ai.cancelDrag=function(){Al();if(Ai.dragCancelled){Ai.dragCancelled()}};this.currentDrag=Ai;if(Ai.dragStart){Ai.dragStart()}},cancelDrag:function(){if(this.currentDrag){this.currentDrag.cancelDrag()}}};function AQ(Ak,Ah,Ag){if(arguments.length==0){return }var Aj;Aj=document.createElement("div");Aj.style.width=Ak.style.width;Aj.style.height=Ak.style.height;Aj.style.zIndex=0;Aj.style.overflow="hidden";Aj.style.background="#FFFFFF";Aj.style.position="relative";Aj.style.top="0px";Aj.style.left="0px";Ak.style.position="relative";Ak.appendChild(Aj);this.parent=Aj;this.width=parseInt(Aj.style.width);this.height=parseInt(Aj.style.height);this.zoom=(Ah>16)?16:parseInt(Ah);this.scale=AJ.SCALES[this.zoom];this.tilesize=256;this.centerlat=Ag.lat;this.centerlng=Ag.lng;var Ai=document.createElement("div");Ai.style.position="absolute";Ai.style.zIndex=0;Aj.appendChild(Ai);this.display=new Aa(this,Ai);this.display.initTransform(this.zoom,this.scale,Ag.lat,Ag.lng,this.width,this.height)}AQ.prototype={};AJ.Kernel={CoreMap:AQ,LoadingLayer:AY,Tile:Ac,ImageTile:AP,MqMapImageTile:AW,MqSatImageTile:Ad,MqStrlblImageTile:Ae,TileLayer:AX,debug:AA,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(AO){var AP;if(!AO){return 0}if(typeof AO=="string"){AP=I[AO];if(!AP){AA("[zindex] No symbolic zindex defined for "+AO);return 0}AO=AP}else{AO=parseInt(AO)||0}return AO}function X(AO,AP){if(AO){AO.style.zIndex=q(AP)}}AJ.ZIndex={absolutize:q,set:X,Registry:I};var R,AH,AD,C,S,m,h,F,V,P,t,p,AL=AM,U,AN,AC,s,d,Z,W,b,AI,g;(function(){AH={};var AR=false,AV=false,AX=[],AU=[],AY=false;function AW(){if(!AY&&document.body){AY=true;if(document.body.attachEvent){document.body.attachEvent("onunload",AQ)}else{document.body.addEventListener("onunload",AQ,false)}}}function AP(){AR=true;AW();for(var Aa=0;Aa<AX.length;Aa++){AX[Aa]()}}function AQ(){}AH._onUnload=function(){if(AV){return }if(window.detachEvent){window.detachEvent("onload",AP);window.detachEvent("onunload",AQ);if(document.body){document.body.detachEvent("onunload",AQ)}}for(var Ab=0;Ab<AU.length;Ab++){var Ac=AU[Ab];try{AU[Ab]();if(Ac){AU[Ab]()}}catch(Aa){}}AV=true};AH.addOnUnload=h=function(Aa){AU.push(Aa)};EventUtil_$=function(Aa){return(typeof Aa=="string")?document.getElementById(Aa):Aa};EventUtil_processEventName=function(Aa,Ab){return(Ab=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||Aa.attachEvent))?"keydown":Ab};AH.observe=AD=function(Aa,Ab,Ac){Aa=EventUtil_$(Aa);Ab=EventUtil_processEventName(Aa,Ab);AH._observe(Aa,Ab,Ac);return Ac};AH.stopObserving=C=function(Aa,Ab,Ac){Aa=EventUtil_$(Aa);Ab=EventUtil_processEventName(Aa,Ab);AH._stopObserving(Aa,Ab,Ac)};var AT=navigator.appVersion;var AO;if(AT.match(/\bMSIE\b/)&&window.attachEvent){AO=parseFloat(AT.split("MSIE ")[1].split(";")[0]);if(AO){var AZ=[];AH._observe=function(Aa,Ab,Ad){Aa.attachEvent("on"+Ab,Ad);var Ac=AZ.length;AZ[Ac]=[Aa,Ab,Ad];Ad["__ie6_"+Ab]=Ac};AH._stopObserving=function(Ab,Ac,Ae){try{Ab.detachEvent("on"+Ac,Ae)}catch(Aa){AA("[stopObserving]: Error disconnecting event "+Aa)}var Ad=Ae["__ie6_"+Ac];if(Ad){delete AZ[Ad]}};h(AH._evUnloadFcn=function(){for(var Ab in AZ){var Ac=AZ[Ab];if(typeof Ac=="object"&&Ac.length==3){delete AZ[Ab];try{Ac[0].detachEvent("on"+Ac[1],Ac[2])}catch(Aa){}}}})}else{AH._observe=function(Aa,Ab,Ac){Aa.attachEvent("on"+Ab,Ac)};AH._stopObserving=function(Ab,Ac,Ad){try{Ab.detachEvent("on"+Ac,Ad)}catch(Aa){AA("[stopObserving]: Error disconnecting event "+Aa)}}}}else{AO=false;AH._observe=function(Aa,Ab,Ac){Aa.addEventListener(Ab,Ac,false)};AH._stopObserving=function(Aa,Ab,Ac){Aa.removeEventListener(Ab,Ac,false)}}var AS=[];AH.addDtor=S=function(Aa,Ac){var Ab=AS.length,Ad;if(arguments.length>1){Ad=[Aa,Ac]}else{Ad=[Aa]}AS[Ab]=Ad;return Ab};AH.delDtor=m=function(Aa){delete AS[Aa]};AH._dtorHandler=function(){AH._inGlobalDtor=true;var Ab,Ac;for(Ab in AS){Ac=AS[Ab];if(Ac&&(typeof Ac=="object")&&Ac.length){try{if(Ac.length==1){Ac[0].call(null)}else{Ac[0][Ac[1]].call(Ac[0])}}catch(Aa){}try{delete AS[Ab]}catch(Aa){}}}};AD(window,"unload",AH._onUnload);h(AH._dtorHandler)})();R=AH;AJ.EventUtil=R;AJ._prEvent=R;AH.element=F=function(AO){return AO.target||AO.srcElement};AH.isLeftClick=V=function(AO){return((AO.which&&(AO.which==1))||(AO.button&&(AO.button==1)))};AH.stop=P=function(AO){try{AO.cancelBubble=true;if(AO.preventDefault){AO.preventDefault();AO.stopPropagation()}else{AO.returnValue=false}}catch(AP){}};AH.falseFunction=t=function(){return false};AH.unselectable=p=function(AO){AO.onselectstart=t;AO.unselectable=true;AO.style.MozUserSelect="none"};AH.hitch=U=function(AQ,AP){var AO=[];for(var AR=2;AR<arguments.length;AR++){AO.push(arguments[AR])}return function(){var AS=[];for(var AT=0;AT<arguments.length;AT++){AS.push(arguments[AT])}return AQ[AP].apply(AQ,AO.concat(AS))}};AH.bind=AN=function(AO,AP){return function(){return AO[AP].apply(AO,arguments)}};d=AH.EventCallback=function(AQ,AP){var AO=AQ;return function(AR){if(AO.turnEventsOff||(AO.map&&AO.map.turnEventsOff)){return }if(!AR){AR=window.event}AO[AP](AR)}};AH.AddDOMEventProtocol=AC=function(AO){B(AO,{addDOMEvent:function(){if(!this._domSubs){this._domSubs=[]}var AR,AP=this._domWired,AQ,AS,AU,AT=this._domSubs;outer:for(AQ=0;AQ<arguments.length;AQ++){AR=arguments[AQ];for(AU=0;AU<AT.length;AU++){if(AT[AU]==AR){continue outer}}AT.push(AR);if(AP){for(AS=0;AS<AP.length;AS++){AD(AP[AS],AR,AP._h)}}}},_wireDOMEvents:function(AQ){var AP=this._domWired,AS=this._domSubs,AR;if(!AP){AP=this._domWired=k();AP._h=d(this,"_onDOMEvent")}AP.push(AQ);if(AS){for(AR=0;AR<AS.length;AR++){AD(AQ,AS[AR],AP._h)}}},_unwireDOMEvents:function(AQ){var AP=this._domWired,AS=this._domSubs,AR,AT;if(arguments.length==0){if(AP&&AS){for(AR=0;AR<AP.length;AR++){for(AT=0;AT<AS.length;AT++){C(AP[AR],AS[AT],AP._h)}}}this._domWired=null}else{if(AP){AP.removeAll(function(AU){if(AU===AQ){for(AT=0;AT<AS.length;AT++){C(AU,AS[AT],AP._h)}}})}}},dispose$Before:function(){this._unwireDOMEvents()}});if(!AO._onDOMEvent){AO._onDOMEvent=function(){}}AO=null};AJ.Event=s=function(AO,AP){this.type="event";this.srcObject=AP;if(arguments.length){this.eventName=AO}else{this.eventName="unnamed event"}};AJ.EventManager=Z=new function(){var AO={};function AP(AQ){var AR=H(AQ),AS=AO[AR];if(!AS){AS={};AO[AR]=AS}return AS}this.addListener=W=function(AS,AV,AU,AQ){AV=AV.toLowerCase();var AR=AP(AS),AT=AR[AV];if(!AT){AT=[];AR[AV]=AT}AT.push([AU,AQ]);return AU};this.removeListener=b=function(AR,AY,AS,AV){AY=AY.toLowerCase();var AQ=AP(AR),AU=AQ[AY],AX=[],AW,AT;if(!AU){return }for(AW=0;AW<AU.length;AW++){AT=AU[AW];if(AT[0]!==AS&&AT[1]!==AV){AX.push(AU[AW])}}AQ[AY]=AX};this.clearListeners=AI=function(AR,AS){AS=AS.toLowerCase();var AQ=AP(AR);delete AQ[AS]};this.clearAllListeners=EventManager_clearAllListeners=function(AQ){var AR=H(AQ);delete AO[AR]};this.trigger=g=function(AR,AW,AT){AW=AW.toLowerCase();var AQ=AP(AR),AS=AQ[AW],AX,AU,AV;if(AS){for(AX=0;AX<AS.length;AX++){AU=AS[AX];AV=AU[0];if(AV){AV.call(AU[1],AT)}}}if(typeof AR.onEvent=="function"){AR.onEvent(AW,AT)}}};var f;(function(){var AV=window.MQA,AQ=AV.Kernel.debug;AV.MapLogo={MAPQUEST:0,SCALES:1,MAPQUEST_COPYRIGHT:2,NAVTEQ_COPYRIGHT:3,ICUBED_COPYRIGHT:4};AV.MapCorner={TOP_LEFT:AV.CORNER_TOPLEFT,TOP_RIGHT:AV.CORNER_TOPRIGHT,BOTTOM_LEFT:AV.CORNER_BOTTOMLEFT,BOTTOM_RIGHT:AV.CORNER_BOTTOMRIGHT};function AP(Ac,Ad,Ab){Ac.display.addLayer(Ad,new AV.Kernel.TileLayer(Ac.display,Ab))}function AO(Ac,Ab){return function(Ad){if(typeof (Ad)=="undefined"){Ad=100}this.slideMapToPoint(this.display.width/2+Ac*this.display.width*Ad/100,this.display.height/2+Ab*this.display.height*Ad/100)}}function AT(Ac,Ab){var Ad,Ae=Ac.getZoomLevel(),Af=new s("MQA.TileMap.zoomStart");Af.zoom=Ae;Ac.onZoomStart(Af);Ad=Ab.call(Ac);Af=new s("MQA.TileMap.zoomEnd");Af.prevZoom=Ae;Af.zoom=Ac.getZoomLevel();Ac.onZoomEnd(Af);return Ad}function AR(Ab,Ac){var Ad=new s();Ad.eventName="MQA.TileMap."+Ac.toLowerCase();Ab["on"+Ac].call(Ab,Ad)}function AS(Ac){var Ab=Ac.srcElement||Ac.target;Ac.cancelBubble=true;if(Ac.stopPropagation){Ac.stopPropagation()}}function Aa(Ap,Al,Aq,Ad,At){var An,Ai,Ao=Al.ul,Af=Al.lr,As,Ab,Aj,Am,Ah,Ak=Ap.getScale(),Ac,Ae=Ap.bestFitMargin,Ag,Ar;if(!Ad||Ad<1||Ad>15){An=1}else{An=Ad+1}if(!At){Ai=16}else{if(At<1||At>16){Ai=16}else{Ai=At}if(Ai<An){Ai=An+1}}if(typeof (Ao.x)=="number"){Ao=Ap.pixToLL(Ao);Af=Ap.pixToLL(Af)}AV.Log.debug("_bestFit minLL=("+Ao.lat+","+Ao.lng+"), maxLL=("+Af.lat+","+Af.lng+")");if(Aq){Aj=Ap.getCenter();Am=Math.max(Math.abs(Aj.lng-Ao.lng),Math.abs(Aj.lng-Af.lng));Ah=Math.max(Math.abs(Aj.lat-Ao.lat),Math.abs(Aj.lat-Af.lat));As=(Am*2)*(AV.PIXERSPERLNGDEGREE/Ak);Ab=(Ah*2)*(AV.PIXERSPERLATDEGREE/Ak)}else{As=Math.abs(Af.lng-Ao.lng)*(AV.PIXERSPERLNGDEGREE/Ak);Ab=Math.abs(Af.lat-Ao.lat)*(AV.PIXERSPERLATDEGREE/Ak)}AV.Log.debug("_bestFit size at scale "+Ak+"=("+As+","+Ab+")");Ac=(Ae<(Ap.width/2)&&Ae<(Ap.height/2))?Ae:Math.round(Math.min((Ap.width/2)-1,((Ap.height/2)-1)));AV.Log.debug("_bestFit margin="+Ac);Ag=Math.max((Ak*(As/(Ap.width-(Ac*2)))),Ak*(Ab/(Ap.height-(Ac*2))));AV.Log.debug("_bestFit curScale="+Ak+", targeScale="+Ag+", startZoom="+An+", maxZoom="+Ai);while(Ag<AV.SCALES[An]&&An<=Ai){An++}An-=1;if(Aq){AV.Log.debug("_bestFit zoom="+An);Ap.setZoomLevel(An)}else{Ar={lat:(Ao.lat+Af.lat)/2,lng:(Ao.lng+Af.lng)/2};AV.Log.debug("_bestFit zoom="+An+", center=("+Ar.lat+","+Ar.lng+")");Ap.setCenter(Ar,An)}}function AY(Al,Af,Aq,Ag,Ab,Ad,Ae){var An,Aj;if(!Ag||Ag<1||Ag>15){An=1}else{An=Ag+1}if(!Ab){Aj=16}else{if(Ab<1||Ab>16){Aj=16}else{Aj=Ab}if(Aj<An){Aj=An+1}}var At=new AV.PointFloatXY((Al.ul.lng+180)*(AV.PIXERSPERLNGDEGREE/AV.SCALES[An]),(Al.ul.lat+90)*(AV.PIXERSPERLATDEGREE/AV.SCALES[An]));var Ak=new AV.PointFloatXY((Al.lr.lng+180)*(AV.PIXERSPERLNGDEGREE/AV.SCALES[An]),(Al.lr.lat+90)*(AV.PIXERSPERLATDEGREE/AV.SCALES[An]));var Ao=new AV.LatLng(Al.ul.lat,Al.ul.lng);var Ah=new AV.LatLng(Al.lr.lat,Al.lr.lng);var Au=Math.abs(Ah.lng-Ao.lng)*(AV.PIXERSPERLNGDEGREE/AV.SCALES[An]);var Ac=Math.abs(Ah.lat-Ao.lat)*(AV.PIXERSPERLATDEGREE/AV.SCALES[An]);if(Aq){var Ar=new AV.PointFloatXY((Af.lng+180)*(AV.PIXERSPERLNGDEGREE/AV.SCALES[An]),(Af.lat+90)*(AV.PIXERSPERLATDEGREE/AV.SCALES[An]));var Am=Math.max(Math.abs(Ar.x-At.x),Math.abs(Ar.x-Ak.x));var Ai=Math.max(Math.abs(Ar.y-At.y),Math.abs(Ar.y-Ak.y));Au=Am*2;Ac=Ai*2}var As=(Ae<(Ad.width/2)&&Ae<(Ad.height/2)?Ae:Math.round(Math.min(((Ad.width/2)-1),((Ad.height/2)-1))));var Ap=Math.max((AV.SCALES[An]*(Au/(Ad.width-(As*2)))),(AV.SCALES[An]*(Ac/(Ad.height-(As*2)))));if(Ap>AV.SCALES[An]){return An}while(Ap<AV.SCALES[An]&&An<=Ab){An++}return An-1}function AX(Ac){var Ab=false;this.dragStart=function(){AA("[map dragStart]: startXY=("+this.startXY.x+","+this.startXY.y+"), dragXY=("+this.dragXY.x+","+this.dragXY.y+")");Ac.parent.style.cursor=Ac._grabbing_mousecursor};this.dragMove=function(){if(!Ab){AR(Ac,"DragStart");AR(Ac,"MoveStart");Ab=true}var Ad=Ac.display,Ae=this.dragXY.x-this.startXY.x,Af=this.dragXY.y-this.startXY.y;Ad.setViewport(Ad.ulX-Ae,Ad.ulY-Af);AR(Ac,"Drag");AR(Ac,"Move")};this.dragEnd=function(){AA("[map dragEnd]: startXY=("+this.startXY.x+","+this.startXY.y+"), dragXY=("+this.dragXY.x+","+this.dragXY.y+")");var Ad=this;if(!Ab){if(!Ac.clickCnt){Ac.clickCnt=0}AA("[map clickCnt = "+Ac.clickCnt+"]");Ac.clickCnt+=1;if(Ac.clickCnt>=2){Ac.handleDblClickEvent(Ad.startXY.x-Ac.display.ulX,Ad.startXY.y-Ac.display.ulY);Ac.clickCnt=0;if(Ac.clickTimeout){clearTimeout(Ac.clickTimeout);Ac.clickTimeout=null}}if(!Ac.clickTimeout){Ac.clickTimeout=setTimeout(function(){if(Ac.clickCnt==1){Ac.handleClickEvent(Ad.startXY.x-Ac.display.ulX,Ad.startXY.y-Ac.display.ulY)}Ac.clickCnt=0;Ac.clickTimeout=null;AA("[map clickCnt = "+Ac.clickCnt+"]: setTimeout fired.")},200)}}Ad.dragCancelled()};this.dragCancelled=function(){if(Ab){AR(Ac,"DragEnd");AR(Ac,"MoveEnd")}Ac.parent.style.cursor=Ac._grab_mousecursor}}function AW(Ab,Ad,Ac){Ad=Ad+"px";Ac=Ac+"px";switch(Ab._corner){case 0:break;case 1:Ab.style.left=Ad;break;case 2:Ab.style.top=Ac;break;case 3:Ab.style.left=Ad;Ab.style.top=Ac;break}}f=function(Ag,Ae,Al,Ak,Ac){var Ad=this;if(Ac){this.bestFitMargin=(typeof (Ac.bestFitMargin)!="number")?0:Ac.bestFitMargin||0;if(Ac.bestFitRect){var Ab={width:E(Ag),height:N(Ag)};if(!Ac.keepCenter){Ae=AY(Ac.bestFitRect,Al,false,Ac.minZoom||1,Ac.maxZoom||16,Ab,this.bestFitMargin);var Ai=Ac.bestFitRect;var Aj=new AV.LatLng(Ai.ul.lat,Ai.ul.lng);var Ah=new AV.LatLng(Ai.lr.lat,Ai.lr.lng);Al=new AV.LatLng(((Aj.lat+Ah.lat)/2),((Aj.lng+Ah.lng)/2))}else{this.setCenter(Al);Ae=AY(Ac.bestFitRect,Al,true,Ac.minZoom||1,Ac.maxZoom||16,Ab,this.bestFitMargin)}}}if(!Al){Al={lat:38.134557,lng:-98.4375}}if(!Ae){Ae=1}AV.Kernel.CoreMap.call(this,Ag,Ae,Al);this._cornerAnchors=[];var Af=this.display.zlevel("control",true);Af.style.cursor="default";this.controlParent=this.parent2=Af;this.controlAnchors=[Af,this._createCornerAnchor(1,Af),this._createCornerAnchor(2,Af),this._createCornerAnchor(3,Af)];this._grab_mousecursor=this.parent.attachEvent?AV.RESOURCES+"grab.cur":"-moz-grab";this._grabbing_mousecursor=this.parent.attachEvent?AV.RESOURCES+"grabbing.cur":"-moz-grabbing";this.parent.style.cursor=this._grab_mousecursor;this.bestFitMargin=0;this.display.addLayer("loading",new AV.Kernel.LoadingLayer(this.display));AP(this,AV.TILE_LAYER_ID.MAP,AV.Kernel.MqMapImageTile);AP(this,AV.TILE_LAYER_ID.SAT,AV.Kernel.MqSatImageTile);AP(this,AV.TILE_LAYER_ID.HYB,AV.Kernel.MqStrlblImageTile);this._placeCornerAnchors();this._initLogos();this.setMapType(Ak||"map");this.addDOMEvent("mousedown");this._wireDOMEvents(this.display.elt);this.saveState();this.onMapInit();this._dtorHandle=S(this,"dispose");if(AV.browser.name=="iphone"||AV.browser.name=="ipod"||AV.browser.name=="android"){AV.withModule("iphone",function(){AV.iPhone.init(Ad)})}};f.prototype=new AV.Kernel.CoreMap();AC(f.prototype);AF(f.prototype,{dispose:function(){m(this._dtorHandle)},_createCornerAnchor:function(Ac,Ad){var Ab=document.createElement("div");Ab.style.position="absolute";Ab._corner=Ac;this._cornerAnchors.push(Ab);AW(Ab,this.width,this.height);if(Ad){Ad.appendChild(Ab)}return Ab},_onDOMEvent:function(Ac){try{var Ad=Ac.type,Ae=this.display.findParent(F(Ac));if(Ae._f){return }if(Ad=="mousedown"&&V(Ac)){AA("[map mousedown]");var Af=new AX(this);this.display.startDrag(Ac,Af);P(Ac)}}catch(Ab){return }},connectSuppressEvents:function(Ab){AD(Ab,"mousedown",AS);AD(Ab,"click",AS)},disconnectSuppressEvents:function(Ab){C(Ab,"mousedown",AS);C(Ab,"click",AS)},_initLogos:function(){function Af(){var Ag=document.createElement("div");Ag.corner=AV.CORNER_TOPLEFT;Ag.offset={x:50,y:10};Ag.style.position="absolute";Ag.style.display="block";Ag.style.zIndex=22;Ag.width="124";Ag.height="18";Ag.style.overflow="hidden";Ag.style.width="124px";Ag.style.height="18px";Ag.innerHTML="<img style='-moz-user-select:none;' unselectable='on' src='http://"+RESSERVER+"/scales/scalebar.gif' />";return Ag}function Ab(Ah,Al,Ak,Ai,Ao,An,Am,Ag){var Aj=document.createElement("img");Aj.src=An;Aj.style.MozUserSelect="none";Aj.unselectable="no";Aj.corner=Ah;Aj.offset=Al;Aj.style.position=Ak;Aj.style.display=Ai;Aj.style.zIndex=Ao;Aj.width=Am;Aj.height=Ag;Aj.style.width=Am+"px";Aj.style.height=Ag+"px";return Aj}var Ac=this.logos=[Ab(AV.CORNER_BOTTOMLEFT,{x:5,y:10},"absolute","block",22,AV.RESOURCES+"mqlogo.gif",95,15),Af()],Ae,Ad=this.display.zlevel("logo",true);for(Ae=0;Ae<Ac.length;Ae++){Ad.appendChild(Ac[Ae])}this._updateLogoPositions()},_updateLogoPositions:function(){var Af,Ab=this.logos,Ac,Ad=0,Ae=0;for(Af=0;Af<Ab.length;Af++){Ac=Ab[Af];Ad=0;Ae=0;if(Ac.corner==AV.CORNER_BOTTOMRIGHT||Ac.corner==AV.CORNER_TOPRIGHT){Ad=this.width-parseInt(Ac.style.width)-Ac.offset.x}else{Ad=Ac.offset.x}if(Ac.corner==AV.CORNER_BOTTOMRIGHT||Ac.corner==AV.CORNER_BOTTOMLEFT){Ae=this.height-parseInt(Ac.style.height)-Ac.offset.y}else{Ae=Ac.offset.y}Ac.style.left=Ad+"px";Ac.style.top=Ae+"px"}Ab[AV.LOGO_MQ_SCALES].childNodes[0].style.marginTop=-((this.zoom-1)*parseInt(Ab[AV.LOGO_MQ_SCALES].height))+"px"},setLogoPlacement:function(Ab,Ac){var Ad=this.logos[Ab];if(Ad){Ad.corner=Ac.mapCorner;Ad.offset={x:Ac.offsetSize.width,y:Ac.offsetSize.height};this._updateLogoPositions()}},handleClickEvent:function(Ad,Ab){var Ac=new s("MQA.TileMap.click");Ac.srcObject=this;Ac.xy={x:Ad,y:Ab};Ac.ll=this.pixToLL(Ac.xy);this.onClick(Ac);this.slideMapToPoint(Ad,Ab)},handleDblClickEvent:function(Af,Ab){var Ae=new s("MQA.TileMap.dblClick"),Ad=this.getZoomLevel(),Ac=this.pixToLL({x:Af,y:Ab});this.onDoubleClick(Ae);if(Ad<16){Ad+=1}this.setCenter(Ac,Ad)},slideMapToPoint:function(Ad,Ag){if(typeof (Ad)=="object"){Ag=Ad.y;Ad=Ad.x}if(this._slideKey){clearTimeout(this._slideKey)}this._slideKey=null;var Ah=this.display;Ad+=Ah.ulX;Ag+=Ah.ulY;var Ae=(Ah.ulX+Ah.width/2),Af=(Ah.ulY+Ah.height/2),Aj=Ad-Ae,Ai=Ag-Af,Ab=Ah.ulX+Aj,Ac=Ah.ulY+Ai;AR(this,"MoveStart");this._doSlide(Ab,Ac,Aj/AV.SLIDESTEPS,Ai/AV.SLIDESTEPS,AV.SLIDESTEPS)},_doSlide:function(Ac,Ad,Ae,Af,Ag){var Ab=this.display;Ab.setViewport(Ab.ulX+Ae,Ab.ulY+Af);AR(this,"Move");if(Ag==0){this._slideKey=null;Ab.setViewport(Ac,Ad);AR(this,"MoveEnd")}else{this._slideKey=setTimeout(U(this,"_doSlide",Ac,Ad,Ae,Af,Ag-1),AV.SLIDEDELAY)}},setMapType:function(Ai){var Ah=false,Ab=Ah,Ag=Ah,Af=false,Ac=false,Ae=this.mapType,Ad;switch(Ai){case"map":Ah=true;Af=true;break;case"sat":Ab=true;Ac=true;break;case"hyb":Ab=true;Ag=true;Af=true;Ac=true;break}function Aj(Al,Ak){if(Ak){Al.enable()}else{Al.disable()}}Aj(this.display.layers[AV.TILE_LAYER_ID.MAP],Ah);Aj(this.display.layers[AV.TILE_LAYER_ID.SAT],Ab);Aj(this.display.layers[AV.TILE_LAYER_ID.HYB],Ag);this.mapType=Ai;Ad=new s("MQA.TileMap.mapTypeChanged");Ad.prevMapType=Ae;Ad.mapType=Ai;this.onMapTypeChanged(Ad)},getMapType:function(){return this.mapType},panNorth:AO(0,-1),panSouth:AO(0,1),panEast:AO(1,0),panWest:AO(-1,0),panNorthWest:AO(-1,-1),panSouthWest:AO(-1,1),panNorthEast:AO(1,-1),panSouthEast:AO(1,1),setZoomLevel:function(Ab){Ab=parseInt(Ab);if(Ab<1){Ab=1}if(Ab>16){Ab=16}if(this.zoom==Ab){return }var Ac=this.getCenter();this.zoom=Ab;this.scale=AV.SCALES[Ab];AT(this,function(){this.display.initTransform(this.zoom,this.scale,Ac.lat,Ac.lng,this.width,this.height)});this._updateLogoPositions()},getZoomLevel:function(){return this.zoom},getScale:function(){return this.scale},getCenter:function(){var Ad=Math.floor(this.display.width/2)+this.display.ulX,Ab=Math.floor(this.display.height/2)+this.display.ulY,Ac=this.display.transform.displayToLatLng(Ad,Ab);return new AV.LatLng(Ac.lat,Ac.lng)},setCenter:function(Ab,Ac){var Ad=this.display;if(Ac&&Ac!=this.zoom){this.zoom=Ac;this.scale=AV.SCALES[Ac];AT(this,function(){Ad.initTransform(this.zoom,this.scale,Ab.lat,Ab.lng,this.width,this.height)});this._updateLogoPositions()}else{var Ae=Ad.transform.latLngToDisplay(Ab.lat,Ab.lng);AQ("Center:("+Ae.x+","+Ae.y+")");AR(this,"MoveStart");Ad.setViewport(Ae.x-Ad.width/2,Ae.y-Ad.height/2);AR(this,"MoveEnd")}},getBounds:function(){var Ac=this.pixToLL(new AV.Point(0,0));var Ab=this.pixToLL(new AV.Point(this.getSize().width,this.getSize().height));return new AV.RectLL(Ac,Ab)},pixToLL:function(Ad){var Ac=this.display,Ab=Ac.transform.displayToLatLng(Ac.ulX+Ad.x,Ac.ulY+Ad.y);return new AV.LatLng(Ab.lat,Ab.lng)},llToPix:function(Ab){var Ac=this.display,Ad=Ac.transform.latLngToDisplay(Ab.lat,Ab.lng);return new AV.Point(Ad.x-Ac.ulX,Ad.y-Ac.ulY)},llToDisplay:function(Ab){return this.display.transform.latLngToDisplay(Ab.lat,Ab.lng)},pixToDisplay:function(Ac){var Ab=this.display;return new AV.PointXY(Ab.ulX+Ac.x,Ab.ulY+Ac.y)},getDragOffset:function(){var Ab=this.display;return new AV.Point(Ab.ulX,Ab.ulY)},getSize:function(){return new AV.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)},setSize:function(Ab){var Al,Ad,Af=this.parent,Ai=this.parent2,Ag=this.display,Aj,Ak,Am,Ac,Ae;Ag.cancelDrag();if(Ab){Al=Ab.width;Ad=Ab.height}else{var Ah=Af.parentNode;Al=E(Ah);Ad=N(Ah)}if(Al<0||Ad<0){return }AV.Log.debug("setSize("+Al+","+Ad+")");Aj=(Ag.ulX+Ag.width/2);Ak=(Ag.ulY+Ag.height/2);this.width=Al;this.height=Ad;Ag.width=Al;Ag.height=Ad;Af.style.width=Al+"px";Af.style.height=Ad+"px";Am=Aj-Al/2;Ac=Ak-Ad/2;AV.Log.debug("setSize: setting viewport to (x,y)=("+Am+","+Ac+")  (width,height)=("+Al+","+Ad+")");Ag.setViewport(Am,Ac,Al,Ad);this._updateLogoPositions();this._placeCornerAnchors();Ae=new s("MQA.TileMap.sizeChanged");Ae.width=Al;Ae.height=Ad;this.onSizeChanged(Ae)},_placeCornerAnchors:function(){var Ac,Ab=this._cornerAnchors;for(Ac=0;Ac<Ab.length;Ac++){AW(Ab[Ac],this.width,this.height)}},zoomToRect:function(Ad,Ac,Ab,Ae){Aa(this,Ad,Ac,Ab||1,Ae||16)},bestFit:function(Ah,Af,Aj){var Ae=this.getZoomLevel();if(Ah==null){Ah=false}if(Af==null){Af=1}if(Aj==null){Aj=16}var Ab=new AV.Event("MQA.TileMap.zoomStart");Ab.zoom=Ae;this.onZoomStart(Ab);var Ac=this._getAllShapes(false,false,true).getBoundingRect();if(!Ac){return }var Ai=this.getShapeCollections(true,false);for(var Ad=1;Ad<Ai.length;Ad++){var Ak=Ai[Ad];if(Ak.bestFit&&Ak.getBoundingRect()!=null){if(!Ac){Ac=new AV.RectLL(Ak.getAt(0).getValue("latLng"),Ak.getAt(0).getValue("latLng"))}Ac.extend(Ak.getBoundingRect().ul);Ac.extend(Ak.getBoundingRect().lr)}}Aa(this,Ac,Ah,Af,Aj);var Ag=new AV.Event("MQA.TileMap.zoomEnd");Ag.prevZoom=Ae;Ag.zoom=this.getZoomLevel();this.onZoomEnd(Ag)},_getAllShapes:function(Ak,Ab,Ah){Ab=(typeof (Ak)!="undefined"?Ab:true);Ak=(typeof (Ak)!="undefined"?Ak:false);Ah=(typeof (Ah)!="undefined"?Ah:false);var Af=new AV.ShapeCollection;var Ae=this.getShapeCollections(true,Ab);for(var Ad=0;Ad<Ae.length;Ad++){if(Ah&&!Ae[Ad].bestFit){continue}for(var Ai=0,Aj=Ae[Ad].getSize();Ai<Aj;Ai++){var Ac=Ae[Ad].getAt(Ai);var Ag=((Ak&&(Ac instanceof AV.Poi||Ac instanceof AV.BasePoi))||!Ak);if(Ag){Af.add(Ac,false)}}}return Af}});function AU(Ac){var Ab=Ac.toLowerCase();return function(Ad){g(this,Ab,Ad)}}function AZ(Ab,Ac){for(var Ad=0;Ad<Ac.length;Ad++){Ab["on"+Ac[Ad]]=AU(Ac[Ad])}}AZ(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"]);AV.TileMap=f})();var w;AJ.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 AP={"":1,"Map Data":2,Imagery:3};function AR(AX,AZ){var AU=AX[1],AV=AZ[1],AS=AU.group,AT=AV.group,AW=String(AU.html||AU.text||""),AY=String(AV.html||AV.text||"");AS=String(AP[AS]||AS);AT=String(AP[AT]||AT);if(AS==AT){if(AW==AY){return 0}else{if(AW<AY){return -1}else{return 1}}}else{if(AS<AT){return -1}else{return 1}}}function AO(AS){return AS.replace(/\<|\>\|\&/g,function(AT){return ;(AT=="<"&&"&lt;")||(AT==">"&&"&gt;")||(AT=="&"&&"&amp;")})}function AQ(AS){var AT=y("");return AS.replace(/\%TK\%/g,AT)}w=function(AT){var AS=document.createElement("div");AS.className="mqacopyright";AS.style.position="absolute";AS.style.bottom="0px";AS.style.right="5px";AS.style.textAlign="right";p(AS);if(AT){AT.appendChild(AS)}this.elt=AS;this.list=[];this.invalidate()};w.prototype={setClass:function(AS){this.elt.className="mqacopyright "+AS},set:function(AS,AW){var AX,AT=this.list,AV,AU=false;if(!AW){for(AX=0;AX<AT.length;AX++){AV=AT[AX];if(AV&&AV[0]==AS){AT[AX]=null;this.invalidate();return }}}else{AT.push([AS,AW]);this.invalidate()}},invalidate:function(){if(this._refreshKey){return }var AS=this;this._refreshKey=setTimeout(function(){AS.refresh()},0)},refresh:function(){this._refreshKey=null;var Ab,AZ=[],AX,AU=this.list,AS,Aa=["&copy;2010 MapQuest"],AV=null,AT,AW,AY={};for(AX=0;AX<AU.length;AX++){AS=AU[AX];if(AS){AZ.push(AS)}}AZ.sort(AR);this.list=AZ;for(AX=0;AX<AZ.length;AX++){if(AX==0){Aa.push("&nbsp;&nbsp;Portions&nbsp;&copy;"+(new Date().getFullYear())+"&nbsp;")}Ab=AZ[AX][0];AS=AZ[AX][1];if(!AS||AY[Ab]){continue}AY[Ab]=true;if(AX>0){Aa.push(",&nbsp;")}if(AS.html){Aa.push(AQ(AS.html))}else{if(AS.text){Aa.push(AO(AS.text))}}}AW=Aa.join("");if(AW!=this._curHtml){this.elt.innerHTML=AW;this._curHtml=AW}}};B(f.prototype,{onMapInit$After:function(){var AS=this._createCornerAnchor(3,this.display.zlevel("logo",true));this.copyright=new w(AS);this._updateCopyrightStyle()},_updateCopyrightStyle:function(){var AT=this.mapType,AS="mqacopyrightdark";if(AT=="hyb"||AT=="sat"){AS="mqacopyrightlight"}this.copyright.setClass(AS)},onMapTypeChanged$After:function(){if(this.copyright){this._updateCopyrightStyle()}}})})();var l;(function(){var AQ={},AP=window.COVSERVER||window.LOGSERVER;function AR(AT,AV){if(!AP){AJ.Log.debug("No coverage server defined.");return }var AW=AQ[AT];if(AW&&AW.time<(new Date().getTime()-30000)){if(AW.scriptElt&&AW.scriptElt.parentNode){AW.scriptElt.parentNode.removeChild(AW.scriptElt)}AW=null;AJ.Log.debug("Removed timed out coverage request: "+AT)}if(!AW){AW=[AV];AQ[AT]=AW;AW.time=new Date().getTime();var AX=window.location.protocol+"//"+AP+"/coverage?"+AT,AU;AJ.Log.debug("Send coverage request: "+AX);AU=document.createElement("script");AU.setAttribute("src",AX);AW.scriptElt=AU;(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(AU)}else{AW.push(AV)}}AJ._covCallback=function(AU,AT){AJ.Log.debug("Coverage result for: "+AT);var AV=AQ[AT],AW;delete AQ[AT];if(!AV){AJ.Log.debug("WARN: No coverage dispatch map for "+AT);return }for(AW=0;AW<AV.length;AW++){AV[AW]._handleCoverageData(AU,AT)}setTimeout(function(){if(AV.scriptElt&&AV.scriptElt.parentNode){AV.scriptElt.parentNode.removeChild(AV.scriptElt)}},0)};function AS(AY,AT){var AV,AX=AY[2]-AY[0],AU=AY[3]-AY[1],AW;if(AT<=7){AV=0.5}else{if(AT<=12){AV=1.5}else{AV=5}}AW=[Math.floor(AY[0]-AV*AX),Math.floor(AY[1]-AV*AU),Math.ceil(AY[2]+AV*AX),Math.ceil(AY[3]+AV*AU)];if(AW[1]<-90){AW[1]=-90}if(AW[3]>90){AW[3]=90}return AW}l=function(Ad){var Aa=this,Ai,AT,AU,AX,AV,Aj=[],AY,Af={},AZ={};function Ac(){if(AY){return }AY=setTimeout(Ab,0)}function Ab(){AY=null;AJ.Log.debug("Coverage.refresh(): valid=["+(AT||[]).join(",")+"]/"+Ai+", current=["+AX.join(",")+"]/"+AV);AT=AS(AX,AV);Ai=AV;var Ak="format=json&jsonp=MQA._covCallback&loc="+AT.join(",")+"&scale="+AJ.SCALES[Ai]+"&cat="+encodeURIComponent(Aj.join(","));if(Ak==AU){AJ.Log.debug("Not requesting duplicate coverage: "+Ak);return }AU=Ak;AR(Ak,Aa)}function AW(Al,Ak){var An=Af[Al],Am=AZ[Al];if(An){if(Am){Ae(Am);Am.features=null}}Af[Al]=Ak;if(Ak&&Am){Am.features=Ak;Ag(Am)}}function Ah(Aq,Al){var Ak={},An,Ao=Aq.featureIds,Am=Aq.features,Ap;for(An=0;Ao.length;An++){Ak[Ao[An]]=true}if(Am){for(An=0;An<Am.length;An++){Ap=Am[An];if(!Ap.opt||Ak[Ap.id]){Al(Ap)}}}}function Ag(Ak){Ah(Ak,function(Am){var An=Am.copyrights,Al,Ao;if(An){for(Ao=0;Ao<An.length;Ao++){Al=An[Ao];Ad.set(Al.id,Al)}}})}function Ae(Ak){Ah(Ak,function(Am){var An=Am.copyrights,Al,Ao;if(An){for(Ao=0;Ao<An.length;Ao++){Al=An[Ao];Ad.set(Al.id)}}})}this.subscribe=function(){for(var Ak=0;Ak<arguments.length;Ak++){Aj.push(String(arguments[Ak]))}Ac()};this.activate=function(Al){var Ak=[],An,Am;Am=AZ[Al];if(Am){Ae(Am)}for(An=1;An<arguments.length;An++){Ak.push(arguments[An])}Am={featureIds:Ak,features:Af[Al]};AZ[Al]=Am;Ag(Am)};this.deactivate=function(){var Ak,Al,Am;for(Ak=0;Ak<arguments.length;Ak++){Am=arguments[Ak];Al=AZ[Am];if(Al){delete AZ[Am];Ae(Al)}}};this.updateBox=function(Al,Ak){AX=Al;AV=Ak;if(AV!=Ai||!AT||(AX[0]<AT[0]||AX[1]<AT[1]||AX[2]>AT[2]||AX[3]>AT[3])){Ac()}};this._handleCoverageData=function(Am,Al){if(Al!=AU){AJ.Log.debug("WARN: Stale coverage ignored: "+Al);return }var An,Ak;for(An in Am){Ak=Am[An];if(typeof Ak=="object"&&Ak instanceof Array){AW(An,Ak)}}for(An in Af){Ak=Am[An];if(typeof Ak=="object"&&Ak instanceof Array&&!Am[An]){AW(An)}}}};function AO(AU){var AV=AU.coverage;if(!AV){return }var AX=AU.mapType,AY=AV._curMapType;if(AX!=AV._curMapType){AV.deactivate(AY);AV.activate(AX);AV._curMapType=AX}var AW=AU.getBounds(),AT;if(AW.ul.lng>0&&AW.lr.lng<0){if((AW.ul.lng+AW.lr.lng)>0){AW.ul.lng-=360}else{AW.lr.lng+=360}}AT=[Math.min(AW.ul.lng,AW.lr.lng),Math.min(AW.ul.lat,AW.lr.lat),Math.max(AW.ul.lng,AW.lr.lng),Math.max(AW.ul.lat,AW.lr.lat)];AV.updateBox(AT,AU.getZoomLevel())}B(f.prototype,{onMapInit$After:function(){var AU=this.copyright,AT=new l(AU);AT.subscribe("map","hyb","sat");this.coverage=AT;AO(this)},onMapTypeChanged$After:function(){AO(this)},onMoveEnd$After:function(){AO(this)},onZoomEnd$After:function(){AO(this)}})})();(function(){var AP=window.MQA;function AQ(AR,AS){var AT=AS?H(AS):"";return"w:"+AT+":"+AR}function AO(AR){this.map=AR;this.registry={};var AT=document.createElement("div");AT.style.position="absolute";AT.style.zIndex="1000";AT.style.left="0px";AT.style.top="0px";AR.display.zlevel("window",true).appendChild(AT);this.screenSurface=AT;var AS=document.createElement("div");AS.style.position="absolute";AS.style.zIndex="1000";AR.display.zlevel("window").appendChild(AS);this.globalSurface=AS;AR.display.addLayer("global-window",this)}AO.prototype={resetTransform:function(AR){this.each(function(AS){if(AS.resetTransform){AS.resetTransform(AR)}})},each:function(AR){var AT,AU=this.registry,AS;for(AT in AU){if(AT.match(/^w\:/)){AS=AR(AU[AT]);if(AS){return AS}}}},open:function(AR,AS,AT){var AW=this.registry,AV=AQ(AR,AS),AU=AW[AV];this.close(AS,AR);AT.opener=AS;AT.id=AR;AW[AV]=AT;if(AT.resetTransform){AT.resetTransform(this.map.display.transform)}AT.onOpen(this);if(AS&&AS.onWindowOpen){AS.onWindowOpen(AT)}},find:function(AR,AS){return this.registry[AQ(AR,AS)]},close:function(AR,AT){var AW=this.registry,AV=AQ(AR,AT),AU=AW[AV];if(AU){AP.Log.debug("Existing window "+AV+" found.  Removing.");try{if(AT&&AT.onWindowClose){AT.onWindowClose(AU)}AU.dispose()}catch(AS){AP.Log.handleError("Error calling dispose() on window with key "+AV,AS);throw AS}delete AW[AV]}},closeAll:function(AR,AS){var AT=this;this.each(function(AU){if((AR&&AR!=AU.id)||(AS&&AS!==AU.opener)){return }AT.close(AU.id,AU.opener)})}};B(AP.TileMap.prototype,{onMapInit$After:function(){this.windowManager=new AO(this)}});AP.WindowManager=AO})();(function(){var AV=window.MQA,AU=MQLOGURL+"/transaction";function AS(Ab,Ad,AY,AZ,Ae){AY=parseInt(AY*1000000)/1000000;AZ=parseInt(AZ*1000000)/1000000;var Aa=Ab.display.transform.scale,Ac=Ab.getCenter(),AX;AX=AU+"?transaction=log&t="+Ad+"&c="+AY+"&c2="+AZ+"&s="+Ae+"&lat="+Ac.lat+"&lng="+Ac.lng+"&key="+Key+"&width="+Ab.width+"&height="+Ab.height+"&rand="+Math.floor(Math.random()*99991);AV.Log.debug("TranLog: "+AX);return AX}function AR(AX){var Aa=AX._tranLayer,AZ,AY=Aa.lastScale;AV.Log.debug("TranLog: Send transactions.  mapaccum1="+Aa.mapaccum1+", sataccum1="+Aa.sataccum1+", hybaccum1="+Aa.hybaccum1+", mapaccum2="+Aa.mapaccum2+", sataccum2="+Aa.sataccum2+", hybaccum2="+Aa.hybaccum2+", lastScale="+AY);if(Aa.mapaccum1>0){AX.maptiler.src=AS(AX,"m",Aa.mapaccum1,Aa.mapaccum2,AY);AZ=true}if(Aa.sataccum1>0){AX.sattiler.src=AS(AX,"a",Aa.sataccum1,Aa.sataccum2,AY);AZ=true}if(Aa.hybaccum1>0){AX.hybtiler.src=AS(AX,"h",Aa.hybaccum1,Aa.hybaccum2,AY);AZ=true}Aa.resetStats(true);return AZ}function AO(AX){var AY=document.createElement("img");AY.src=AV.NOTHING;AY.unselectable="on";AY.style.MozUserSelect="none";AY.style.display="none";AX.appendChild(AY);return AY}function AT(AX){var AY=AX.display,AZ=AY.layers;return{map:AZ[AV.TILE_LAYER_ID.MAP].enabled,sat:AZ[AV.TILE_LAYER_ID.SAT].enabled,hyb:AZ[AV.TILE_LAYER_ID.HYB].enabled}}function AW(AX){this.map=AX;this.resetStats(true);this.resetStats(false);this.lastScale=AX.display.transform.scale}AW.prototype={resetStats:function(AX){if(AX){this.mapaccum1=0;this.sataccum1=0;this.hybaccum1=0;this.mapaccum2=0;this.sataccum2=0;this.hybaccum2=0}else{var AY=AT(this.map);if(AY.map){this.mapaccum1+=1;this.mapaccum2+=1}if(AY.sat){this.sataccum1+=1;this.sataccum2+=1}if(AY.hyb){this.hybaccum1+=1;this.hybaccum2+=1}}this.diffaccum=0;this.tileOffsetX=0;this.tileOffsetY=0},resetTransform:function(){AR(this.map);this.tileOffsetX=0;this.tileOffsetY=0;this._lastTileCoords=null;this.lastScale=this.map.display.transform.scale},setViewport:function(Am,AX,Ai,AY){var Al=this.map,AZ=Al.display,Ah=AZ.transform,Ag,Aa=0,Ac,Ad=AP(Ah,Am,AX,Ai,AY),Ab=this._lastTileCoords,Aj,Ae,Af,Ak;if(Ab){Aj=Ab.ul[0]-Ad.ul[0];Ae=AQ(Ad.lr[0]-Ab.lr[0]);Af=Ad.ul[1]-Ab.ul[1];Ak=AQ(Ab.lr[1]-Ad.lr[1]);this.tileOffsetX+=Aj;this.tileOffsetY+=Af;Aj=AQ(Aj);Af=AQ(Af);if(Aj||Ae||Af||Ak){AV.Log.debug("TranLog: Revealed tiles (l,r,t,b) = ("+Aj+","+Ae+","+Af+","+Ak+")")}Aa+=(Aj+Ae)*Ad.rowcount;Aa+=(Af+Ak)*Ad.colcount;if(Aa>0){Ac=Aa/(Ad.rowcount*Ad.colcount*9);AV.Log.debug("TranLog: Accumulated "+Aa+" tiles (weighted="+Ac+")");Ag=AT(this.map);if(Ag.map){this.mapaccum1+=Ac}if(Ag.sat){this.sataccum1+=Ac}if(Ag.hyb){this.hybaccum1+=Ac}if(Math.abs(this.tileOffsetX)>4||Math.abs(this.tileOffsetY)>4){AV.Log.debug("Sending transactions because tile offset limit exceeded");AR(this.map)}}}this._lastTileCoords=Ad}};function AQ(AX){return AX<0?0:AX}function AP(AX,AY,Aa,Ad,AZ){var Ae=AX.displayToGridCoord(AY,Aa),Ab,Ac;ret;Ab=Math.floor((Ad+Math.abs(AY-Ae.ulX))/Ae.gridSize);if(Ab<Math.floor(Ad/Ae.gridSize)){throw new Error("Assertion failed: colspan is too small: "+Ab)}Ac=Math.floor((AZ+Math.abs(Aa-Ae.ulY))/Ae.gridSize);if(Ac<Math.floor(AZ/Ae.gridSize)){throw new Error("Assertion failed: rowspan is too small: "+Ac)}ret={ul:[Ae.col,Ae.row],lr:[Ae.col+Ab,Ae.row-Ac],colcount:Ab+1,rowcount:Ac+1};return ret}B(AV.TileMap.prototype,{onMapInit$After:function(){var AY=this.parent2,AX;this.maptiler=AO(AY);this.sattiler=AO(AY);this.hybtiler=AO(AY);AX=new AW(this);this._tranLayer=AX;this.display.addLayer("tran-"+H(AX),AX)},dispose$Before:function(){var AX=AR(this);if(AX&&AV.EventUtil._inGlobalDtor){var AY=new Date().getTime()+250;while(new Date().getTime()<AY){}}},onMapTypeChanged$After:function(){var AX=this._tranLayer;if(AX){AR(this);this._tranLayer.resetStats(false)}},setCenter$Before:function(){var AX=this._tranLayer;if(AX){AR(this);AX.resetTransform();AX.resetStats(false)}},onMoveStart$After:function(){var AX=this._tranLayer,AY=this.display;if(AX){AX.startx=AY.ulX;AX.starty=AY.ulY}},onMoveEnd$After:function(){var Aa=this._tranLayer,Ab=this.display,AX,AY,Ac,Ae,Ad,AZ;if(Aa){AX=Aa.startx,AY=Aa.starty;Ac=Math.abs(Ab.ulX-AX);Ae=Math.abs(Ab.ulY-AY);Aa.diffaccum+=((Ac*Ae)+((this.width-Ac)*Ae)+((this.height-Ae)*Ac));Ad=((Aa.diffaccum/(this.width*this.height))>=0.4);if(Ad){AV.Log.debug("TranLog: diffaccum exceeds 40%.  Incrementing secondary counters.");AZ=AT(this);if(AZ.map){Aa.mapaccum2+=1}if(AZ.sat){Aa.sataccum2+=1}if(AZ.hyb){Aa.hybaccum2+=1}Aa.diffaccum=0}Aa.startx=null;Aa.starty=null}},onZoomEnd$After:function(){var AX=this._tranLayer;AX.resetStats(false)}})})();var AE;(function(){var AV=window.MQA;function AR(){this.items=[];this.guid=AV.Util._getRandomGUID(10);this.collectionName="";this.bestFit=true;this.setName=function(Ad){this.collectionName=Ad};this.getName=function(){return this.collectionName};this.add=function(Ad){var Ae=this.items.length;this.items.push(Ad);if(this._onAdd){this._onAdd(Ad,Ae)}return Ae+1};this.getSize=function(){return this.items.length};this.getAt=function(Ad){return this.items[Ad]};this.remove=function(Ae){var Af,Ag=this.items,Ad=Ag[Ae];if(Ae>=Ag.length){return }for(Af=Ae;Af<Ag.length;Af++){Ag[Af]=Ag[Af+1]}Ag.length-=1;if(this._onRemove){this._onRemove(Ad)}return Ad};this.removeAll=function(){var Ae=this.items;this.items=[];if(this._onRemove){for(var Ad=0;Ad<Ae.length;Ad++){this._onRemove(Ae[Ad])}}};this.contains=function(Ad){var Af=this.items;for(var Ae=0;Ae<Af.length;Ae++){if(Af[Ae]===Ad){return true}}};this.getById=function(Ae){var Ag=0,Ad=this.items.length,Af;for(;Ag<Ad;Ag++){Af=this.items[Ag];if(Af.id&&Af.id===Ae){return Af}}return null};this.removeItem=function(Ad){var Af=this.items;for(var Ae=Af.length-1;Ae>=0;Ae--){if(Af[Ae]===Ad){this.remove(Ae);return }}};this.append=function(Ad){for(var Ae=0;Ae<Ad.getSize();Ae++){this.add(Ad.getAt(Ae))}};this.getItemIndex=function(Ad){var Af=this.items;for(var Ae=0;Ae<Af.length;Ae++){if(Af[Ae]===Ad){return Ae}}return false}}function AQ(Ad,Ae){this.ul=Ad?new AV.LatLng(Ad.lat,Ad.lng):new AV.PointLL(0,0);this.lr=Ae?new AV.LatLng(Ae.lat,Ae.lng):new AV.PointLL(0,0);this.extend=function(Af){if(Af.lat>this.ul.lat){this.ul.lat=Af.lat}if(Af.lng<this.ul.lng){this.ul.lng=Af.lng}if(Af.lat<this.lr.lat){this.lr.lat=Af.lat}if(Af.lng>this.lr.lng){this.lr.lng=Af.lng}}}function AY(){this.guid=AV.Util._getRandomGUID(10);this.className="MQA.base";this.reservedProperties="guid,className,parentCollections";this.parentCollections=[];this.setValue=function(Ad,Ae){if(typeof (this[Ad])!="undefined"){if(this.reservedProperties.search(Ad)!=-1){return false}this[Ad]=Ae;if(typeof (this[Ad+"_override"])=="undefined"){this._facio(Ad,this[Ad])}this.facio(Ad,this[Ad]);return true}else{return false}};this.getValue=function(Ad){var Ae;if(typeof (this[Ad])!="undefined"){Ae=this.duco(Ad);if(typeof (Ae)=="undefined"){Ae=this._duco(Ad);if(typeof (Ae)=="undefined"){Ae=this[Ad]}}return Ae}};this.setValues=function(Ae){var Ad=0;for(key in Ae){if(typeof (this[key])!="undefined"){if(this.setValue(key,Ae[key])){Ad++}}}return Ad};this.override=function(Ad){if(!(Ad instanceof Array)){Ad=[Ad]}for(var Ae=0;Ae<Ad.length;Ae++){this[Ad[Ae]+"_override"]=1}};this._facio=function(Ae,Ad){};this.facio=function(Ae,Ad){};this._duco=function(Ad){};this.duco=function(Ad){};this.draw=function(){};this.dispose=function(){}}function Ac(Ad){return(typeof (Ad)=="function")?Ad:undefined}function AS(Ad,Af){var Ae=Af.substring(0,1).toUpperCase()+Af.substring(1);return Ac(Ad["get"+Ae])||Ac(Ad["is"+Ae])||function(){return Ad[Af]}}function AW(Ad,Af,Ag){var Ae=Af.substring(0,1).toUpperCase()+Af.substring(1);return Ac(Ad["set"+Ae])||(!Ag&&function(Ah){return Ad[Af]=Ah})}var AP={setValue:function(Ae,Ad){AW(this,Ae).call(this,Ad)},getValue:function(Ad){return AS(this,Ad).call(this)},setValues:function(Af){var Ag={},Ae,Ad=0;for(key in Af){if(Ag[key]){continue}Ae=AW(this,key,true);if(Ae){Ae.call(this,Af[key]);Ad++}}return Ad},dispose:function(){},defineProperty:function(Am,Al,Af,Ad){var Ag=Am.substring(0,1).toUpperCase()+Am.substring(1),Aj="set"+Ag,Ak=function(Ao){var An=Ad;if(Al&&Ao!==null&&Ao!==undefined){Ao=Al(Ao)}if(this[Am]!==Ao){this[Am]=Ao;if(typeof (An)=="string"){An=this[An]}if(typeof (An)=="function"){An.call(this)}}},Ae="get"+Ag,Ai="is"+Ag,Ah=function(){return this[Am]};if(!this[Aj]){this[Aj]=Ak}if(!this[Ae]){this[Ae]=Ah}if(Al===Boolean&&!this[Ai]){this[Ai]=Ah}if(typeof (Af)!="undefined"){this[Am]=Af}}};function AT(){}AT.prototype=AP;function AZ(Ad,Ae){this.setLatLng(Ad,Ae)}AZ.prototype={setLatitude:function(Ad){this.lat=parseFloat(Ad)},getLatitude:function(){return this.lat},setLongitude:function(Ad){this.lng=parseFloat(Ad)},getLongitude:function(){return this.lng},setLatLng:function(Ad,Ae){this.lat=parseFloat(Ad);this.lng=parseFloat(Ae)}};function AX(Ae,Ad){this.x=Ae;this.y=Ad}AX.prototype={setX:function(Ad){this.x=Ad},setY:function(Ad){this.y=Ad},getX:function(){return this.x},getY:function(){return this.y},setXY:function(Ae,Ad){this.x=Ae;this.y=Ad}};function Aa(Ae,Ad){this.width=parseInt(Ae||0);this.height=parseInt(Ad||0)}Aa.prototype={getWidth:function(){return this.width},getHeight:function(){return this.height},setWidth:function(Ad){this.width=parseInt(Ad)},setHeight:function(Ad){this.height=parseInt(Ad)},toString:function(){return this.width+","+this.height}};function AU(Ae,Ad){if(Ae==null){Ae=AV.MapCorner.TOP_LEFT}if(Ad==null){Ad=new AV.Size(0,0)}this.mapCorner=Ae;this.offsetSize=new AV.Size(Ad.width,Ad.height)}AU.prototype={getMapCorner:function(){return this.mapCorner},getOffsetSize:function(){return new AV.Size(this.offsetSize.getWidth(),this.offsetSize.getHeight())}};function Ab(Ad){return function(Ae,Af){this.x=Ad(Ae);this.y=Ad(Af)}}function AO(){var Ad=document.createElement("img");Ad.setAttribute("unselectable","on");Ad.style.MozUserSelect="none";Ad.style.display="block";Ad.setAttribute("galleryimg","no");return Ad}AE=AV.Icon=function(Af,Ae,Ad){this.imageURL=Af;this.width=parseInt(Ae);this.height=parseInt(Ad)};AE.prototype={createElement:function(){var Ae,Af=this.imageURL,Ad=this.width,Ah=this.height,Ag;if(x.ie6&&Af.indexOf(".png")>=0&&Ad&&Ah){Ae=document.createElement("div");Ae.style.width=Ad+"px";Ae.style.height=Ah+"px";Ag=document.createElement("v:image");Ag.setAttribute("src",Af);Ag.style.width=Ad+"px";Ag.style.height=Ah+"px";Ae.insertAdjacentElement("beforeEnd",Ag)}else{Ae=AO();Ae.src=Af;Ae.setAttribute("width",this.width);Ae.setAttribute("height",this.height)}return Ae}};AV.LatLng=window.MQLatLng=AZ;AV.Point=window.MQPoint=AX;AV.LatLngCollection=AR;AV.RectLL=AQ;AV.Size=Aa;AV.Component=AT;AV.Base=AY;AV.MapCornerPlacement=AU;AV.PointXY=Ab(parseInt);AV.PointFloatXY=Ab(parseFloat);AV.PointLL=Ab(parseFloat);AV.TKObjectCollection=AR;AV.Icon=AE})();var T;(function(){var AQ=1;function AS(AV){if(!AV){throw new Error("shape does not meet contract: it is null")}if(typeof (AV.createPeer)!="function"){throw new Error("shape does not meet contract: it does not define a createPeer function")}}function AT(AV){if(!AV){throw new Error("shape peer does not meet contract: it is null")}if(typeof (AV.layerInit)!="function"){throw new Error("shape peer does not meet contract: it does not define a layerInit function")}if(typeof (AV.resetTransform)!="function"){throw new Error("shape peer does not meet contract: it does not define a resetTransform function")}if(typeof (AV.dispose)!="function"){throw new Error("shape peer does not meet contract: it does not define a dispose function")}}function AP(){AJ.TKObjectCollection.call(this)}AP.prototype={clone:function(){var AW=new AJ.ShapeCollection();AJ.mixin(AW,AJ.Util._cloneValue(this));AW.removeAll();for(var AV=0;AV<this.getSize();AV++){var AX=this.getAt(AV);if(AX.clone){AW.add(AX.clone())}else{AJ.Log.debug("peforming an type unsafe clone, this shape needs to have a clone method implmeted");AW.add(AJ.Util._cloneValue(AX))}}return AW},_onAdd:function(AW){var AV=this._peer;if(AV){AV.addShape(AW)}},_onRemove:function(AW){var AV=this._peer;if(AV){AV.removeShape(AW)}},getByKey:function(AW){var AX=0,AV=this.getSize(),AY;for(;AX<AV;AX++){AY=this.getAt(AX);if(AY.key&&AY.key===AW){return AY}}return null},isOnMap:function(){return !!this._peer},getDeclutter:function(){return this.declutter},setDeclutter:function(AV){this.declutter=AV;if(this.map&&this.map.declutter){this.map.declutter.invalidate()}},setMinZoomLevel:function(AV){this.minZoomLevel=AV},getMinZoomLevel:function(){return this.minZoomLevel||1},setMaxZoomLevel:function(AV){this.maxZoomLevel=AV},getMaxZoomLevel:function(){return this.maxZoomLevel||16},inZoomWindow:function(){if(!this.map){return }var AV=this.map.getZoomLevel();return(AV>=this.getMinZoomLevel()&&AV<=this.getMaxZoomLevel())},getBoundingRect:function(){if(this.getSize()==0){return null}var AZ,AV=[];for(var AX=0;AX<this.getSize();AX++){AZ=this.getAt(AX);window.x=AZ;if((AJ.BasePoi&&AZ instanceof AJ.BasePoi)||AZ.getValue("latLng")){if(AZ.getValue("latLng")){AV.push(AZ.getValue("latLng"))}}else{if(AJ.ShapeOverlay&&AZ instanceof AJ.ShapeOverlay){if(AJ.RibbonOverlay&&AZ instanceof AJ.RibbonOverlay){for(var AY=0;AY<AZ.getValue("shapePoints").length;AY=AY+2){AV.push({lat:AZ.getValue("shapePoints")[AY],lng:AZ.getValue("shapePoints")[AY+1]})}}else{}}}}var Aa=new AJ.RectLL(AV[0],AV[0]);for(var AW=1;AW<AV.length;AW++){Aa.extend(AV[AW])}return Aa}};T=function(AW,AV){this.display=AW;this.collection=AV;var AX=AW.zlevel("shape");this.elt=AX;this.shapes={};this._initCollection();this.resetTransform()};T.prototype={_initCollection:function(){var AX,AW,AV=this.collection;AV._peer=this;AV.map=this.display.map;for(AW=0;AW<AV.getSize();AW++){AX=AV.getAt(AW);this.addShape(AX)}},dispose:function(){AJ.Log.debug("Remove shape layer");this.eachShapePeer(function(AV){AV.dispose()});this.shapes={}},resetTransform:function(){var AV=this.collection,AW=this.display,AY=AW.transform,AX=AY.zoom,AZ=this.elt;this.eachShapePeer(function(Aa){Aa.resetTransform(AW.transform)})},eachShapePeer:function(AX){var AV,AW;for(AV in this.shapes){if(a(AV)){AW=this.shapes[AV];AX(AW)}}},addShape:function(AY){var AV=H(AY),AX;try{AS(AY);AX=AY.createPeer();AT(AX);this._addPeer(AX,AV)}catch(AW){v("error drawing shape "+AY,AW);throw AW}return AV},removeShape:function(AX){var AV=H(AX),AW=this.shapes[AV];if(AW){this._removePeer(AW,AV)}},_addPeer:function(AW,AV){this.shapes[AV]=AW;AW.layerInit(this,this.display.map);AW.resetTransform(this.display.transform)},_removePeer:function(AW,AV){delete this.shapes[AV];if(AW.dispose){AW.dispose()}}};var AU="shape.default";function AR(AW){var AY,AX=AW.display,AV=AW._defaultShapeCollection;if(!AV){AV=new AP();AW._defaultShapeCollection=AV;AY=new T(AX,AV);AX.addLayer(AU,AY)}return AV}function AO(AV){var AX="_shapeCollectionRegistry",AW=AV[AX];if(!AW){AW=new AJ.TKObjectCollection();AV[AX]=AW}return AW}AF(AJ.TileMap.prototype,{_clearCollectionContentsOnRemoval:true,addShape:function(AV){AR(this).add(AV);return AV},removeAllShapes:function(){AR(this).removeAll()},removeShape:function(AV){AR(this).removeItem(AV)},getShapes:function(AV){},getByKey:function(AV){return AR(this).getByKey(AV)},addShapes:function(AV){},replaceShapes:function(AV){},addShapeCollection:function(AZ){var AX="custom.shape.layer."+(AQ++),AV=this.display,AY,AW=AO(this);if(AW.contains(AZ)){return }try{if(this.declutter){this.declutter.suspend()}AY=new T(AV,AZ);AY.key=AX;AV.addLayer(AX,AY);AW.add(AZ);AA("Added ShapeCollection layer "+AX)}finally{if(this.declutter){this.declutter.resume()}}},removeShapeCollection:function(AY){var AX,AV=this.getShapeCollection(AY),AW=AO(this);if(!AV){return }AX=AV._peer;if(!AX){return }try{if(this.declutter){this.declutter.suspend()}AA("Removing shape collection layer "+AX.key);if(this._clearCollectionContentsOnRemoval){AV.removeAll()}this.display.removeLayer(AX.key)}finally{if(this.declutter){this.declutter.resume()}}AW.removeItem(AV);delete AV._peer;delete AV.map},replaceShapeCollection:function(AW,AV){},getShapeCollection:function(AY){var AX,AV,AW=AO(this);for(AX=0;AX<AW.getSize();AX++){AV=AW.getAt(AX);if(AV&&AV.collectionName==AY){return AV}}},getShapeCollections:function(AV){var AX,AY=[],AW=AO(this);if(AV){AY.push(AR(this))}for(AX=0;AX<AW.getSize();AX++){AY.push(AW.getAt(AX))}return AY},getShapeCollectionNames:function(){var AW,AX,AY=[],AV=AO(this);for(AW=0;AW<AV.getSize();AW++){AX=AV.getAt(AW);if(AX&&AX.collectionName){AY.push(AX.collectionName)}}return AY},getShapeCollectionCount:function(){return AO(this).getSize()}});AJ.TileMap.prototype.getShapeByKey=AJ.TileMap.getByKey;AJ.TileMap.prototype.addPoi=AJ.TileMap.addShape;AJ.TileMap.prototype.removePoi=AJ.TileMap.removePoi;AJ.ShapeCollection=AP})();var z;(function(){z=function(Ab){var AW,AX,Ac;for(AW=0;AW<Ab.length;AW++){Ac=Ab[AW].bounds;Ac.w=Math.abs(Ac.ulX-Ac.lrX);Ac.h=Math.abs(Ac.ulY-Ac.lrY);Ac.ix=Ac.ulX;Ac.iy=Ac.ulY}Ab.sort(AU);var AZ=AP(Ab);AS(AZ,Ab);var Aa=[],AY=[Aa];for(AW=0;AW<Ab.length;AW++){if(Ab[AW].bounds.bias){Aa.push(Ab[AW])}else{AY.push(Ab[AW])}}return AY};function AT(AW,AY){for(var AX=0;AX<AW.length;AX++){if(AW[AX]==AY){return AX}}return -1}function AP(Ab){var AZ=[],AW=[],Ac=0,Aa;for(var AX=0;AX<Ab.length;AX++){if(AT(AZ,AX)>=0){continue}Aa=false;for(var AY=AX+1;AY<Ab.length;AY++){if(AT(AZ,AY)>=0){continue}if(AR(Ab[AX].bounds,Ab[AY].bounds)){if(!Aa){AW[Ac]=[AX];AZ.push(AX);Aa=true}AW[Ac].push(AY);AZ.push(AY)}}if(AW[Ac]&&AW[Ac].length>0){Ac++}}return AW}function AS(Al,Ap){var Ab={ulX:0,ulY:0,lrX:0,lrY:0};var AZ=3.14;var Aj,Ai;var Ar,As;var Ac,Ak;var Ao;var Aq;var AY;var An;var Ad=false;var Ah;if(Al.length==1&&Al[0].length==Ap.length){Ad=true;Aj=360/Al[0].length;Ai=1350/Aj;Ai=(Ai<75)?75:Ai}else{Aj=10;Ai=75}var Am;var At,Au;for(var AW=0,Ae=Al.length;AW<Ae;AW++){Ac=-180;Ak=AV(Al[AW],Ap);Ao=1;Am=Ai;for(var AX=0,Af=Al[AW].length;AX<Af;AX++){Aq=Ap[Al[AW][AX]];At=Math.ceil(Aq.bounds.w/2);Au=Math.ceil(Aq.bounds.h/2);if(!Aq.moveable){continue}for(var Av=Ac;;Av+=Aj){if(Av>=180){++Ao;Av-=360;if(Ao>2){Am+=30}}if(Ao>4){break}Ar=Math.round(Am*Math.cos(AZ*Av/180));As=-Math.round(Am*Math.sin(AZ*Av/180));Ab.ulX=Ak.x+Ar-At;Ab.ulY=Ak.y+As-Au;Ab.lrY=Ab.ulY+Aq.bounds.h;Ab.lrX=Ab.ulX+Aq.bounds.w;AY=false;for(var Aa=0,Ag=Ap.length;Aa<Ag;Aa++){Ah=AT(Al[AW],Aa);if(!Ap[Aa].moveable||(Ap[Aa].bounds.ix!=Ap[Aa].bounds.ulX)||(Ap[Aa].bounds.iy!=Ap[Aa].bounds.ulY)){if(AQ(Ap[Aa].bounds.ix+At,Ap[Aa].bounds.iy+Au,Ap[Aa].bounds.ulX+At,Ap[Aa].bounds.ulY+Au,Aq.bounds.ix+At,Aq.bounds.iy+Au,Ab.ulX+At,Ab.ulY+Au)){AY=true;break}}if(Ah<0){if((AR(Ab,Ap[Aa].bounds))||((Ao<2)&&AO((Aq.bounds.ix+At),(Aq.bounds.iy+Au),Ab.ulX+At,Ab.ulY+Au,Ap[Aa].bounds))){AY=true;break}else{if((Ao<2)&&(!Ap[Aa].moveable||(Ap[Aa].bounds.ix!=Ap[Aa].bounds.ulX)||(Ap[Aa].bounds.iy!=Ap[Aa].bounds.ulY))){if(AO(Ap[Aa].bounds.ix+(Ap[Aa].bounds.w/2),Ap[Aa].bounds.iy+(Ap[Aa].bounds.h/2),Ap[Aa].bounds.ulX+At,Ap[Aa].bounds.ulY+Au,Ab)){AY=true;break}}}}else{if((Ah>=0)&&(Ah<AX)&&(AR(Ab,Ap[Aa].bounds))){AY=true;break}}}if(AY){continue}Ac=Av+Aj;An=Aq;Aq.bounds.ulX=Ab.ulX;Aq.bounds.ulY=Ab.ulY;Aq.bounds.lrX=Ab.ulX+Aq.bounds.w;Aq.bounds.lrY=Ab.ulY+Aq.bounds.h;Aq.bounds.bias={x:Ab.ulX-Aq.bounds.ix,y:Ab.ulY-Aq.bounds.iy};if(!Aq.bounds.bias.x&&!Aq.bounds.bias.y){Aq.bounds.bias=null}break}}}}function AR(Ae,Af){var Ac=Ae.ulX,AW=Ae.ulY,AX=Ae.lrX,Aa=Ae.lrY,Ad=Af.ulX,AY=Af.ulY,AZ=Af.lrX,Ab=Af.lrY;return !(Ad>=AX||AZ<=Ac||AY>=Aa||Ab<=AW)}function AV(AY,Ac){var Aa=0;var Ab=0;var AW;var AX=AY.length;for(var AZ=0;AZ<AX;AZ++){AW=Ac[AY[AZ]].bounds;Aa+=AW.ix+AW.w/2;Ab+=AW.iy+AW.h/2}return{x:Math.round(Aa/AX),y:Math.round(Ab/AX)}}function AQ(Ag,Aa,Aj,Ac,Af,AZ,Ah,Ab){var AW=(Aj-Ag==0)?(Ac-Aa)/1e-8:(Ac-Aa)/(Aj-Ag);var Ai=Aa-AW*Ag;var AY=(Ah-Af==0)?(Ab-AZ)/1e-8:(Ab-AZ)/(Ah-Af);var Ak=AZ-AY*Af;var Ad,Ae;Ad=Math.round(0-(Ai-Ak)/(AW-AY));Ae=(Math.abs(AW)<Math.abs(AY))?Math.round(Ai+AW*Ad):Math.round(Ak+AY*Ad);if(((Ag<=Ad&&Aj>=Ad)||(Ag>=Ad&&Aj<=Ad))&&((Af<=Ad&&Ah>=Ad)||(Af>=Ad&&Ah<=Ad))&&((Aa<=Ae&&Ac>=Ae)||(Aa>=Ae&&Ac<=Ae))&&((AZ<=Ae&&Ab>=Ae)||(AZ>=Ae&&Ab<=Ae))){var AX=3;if(((Math.abs(Ag-Ad)<=AX)&&(Math.abs(Aa-Ae)<=AX))||((Math.abs(Af-Ad)<=AX)&&(Math.abs(AZ-Ae)<=AX))||((Math.abs(Aj-Ad)<=AX)&&(Math.abs(Ac-Ae)<=AX))||((Math.abs(Ah-Ad)<=AX)&&(Math.abs(Ab-Ae)<=AX))){return(false)}return(true)}return(false)}function AO(Ai,AY,Ak,Aa,Am){var AW=(Ak-Ai==0)?(Aa-AY)/1e-8:(Aa-AY)/(Ak-Ai);var Ah=AY-AW*Ai;var Ad=0;var Ac=Am.h/1e-8;var Ag,AX,Aj,AZ;var Al,Ab,Af;for(var Ae=1;Ae<=4;Ae++){switch(Ae){case 1:Ag=Am.ulX;AX=Am.ulY;Aj=Am.lrX;AZ=Am.lrY;break;case 2:Ag=Am.lrX;AX=Am.ulY;Aj=Am.lrX;AZ=Am.lrY;break;case 3:Ag=Am.ulX;AX=Am.lrY;Aj=Am.lrX;AZ=Am.lrY;break;case 4:Ag=Am.ulX;AX=Am.ulY;Aj=Am.ulX;AZ=Am.lrY;break}if(Ae%2==1){Al=AX;Ab=Math.round(0-(Ah-Al)/AW);Af=Al}else{Al=AX-Ac*Ag;Ab=Math.round(0-(Ah-Al)/(AW-Ac));Af=(Math.abs(AW)<Math.abs(Ac))?Math.round(Ah+AW*Ab):Math.round(Al+Ac*Ab)}if(((Ai<=Ab&&Ak>=Ab)||(Ai>=Ab&&Ak<=Ab))&&((Ag<=Ab&&Aj>=Ab)||(Ag>=Ab&&Aj<=Ab))&&((AY<=Af&&Aa>=Af)||(AY>=Af&&Aa<=Af))&&((AX<=Af&&AZ>=Af)||(AX>=Af&&AZ<=Af))){return(true)}}return(false)}function AU(AW,AX){return AW.bounds.ulX-AX.bounds.ulX}})();(function(){function AO(AP){this.map=AP;this._enabled=0;this._markers=O()}AO.prototype={register:function(AP){if(!AP.getNeededBounds||!AP.setBias||!AP.shouldDeclutter){AA("[declutter] Ignoring marker because it does not conform to the expected interface");return }if(!this._markers.put(AP,AP)&&AP.shouldDeclutter()){this.invalidate()}},unregister:function(AP){if(this._markers.remove(AP)){this.invalidate()}},invalidate:function(){this._invalid=true;if(this._enabled==0){this._execute()}},suspend:function(){this._enabled++},resume:function(){if(this._enabled>0){if(--this._enabled==0&&this._invalid){this._execute()}}},withSuspended:function(AQ,AP){this.suspend();try{if(arguments.length>1){return AP.call(AQ)}else{return AQ()}}finally{this.resume()}},_execute:function(){this._invalid=false;AA("[declutter] Execute");var AP=this.map.display.transform,AV=[];this._markers.each(function(AZ){AV.push({marker:AZ,bounds:AZ.getNeededBounds(AP),moveable:AZ.shouldDeclutter()=="moveable"})});var AQ=(new Date().getTime());var AT,AR,AS,AU,AW,AY,AX=z(AV);AA("[declutter] Cluster time="+(new Date().getTime()-AQ)+"ms");AQ=(new Date().getTime());for(AW=0;AW<AX.length;AW++){AU=AX[AW];if(AU.marker){AU.marker.setBias(null)}else{for(AY=0;AY<AU.length;AY++){AT=AU[AY];AR=AT.marker.bias;AS=AT.bounds.bias;if(!AR||!AS||AR.x!=AS.x||AR.y!=AS.y){AT.marker.setBias(AS)}}}}AA("[declutter] Update bias time="+(new Date().getTime()-AQ)+"ms")}};B(f.prototype,{onMapInit$After:function(){this.declutter=new AO(this)},getDeclutter:function(){return this.declutter},onZoomEnd$After:function(){this.declutter.invalidate()}});B(T.prototype,{_addPeer$After:function(AP){if(typeof AP.shouldDeclutter=="function"&&AP.shouldDeclutter()){var AQ=this.display.map.declutter;AP._declutterCnt=AQ;AQ.register(AP)}},_removePeer$After:function(AP){if(AP._declutterCnt){this.display.map.declutter.unregister(AP)}}})})();var j;(function(){j=function(){this._cnts=O();this._pxX=0;this._pxY=0};var AR=AF(new AJ.Component(),{createPeer:function(){return this},layerInit:function(AU,AT){this.map=AT;this.layer=AU;var AS=this;this._cnts.each(function(AV){AQ(AS,AV)})},dispose:function(){var AS=this;this._cnts.each(function(AT){AO(AS,AT);if(AT.parentNode){AT.parentNode.removeChild(AT)}})},_onDOMEvent:function(AS){},resetTransform:function(AS){this._updatePosition()},_updatePosition:function(){if(!this.map){return }if(!this._updateVisibility()){return }var AV=this.map.display.transform,AS=AV.latLngToDisplay(this.latLng.lat,this.latLng.lng),AT,AU,AX=this.bias,AW=this._elt;if(AX&&(AX.x||AX.y)){AT=AS.x+AX.x;AU=AS.y+AX.y;this._updateBias(AS.x,AS.y,AX.x,AX.y)}else{AT=AS.x;AU=AS.y;this._updateBias(AT,AU,0,0)}if(this._pxX!=AT||this._pxY!=AU){this._pxX=AT;this._pxY=AU;this._cnts.each(function(AY){var AZ=AY._poiOfs;AY.style.top=(AZ.y+AU)+"px";AY.style.left=(AZ.x+AT)+"px"});g(this,"move",new s("Poi.move",this))}},_updateBias:function(AV,AS,AT,AU){},_actIsVisible:function(){if(!this.layer){return false}var AS=(this.map?this.map.zoom:0),AT=this.layer.collection;return this.visible&&this.latLng&&AS>=Math.max(this.minZoomLevel,AT.getMinZoomLevel())&&AS<=Math.min(this.maxZoomLevel,AT.getMaxZoomLevel())},_updateVisibility:function(){var AS=this._actIsVisible();this._cnts.each(function(AT){AT.style.display=((AS&&AT._poiV)?"block":"none")});return AS},setContent:function(AT,AW,AX,AY,AZ,AS){var AV=this._cnts,Aa=AV.remove(AT),AU;if(Aa){AO(this,Aa);if(Aa.parentNode){Aa.parentNode.removeChild(Aa)}}if(AW){p(AW);AW.style.position="absolute";AW._poiOfs={x:AX,y:AY};AW._poiZ=AS;AW._poiV=true;AV.put(AT,AW);if(Aa&&Aa.parentNode){Aa.parentNode.removeChild(Aa)}AQ(this,AW);AP(this,AW,AZ)}},setContentOffset:function(AU,AT,AV){var AS=this._cnts.get(AU);if(AS){AS._poiOfs={x:AT,y:AV};AQ(this,AS)}},getContent:function(AS){return this._cnts.get(AS)},setContentZIndex:function(AT,AU){var AS=this._cnts.get(AT);if(AS){AS._poiZ=AU;AQ(this,AS)}},setContentVisible:function(AU,AS){var AT=this._cnts.get(AU);if(AT){AT._poiV=AS;AT.style.display=(this._actIsVisible()&&AS)?"block":"none"}},clone:function(){var AS=new j();AJ.mixin(AS,AJ.Util._cloneValue(this));return AS}});j.prototype=AR;AC(AR);function AP(AT,AU,AS){AU._eventGroup=AS;if(AS){AT._wireDOMEvents(AU)}}function AO(AS,AT){if(!AT||!AT._eventGroup){return }if(AT._eventGroup){AS._unwireDOMEvents(AT)}AT._eventGroup=null}function AQ(AS,AT){var AW=AS.layer,AV,AX=AT._poiZ,AU=AT._poiOfs;if(!AW){return }AV=AW.display.zlevel(AX||I.poi);AT.style.top=(AU.y+AS._pxY)+"px";AT.style.left=(AU.x+AS._pxX)+"px";if(AV!==AT.parentNode){AV.appendChild(AT)}}AR.defineProperty("key",null,"");AR.defineProperty("visible",null,true,"_updateVisibility");AR.defineProperty("latLng",function(AS){return{lat:AS.lat,lng:AS.lng}},null,"_updatePosition");AR.defineProperty("bias",function(AS){return{x:AS.x,y:AS.y}},null,"_updatePosition");AR.defineProperty("minZoomLevel",parseInt,1,"_updateVisibility");AR.defineProperty("maxZoomLevel",parseInt,16,"_updateVisibility")})();AJ.BasePoi=j;AJ.Poi=j;var e;(function(){function AR(AU){var AX,AZ,AY,AV,AW;this.dragStart=function(){AX=AU.getLatLng();AZ=this.display.transform.latLngToDisplay(AX.lat,AX.lng);AY=AU.getBias();AV=AU.getZIndex();AU.setZIndex("poi_drag");AU.snapback=false};this.dragMove=function(){if(!AW){g(AU,"dragstart",new s("StdPoi.dragstart",AU));AW=true;AU._dragging=true}if(AU.draggable=="bias"||(AU.declutter&&!AU.draggable)){AU.setBias({x:this.dragXY.x-AZ.x,y:this.dragXY.y-AZ.y})}else{AU.setBias(null);AU.setLatLng(this.dragLatLng)}g(AU,"drag",new s("StdPoi.drag",AU))};this.dragCancelled=function(){AU.setLatLng(AX);AU.setBias(AY);AU.setZIndex(AV);var Aa=new s("StdPoi.dragend",AU);Aa.cancelled=true;g(AU,"dragend",Aa)};this.dragEnd=function(){AU.setZIndex(AV);if(AW){AU._dragging=false;if(AU.snapback){this.dragCancelled()}else{g(AU,"dragend",new s("StdPoi.dragend",AU))}}}}function AO(AU,AV){this.stateName=AU;this.cursor="pointer";if(AV){this.icon=new AE(y("images/poi/star.png"),29,29)}this.shadow=new AE(y("images/poi/shadow.png"),23,7)}AO.prototype={isValid:function(){return !!this.icon},activate:function(){var AU=this.poi;AU.setContentVisible(this.stateName+"-icon",true);AU.setContentVisible(this.stateName+"-shadow",true);this.activated=true;if(!this.inited){this.applyIcon();this.applyShadow();this.inited=true}},deactivate:function(){var AU=this.poi;AU.setContentVisible(this.stateName+"-icon",false);AU.setContentVisible(this.stateName+"-shadow",false);this.activated=false},shadowAnchor:function(){var AV=this.getIconOffset(),AW=this.icon,AU=(AW&&AW.height)||0;return{x:AV.x,y:AV.y+AU}},getIconOffset:function(){var AU=this.iconOffset,AV=this.icon;if(!AU){AU=AV?{x:-parseInt(AV.width/2),y:-parseInt(AV.height/2)}:{x:0,y:0}}return AU},setIconOffset:function(AU){this.iconOffset=AU;this.applyIcon(true);this.applyShadow(true)},getIcon:function(){return this.icon},setIcon:function(AU){this.icon=AU;this.applyIcon();this.applyShadow(true)},applyIcon:function(AY){var AU=this.poi,AW=this.icon,AV=this.getIconOffset()||{x:0,y:0},AX;if(AU){if(AY){AU.setContentOffset(this.stateName+"-icon",AV.x,AV.y)}else{AX=AW&&AW.createElement();if(AX){AX.style.cursor=this.cursor}AU.setContent(this.stateName+"-icon",AX,AV.x,AV.y,"icon",AU.zIndex);AU.setContentVisible(this.stateName+"-icon",this.activated)}}},getCursor:function(){return this.cursor},setCursor:function(AU){this.cursor=AU;var AV=this.poi,AW;if(AV){AW=AV.getContent(this.stateName+"-icon");if(AW){AW.style.cursor=AU}}},getShadow:function(){return this.icon},setShadow:function(AU){this.shadow=AU;this.applyShadow()},getShadowOffset:function(){return this.shadowOffset||{x:6,y:0}},setShadowOffset:function(AU){this.shadowOffset=AU;this.applyShadow()},applyShadow:function(AY){var AU=this.poi,Aa=this.shadow,AV=this.getShadowOffset(),AW=this.shadowAnchor(),AZ=AW.x+AV.x,Ab=AW.y+AV.y;if(AU){if(AY){AU.setContentOffset(this.stateName+"-shadow",AZ,Ab)}else{var AX=Aa&&Aa.createElement();if(AX){AX._zbg=true}AU.setContent(this.stateName+"-shadow",AX,AZ,Ab,null,"poi_shadow");AU.setContentVisible(this.stateName+"-shadow",this.activated)}}},getBounds:function(AY,Aa){var AZ=this.getIconOffset(),AX=this.icon,AV=this.getShadowOffset(),AW=this.shadow,AU=this.shadowAnchor(),Ac;Ac={x:AY,y:Aa,anchorX:AY,anchorY:Aa,width:0,height:0,icon:{x:AZ.x,y:AZ.y,width:(AX&&AX.width)||0,height:(AX&&AX.height)||0},shadow:{x:AV.x+AU.x,y:AV.y+AU.y,width:(AW&&AW.width)||0,height:(AW&&AW.height)||0}};function Ab(Af){Af.offsetX=Af.x;Af.offsetY=Af.y;Af.x+=AY;Af.y+=Aa;var Ad=Af.x+Af.width,Ae=Af.y+Af.height;lrX=Ac.x+Ac.width,lrY=Ac.y+Ac.height;if(Ac.x>Af.x){Ac.x=Af.x}if(Ac.y>Af.y){Ac.y=Af.y}if(lrX<Ad){Ac.width+=(Ad-lrX)}if(lrY<Ae){Ac.height+=(Ae-lrY)}}Ab(Ac.icon);Ab(Ac.shadow);return Ac}};e=function(AV,AU){j.call(this);this.zIndex="poi";this._dspStates={"":new AO("",true)};this.stateStack=[""];if(AV){if(AV.lat&&(typeof AV.lat=="string")){AV.lat=parseFloat(AV.lat)}if(AV.lng&&(typeof AV.lng=="string")){AV.lng=parseFloat(AV.lng)}this.setLatLng(AV)}if(AU){this.setIcon(AU)}this.draggable=false;this.addDOMEvent("mousedown","mouseup","dblclick","mouseover","mouseout")};function AP(AV,AW,AU){AW._eventGroup=AU;if(AU){AV._wireDOMEvents(AW)}}function AT(AU,AV){if(!AV||!AV._eventGroup){return }if(AV._eventGroup){AU._unwireDOMEvents(AV)}AV._eventGroup=null}var AQ=o(j,{_onDOMEvent:function(AV){if(AV.type=="click"){return }var AW=new s("MQA.Poi."+AV.type,this),AU;AW.button=V(AV)?AJ.BUTTON_MQ_LEFT:AJ.BUTTON_MQ_RIGHT;AW.domEvent=AV;g(this,AV.type,AW);AU=this["_onDOM"+AV.type];if(AU){AU.call(this,AV)}},_fakeClick:function(AV){var AW=new s("MQA.Poi.click"),AU;AW.button=V(AV)?AJ.BUTTON_MQ_LEFT:AJ.BUTTON_MQ_RIGHT;AW.domEvent=AV;AW.srcObject=this;g(this,"click",AW)},_onDOMmousedown:function(AU){if(this.draggable||this.declutter){this.map.display.startDrag(AU,new AR(this))}P(AU)},_onDOMmouseup:function(AU){if(!this._dragging){AA("[stdpoi] Mouse up while not dragging.  Simulating click.");this._fakeClick(AU)}else{AA("[stdpoi] Mouse up while dragging. Suppressing click.")}},_onDOMclick:function(AU){AA("[stdpoi] Mouse click")},layerInit$After:function(){this._activated=true;this.setState(this.state);this.setBias(this.bias)},getDisplayState:function(AU){var AV=this._dspStates[AU||""];if(!AV){AV=this._dspStates[AU||""]=new AO(AU)}return AV},setIcon:function(AV,AU){this.getDisplayState(AU).setIcon(AV)},getIcon:function(AU){return this.getDisplayState(AU).icon},setIconOffset:function(AU,AV){this.getDisplayState(AV).setIconOffset(AU)},getIconOffset:function(AU){return this.getDisplayState(AU).iconOffset||{x:0,y:0}},setShadow:function(AU,AV){this.getDisplayState(AV).setShadow(AU)},getShadow:function(AU){return this.getDisplayState(AU).getShadow()},setShadowOffset:function(AV,AU){this.getDisplayState(AU).setShadowOffset(AV)},getShadowOffset:function(AU){return this.getDisplayState(AU).getShadowOffset()},getCursor:function(AU){return this.getDisplayState(AU).getCursor()},setCursor:function(AU,AV){this.getDisplayState(AV).setCursor(AU)},setState:function(AU){this.stateStack=[AU];if(!this._dspStates[AU]){this._dspStates[AU]=new AO(AU)}return this._applyState(AU)},_applyState:function(AV){if(this._activated){var AW=this._dspStates[AV||""],AU=this._curDspState;if(AW&&AW.isValid()){if(AU){AU.deactivate()}AW.poi=this;AW.activate();this._curDspState=AW;return true}else{return false}}else{return false}},getState:function(){return this.stateStack[this.stateStack.length-1]||""},pushState:function(AU){this.stateStack.push(AU);this._applyState(AU)},popState:function(){if(this.stateStack.length>1){var AU=this.stateStack.pop();this._applyState(AU)}else{this.stateStack=[""];this._applyState("")}},_updateBias:function(AZ,Aa,Af,Ai){if(!this._activated){return }var AY,Ad,Ae;if(!Af&&!Ai){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 Aj=Math.abs(Af),AW=Math.abs(Ai),Ag=6,Ah,AV,AX,Ab,Ac,AU,Ak;AY=Q.createSurface(Aj+2*Ag,AW+2*Ag);Ah=AY.element();if(Af>0){AV=Ag;Ab=Aj+Ag;Ad=(-Af-Ag)}else{AV=Aj+Ag;Ab=Ag;Ad=(-Ag)}if(Ai>0){AX=Ag;Ac=AW+Ag;Ae=(-Ai-Ag)}else{AX=AW+Ag;Ac=Ag;Ae=(-Ag)}AU=AY.line();AU.setPoints([{x:AV,y:AX},{x:Ab,y:Ac}]);AU.setColor("#000000");AU.setBorderWidth(2);AU.add();Ak=AY.ellipse();Ak.setPoints([{x:AV-Ag/2,y:AX-Ag/2},{x:AV+Ag/2,y:AX+Ag/2}]);Ak.setFillColor("#000000");Ak.add();this.setContent("leader",Ah,Ad,Ae,null,"poi_leader")}},shouldDeclutter:function(){var AU=this.layer;if(this.declutter||(AU&&AU.collection.declutter)){return this.declutterFixed?"fixed":"moveable"}else{return false}},getNeededBounds:function(AY){var AX=this.getIcon(),AV=(AX&&AX.width)||0,AU=(AX&&AX.height)||0,AW=(AY||this.map.display.transform).latLngToDisplay(this.latLng.lat,this.latLng.lng);return{xy:AW,ulX:AW.x-AV/2,ulY:AW.y-AU/2,lrX:AW.x+AV/2,lrY:AW.y+AU/2}},getCurrentBounds:function(){var AW=this._elt,AU=this._dspStates[this.getState()],AX=this.bias,AV=AU.getBounds(this._pxX,this._pxY);AA("[stdpoi] Computing bounds for display state "+AU.stateName);AV.biasX=(AX&&AX.x)||0;AV.biasY=(AX&&AX.y)||0;return AV},getDeclutterMode:function(){return this.declutter},setDeclutterMode:function(AU){this.setDeclutter(AU)},_applyZIndex:function(){var AV=this.zIndex,AU=this;this._cnts.each(function(AX,AW){if(AW.match(/\-icon/)){AU.setContentZIndex(AW,AV)}})},dispose:function(){var AU=this;this._cnts.each(function(AV){AT(AU,AV);if(AV.parentNode){AV.parentNode.removeChild(AV)}});this._cnts=O();this._dspStates={"":new AO("",true)};this.stateStack=[""];this.addDOMEvent("mousedown","mouseup","dblclick","mouseover","mouseout")}});e.prototype=AQ;AQ.defineProperty("declutter");AQ.defineProperty("declutterFixed");AQ.defineProperty("infoTitleHTML");AQ.defineProperty("infoContentHTML");AQ.defineProperty("rolloverContent");AQ.defineProperty("draggable");AQ.defineProperty("snapback");AQ.defineProperty("zIndex",null,"poi","_applyZIndex");function AS(AV,AW){var AU=e.prototype;AU["get"+AW+"Icon"]=function(){return this.getIcon(AV)};AU["set"+AW+"Icon"]=function(AX){this.setIcon(AX,AV)};AU["get"+AW+"Shadow"]=function(){return this.getIcon(AV)};AU["set"+AW+"Shadow"]=function(AX){this.setIcon(AX,AV)};AU["get"+AW+"IconOffset"]=function(){return this.getIconOffset(AV)};AU["set"+AW+"IconOffset"]=function(AX){this.setIconOffset(AX,AV)};AU["get"+AW+"ShadowOffset"]=function(){return this.getIconOffset(AV)};AU["set"+AW+"ShadowOffset"]=function(AX){this.setShadowOffset(AX,AV)}}AS("bias","Bias");AS("bias","Declutter");AS("alt","Alt")})();AJ.StdPoi=e;AJ.Poi=e;var Q;(function(){var AW="http://www.w3.org/2000/svg";function AU(){}var AV=new AJ.Component();AU.prototype=AV;AF(AV,{init:function(Ad,Ae){this.surface=Ad;this.elt=document.createElementNS(AW,Ae)},add:function(){this.surface.elt.appendChild(this.elt)},remove:function(){var Ad=this.elt;if(Ad.parentNode){Ad.parentNode.removeChild(Ad)}},dispose:function(){if(this.elt){this.remove()}this.elt=null},element:function(){return this.elt}});function AS(Ah,Ag,Ae,Af,Ad){Ah.defineProperty(Ag,null,Ad,function(){var Ai=this[Ag];if(Af){Ai=Af(Ai)}if(!this["_no"+Ae]){this.elt.setAttribute(Ae,Ai)}})}AS(AV,"color","stroke",c);AS(AV,"colorAlpha","stroke-opacity",null,"1.0");AS(AV,"borderWidth","stroke-width",null,"0");AS(AV,"fillColor","fill",c);AS(AV,"fillColorAlpha","fill-opacity",null,"1.0");function Ac(Ad){this.init(Ad,"rect")}var AR=new AU();Ac.prototype=AR;AR.defineProperty("points",null,null,function(){var Ai=this.points,Af=Ai[0].x,Ah=Ai[0].y,Ad=Ai[1].x,Ag=Ai[1].y,Ae=this.elt;Ae.setAttribute("x",Af);Ae.setAttribute("y",Ah);Ae.setAttribute("width",Ad-Af);Ae.setAttribute("height",Ag-Ah)});function AX(Ad){this.init(Ad,"path")}var AQ=new AU();AX.prototype=AQ;AQ.defineProperty("points",null,null,function(){var Af=this.points,Ae,Ad=[];for(Ae=0;Ae<Af.length;Ae++){Ad.push(Ae==0?"M":"L");Ad.push(Af[Ae].x);Ad.push(Af[Ae].y)}Ad.push("z");this.elt.setAttribute("d",Ad.join(" "))});function AT(Ad){this.init(Ad,"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 AZ=new AU();AT.prototype=AZ;AZ.defineProperty("points",null,null,function(){var Af=this.points,Ae,Ad=[];for(Ae=0;Ae<Af.length;Ae++){Ad.push(Af[Ae].x+","+Af[Ae].y)}this.elt.setAttribute("points",Ad.join(" "))});function Ab(Ad){this.init(Ad,"ellipse")}var AP=new AU();Ab.prototype=AP;AP.defineProperty("points",null,null,function(){var Am=this.points,Af=Am[0].x,Al=Am[0].y,Ad=Am[1].x,Aj=Am[1].y,Ae=Ad-Af,An=Aj-Al,Ak=parseInt(Ae/2),Ah=parseInt(An/2),Ag=Ad-Ak,Ai=Aj-Ah;elt=this.elt;elt.setAttribute("cx",Ag);elt.setAttribute("cy",Ai);elt.setAttribute("rx",Ak);elt.setAttribute("ry",Ah)});function AO(Ad){this.init(Ad,"circle")}var Aa=new AU();AO.prototype=Aa;Aa.defineProperty("radius",null,null,null);Aa.defineProperty("points",null,null,function(){var Af=this.points,Ae=this.elt,Ad=this.radius;Ae.setAttribute("r",Ad);Ae.setAttribute("cx",Af[0].x);Ae.setAttribute("cy",Af[0].y)});function AY(Af,Ad){var Ae=document.createElementNS(AW,"svg");this.elt=Ae;Ae.setAttribute("height",Ad);Ae.setAttribute("width",Af);Ae.setAttribute("xmlns",AW);Ae.setAttribute("version","1.1");Ae.setAttribute("viewBox","0 0 "+Af+" "+Ad);Ae.appendChild(document.createElement("defs"));this.width=Af;this.height=Ad}AY.prototype={element:function(){return this.elt},rect:function(){return new Ac(this)},polygon:function(){return new AX(this)},ellipse:function(){return new Ab(this)},line:function(){return new AT(this)},circle:function(){return new AO(this)},dispose:function(){var Ad=this.elt;if(Ad){Ad.parentNode.removeChild(Ad)}this.elt=null}};AJ.Graphics_SVG={name:"svg",initialize:function(){},createSurface:function(Ae,Ad){return new AY(Ae,Ad)},supportsSVG:function(){if(!document.createElementNS){return false}var Ad=document.createElementNS(AW,"svg");return Ad.width!="undefined"?true:false}}})();(function(){function AY(Ae){var Ad=Infinity,Ag=Infinity,Af;for(Af=0;Af<Ae.length;Af++){if(Ad>Ae[Af].x){Ad=Ae[Af].x}if(Ag>Ae[Af].y){Ag=Ae[Af].y}}return{x:Ad,y:Ag}}function AT(){}var AU=new AJ.Component();AT.prototype=AU;AF(AU,{init:function(Ad,Af){this.surface=Ad;var Ae=document.createElement(Af);this.elt=Ae},add:function(){this.surface.elt.appendChild(this.elt)},remove:function(){var Ad=this.elt;if(Ad.parentNode){Ad.parentNode.removeChild(Ad)}},dispose:function(){if(this.elt){this.remove()}this.elt=null},element:function(){return this.elt}});function Aa(Ah,Ag,Ae,Af,Ad){Ah.defineProperty(Ag,null,Ad,function(){var Ai=this[Ag];if(Af){Ai=Af(Ai)}AA("Setting attribute "+Ae+" on "+this.elt.tagName);this.elt.setAttribute(Ae,Ai)})}AU.defineProperty("color");AU.defineProperty("colorAlpha",null,"1.0");AU.defineProperty("borderWidth",null,"0");AU.defineProperty("fillColor");AU.defineProperty("fillColorAlpha",null,"1.0");function Ac(Ad){this.init(Ad,"v:rect");var Ae=this.elt,Ag,Af;this.elt.style.position="absolute";this.elt.setAttribute("stroked","true");Ag=document.createElement("v:fill");Ae.appendChild(Ag);this.fill=Ag;Af=document.createElement("v:stroke");Af.setAttribute("miterlimit","8.0");Af.setAttribute("joinstyle","miter");Af.setAttribute("endcap","flat");this.stroke=Af;Ae.appendChild(Af)}var AR=new AT();Ac.prototype=AR;AR.defineProperty("points",null,null,function(){var Ai=this.points,Af=Ai[0].x,Ah=Ai[0].y,Ad=Ai[1].x,Ag=Ai[1].y,Ae=this.elt;Ae.style.left=Af+"px";Ae.style.top=Ah+"px";Ae.style.width=(Ad-Af)+"px";Ae.style.height=(Ag-Ah)+"px"});AF(AR,{setColor:function(Ad){this.color=Ad;this.stroke.setAttribute("color",Ad)},setColorAlpha:function(Ad){this.colorAlpha=Ad;this.stroke.setAttribute("opacity",Ad)},setBorderWidth:function(Ad){this.borderWidth=Ad;this.stroke.setAttribute("weight",Ad)},setFillColor:function(Ad){this.fillColor=Ad;this.fill.setAttribute("color",Ad)},setFillColorAlpha:function(Ad){this.fillColorAlpha=Ad;this.fill.setAttribute("opacity",Ad)}});function AV(Ad){this.init(Ad,"v:shape");var Ae=this.elt,Ah,Ag,Af;Ae.style.width=Ad.width;Ae.style.height=Ad.height;Ae.style.position="absolute";Ae.setAttribute("stroked","true");Ae.setAttribute("coordsize",Ad.width+" "+Ad.height);Ae.setAttribute("coordorigin","0 0");Ah=document.createElement("v:fill");Ae.appendChild(Ah);this.fill=Ah;Ag=document.createElement("v:stroke");Ag.setAttribute("miterlimit","8.0");Ag.setAttribute("joinstyle","miter");Ag.setAttribute("endcap","flat");this.stroke=Ag;Ae.appendChild(Ag);Af=document.createElement("v:path");Ae.appendChild(Af);this.path=Af}var AQ=new AT();AV.prototype=AQ;AQ.defineProperty("points",null,null,function(){var Af=this.points,Ae,Ad=[];for(Ae=0;Ae<Af.length;Ae++){Ad.push(Ae==0?"M":"l");Ad.push(Ae==0?(Af[Ae].x+" "+Af[Ae].y):(Af[Ae].x+","+Af[Ae].y))}Ad.push("x e");this.path.setAttribute("v",Ad.join(" "))});AF(AQ,{setColor:function(Ad){this.color=Ad;this.stroke.setAttribute("color",Ad)},setColorAlpha:function(Ad){this.colorAlpha=Ad;this.stroke.setAttribute("opacity",Ad)},setBorderWidth:function(Ad){this.borderWidth=Ad;this.stroke.setAttribute("weight",Ad)},setFillColor:function(Ad){this.fillColor=Ad;this.fill.setAttribute("color",Ad)},setFillColorAlpha:function(Ad){this.fillColorAlpha=Ad;this.fill.setAttribute("opacity",Ad)}});function AS(Ad){this.init(Ad,"v:polyline");var Ae=this.elt,Af;Ae.style.width=Ad.width+"px";Ae.style.height=Ad.height+"px";Ae.style.position="absolute";Ae.style.top="0px";Ae.style.left="0px";Ae.setAttribute("stroked","true");Ae.setAttribute("coordsize",Ad.width+" "+Ad.height);Ae.setAttribute("filled","false");Af=document.createElement("v:stroke");Af.setAttribute("miterlimit","8.0");Af.setAttribute("joinstyle","round");Af.setAttribute("endcap","round");Af.setAttribute("weight","0px");this.stroke=Af;Ae.appendChild(Af)}var AX=new AT();AS.prototype=AX;AX.defineProperty("points",null,null,function(){var Ag=this.points,Af,Ae=[],Ah=AY(Ag),Ad=this.elt;for(Af=0;Af<Ag.length;Af++){Ae.push((Ag[Af].x-Ah.x)+","+(Ag[Af].y-Ah.y))}Ad.setAttribute("points",Ae.join(" "));Ad.style.left=Ah.x+"px";Ad.style.top=Ah.y+"px"});AF(AX,{setColor:function(Ad){this.color=Ad;this.stroke.setAttribute("color",Ad)},setColorAlpha:function(Ad){this.colorAlpha=Ad;this.stroke.setAttribute("opacity",Ad)},setBorderWidth:function(Ad){this.borderWidth=Ad;this.stroke.setAttribute("weight",Ad+"px")}});function Ab(Ad){this.init(Ad,"v:oval");var Ae=this.elt,Ag,Af;Ae.style.position="absolute";Ae.setAttribute("stroked","true");Ag=document.createElement("v:fill");Ae.appendChild(Ag);this.fill=Ag;Af=document.createElement("v:stroke");Af.setAttribute("miterlimit","8.0");Af.setAttribute("joinstyle","miter");Af.setAttribute("endcap","flat");this.stroke=Af;Ae.appendChild(Af)}var AP=new AT();Ab.prototype=AP;AP.defineProperty("points",null,null,function(){var Ak=this.points,Ag=Ak[0].x,Aj=Ak[0].y,Ae=Ak[1].x,Ah=Ak[1].y,Ai=Ae-Ag,Ad=Ah-Aj,Af=this.elt;Af.style.left=Ag+"px";Af.style.top=Aj+"px";Af.style.width=Ai;Af.style.height=Ad});AF(AP,{setColor:function(Ad){this.color=Ad;this.stroke.setAttribute("color",Ad)},setColorAlpha:function(Ad){this.colorAlpha=Ad;this.stroke.setAttribute("opacity",Ad)},setBorderWidth:function(Ad){this.borderWidth=Ad;this.stroke.setAttribute("weight",Ad)},setFillColor:function(Ad){this.fillColor=Ad;this.fill.setAttribute("color",Ad)},setFillColorAlpha:function(Ad){this.fillColorAlpha=Ad;this.fill.setAttribute("opacity",Ad)}});function AO(Ad){this.init(Ad,"v:oval");var Ae=this.elt,Ag,Af;Ae.style.position="absolute";Ae.setAttribute("stroked","true");Ag=document.createElement("v:fill");Ae.appendChild(Ag);this.fill=Ag;Af=document.createElement("v:stroke");Af.setAttribute("miterlimit","8.0");Af.setAttribute("joinstyle","miter");Af.setAttribute("endcap","flat");this.stroke=Af;Ae.appendChild(Af)}var AZ=new AT();AO.prototype=AZ;AZ.defineProperty("points",null,null,function(){var Ag=this.points,Ae=Ag[1].x,Af=Ag[1].y,Ah=this.radius,Ad=this.elt;Ad.style.left=Ae+"px";Ad.style.top=Af+"px";Ad.style.width=Ah*2;Ad.style.height=Ah*2});AF(AZ,{setColor:function(Ad){this.color=Ad;this.stroke.setAttribute("color",Ad)},setColorAlpha:function(Ad){this.colorAlpha=Ad;this.stroke.setAttribute("opacity",Ad)},setBorderWidth:function(Ad){this.borderWidth=Ad;this.stroke.setAttribute("weight",Ad)},setFillColor:function(Ad){this.fillColor=Ad;this.fill.setAttribute("color",Ad)},setFillColorAlpha:function(Ad){this.fillColorAlpha=Ad;this.fill.setAttribute("opacity",Ad)}});function AW(Af,Ad){var Ae=document.createElement("div");Ae.style.width=Af+"px";Ae.style.height=Ad+"px";this.elt=Ae;this.width=Af;this.height=Ad}AW.prototype={element:function(){return this.elt},rect:function(){return new Ac(this)},polygon:function(){return new AV(this)},ellipse:function(){return new Ab(this)},line:function(){return new AS(this)},circle:function(){return new AO(this)},dispose:function(){var Ad=this.elt;if(Ad){Ad.parentNode.removeChild(Ad)}this.elt=null}};AJ.Graphics_VML={name:"vml",initialize:function(Ad){if(Ad){AJ.Graphics=Q=this}if(this._inited){return }this._inited=true;document.namespaces.add("v","urn:schemas-microsoft-com:vml");var Ae;if(document.styleSheets.length==0){document.getElementsByTagName("head")[0].appendChild(document.createElement("style"))}Ae=document.styleSheets[0];if(AJ.browser.ie6){Ae.addRule("v\\:*","behavior: url(#default#VML);display: inline-block;")}else{var Af="behavior: url(#default#VML);display: inline-block;";Ae.addRule("v\\:shape",Af);Ae.addRule("v\\:path",Af);Ae.addRule("v\\:rect",Af);Ae.addRule("v\\:oval",Af);Ae.addRule("v\\:polyline",Af);Ae.addRule("v\\:fill",Af);Ae.addRule("v\\:stroke",Af)}},createSurface:function(Ae,Ad){return new AW(Ae,Ad)}}})();if(x.name=="msie"){Q=AJ.Graphics_VML}else{if(AJ.Graphics_SVG&&AJ.Graphics_SVG.supportsSVG()){Q=AJ.Graphics_SVG}else{Q=null}}AJ.Graphics=Q;if(Q){AA("Using graphics engine: "+Q&&Q.name);Q.initialize()}else{AA("NO GRAPHICS SUPPORT DETECTED")}(function(){var Ab=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,Ac,AS,Ae={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function AO(Af){Ab.lastIndex=0;return Ab.test(Af)?'"'+Af.replace(Ab,function(Ag){var Ah=Ae[Ag];return typeof Ah==="string"?Ah:"\\u"+("0000"+Ag.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+Af+'"'}function AY(Am,Aj){var Ah,Ag,An,Af,Ak=Ac,Ai,Al=Aj[Am];switch(typeof Al){case"string":return AO(Al);case"number":return isFinite(Al)?String(Al):"null";case"boolean":case"null":return String(Al);case"object":if(!Al){return"null"}Ac+=AS;Ai=[];if(Object.prototype.toString.apply(Al)==="[object Array]"){Af=Al.length;for(Ah=0;Ah<Af;Ah+=1){Ai[Ah]=AY(Ah,Al)||"null"}An=Ai.length===0?"[]":Ac?"[\n"+Ac+Ai.join(",\n"+Ac)+"\n"+Ak+"]":"["+Ai.join(",")+"]";Ac=Ak;return An}for(Ag in Al){if(Object.hasOwnProperty.call(Al,Ag)){An=AY(Ag,Al);if(An){Ai.push(AO(Ag)+(Ac?": ":":")+An)}}}An=Ai.length===0?"{}":Ac?"{\n"+Ac+Ai.join(",\n"+Ac)+"\n"+Ak+"}":"{"+Ai.join(",")+"}";Ac=Ak;return An}}function AR(Af){return AY("",{"":Af})}function AZ(Ai){var Ag=[],Ah={},Af;for(Af in Ai){if(!Ah[Af]){Ag.push(encodeURIComponent(Af)+"="+encodeURIComponent(String(Ai[Af])))}}return Ag.join("&")}function Aa(){function Af(Ah){try{return new ActiveXObject(Ah)}catch(Ai){return undefined}}if(window.XMLHttpRequest){return new window.XMLHttpRequest()}if(window.ActiveXObject){var Ag=Af("Msxml2.XMLHTTP.6.0")||Af("Msxml2.XMLHTTP.3.0")||Af("Msxml2.XMLHTTP")||Af("Microsoft.XMLHTTP");if(Ag){return Ag}}throw new Error("Current browser configuration does not support XMLHttpRequest")}function AP(Af){try{return AJ._jsEval("("+Af+")")}catch(Ag){v('Failed to parse JSON "'+Af+'"',Ag);return undefined}}function AT(Af,Ag,Ak){if(!Ag){Ag={}}var An=Aa(),Al,Am,Ah=Ag.verb||"GET",Ai=(typeof Ag.async!="undefined")?Ag.async:true;setup=Ag.setup;AA("Http: "+Af);An.open(Ah,Af,Ai);if(setup){setup(An)}if((Ah=="GET")&&(AJ.browser.name=="msie")){An.setRequestHeader("If-Modified-Since","Thu, 1 Jan 1970 00:00:00 GMT")}var Aj=function(){An.onreadystatechange=AM;var Ao,As;try{Ao=An.status}catch(Ar){}As=An;An=null;if(Am){clearTimeout(Am)}if(Ao>=200&&Ao<=299){AA("Success: Http: "+Af);Ak(As,false)}else{AA("xhr failure");var Aq;try{Aq=As.responseText}catch(Ap){AA(Ap.message)}AA("Failure("+Ao+") Http: "+Af+"\n"+Aq);Ak(As,{reason:"HTTP error",statusCode:Ao,responseText:Aq})}};An.onreadystatechange=function(){if(Al){return }if(An.readyState==4){Aj()}};if(Ag.timeout){Am=setTimeout(function(){if(Al){return }AA("Timeout Http: "+Af);Al=true;An.onreadystatechange=AM;An.abort();Ak(An,{reason:"Request timed out"});An=null},Ag.timeout)}if(Ag.postData){AA("Http post data: \n"+Ag.postData)}An.send(Ag.postData||null);if(!Ai&&(AJ.browser.name=="firefox")){Aj()}return function(){if(An){AA("Abort Http: "+Af);Al=true;An.onreadystatechange=AM;An.abort();An=null;if(Am){clearTimeout(Am)}}}}function AX(Af,Ag,Ah){return AT(Af,Ag,function(Aj,Ak){if(Ak){Ah(false,Ak)}else{var Ai=AP(Aj.responseText);if(!Ai){Ah(false,{reason:"Parse Error",responseText:Aj.responseText})}else{Ah(Ai,null,Aj.responseText)}}})}function AV(Af,Ai,Ag,Ah){Ag=AF(Ag,{verb:"POST",setup:function(Aj){Aj.setRequestHeader("Content-Type","application/json; charset=UTF-8")},postData:AR(Ai)});return AX(Af,Ag,Ah)}function Ad(Af,Ag){var Ah=document.createElement("script");Ah.src=Af;Ah.type="text/javascript";document.body.appendChild(Ah);return function(){}}function AW(Af,Ag,Ai){var Ah=document.createElement("script");Ah.src=Af;Ah.type="text/javascript";if(AJ.browser.name=="msie"){Ah.onreadystatechange=function(){Ai()}}else{Ah.onload=function(){Ai()}}document.body.appendChild(Ah);return function(){}}var AQ=0;function AU(){return(new Date().getTime()+","+(++AQ))}AJ.IO={toQueryString:AZ,parseJSON:AP,doXhr:AT,doGetJSON:AX,doPostJSON:AV,doJSONP:Ad,doJSONV:AW,stringifyJSON:AR,cacheBust:AU};window.IO_cacheBust=AU;window.IO_doPostJSON=AV})();(function(){var AO=window.MQA;AF(AO.TileMap.prototype,{_clearCollectionContentsOnRemoval:false})})();(function(){var AX=window.MQA,AU=AX.Log.debug,Aa=AX.mixin,AT=AX.connect,AR=AX.EventUtil.observe,AO=AX.EventManager.trigger,AZ=AX.EventUtil.hitch,AV=AX.Event;var AX=window.MQA;function AP(Ab){return function(){var Ad,Ae=[],Ac=this;for(Ad=0;Ad<arguments.length;Ad++){Ae.push(arguments[Ad])}AX.withModule("basicwindow",function(){Ab.apply(Ac,Ae)})}}function AS(Ab,Ac){if(Ab.rolloverContent){Ac.setContent(Ab.rolloverContent)}else{if(Ab.infoTitleHTML){Ac.setContent(Ab.infoTitleHTML)}else{Ac.setTitle(Ab.infoTitleHTML||"");Ac.setTitleBackgroundColor(Ab.titleBackgroundColor||"");Ac.setContent(Ab.infoContentHTML||"")}}}function AY(Ab,Ac){Ac.setTitle(Ab.infoTitleHTML||"");Ac.setTitleBackgroundColor(Ab.titleBackgroundColor||"");Ac.setContent(Ab.infoContentHTML||"")}function AQ(Ae,Ac,Ag){var Af=Ac.getCurrentBounds();Ag.setPosition({lat:Ac.latLng.lat,lng:Ac.latLng.lng,offsetX:Af.biasX,offsetY:Af.biasY+Af.icon.offsetY,iconHeight:Af.icon.height,iconWidth:Af.icon.width});var Ab=Ae.windowManager.maxSizeDivisor||1,Ad=Ag.getNaturalDimensions(),Ah=Ag.maxWidth||Ae.width/Ab,Ai=Ag.maxHeight||Ae.height/Ab;AU("Natural dimensions: ("+Ad.width+","+Ad.height+")");if(Ag.settings.titleVisible){Ad.width+=20}if(Ad.width>Ah){Ad.width=Ah}if(Ad.height>Ai){Ad.height=Ai}Ag.setDimensions(Ad.width,Ad.height)}function AW(Ae,Ag){var Af=Ae.display,Ab=Ag.getBounds(),Ai=Ae.windowManager,Ah={x1:Af.ulX+(Ai.scrollBorderLeft||50),y1:Af.ulY+(Ai.scrollBorderTop||50),x2:Af.ulX+Af.width-(Ai.scrollBorderRight||50),y2:Af.ulY+Af.height-(Ai.scrollBorderBottom||50)},Ac=0,Ad=0;AU("Map bounds: ("+Ah.x1+","+Ah.y1+","+Ah.x2+","+Ah.y2+")");AU("Wnd bounds: ("+Ab.x1+","+Ab.y1+","+Ab.x2+","+Ab.y2+")");AU("Wnd (width,height): ("+Ag.settings.width+","+Ag.settings.height+")");if(Ab.x1<Ah.x1){Ac=Ab.x1-Ah.x1}else{if(Ab.x2>Ah.x2){Ac=Ab.x2-Ah.x2}}if(Ab.y1<Ah.y1){Ad=Ab.y1-Ah.y1}else{if(Ab.y2>Ah.y2){Ad=Ab.y2-Ah.y2}}AU("Map slide (deltax, deltay)=("+Ac+","+Ad+")");if(Ac||Ad){Ae.slideMapToPoint(Af.width/2+Ac,Af.height/2+Ad)}}AX.extend(AX.WindowManager.prototype,{onPoiMouseOver:function(Ab,Ac){var Ad=this;if(Ab.infoWindow){return }if(!Ab._isRollover){Ab._isRollover=0}AU("WindowManager.onPoiMouseOver("+Ac+") - counter="+Ab._isRollover);if(!Ac){setTimeout(function(){Ab._isRollover-=1;if(Ab._isRollover<=0){Ad.close("rolloverwindow",Ab);Ab._isRollover=0;var Ae=new AV("MQA.BasicWindowManager.closePoiRollover");Ae.srcObject=Ab;AO(Ab,"rolloverclose",Ae)}},50)}else{Ab._isRollover+=1;if(Ab._isRollover==1){if(Ab.infoContentHTML||Ab.infoTitleHTML||Ab.rolloverContent){this.closeAll("rolloverwindow");this.openPoiRollover(Ab)}}}},onPoiActivate:function(Ab,Ad){if(!Ab.infoContentHTML&&!Ab.infoTitleHTML){return }this.closeAll("rolloverwindow");var Ac=Ab.infoWindow;if(Ac){AU("Bring poi infowindow to front.");Ac.bringToFront();return }this.openPoiWindow(Ab,Ad)},openPoiRollover:AP(function(Ab){if(Ab.infoWindow||!Ab._isRollover){return }var Ad=this,Ae=new AX.BasicWindow();Ae.settings.titleVisible=false;Ae.settings.rollover=true;Ab.rolloverWindow=Ae;AT(Ae,"onEvent","after",this,"_onRolloverEvent",Ab);AS(Ab,Ae);Ae.setCloseVisible(false);this.open("rolloverwindow",Ab,Ae);AQ(this.map,Ab,Ae);Ae.setVisible(true);var Ac=new AV("MQA.BasicWindowManager.openPoiRollover",Ab);AO(Ab,"rolloveropen",Ac)}),_onRolloverEvent:function(Ab,Ad,Ac){AU("[basicwm] _onRolloverEvent "+Ad);switch(Ad){case"mouseoverstate":this.onPoiMouseOver(Ab,Ac.isOver);break;case"click":this.onPoiActivate(Ab,true);break}},openPoiWindow:AP(function(Ab,Ae){if(Ab.infoWindow){return }AX.Log.debug("Open info window for poi");AU("Open rollover window for poi");var Ad;Ad=new AX.BasicWindow();Ab.infoWindow=Ad;AY(Ab,Ad);this.closeAll("infowindow");this.open("infowindow",Ab,Ad);AQ(this.map,Ab,Ad);Ad.setVisible(true);if(!Ae){AW(this.map,Ad)}var Ac=new AX.Event("MQA.BasicWindowManager.infoWindowOpen");Ac.srcObject=Ab;AX.EventManager.trigger(Ab,"infowindowopen",Ac)}),resizePoiWindow:function(Ac,Ae,Ab){var Ad=this.find("infowindow",Ac);Ad.setDimensions(Ad.settings.width+Ae,Ad.settings.height+Ab)}});Aa(AX.TileMap.prototype,{onZoomStart$After:function(){this.windowManager.closeAll()}});Aa(AX.Poi.prototype,{toggleInfoWindow:function(){var Ab=this._isRollover>0?true:false;if(Ab){this.map.windowManager.close("rolloverwindow",this)}if(!this.infoWindow){this.map.windowManager.openPoiWindow(this,true)}else{this.map.windowManager.close("infowindow",this)}},toggleInfoWindowRollover:function(){if(this.infoWindow){this.map.windowManager.close("infowindow",this)}if(!this._isRollover){this._isRollover=0}var Ab=this._isRollover==0?true:false;this.map.windowManager.onPoiMouseOver(this,Ab)},dispose$Before:function(){if(!this.map){return }var Ab=this.map.windowManager;Ab.close("rolloverwindow",this);Ab.close("infowindow",this)},onEvent$After:function(Ad,Ab){if(!this.getInfoTitleHTML()&&!this.getInfoContentHTML()&&!this.getRolloverContent()){return }if(Ad=="click"&&!this.getInfoContentHTML()){return }var Ac=this.map.windowManager;switch(Ad){case"mouseover":if(this._isMouseOver||this._dragging){return }this._isMouseOver=true;Ac.onPoiMouseOver(this,true);break;case"mouseout":if(this._isMouseOver){this._isMouseOver=false;Ac.onPoiMouseOver(this,false)}break;case"click":Ac.onPoiActivate(this,true);break;case"dragstart":Ac.close("rolloverwindow",this);Ac.close("infowindow",this);break;case"move":Ac.close("rolloverwindow",this);if(this.infoWindow){AQ(this.map,this,this.infoWindow)}break}},onWindowClose:function(Ab){AX.Log.debug("POI notified of window close.");if(Ab===this.infoWindow){delete this.infoWindow}if(Ab===this.rolloverWindow){delete this.rolloverWindow;this._isRollover=0}}});AX.Loader._moduleLoaded("basicwindowmanager")})()})(MQA);
