/**
 * 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(AL){var AC=function(AQ){};var x=function(){};AL.Log={debug:AC,handleError:x};function AO(){}function w(){return function(){}}function AH(AR,AS){var AT={};for(var AQ in AS){if(!AT[AQ]){AR[AQ]=AS[AQ]}}return AR}function j(AQ){var AR=function(){var AS,AT,AV=arguments.callee,AU;AS=AV.__before__;if(AS){for(AT=AS.length-1;AT>=0;AT--){AS[AT].apply(this,arguments)}}AU=AQ.apply(this,arguments);AS=AV.__after__;if(AS){for(AT=0;AT<AS.length;AT++){AS[AT].apply(this,arguments)}}return AU};AR.__aopwrapper__=true;return AR}function K(AQ){var AR=AQ.indexOf("$");if(AR>0){return{name:AQ.substring(0,AR),advice:AQ.substring(AR+1).toLowerCase()}}else{return{name:AQ}}}function D(AT,AU,AS,AV){var AQ=AV[AT],AR;if(AQ===undefined){AQ=AO}if(!AV.hasOwnProperty(AT)||!AQ.__aopwrapper__){AR=j(AQ);AV[AT]=AR}else{AR=AQ}switch(AU){case"before":if(!AR.__before__){AR.__before__=[AS]}else{AR.__before__.push(AS)}break;case"after":if(!AR.__after__){AR.__after__=[AS]}else{AR.__after__.push(AS)}break}}function B(AR,AS){var AW,AT={},AQ,AV,AU;for(AW in AS){if(AT[AW]){continue}AU=K(AW);AQ=AS[AW];if(!AU.advice){AR[AW]=AQ}else{D(AU.name,AU.advice,AQ,AR)}}return AR}function AM(AR,AQ,AT,AS){D(AQ,AT.toLowerCase(),AS,AR)}function o(AR,AU,AW,AS,AT){var AV,AQ=[];for(AV=5;AV<arguments.length;AV++){AQ.push(arguments[AV])}AM(AR,AU,AW,function(){var AX=AQ.concat();for(AV=0;AV<arguments.length;AV++){AX.push(arguments[AV])}return AS[AT].apply(AS,AX)})}AL.extend=AH;AL.mixin=B;AL.attach=AM;AL.connect=o;var z,H,AD;function M(AQ){return typeof (AQ)=="function"}function Z(AQ){return typeof (AQ)=="undefined"}function b(AQ){return typeof AQ!="string"?false:!!AQ.match(/^\$id\$/)}function J(AS){var AQ=0,AR=0;do{AQ+=AS.offsetTop||0;AR+=AS.offsetLeft||0;AS=AS.offsetParent}while(AS);return{x:AR,y:AQ}}function AI(AS,AU){var AT=J(AS),AQ=0,AR=0;if(AU.pageX||AU.pageY){AQ=AU.pageX;AR=AU.pageY}else{if(AU.clientX||AU.clientY){AQ=AU.clientX+(document.body.scrollLeft||0)+(document.documentElement.scrollLeft||0);AR=AU.clientY+(document.body.scrollTop||0)+(document.documentElement.scrollTop||0)}}AT.x=AQ-AT.x;AT.y=AR-AT.y;return AT}function q(AR,AQ){var AS=w();AS.prototype=AR.prototype;return(AQ)?B(new AS(),AQ):new AS()}function A(AQ){return(z.ie6)?AQ.replace(".png",".gif"):AQ}function L(AQ){if(z.ie6){AQ.className=AQ.className+" mqaie6"}return AQ}function E(AR){var AQ=0;if(AR.offsetWidth){if(AR.scrollWidth&&(AR.offsetWidth!=AR.scrollWidth)){AQ=AR.scrollWidth}else{AQ=AR.offsetWidth}}else{if(AR.clip&&AR.clip.width){AQ=AR.clip.width}else{if(AR.style&&AR.style.pixelWidth){AQ=AR.style.pixelWidth}}}return parseInt(AQ,10)}function N(AR){var AQ=0;if(AR.offsetHeight){AQ=AR.offsetHeight}else{if(AR.clip&&AR.clip.height){AQ=AR.clip.height}else{if(AR.style&&AR.style.pixelHeight){AQ=AR.style.pixelHeight}}}return parseInt(AQ,10)}function t(AR,AS){if(AR.type!="mouseout"&&AR.type!="mouseover"){return false}var AQ=AR.relatedTarget?AR.relatedTarget:AR.type=="mouseout"?AR.toElement:AR.fromElement;while(AQ&&AQ!=AS){AQ=AQ.parentNode}return(AQ!=AS)}function d(AQ){function AR(AS){var AT=String(AS).toUpperCase();return AT.length==1?"0"+AT:AT}if(!AQ){return"#000000"}if(typeof (AQ)=="object"){return"#"+AR(AQ[0])+AR(AQ[1])+AR(AQ[2])}else{return AQ}}AL.Util={};(function(){var AR=1;H=function(AU){if(AU.guid){return AU.guid}var AT=AU["$mqa.id$"];if(!AT){AT=("$id$"+(AR++));AU["$mqa.id$"]=AT}return AT};AD=function(){var AT,AU;if(arguments.length==1){AT=arguments[0];AU=(typeof AT=="string")?AL._jsEval("("+AT+")"):AT;return AQ(AU[0],AU[1])}else{if(arguments.length==2){return AQ.apply(null,arguments)}else{}}};function AQ(AY,AU,AT){var Ab,Ac,AW,Aa,AX,AV=arguments.callee,AZ,Ae=(AL.browser.name=="msie");if(!AT){AT={}}function Ad(Aq){var Al=Aq.match(/^([^\#\.]+)(\#([^\.]+))?(\.(.+))?$/),Ap=Al[3],Ai=Al[5],Ar,As=[],Am,Au,Ah,At,An,Ak,Aj,Ao;Aq=Al[1];if(Ae&&Aq=="input"){for(Am=0;Am<Ab.length;Am++){Ah=Ab[Am];At=Ab[++Am];if(Ah=="@type"&&(At=="radio"||At=="checkbox")){Ar=true}if(Ah.charAt(0)=="@"){As[As.length]=[Ah.substring(1),At]}}if(Ar){An=[];Ak=' {field}="{value}"';Aj="<input {attrs}/>";for(Au=0;Au<As.length;Au++){An[An.length]=Ak.replace("{field}",As[Au][0]).replace("{value}",As[Au][1])}Aq=Aj.replace("{attrs}",An.join(""))}}Ao=document.createElement(Aq);if(Ap){AT[Ap]=Ao}if(Ai){Ao.className=Ai}return Ao}function Af(Ai,Aj,Ah){if(Ae&&(Aj=="type")&&((Ah=="checkbox")||(Ah=="radio"))){return }Ai.setAttribute(Aj,Ah)}var Ag=function(Ah){if(Ah.match(/&([A-Za-z0-9#]+);/g)!==null){var Ai=document.createElement("div");Ai.innerHTML=Ah;Ah=Ai.childNodes[0].nodeValue;delete Ai}return Ah};if(typeof (AY)=="string"){AY=Ad(AY);AT.root=AY}for(Ac=0;Ac<AU.length;Ac++){AX=AU[Ac];Aa=typeof (AX);if(Aa=="number"&&AX===0){}else{Ab=AU[++Ac];AW=typeof (Ab);if(AW=="undefined"){continue}if(AW=="object"){AZ=Ad(AX);AV(AZ,Ab,AT);AY.appendChild(AZ)}else{(AX=="text"||AX=="t")?AY.appendChild(document.createTextNode(Ag(Ab))):(AX=="style"||AX=="s")?AY.style.cssText=Ab:(AX=="i")?AY.setAttribute("src",A(Ab)):(AX=="@domid"||AX=="@domId")?AY.id=Ab:(AX.charAt(0)=="@")?Af(AY,AX.substring(1),Ab):AY[AX]=Ab}}}return AT}AH(AL.Util,{objectId:H,isObjectId:b,isFunction:M,isUndefined:Z,getParentOffset:J,getLocalCoords:AI,_getRandomGUID:function(){return"$id$"+(AR++)},subClass:q,html:AD,ie6Image:A,ie6Class:L,getDomWidth:E,getDomHeight:N,isMouseLeaveOrEnter:t,toRadians:function(AT){return AT*0.017453},arcDistance:function(AV,AY,Aa){var Ac=parseFloat(AV.lat);var Ae=parseFloat(AY.lat);var AU=parseFloat(AV.lng);var AX=parseFloat(AY.lng);if(Ac==Ae&&AU==AX){return 0}var AT=AX-AU;var AW=this.toRadians(90-Ac);var AZ=this.toRadians(90-Ae);var Ad=Math.cos(AW)*Math.cos(AZ)+Math.sin(AW)*Math.sin(AZ)*Math.cos(this.toRadians(AT));var Ab=Aa!="m"?6378.160187:3963.205;if(Ad<-1){return 3.14159*Ab}if(Ad>=1){return 0}else{return Math.acos(Ad)*Ab}}});function AS(){var AW={},AU=(navigator.userAgent||"").toLowerCase(),AV=["firefox","msie","netscape","opera","safari"],AX=["linux","mac","windows","x11","iphone","android","webos"],AY,Aa,AT,AZ,Ab;AW.name=AW.version=AW.os="unknown";for(AY=0,Aa=AV.length;AY<Aa;AY++){AT=AU.indexOf(AV[AY])+1;if(AT>0){AW.name=AV[AY];AZ=AT+AW.name.length;Ab=((AW.name=="safari")||(AU.charAt(AZ+4)>0&&AU.charAt(AZ+4)<9))?5:3;AW.version=AU.substring(AZ,AZ+Ab)}}for(AY=0,Aa=AX.length;AY<Aa;AY++){AT=AU.indexOf(AX[AY])+1;if(AT>0){AW.os=AX[AY]}}if(AU.indexOf("ipad")>-1){AW.os="iphone"}if(AW.name=="msie"&&AW.version<7){AW.ie6=true}return AW}z=AS();AL.browser=z;AL.Util.getBrowserInfo=function(){return z};AL.Util.distanceBetween=function(AV,AX,AU){var AU=AU||"MI",AW=(AV.lat-AX.lat)*Math.PI/180,AY=(AV.lng-AX.lng)*Math.PI/180,AT=Math.sin(AW/2)*Math.sin(AW/2)+Math.cos(AV.lat*Math.PI/180)*Math.cos(AX.lat*Math.PI/180)*Math.sin(AY/2)*Math.sin(AY/2),AZ=2*Math.atan2(Math.sqrt(AT),Math.sqrt(1-AT));km=6371;var Aa=(AU=="KM"?km:(km/1.609));return Aa*AZ}})();var l,O,G;(function(){var AR={removeAll:function(AW,AU){var AV,AX=0,AT=AU||0,AY=AW;if(!M(AW)){AY=function(AZ){return AZ==AW}}for(AV=AU||0;AV<this.length;AV++){if(AY(this[AV],AV)){AX++}else{if(AV!=AT){this[AT]=this[AV]}AT++}}this.length-=AX},removeAt:function(AU){var AT,AV=this[AU];for(AT=AU+1;AT<this.length;AT++){this[AT-1]=this[AT]}this.length-=1;return AV},insert:function(AT,AV){var AU;if(AV>=this.length){this[AV]=AT;return }for(AU=this.length;AU>AV;AU--){this[AU]=this[AU-1]}this[AV]=AT},each:function(AU){for(var AV=0;AV<this.length;AV++){try{AU(this[AV],AV)}catch(AT){if(AT===G){return }throw AT}}}};function AQ(AT){var AU=typeof (AT);if(AU=="string"||AU=="number"){return"@$"+AT}else{return"@#"+H(AT)}}function AS(){}AS.prototype={get:function(AT){return this[AQ(AT)]},put:function(AU,AT){AU=AQ(AU);var AV=this[AU];this[AU]=AT;return AV},remove:function(AT){AT=AQ(AT);var AU=this[AT];delete this[AT];return AU},each:function(AT){var AV,AW;for(AV in this){if(AV.charAt(0)=="@"){AW=this[AV];if(AV.charAt(1)=="$"){AV=AV.substring(2)}try{AT(AW,AV)}catch(AU){if(AU==G){return }throw AU}}}}};l=function(AT){if(!AT){AT=[]}AH(AT,AR);return AT};O=function(AT){if(!AT){return new AS()}AH(AT,AS.prototype);return AT}})();AL.Collection={list:l,map:O};var AA;(function(){var Ab={traffic:{depends:["fullUtil","shapes","jsondeserializer","remotecollection"]},streetview360:{depends:["fullUtil","shapes"]},jsondeserializer:{depends:["basedeserializer"]}};if(window.mqaConfig&&window.mqaConfig.modules){AH(Ab,window.mqaConfig.modules)}var AR;function AY(Ac,Ad){AR=Ac;AL.Loader.resourcePath=AA=Ad}function AW(Ac){var Ad=Ab[Ac];if(!Ad){Ad={};Ab[Ac]=Ad}return Ad}function AU(Ac){var Ad=document.createElement("script");Ad.src=Ac;var Ae=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];Ae.appendChild(Ad)}function AT(){var Ae,Af,Ag=[],Ac,Ad=[];for(Ae=0;Ae<arguments.length;Ae++){Af=arguments[Ae];if(typeof Af=="string"){if(Ab[Af]&&Ab[Af].loaded){continue}Ag.push(Af);Ad.push(Af)}else{if(typeof Af=="function"){Ac=Af}break}}Ad.push(Ac);if(Ag.length==0){Ac();return true}else{AZ(Ag[0],function(){AT.apply(null,Ad)})}}function AZ(Ae,Ac){var Ai=AW(Ae),Ag,Ah,Af,Ad;if(Ai.loaded){Ac();return true}Ag=Ai.depends;if(Ag){for(Af=0;Af<Ag.length;Af++){Ah=Ab[Ag[Af]];if(!Ah){Ah={};Ab[Ag[Af]]=Ah}if(!Ah.loaded){AT(Ag[Af],function(){AT(Ae,Ac)});return false}}}if(Ai.waiters){Ai.waiters.push(Ac);return false}else{Ai.waiters=[Ac];Ai.requestTime=new Date().getTime();Ad=Ai.uri?Ai.uri:AR(Ae,"js");AU(Ad,true);return false}}function AS(Ae){var Ag=Ab[Ae],Ah,Ad,Af,Ai;if(!Ag){Ag={};Ab[Ae]=Ag}Ah=Ag.waiters;delete Ag.waiters;Ag.loaded=true;if(!Ah){return }for(Af=0;Af<Ah.length;Af++){Ai=Ah[Af];if(typeof (Ai)=="function"){try{Ai()}catch(Ac){Ad=Ac}}}if(Ad){throw Ad}}function AV(Ac){var Ad=document.createElement("style"),Ae=document.getElementsByTagName("head")[0];if(!Ae){return }if(z.name=="msie"){Ad.setAttribute("type","text/css");Ad.styleSheet.cssText=Ac}else{Ad.appendChild(document.createTextNode(Ac))}if(Ae.firstChild){Ae.insertBefore(Ad,Ae.firstChild)}else{Ae.appendChild(Ad)}}function AQ(Ac){var Ad=document.createElement("link"),Ae=document.getElementsByTagName("head")[0];Ad.setAttribute("rel","stylesheet");Ad.setAttribute("href",Ac);if(!Ae){return }if(Ae.firstChild){Ae.insertBefore(Ad,Ae.firstChild)}else{Ae.appendChild(Ad)}}function Aa(Ag,Ae){var Ah=AW(Ag),Ad,Af,Ac;if(Ah.cssLoaded){return }if(Ah.cssText){AV(Ah.cssText)}else{AQ(AR(Ag,"css"))}if(Ae&&!Ah.cssText){AV(Ae)}Ah.cssLoaded=true}function AX(Ad,Ac){AW(Ad).cssText=Ac}AL.Loader={_initialize:AY,_moduleLoaded:AS,withModule:AT,requireCss:Aa,registerCss:AX,prependCss:AV,resourcePath:AA,isLoaded:function(Ac){var Ad=Ab[Ac];return Ad||Ad.loaded},registerModules:function(Ac){AH(Ab,Ac)}};AL.withModule=AT})();(function(){var AW,AR="",AS,AT,AQ,AX=document.getElementsByTagName("script");for(AW=0;AW<AX.length;AW++){AS=AX[AW];AT=AS.src;if(!AT){continue}AQ=AT.indexOf("mqa.");if(AQ>=0&&AT.lastIndexOf("/")<AQ){AR=AT.substring(0,AQ);break}}function AU(AZ,AY){if(AZ=="IMCPlayer"){setTimeout(function(){AL.Loader._moduleLoaded("IMCPlayer")},2000);return"http://"+STREETVIEWORIGINSERVER+"/sv/ac/"+STREETVIEWPLAYERVERSION+"/implayer.js"}else{return AR+"mqa.module."+AZ+"."+AY}}function AV(AY){return AR+AY}AL.Loader._initialize(AU,AV)})();(function(){function Ah(Ak,Al){var Ai=(Ak+90)*(AL.PIXERSPERLATDEGREE/Al);var Aj=parseInt(Ai/AL.TILESIZE);return Aj}function AQ(Ak,Al){var Ai=(Ak+90)*(AL.PIXERSPERLATDEGREE/Al);var Aj=parseInt(Ai/AL.TILESIZE);return ret=(Ai-Aj*AL.TILESIZE)}function AT(Ak,Ai){var Al=(Ak+180)*(AL.PIXERSPERLNGDEGREE/Ai);var Aj=parseInt(Al/AL.TILESIZE);return Aj}function Ad(Ak,Ai){var Al=(Ak+180)*(AL.PIXERSPERLNGDEGREE/Ai);var Aj=parseInt(Al/AL.TILESIZE);return(Al-Aj*AL.TILESIZE)}function Ab(Am,Al,Aj){var Ai=Am*AL.TILESIZE+Al;var Ak=Ai/(AL.PIXERSPERLATDEGREE/Aj)-90;Ak=parseInt(Ak*1000000)/1000000;return Ak}function AW(Ak,Aj,Ai){var Al=Ak*AL.TILESIZE+Aj;var Am=Al/(AL.PIXERSPERLNGDEGREE/Ai)-180;Am=parseInt(Am*1000000)/1000000;while(Am>180){Am-=360}while(Am<-180){Am+=360}return Am}__nextId=0;function Aa(Aj){this.display=Aj;var Ai=document.createElement("div");Ai.style.position="absolute";Ai.style.backgroundImage="url("+AL.RESOURCES+"loading.gif)";Ai.style.backgroundRepeat="repeat";Aj.zlevel("background").appendChild(Ai);this.div=Ai}Aa.prototype={setViewport:function(Al,Ai,Ak,Am){if(Al>=this.ulX&&Ai>=this.ulY&&(Al+Ak)<=(this.ulX+this.width)&&(Ai+Am)<=(this.ulY+this.height)){return }var Aj=this.display.transform.displayToGridCoord(Al,Ai);this.ulX=Aj.ulX-2*Aj.gridSize;this.ulY=Aj.ulY-2*Aj.gridSize;this.width=Ak+4*Aj.gridSize;this.height=Am+4*Aj.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 AU(Ai,Ak,Aj){return Ai+":"+Aj+":"+Ak}function Ae(Ai){}Ae.prototype={initialize:function(Ai){this.parent=Ai},dispose:function(){},setup:function(Ai,Ak,An,Aj,Al,Ap,Ao,Am){},hide:function(){}};function AR(){}AR.prototype=new Ae();AR.prototype.initialize=function(Ai){this.parent=Ai;var Aj=document.createElement("img");Aj.style.position="absolute";Aj.style.visibility="hidden";Aj.style.display="block";Aj.setAttribute("unselectable","on");Aj.setAttribute("galleryimg","no");Aj.style.MozUserSelect="none";this.parent.elt.appendChild(Aj);this.elt=Aj};AR.prototype.dispose=function(){this.elt.parentNode.removeChild(this.elt)};AR.prototype.hide=function(){this.elt.style.visibility="hidden";this.elt.style.display="none"};AR.prototype.setup=function(Ai,Ak,An,Aj,Al,Ap,Ao,Am){this.key=Ai;if(Ak>=0&&An>=0){this.setupImage(this.elt,Ak,An,Ap,Ao);if(this.elt.src!=""){this.elt.style.left=Aj+"px";this.elt.style.top=Al+"px";this.elt.style.width=Am+"px";this.elt.style.height=Am+"px";this.elt.style.display="block";this.elt.style.visibility="";this.elt.style.display=""}}else{this.elt.display="none"}};AR.prototype.setupImage=function(Al,Am,Ai,Ak,Aj){Al.src=AL.RESOURCES+"loading.gif"};function AV(Aj,Ai){return function(As,Ak,Ao,Ap,At){var Al=Ak,Am=Ao,Aq,Ar,An="";while(Al<0){Al+=AL.MODS[Ap]}while(Al>=AL.MODS[Ap]){Al-=AL.MODS[Ap]}Aq=Math.floor(Al/1000);Ar=Math.floor(Am/1000);if(typeof TILEVERSION!="undefined"&&TILEVERSION!="default"){An=["http://",MAPSERVER[Ak%MAPSERVER.length],"/tiles/std/",TILEVERSION,"/",Aj,"?s=",At,"&y=",Am,"&x=",Al].join("")}else{An=["http://",MAPSERVER[Ak%MAPSERVER.length],"/",Aj,"/Scale",At,"/",Ar,"/",Am-Ar*1000,"/",Aq,"/",Al-Aq*1000,".",Ai].join("")}if(As.src){As.src=AL.RESOURCES+"loading.gif"}As.src=An}}function AY(){}AY.prototype=new AR();AY.prototype.setupImage=AV("map","gif");function Af(){}Af.prototype=new AR();Af.prototype.setupImage=AV("sat","jpg");function Ag(){}Ag.prototype=new AR();Ag.prototype.setupImage=AV("hyb","gif");function AZ(Aj,Ai){this.display=Aj;this.tileCtor=Ai||Ae;var Ak=document.createElement("div");Ak.style.position="absolute";Aj.zlevel("tiles").appendChild(Ak);this.elt=Ak;this.tileBucket={};this.extraTiles=[];this.enabled=false}AZ.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 Aj,Ak,Al=this.tileBucket,Ai=this.extraTiles;this.tileBucket={};this.extraTiles=[];for(var Aj in Al){var Ak=Al[Aj];if(Ak&&(Ak instanceof Ae)){Ak.dispose()}}for(Aj=0;Aj<Ai.length;Aj++){Ai[Aj].dispose()}},setViewport:function(A3,A7,Az,A6){if(!this.enabled){return }var A9=this.display.transform,Ar=A9.displayToGridCoord(A3,A7),A0=A3+Az,A2=A7+A6,A5=Math.ceil((A0-A3)/Ar.gridSize),BB=Math.ceil((A2-A7)/Ar.gridSize),BD,Ay,A8,Al,At,Ao,Ap=A9.zoom,Aq=A9.scale,Ai,BE,Au,Av,A4,Ak,Aj,Am=this.extraTiles,Aw=this.tileBucket,BC={},A1=0,As=0;function An(){var BH=A4,BG=0;while(BC[A4]){A4=BH+":"+(BG++)}var BF=Aw[A4];if(!BF||A9.zoom==1){BF=Am.pop();if(!BF){BF=new this.tileCtor();BF.initialize(this);A1+=1}else{As+=1}BF.setup(A4,Ak,Aj,Au,Av,Ap,Aq,Ar.gridSize)}else{delete Aw[A4]}BC[A4]=BF}BD=Ar.row+1;Ay=BD-BB-1;A8=Ar.col-1;Al=A8+A5+1;At=Ar.ulX-Ar.gridSize*1;Ao=Ar.ulY-Ar.gridSize*1;for(var Ai=A8;Ai<=Al;Ai++){Ak=A9.normalizeCol(Ai);Au=At+(Ai-A8)*Ar.gridSize;for(var BE=BD;BE>=Ay;BE--){Aj=BE;Av=Ao+(BD-BE)*Ar.gridSize;A4=AU(Aq,Ak,Aj);An.call(this)}}this.tileBucket=BC;for(var Ax in Aw){var BA=Aw[Ax];if(BA&&(BA instanceof Ae)){if(Am.length<32){Am.push(BA)}else{BA.dispose()}}}}};function AX(Aj,An,Ak,Am,Ai,Al){this.zoom=Aj;this.scale=An;this.refLat=parseFloat(Ak);this.refLng=parseFloat(Am);this.leftOffset=Ai;this.topOffset=Al;this.ulXRefGrid=-Math.round(Ad(Am,An));this.ulYRefGrid=-(AL.TILESIZE-Math.round(AQ(Ak,An)));this.colRefGrid=AT(Am,An);this.rowRefGrid=Ah(Ak,An);this.colMax=AT(180,An);this.rowMax=Ah(90,An)}AX.prototype={displayToGridCoord:function(Ak,Al){var Aq=Ak-this.ulXRefGrid,Aj=Al-this.ulYRefGrid,An=Math.floor((Math.abs(Aq)/256)*(Aq>=0?1:-1)),Ao=Math.floor((Math.abs(Aj)/256)*(Aj>=0?1:-1)),Ap=this.ulXRefGrid+An*256,Ai=this.ulYRefGrid+Ao*256;var Am={ulX:Ap,ulY:Ai,dx:Aq,dy:Aj,x:Ak-Ap,y:Al-Ai,nx:An,ny:Ao,col:this.normalizeCol(this.colRefGrid+An),row:(this.rowRefGrid-Ao),gridSize:256};return Am},normalizeCol:function(Ai){while(Ai<0){Ai+=this.colMax+1}while(Ai>this.colMax){Ai-=this.colMax+1}return Ai},displayToLatLng:function(Ak,Ai){var Aj=this.displayToGridCoord(Ak,Ai);return{lat:Ab(Aj.row,AL.TILESIZE-Aj.y,this.scale),lng:AW(Aj.col,Aj.x,this.scale)}},latLngToDisplay:function(Am,Ak){if(Am&&(typeof Am=="string")){Am=parseFloat(Am)}if(Ak&&(typeof Ak=="string")){Ak=parseFloat(Ak)}var An=this.scale,Ao=-Math.round(Ad(Ak,An)),Ap=-(AL.TILESIZE-Math.round(AQ(Am,An))),Ai=AT(Ak,An),Aq=Ah(Am,An),Aj=(Ai-this.colRefGrid)*AL.TILESIZE+this.ulXRefGrid-Ao,Al=(this.rowRefGrid-Aq)*AL.TILESIZE+this.ulYRefGrid-Ap;return{x:Aj,y:Al}}};function Ac(Ai,Aj){this.map=Ai;this.elt=Aj;this.layers={};this.zlevels=[]}Ac.prototype={zlevel:function(Ai,Ak){var Al,Aj=this.zlevels,Am;Ai=s(Ai)||0;for(Al=0;Al<Aj.length;Al++){Am=Aj[Al];if(Am._z==Ai&&Am._f==!!Ak){return Am}}Am=document.createElement("div");Am.className="mqa-zl mqa-zl"+Ai+(Ak?" mqa-zlf":" mqa-zlgl");Am._z=Ai;Am._f=!!Ak;Am.style.position="absolute";Am.style.zIndex=Ai;if(!Ak&&this._inited){Am.style.left=this.left+"px";Am.style.top=this.top+"px"}Aj.push(Am);this.elt.appendChild(Am);return Am},findParent:function(Ai){while(Ai){if(Ai.parentNode===this.elt){return Ai}Ai=Ai.parentNode}return null},ancestorEventCoords:function(Aj){var Ai=AI(this.elt,Aj);dspX=this.ulX+Ai.x,dspY=this.ulY+Ai.y;return{screen:Ai,display:{x:dspX,y:dspY},latLng:this.transform.displayToLatLng(dspX,dspY)}},addLayer:function(Aj,Ak){this.removeLayer(Aj);this.layers[Aj]=Ak;try{if(Ak.resetTransform){Ak.resetTransform(this.transform)}if(Ak.setViewport){Ak.setViewport(this.ulX,this.ulY,this.width,this.height)}}catch(Ai){x("setViewport layer "+Aj,Ai)}},removeLayer:function(Ak){var Aj=this.layers[Ak];if(Aj&&Aj.dispose){try{Aj.dispose()}catch(Ai){x("dispose layer "+Ak,Ai)}delete this.layers[Ak]}},eachLayer:function(Ak){var Ai,Aj;for(Ai in this.layers){Aj=this.layers[Ai];if(Aj&&typeof (Aj)=="object"){Ak(Aj,Ai)}}},invalidateLayer:function(Ai){if(typeof (Ai)=="string"){Ai=this.layers[Ai]}if(!Ai){return }Ai.setViewport(this.ulX,this.ulY,this.width,this.height)},createTransform:function(Aj,An,Ak,Am,Ai,Al){Ak=parseFloat(Ak);Am=parseFloat(Am);return new AX(Aj,An,Ak,Am,Ai,Al)},initTransform:function(Aq,An,Am,Al,Ap,Ai){var Ak=Ap/2,Aj=Ai/2,Ao=this.createTransform(Aq,An,Am,Al,Ak,Aj);this.cancelDrag();this.transform=Ao;this.eachLayer(function(Ar){if(Ar.resetTransform){Ar.resetTransform(Ao)}});this.setViewport(-Ak,-Aj,Ap,Ai,true)},setViewport:function(Ak,An,Ai,Al){var Aj,Ao=this.zlevels,Am;this._inited=true;if(typeof (Ai)=="undefined"){Ai=this.width}if(typeof (Al)=="undefined"){Al=this.height}this.width=Ai;this.height=Al;this.ulX=Ak;this.ulY=An;this.left=-Ak;this.top=-An;for(Aj=0;Aj<Ao.length;Aj++){Am=Ao[Aj];if(!Am._f){Am.style.left=this.left+"px";Am.style.top=this.top+"px"}}this.eachLayer(function(Aq,Ar){try{if(Aq.setViewport){Aq.setViewport(Ak,An,Ai,Al)}}catch(Ap){}})},startDrag:function(Ai,Ak){var Ao=this,Al=this.ancestorEventCoords(Ai);this.cancelDrag();var Aj=Al.display;Ai=null;Ak.startXY=Aj;Ak.startLatLng=Al.latLng;Ak.dragXY=Aj;Ak.dragLatLng=Ak.startLatLng;function Am(At){if(!At){At=window.event}var Ap=At.type,As=Ao.ancestorEventCoords(At),Aq=0,Ar=0;Ak.dragXY=As.display;Ak.dragLatLng=As.latLng;Aq=Math.abs(Ak.dragXY.x-Ak.startXY.x);Ar=Math.abs(Ak.dragXY.y-Ak.startXY.y);if(Ap=="mousemove"&&(Aq>5||Ar>5)){if(Ak.dragMove){Ak.dragMove()}}else{if(Ap=="mouseup"){An();if(Ak.dragEnd){Ak.dragEnd(At)}}}P(At)}AF(document,"mousemove",Am);AF(document,"mouseup",Am);function An(){C(document,"mousemove",Am);C(document,"mouseup",Am);Ao.currentDrag=null}Ak.display=this;Ak.cancelDrag=function(){An();if(Ak.dragCancelled){Ak.dragCancelled()}};this.currentDrag=Ak;if(Ak.dragStart){Ak.dragStart()}},cancelDrag:function(){if(this.currentDrag){this.currentDrag.cancelDrag()}}};function AS(Am,Aj,Ai){if(arguments.length==0){return }var Al;Al=document.createElement("div");Al.style.width=Am.style.width;Al.style.height=Am.style.height;Al.style.zIndex=0;Al.style.overflow="hidden";Al.style.background="#FFFFFF";Al.style.position="relative";Al.style.top="0px";Al.style.left="0px";Am.style.position="relative";Am.appendChild(Al);this.parent=Al;this.width=parseInt(Al.style.width);this.height=parseInt(Al.style.height);this.zoom=(Aj>16)?16:parseInt(Aj);this.scale=AL.SCALES[this.zoom];this.tilesize=256;this.centerlat=Ai.lat;this.centerlng=Ai.lng;var Ak=document.createElement("div");Ak.className="mqa-display";Ak.style.position="absolute";Ak.style.zIndex=0;Al.appendChild(Ak);this.display=new Ac(this,Ak);this.display.initTransform(this.zoom,this.scale,Ai.lat,Ai.lng,this.width,this.height)}AS.prototype={};AL.Kernel={CoreMap:AS,LoadingLayer:Aa,Tile:Ae,ImageTile:AR,MqMapImageTile:AY,MqSatImageTile:Af,MqStrlblImageTile:Ag,TileLayer:AZ,debug:AC,handleError:x}})();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,tracker_360:85,hover_poi:85,streetview360path:500,active_poi:81,mqa_searchlayer_poi:2500};function s(AQ){var AR;if(!AQ){return 0}if(typeof AQ=="string"){AR=I[AQ];if(!AR){return 0}AQ=AR}else{AQ=parseInt(AQ)||0}return AQ}function Y(AQ,AR){if(AQ){AQ.style.zIndex=s(AR)}}AL.ZIndex={absolutize:s,set:Y,Registry:I};var R,AJ,AF,C,S,n,i,F,W,p,P,v,r,AN=AO,V,AP,AE,u,e,a,X,c,AK,h;(function(){AJ={};var AT=false,AX=false,AZ=[],AW=[],Aa=false;function AY(){if(!Aa&&document.body){Aa=true;if(document.body.attachEvent){document.body.attachEvent("onunload",AS)}else{document.body.addEventListener("onunload",AS,false)}}}function AR(){AT=true;AY();for(var Ac=0;Ac<AZ.length;Ac++){AZ[Ac]()}}function AS(){}AJ._onUnload=function(){if(AX){return }if(window.detachEvent){window.detachEvent("onload",AR);window.detachEvent("onunload",AS);if(document.body){document.body.detachEvent("onunload",AS)}}for(var Ad=0;Ad<AW.length;Ad++){var Ae=AW[Ad];try{AW[Ad]();if(Ae){AW[Ad]()}}catch(Ac){}}AX=true};AJ.addOnUnload=i=function(Ac){AW.push(Ac)};EventUtil_$=function(Ac){return(typeof Ac=="string")?document.getElementById(Ac):Ac};EventUtil_processEventName=function(Ac,Ad){return(Ad=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||Ac.attachEvent))?"keydown":Ad};AJ.observe=AF=function(Ac,Ad,Ae){Ac=EventUtil_$(Ac);Ad=EventUtil_processEventName(Ac,Ad);AJ._observe(Ac,Ad,Ae);return Ae};AJ.stopObserving=C=function(Ac,Ad,Ae){Ac=EventUtil_$(Ac);Ad=EventUtil_processEventName(Ac,Ad);AJ._stopObserving(Ac,Ad,Ae)};var AV=navigator.appVersion;var AQ;if(AV.match(/\bMSIE\b/)&&window.attachEvent){AQ=parseFloat(AV.split("MSIE ")[1].split(";")[0]);if(AQ){var Ab=[];AJ._observe=function(Ac,Ad,Af){Ac.attachEvent("on"+Ad,Af);var Ae=Ab.length;Ab[Ae]=[Ac,Ad,Af];Af["__ie6_"+Ad]=Ae};AJ._stopObserving=function(Ad,Ae,Ag){try{Ad.detachEvent("on"+Ae,Ag)}catch(Ac){}var Af=Ag["__ie6_"+Ae];if(Af){delete Ab[Af]}};i(AJ._evUnloadFcn=function(){for(var Ad in Ab){var Ae=Ab[Ad];if(typeof Ae=="object"&&Ae.length==3){delete Ab[Ad];try{Ae[0].detachEvent("on"+Ae[1],Ae[2])}catch(Ac){}}}})}else{AJ._observe=function(Ac,Ad,Ae){Ac.attachEvent("on"+Ad,Ae)};AJ._stopObserving=function(Ad,Ae,Af){try{Ad.detachEvent("on"+Ae,Af)}catch(Ac){}}}}else{AQ=false;AJ._observe=function(Ac,Ad,Ae){Ac.addEventListener(Ad,Ae,false)};AJ._stopObserving=function(Ac,Ad,Ae){Ac.removeEventListener(Ad,Ae,false)}}var AU=[];AJ.addDtor=S=function(Ac,Ae){var Ad=AU.length,Af;if(arguments.length>1){Af=[Ac,Ae]}else{Af=[Ac]}AU[Ad]=Af;return Ad};AJ.delDtor=n=function(Ac){delete AU[Ac]};AJ._dtorHandler=function(){AJ._inGlobalDtor=true;var Ad,Ae;for(Ad in AU){Ae=AU[Ad];if(Ae&&(typeof Ae=="object")&&Ae.length){try{if(Ae.length==1){Ae[0].call(null)}else{Ae[0][Ae[1]].call(Ae[0])}}catch(Ac){}try{delete AU[Ad]}catch(Ac){}}}};AF(window,"unload",AJ._onUnload);i(AJ._dtorHandler)})();R=AJ;AL.EventUtil=R;AL._prEvent=R;AJ.element=F=function(AQ){return AQ.target||AQ.srcElement};AJ.isLeftClick=W=function(AQ){return((AQ.which&&(AQ.which==1))||(AQ.button&&(AQ.button==1)))};AJ.isRightClick=p=function(AQ){return((AQ.which&&(AQ.which==3))||(AQ.button&&(AQ.button==2)))||((AQ.which==1&&AQ.ctrlKey))};AJ.stop=P=function(AQ){try{AQ.cancelBubble=true;if(AQ.preventDefault){AQ.preventDefault();AQ.stopPropagation()}else{AQ.returnValue=false}}catch(AR){}};AJ.falseFunction=v=function(){return false};AJ.unselectable=r=function(AQ){AQ.onselectstart=v;AQ.unselectable=true;AQ.style.MozUserSelect="none"};AJ.hitch=V=function(AS,AR){var AQ=[];for(var AT=2;AT<arguments.length;AT++){AQ.push(arguments[AT])}return function(){var AU=[];for(var AV=0;AV<arguments.length;AV++){AU.push(arguments[AV])}return AS[AR].apply(AS,AQ.concat(AU))}};AJ.bind=AP=function(AQ,AR){return function(){return AQ[AR].apply(AQ,arguments)}};e=AJ.EventCallback=function(AS,AR){var AQ=AS;return function(AT){if(AQ.turnEventsOff||(AQ.map&&AQ.map.turnEventsOff)){return }if(!AT){AT=window.event}AQ[AR](AT)}};AJ.AddDOMEventProtocol=AE=function(AQ){B(AQ,{addDOMEvent:function(){if(!this._domSubs){this._domSubs=[]}var AT,AR=this._domWired,AS,AU,AW,AV=this._domSubs;outer:for(AS=0;AS<arguments.length;AS++){AT=arguments[AS];for(AW=0;AW<AV.length;AW++){if(AV[AW]==AT){continue outer}}AV.push(AT);if(AR){for(AU=0;AU<AR.length;AU++){AF(AR[AU],AT,AR._h)}}}},_wireDOMEvents:function(AS){var AR=this._domWired,AU=this._domSubs,AT;if(!AR){AR=this._domWired=l();AR._h=e(this,"_onDOMEvent")}AR.push(AS);if(AU){for(AT=0;AT<AU.length;AT++){AF(AS,AU[AT],AR._h)}}},_unwireDOMEvents:function(AS){var AR=this._domWired,AU=this._domSubs,AT,AV;if(arguments.length==0){if(AR&&AU){for(AT=0;AT<AR.length;AT++){for(AV=0;AV<AU.length;AV++){C(AR[AT],AU[AV],AR._h)}}}this._domWired=null}else{if(AR){AR.removeAll(function(AW){if(AW===AS){for(AV=0;AV<AU.length;AV++){C(AW,AU[AV],AR._h)}}})}}},dispose$Before:function(){this._unwireDOMEvents()}});if(!AQ._onDOMEvent){AQ._onDOMEvent=function(){}}AQ=null};AL.Event=u=function(AQ,AR){this.type="event";this.srcObject=AR;if(arguments.length){this.eventName=AQ}else{this.eventName="unnamed event"}};AL.EventManager=a=new function(){var AQ={};function AR(AS){var AT=H(AS),AU=AQ[AT];if(!AU){AU={};AQ[AT]=AU}return AU}this.addListener=X=function(AU,AX,AW,AS){AX=AX.toLowerCase();var AT=AR(AU),AV=AT[AX];if(!AV){AV=[];AT[AX]=AV}AV.push([AW,AS]);return AW};this.removeListener=c=function(AU,AY,AX,AS){AY=AY.toLowerCase();var AT=AR(AU),AV=AT[AY],AZ,AW;if(!AV){return }for(AZ=0;AZ<AV.length;AZ++){AW=AV[AZ];if(AW[0]===AX&&AW[1]===AS){AV.splice(AZ,1)}}};this.clearListeners=AK=function(AT,AU){AU=AU.toLowerCase();var AS=AR(AT);delete AS[AU]};this.clearAllListeners=EventManager_clearAllListeners=function(AS){var AT=H(AS);delete AQ[AT]};this.trigger=h=function(AT,AY,AV){AY=AY.toLowerCase();var AS=AR(AT),AU=AS[AY],AZ,AW,AX;if(AU){for(AZ=0;AZ<AU.length;AZ++){AW=AU[AZ];AX=AW[0];if(AX){AX.call(AW[1],AV)}}}if(typeof AT.onEvent=="function"){AT.onEvent(AY,AV)}}};var g;(function(){var AX=window.MQA,AS=AX.Kernel.debug;AX.MapLogo={MAPQUEST:0,SCALES:1,MAPQUEST_COPYRIGHT:2,NAVTEQ_COPYRIGHT:3,ICUBED_COPYRIGHT:4};AX.MapCorner={TOP_LEFT:AX.CORNER_TOPLEFT,TOP_RIGHT:AX.CORNER_TOPRIGHT,BOTTOM_LEFT:AX.CORNER_BOTTOMLEFT,BOTTOM_RIGHT:AX.CORNER_BOTTOMRIGHT};function AR(Ae,Af,Ad){Ae.display.addLayer(Af,new AX.Kernel.TileLayer(Ae.display,Ad))}function AQ(Ae,Ad){return function(Af){if(typeof (Af)=="undefined"){Af=100}this.slideMapToPoint(this.display.width/2+Ae*this.display.width*Af/100,this.display.height/2+Ad*this.display.height*Af/100)}}function AV(Ae,Ad){var Af,Ag=Ae.getZoomLevel(),Ah=new u("MQA.TileMap.zoomStart");Ah.zoom=Ag;Ae.onZoomStart(Ah);Af=Ad.call(Ae);Ah=new u("MQA.TileMap.zoomEnd");Ah.prevZoom=Ag;Ah.zoom=Ae.getZoomLevel();Ae.onZoomEnd(Ah);return Af}function AT(Ad,Ae){var Af=new u();Af.eventName="MQA.TileMap."+Ae.toLowerCase();Ad["on"+Ae].call(Ad,Af)}function AU(Ae){var Ad=Ae.srcElement||Ae.target;Ae.cancelBubble=true;if(Ae.stopPropagation){Ae.stopPropagation()}}function Ac(Ar,An,As,Af,Av){var Ap,Ak,Aq=An.ul,Ah=An.lr,Au,Ad,Al,Ao,Aj,Am=Ar.getScale(),Ae,Ag=Ar.bestFitMargin,Ai,At;if(!Af||Af<1||Af>15){Ap=1}else{Ap=Af+1}if(!Av){Ak=16}else{if(Av<1||Av>16){Ak=16}else{Ak=Av}if(Ak<Ap){Ak=Ap+1}}if(typeof (Aq.x)=="number"){Aq=Ar.pixToLL(Aq);Ah=Ar.pixToLL(Ah)}if(As){Al=Ar.getCenter();Ao=Math.max(Math.abs(Al.lng-Aq.lng),Math.abs(Al.lng-Ah.lng));Aj=Math.max(Math.abs(Al.lat-Aq.lat),Math.abs(Al.lat-Ah.lat));Au=(Ao*2)*(AX.PIXERSPERLNGDEGREE/Am);Ad=(Aj*2)*(AX.PIXERSPERLATDEGREE/Am)}else{Au=Math.abs(Ah.lng-Aq.lng)*(AX.PIXERSPERLNGDEGREE/Am);Ad=Math.abs(Ah.lat-Aq.lat)*(AX.PIXERSPERLATDEGREE/Am)}Ae=(Ag<(Ar.width/2)&&Ag<(Ar.height/2))?Ag:Math.round(Math.min((Ar.width/2)-1,((Ar.height/2)-1)));Ai=Math.max((Am*(Au/(Ar.width-(Ae*2)))),Am*(Ad/(Ar.height-(Ae*2))));while(Ai<AX.SCALES[Ap]&&Ap<=Ak){Ap++}Ap-=1;if(As){Ar.setZoomLevel(Ap)}else{At={lat:(Aq.lat+Ah.lat)/2,lng:(Aq.lng+Ah.lng)/2};Ar.setCenter(At,Ap)}}function Aa(An,Ah,As,Ai,Ad,Af,Ag){var Ap,Al;if(!Ai||Ai<1||Ai>15){Ap=1}else{Ap=Ai+1}if(!Ad){Al=16}else{if(Ad<1||Ad>16){Al=16}else{Al=Ad}if(Al<Ap){Al=Ap+1}}var Av=new AX.PointFloatXY((An.ul.lng+180)*(AX.PIXERSPERLNGDEGREE/AX.SCALES[Ap]),(An.ul.lat+90)*(AX.PIXERSPERLATDEGREE/AX.SCALES[Ap]));var Am=new AX.PointFloatXY((An.lr.lng+180)*(AX.PIXERSPERLNGDEGREE/AX.SCALES[Ap]),(An.lr.lat+90)*(AX.PIXERSPERLATDEGREE/AX.SCALES[Ap]));var Aq=new AX.LatLng(An.ul.lat,An.ul.lng);var Aj=new AX.LatLng(An.lr.lat,An.lr.lng);var Aw=Math.abs(Aj.lng-Aq.lng)*(AX.PIXERSPERLNGDEGREE/AX.SCALES[Ap]);var Ae=Math.abs(Aj.lat-Aq.lat)*(AX.PIXERSPERLATDEGREE/AX.SCALES[Ap]);if(As){var At=new AX.PointFloatXY((Ah.lng+180)*(AX.PIXERSPERLNGDEGREE/AX.SCALES[Ap]),(Ah.lat+90)*(AX.PIXERSPERLATDEGREE/AX.SCALES[Ap]));var Ao=Math.max(Math.abs(At.x-Av.x),Math.abs(At.x-Am.x));var Ak=Math.max(Math.abs(At.y-Av.y),Math.abs(At.y-Am.y));Aw=Ao*2;Ae=Ak*2}var Au=(Ag<(Af.width/2)&&Ag<(Af.height/2)?Ag:Math.round(Math.min(((Af.width/2)-1),((Af.height/2)-1))));var Ar=Math.max((AX.SCALES[Ap]*(Aw/(Af.width-(Au*2)))),(AX.SCALES[Ap]*(Ae/(Af.height-(Au*2)))));if(Ar>AX.SCALES[Ap]){return Ap}while(Ar<AX.SCALES[Ap]&&Ap<=Ad){Ap++}return Ap-1}function AZ(Ae){var Ad=false;this.dragStart=function(){Ae.parent.style.cursor=Ae._grabbing_mousecursor};this.dragMove=function(){if(!Ad){AT(Ae,"DragStart");AT(Ae,"MoveStart");Ad=true}var Af=Ae.display,Ag=this.dragXY.x-this.startXY.x,Ah=this.dragXY.y-this.startXY.y;Af.setViewport(Af.ulX-Ag,Af.ulY-Ah);AT(Ae,"Drag");AT(Ae,"Move")};this.dragEnd=function(Af){var Ag=this;if(!Ad){if(typeof Ae.clickCnt=="undefined"||Ae.clickCnt==null){Ae.clickCnt=0}if(!Ae.clickXY){Ae.clickXY={x:(Ag.startXY.x-Ae.display.ulX),y:(Ag.startXY.y-Ae.display.ulY)}}Ae.clickCnt++;if(Ae.clickCnt>1){if(Ae.clickTimeout){clearTimeout(Ae.clickTimeout);Ae.clickTimeout=null}Ae.clickCnt=0}if(Ae.clickCnt==1&&!Ae.clickTimeout){Ae.clickTimeout=setTimeout(function(){Ae.clickCnt=0;Ae.clickTimeout=null;Ae.handleClickEvent(Ae.clickXY.x,Ae.clickXY.y);delete Ae.clickXY},300)}}Ag.dragCancelled()};this.dragCancelled=function(){if(Ad){AT(Ae,"DragEnd");AT(Ae,"MoveEnd")}Ae.parent.style.cursor=Ae._grab_mousecursor};this.doubleClick=function(){if(Ae.clickTimeout){clearTimeout(Ae.clickTimeout)}Ae.clickCnt=0;Ae.clickTimeout=null;Ae.handleDblClickEvent(Ae.clickXY.x,Ae.clickXY.y);delete Ae.clickXY}}function AY(Ad,Af,Ae){Af=Af+"px";Ae=Ae+"px";switch(Ad._corner){case 0:break;case 1:Ad.style.left=Af;break;case 2:Ad.style.top=Ae;break;case 3:Ad.style.left=Af;Ad.style.top=Ae;break}}g=function(Ai,Ag,An,Am,Ae){var Af=this;if(Ae){this.bestFitMargin=(typeof (Ae.bestFitMargin)!="number")?0:Ae.bestFitMargin||0;if(Ae.bestFitRect){var Ad={width:E(Ai),height:N(Ai)};if(!Ae.keepCenter){Ag=Aa(Ae.bestFitRect,An,false,Ae.minZoom||1,Ae.maxZoom||16,Ad,this.bestFitMargin);var Ak=Ae.bestFitRect;var Al=new AX.LatLng(Ak.ul.lat,Ak.ul.lng);var Aj=new AX.LatLng(Ak.lr.lat,Ak.lr.lng);An=new AX.LatLng(((Al.lat+Aj.lat)/2),((Al.lng+Aj.lng)/2))}else{this.setCenter(An);Ag=Aa(Ae.bestFitRect,An,true,Ae.minZoom||1,Ae.maxZoom||16,Ad,this.bestFitMargin)}}}if(!An){An={lat:38.134557,lng:-98.4375}}if(!Ag){Ag=1}AX.Kernel.CoreMap.call(this,Ai,Ag,An);this._cornerAnchors=[];var Ah=this.display.zlevel("control",true);Ah.style.cursor="default";this.controlParent=this.parent2=Ah;this.controlAnchors=[Ah,this._createCornerAnchor(1,Ah),this._createCornerAnchor(2,Ah),this._createCornerAnchor(3,Ah)];switch(AX.browser.name){case"firefox":this._grab_mousecursor="-moz-grab";this._grabbing_mousecursor="-moz-grabbing";break;case"safari":this._grab_mousecursor="-webkit-grab";this._grabbing_mousecursor="-webkit-grabbing";break;default:this._grab_mousecursor="url("+AX.RESOURCES+"grab.cur), default";this._grabbing_mousecursor="url("+AX.RESOURCES+"grabbing.cur), default";break}this._point_mousecursor="pointer";this.parent.style.cursor=this._grab_mousecursor;this.bestFitMargin=0;this.display.addLayer("loading",new AX.Kernel.LoadingLayer(this.display));AR(this,AX.TILE_LAYER_ID.MAP,AX.Kernel.MqMapImageTile);AR(this,AX.TILE_LAYER_ID.SAT,AX.Kernel.MqSatImageTile);AR(this,AX.TILE_LAYER_ID.HYB,AX.Kernel.MqStrlblImageTile);this._placeCornerAnchors();this._initLogos();this.setMapType(Am||"map");this.addDOMEvent("mousedown");this.addDOMEvent("dblclick");this._wireDOMEvents(this.display.elt);AF(Ai,"contextmenu",function(Ao){P(Ao);return false});this.rightClickDelegate=null;this.saveState();this.onMapInit();this._dtorHandle=S(this,"dispose");if((AX.browser.os=="iphone"||AX.browser.os=="android")&&AX.browser.name=="safari"){AX.withModule("iphone",function(){AX.iPhone.init(Af)})}};g.prototype=new AX.Kernel.CoreMap();AE(g.prototype);AH(g.prototype,{dispose:function(){n(this._dtorHandle)},_createCornerAnchor:function(Ae,Af){var Ad=document.createElement("div");Ad.style.position="absolute";Ad._corner=Ae;this._cornerAnchors.push(Ad);AY(Ad,this.width,this.height);if(Af){Af.appendChild(Ad)}return Ad},_onDOMEvent:function(Af){try{var Ag=Af.type,Ah=this.display.findParent(F(Af)),Ad=p(Af);if(Ah._f){return }if(Ag=="mousedown"){P(Af);if(Ad){this.handleRightClickEvent(Af)}else{var Ai=new AZ(this);this.display.startDrag(Af,Ai)}h(this,"TKMouseDown",Af)}else{if(Ag=="dblclick"){var Ai=new AZ(this);Ai.doubleClick();P(Af)}}}catch(Ae){return }},connectSuppressEvents:function(Ad){AF(Ad,"mousedown",AU);AF(Ad,"click",AU)},disconnectSuppressEvents:function(Ad){C(Ad,"mousedown",AU);C(Ad,"click",AU)},_initLogos:function(){function Ah(){var Ai=document.createElement("div");Ai.corner=AX.CORNER_TOPLEFT;Ai.offset={x:10,y:10};Ai.style.position="absolute";Ai.style.display="block";Ai.style.zIndex=22;Ai.width="124";Ai.height="18";Ai.style.overflow="hidden";Ai.style.width="124px";Ai.style.height="18px";Ai.innerHTML="<img style='-moz-user-select:none;' unselectable='on' src='http://"+RESSERVER+"/scales/scalebar.gif' />";return Ai}function Ad(Aj,An,Am,Ak,Aq,Ap,Ao,Ai){var Al=document.createElement("img");Al.src=Ap;Al.style.MozUserSelect="none";Al.unselectable="no";Al.corner=Aj;Al.offset=An;Al.style.position=Am;Al.style.display=Ak;Al.style.zIndex=Aq;Al.width=Ao;Al.height=Ai;Al.style.width=Ao+"px";Al.style.height=Ai+"px";return Al}this.logos=[Ad(AX.CORNER_BOTTOMLEFT,{x:5,y:10},"absolute","block",22,AA("images/questy.png"),61,43),Ah()];var Ae=this.logos,Ag,Af=this.display.zlevel("logo",true);for(Ag=0;Ag<Ae.length;Ag++){Af.appendChild(Ae[Ag])}this._updateLogoPositions()},_updateLogoPositions:function(){var Ah,Ad=this.logos,Ae,Af=0,Ag=0;for(Ah=0;Ah<Ad.length;Ah++){Ae=Ad[Ah];Af=0;Ag=0;if(Ae.corner==AX.CORNER_BOTTOMRIGHT||Ae.corner==AX.CORNER_TOPRIGHT){Af=this.width-parseInt(Ae.style.width)-Ae.offset.x}else{Af=Ae.offset.x}if(Ae.corner==AX.CORNER_BOTTOMRIGHT||Ae.corner==AX.CORNER_BOTTOMLEFT){Ag=this.height-parseInt(Ae.style.height)-Ae.offset.y}else{Ag=Ae.offset.y}Ae.style.left=Af+"px";Ae.style.top=Ag+"px"}Ad[AX.LOGO_MQ_SCALES].childNodes[0].style.marginTop=-((this.zoom-1)*parseInt(Ad[AX.LOGO_MQ_SCALES].height))+"px"},setLogoPlacement:function(Ad,Ae){var Af=this.logos[Ad];if(Af){Af.corner=Ae.mapCorner;Af.offset={x:Ae.offsetSize.width,y:Ae.offsetSize.height};this._updateLogoPositions()}},handleClickEvent:function(Af,Ad){var Ae=new u("MQA.TileMap.click");Ae.srcObject=this;Ae.xy={x:Af,y:Ad};Ae.ll=this.pixToLL(Ae.xy);this.onClick(Ae)},handleRightClickEvent:function(Ae){var Ag=new u("MQA.TileMap.rightClick"),Ad=this.display,Af=Ad.ancestorEventCoords(Ae);Ag.srcObject=this;Ag.xy=Af.screen;Ag.ll=Af.latLng;this.onRightClick(Ag)},handleDblClickEvent:function(Ah,Ad){var Ag=new u("MQA.TileMap.dblClick"),Af=this.getZoomLevel(),Ae=this.pixToLL({x:Ah,y:Ad});this.onDoubleClick(Ag);if(Af<16){Af+=1}this.setCenter(Ae,Af)},slideMapToPoint:function(Af,Ai){if(typeof (Af)=="object"){Ai=Af.y;Af=Af.x}if(this._slideKey){clearTimeout(this._slideKey)}this._slideKey=null;var Aj=this.display;Af+=Aj.ulX;Ai+=Aj.ulY;var Ag=(Aj.ulX+Aj.width/2),Ah=(Aj.ulY+Aj.height/2),Al=Af-Ag,Ak=Ai-Ah,Ad=Aj.ulX+Al,Ae=Aj.ulY+Ak;AT(this,"MoveStart");this._doSlide(Ad,Ae,Al/AX.SLIDESTEPS,Ak/AX.SLIDESTEPS,AX.SLIDESTEPS)},_doSlide:function(Ae,Af,Ag,Ah,Ai){var Ad=this.display;Ad.setViewport(Ad.ulX+Ag,Ad.ulY+Ah);AT(this,"Move");if(Ai==0){this._slideKey=null;Ad.setViewport(Ae,Af);AT(this,"MoveEnd")}else{this._slideKey=setTimeout(V(this,"_doSlide",Ae,Af,Ag,Ah,Ai-1),AX.SLIDEDELAY)}},setMapType:function(Ad){var Aj=false,Af=Aj,Ag=Aj,Ah=this.mapType,Ai;switch(Ad){case"map":Aj=true;break;case"sat":Af=true;break;case"hyb":Af=true;Ag=true;break}function Ae(Ak,Al){Al?Ak.enable():Ak.disable()}Ae(this.display.layers[AX.TILE_LAYER_ID.MAP],Aj);Ae(this.display.layers[AX.TILE_LAYER_ID.SAT],Af);Ae(this.display.layers[AX.TILE_LAYER_ID.HYB],Ag);this.mapType=Ad;Ai=new u("MQA.TileMap.mapTypeChanged");Ai.prevMapType=Ah;Ai.mapType=Ad;this.onMapTypeChanged(Ai)},getMapType:function(){return this.mapType},panNorth:AQ(0,-1),panSouth:AQ(0,1),panEast:AQ(1,0),panWest:AQ(-1,0),panNorthWest:AQ(-1,-1),panSouthWest:AQ(-1,1),panNorthEast:AQ(1,-1),panSouthEast:AQ(1,1),setZoomLevel:function(Ad){if(isNaN(Ad)){return }Ad=parseInt(Ad);if(Ad<1){Ad=1}if(Ad>16){Ad=16}if(this.zoom==Ad){return }var Ae=this.getCenter();this.zoom=Ad;this.scale=AX.SCALES[Ad];AV(this,function(){this.display.initTransform(this.zoom,this.scale,Ae.lat,Ae.lng,this.width,this.height)});this._updateLogoPositions()},getZoomLevel:function(){return this.zoom},getScale:function(){return this.scale},getCenter:function(){var Af=Math.floor(this.display.width/2)+this.display.ulX,Ad=Math.floor(this.display.height/2)+this.display.ulY,Ae=this.display.transform.displayToLatLng(Af,Ad);return new AX.LatLng(Ae.lat,Ae.lng)},getCenterOffset:function(Aj,Ae){var Af=AX.SCALES[Ae],Ah=this.pixToLL(Aj),Ad,Ag,Ai=Aj.x-this.width/2,Ak=Aj.y-this.height/2;if(!Af){Af=this.scale}Ag=this.display.createTransform(Ae||this.zoom,Af,Ah.lat,Ah.lng,0,0);Ad=Ag.displayToLatLng(-Ai,-Ak);return Ad},setCenter:function(Af,Ag){var Ah=this.display;if(Ag&&Ag!=this.zoom){this.zoom=Ag;this.scale=AX.SCALES[Ag];AV(this,function(){AT(this,"MoveStart");Ah.initTransform(this.zoom,this.scale,Af.lat,Af.lng,this.width,this.height);AT(this,"MoveEnd")});this._updateLogoPositions()}else{var Ai=Ah.transform.latLngToDisplay(Af.lat,Af.lng),Ad=Ai.x-Ah.width/2,Ae=Ai.y-Ah.height/2;AT(this,"MoveStart");if(Math.abs(Ah.ulX-Ad)>500000||Math.abs(Ah.ulY-Ae)>500000){Ah.initTransform(this.zoom,this.scale,Af.lat,Af.lng,this.width,this.height)}else{Ah.setViewport(Ad,Ae)}AT(this,"MoveEnd")}},getBounds:function(){var Ae=this.pixToLL(new AX.Point(0,0));var Ad=this.pixToLL(new AX.Point(this.getSize().width,this.getSize().height));return new AX.RectLL(Ae,Ad)},pixToLL:function(Af){var Ae=this.display,Ad=Ae.transform.displayToLatLng(Ae.ulX+Af.x,Ae.ulY+Af.y);return new AX.LatLng(Ad.lat,Ad.lng)},llToPix:function(Ad){var Ae=this.display,Af=Ae.transform.latLngToDisplay(Ad.lat,Ad.lng);return new AX.Point(Af.x-Ae.ulX,Af.y-Ae.ulY)},llToDisplay:function(Ad){return this.display.transform.latLngToDisplay(Ad.lat,Ad.lng)},pixToDisplay:function(Ae){var Ad=this.display;return new AX.PointXY(Ad.ulX+Ae.x,Ad.ulY+Ae.y)},getDragOffset:function(){var Ad=this.display;return new AX.Point(Ad.ulX,Ad.ulY)},getSize:function(){return new AX.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)},setRightClickDelegate:function(Ad){this.rightClickDelegate=Ad},getRightClickDelegate:function(){return this.rightClickDelegate},setSize:function(Aq){var An,Ae,Al,Ao,Ag=this.parent,Aj=this.parent2,Ah=this.display,Ak,Am,Ap,Ad,Af;Ah.cancelDrag();Ao=Ag.parentNode;Al=Ag.parentNode.style;if(Al&&Al.borderWidth){if(Al.borderWidth.replace("px","")>0){Ao.style.overflow="hidden"}}if(Aq){An=Aq.width;Ae=Aq.height}else{var Ai=Ag.parentNode;An=E(Ai);Ae=N(Ai)}if(An<0||Ae<0){return }Ak=(Ah.ulX+Ah.width/2);Am=(Ah.ulY+Ah.height/2);this.width=An;this.height=Ae;Ah.width=An;Ah.height=Ae;Ag.style.width=An+"px";Ag.style.height=Ae+"px";Ag.parentNode.style.width=An+"px";Ag.parentNode.style.height=Ae+"px";Ap=Ak-An/2;Ad=Am-Ae/2;Ah.setViewport(Ap,Ad,An,Ae);this._updateLogoPositions();this._placeCornerAnchors();Af=new u("MQA.TileMap.sizeChanged");Af.width=An;Af.height=Ae;this.onSizeChanged(Af)},_placeCornerAnchors:function(){var Ae,Ad=this._cornerAnchors;for(Ae=0;Ae<Ad.length;Ae++){AY(Ad[Ae],this.width,this.height)}},zoomToRect:function(Af,Ae,Ad,Ag){Ac(this,Af,Ae,Ad||1,Ag||16)},bestFit:function(Aj,Ah,Al){var Ag=this.getZoomLevel();if(Aj==null){Aj=false}if(Ah==null){Ah=1}if(Al==null){Al=16}var Ad=new AX.Event("MQA.TileMap.zoomStart");Ad.zoom=Ag;this.onZoomStart(Ad);var Ae=this._getAllShapes(false,false,true).getBoundingRect();if(!Ae){return }var Ak=this.getShapeCollections(true,false);for(var Af=1;Af<Ak.length;Af++){var Am=Ak[Af];if(Am.bestFit&&Am.getBoundingRect()!=null){if(!Ae){Ae=new AX.RectLL(Am.getAt(0).getValue("latLng"),Am.getAt(0).getValue("latLng"))}Ae.extend(Am.getBoundingRect().ul);Ae.extend(Am.getBoundingRect().lr)}}Ac(this,Ae,Aj,Ah,Al);var Ai=new AX.Event("MQA.TileMap.zoomEnd");Ai.prevZoom=Ag;Ai.zoom=this.getZoomLevel();this.onZoomEnd(Ai)},_getAllShapes:function(Am,Ad,Aj){Ad=(typeof (Am)!="undefined"?Ad:true);Am=(typeof (Am)!="undefined"?Am:false);Aj=(typeof (Aj)!="undefined"?Aj:false);var Ah=new AX.ShapeCollection;var Ag=this.getShapeCollections(true,Ad);for(var Af=0;Af<Ag.length;Af++){if(Aj&&!Ag[Af].bestFit){continue}for(var Ak=0,Al=Ag[Af].getSize();Ak<Al;Ak++){var Ae=Ag[Af].getAt(Ak);var Ai=((Am&&(Ae instanceof AX.Poi||Ae instanceof AX.BasePoi))||!Am);if(Ai){Ah.add(Ae,false)}}}return Ah}});function AW(Ae){var Ad=Ae.toLowerCase();return function(Af){h(this,Ad,Af)}}function Ab(Ad,Ae){for(var Af=0;Af<Ae.length;Af++){Ad["on"+Ae[Af]]=AW(Ae[Af])}}Ab(g.prototype,["MapInit","LayerDrawn","LayerAdded","LayerRemoved","Click","RightClick","DoubleClick","ZoomStart","ZoomEnd","MapTypeChanged","ShapeAdded","ShapeRemoved","MapCleared","InfoWindowOpen","InfoWindowClose","MoveStart","Move","MoveEnd","DragStart","Drag","DragEnd","TKMouseDown","TKMouseUp","SizeChanged"]);AX.TileMap=g})();var y;AL.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 AR={"":1,"Map Data":2,Imagery:3};function AT(AZ,Ab){var AW=AZ[1],AX=Ab[1],AU=AW.group,AV=AX.group,AY=String(AW.html||AW.text||""),Aa=String(AX.html||AX.text||"");AU=String(AR[AU]||AU);AV=String(AR[AV]||AV);if(AU==AV){if(AY==Aa){return 0}else{if(AY<Aa){return -1}else{return 1}}}else{if(AU<AV){return -1}else{return 1}}}function AQ(AU){return AU.replace(/\<|\>\|\&/g,function(AV){return ;(AV=="<"&&"&lt;")||(AV==">"&&"&gt;")||(AV=="&"&&"&amp;")})}function AS(AU){var AV=AA("");return AU.replace(/\%TK\%/g,AV)}y=function(AV){var AU=document.createElement("div");AU.className="mqacopyright";AU.style.position="absolute";AU.style.bottom="0px";AU.style.right="5px";AU.style.textAlign="right";r(AU);if(AV){AV.appendChild(AU)}this.elt=AU;this.list=[];this.invalidate()};y.prototype={setClass:function(AU){this.elt.className="mqacopyright "+AU},set:function(AU,AY){var AZ,AV=this.list,AX,AW=false;if(!AY){for(AZ=0;AZ<AV.length;AZ++){AX=AV[AZ];if(AX&&AX[0]==AU){AV[AZ]=null;this.invalidate();return }}}else{AV.push([AU,AY]);this.invalidate()}},invalidate:function(){if(this._refreshKey){return }var AU=this;this._refreshKey=setTimeout(function(){AU.refresh()},0)},refresh:function(){this._refreshKey=null;var Ad,Ab=[],AZ,AW=this.list,AU,Ac=["&copy;"+(new Date().getFullYear())+"&nbsp;MapQuest"],AX=null,AV,AY,Aa={};for(AZ=0;AZ<AW.length;AZ++){AU=AW[AZ];if(AU){Ab.push(AU)}}Ab.sort(AT);this.list=Ab;for(AZ=0;AZ<Ab.length;AZ++){if(AZ==0){Ac.push("&nbsp;&nbsp;Portions&nbsp;&copy;"+(new Date().getFullYear())+"&nbsp;")}Ad=Ab[AZ][0];AU=Ab[AZ][1];if(!AU||Aa[Ad]){continue}Aa[Ad]=true;if(AZ>0){Ac.push(",&nbsp;")}if(AU.html){Ac.push(AS(AU.html))}else{if(AU.text){Ac.push(AQ(AU.text))}}}AY=Ac.join("");if(AY!=this._curHtml){this.elt.innerHTML=AY;this._curHtml=AY}}};B(g.prototype,{onMapInit$After:function(){var AU=this._createCornerAnchor(3,this.display.zlevel("logo",true));this.copyright=new y(AU);this._updateCopyrightStyle()},_updateCopyrightStyle:function(){var AV=this.mapType,AU="mqacopyrightdark";if(AV=="hyb"||AV=="sat"){AU="mqacopyrightlight"}this.copyright.setClass(AU)},onMapTypeChanged$After:function(){if(this.copyright){this._updateCopyrightStyle()}}})})();var m;(function(){var AS={},AR=window.COVSERVER||window.LOGSERVER;function AT(AV,AX){if(!AR){return }var AY=AS[AV];if(AY&&AY.time<(new Date().getTime()-30000)){if(AY.scriptElt&&AY.scriptElt.parentNode){AY.scriptElt.parentNode.removeChild(AY.scriptElt)}AY=null}if(!AY){AY=[AX];AS[AV]=AY;AY.time=new Date().getTime();var AZ=window.location.protocol+"//"+AR+"/coverage?"+AV,AW;AW=document.createElement("script");AW.setAttribute("src",AZ);AY.scriptElt=AW;(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(AW)}else{AY.push(AX)}}AL._covCallback=function(AW,AV){var AX=AS[AV],AY;delete AS[AV];if(!AX){return }for(AY=0;AY<AX.length;AY++){AX[AY]._handleCoverageData(AW,AV)}setTimeout(function(){if(AX.scriptElt&&AX.scriptElt.parentNode){AX.scriptElt.parentNode.removeChild(AX.scriptElt)}},0)};function AU(Aa,AV){var AX,AZ=Aa[2]-Aa[0],AW=Aa[3]-Aa[1],AY;if(AV<=7){AX=0.5}else{if(AV<=12){AX=1.5}else{AX=5}}AY=[Math.floor(Aa[0]-AX*AZ),Math.floor(Aa[1]-AX*AW),Math.ceil(Aa[2]+AX*AZ),Math.ceil(Aa[3]+AX*AW)];if(AY[1]<-90){AY[1]=-90}if(AY[3]>90){AY[3]=90}return AY}m=function(Af){var Ac=this,Ak,AV,AW,AZ,AX,Al=[],Aa,Ah={},Ab={};function Ae(){if(Aa){return }Aa=setTimeout(Ad,0)}function Ad(){Aa=null;AV=AU(AZ,AX);Ak=AX;var Am="format=json&jsonp=MQA._covCallback&loc="+AV.join(",")+"&scale="+AL.SCALES[Ak]+"&cat="+encodeURIComponent(Al.join(","));if(Am==AW){AL.Log.debug("Not requesting duplicate coverage: "+Am);return }AW=Am;AT(Am,Ac)}function AY(An,Am){var Ap=Ah[An],Ao=Ab[An];if(Ap){if(Ao){Ag(Ao);Ao.features=null}}Ah[An]=Am;if(Am&&Ao){Ao.features=Am;Ai(Ao)}}function Aj(As,An){var Am={},Ap,Aq=As.featureIds,Ao=As.features,Ar;for(Ap=0;Aq.length;Ap++){Am[Aq[Ap]]=true}if(Ao){for(Ap=0;Ap<Ao.length;Ap++){Ar=Ao[Ap];if(!Ar.opt||Am[Ar.id]){An(Ar)}}}}function Ai(Am){Aj(Am,function(Ao){var Ap=Ao.copyrights,An,Aq;if(Ap){for(Aq=0;Aq<Ap.length;Aq++){An=Ap[Aq];Af.set(An.id,An)}}})}function Ag(Am){Aj(Am,function(Ao){var Ap=Ao.copyrights,An,Aq;if(Ap){for(Aq=0;Aq<Ap.length;Aq++){An=Ap[Aq];Af.set(An.id)}}})}this.subscribe=function(){for(var Am=0;Am<arguments.length;Am++){Al.push(String(arguments[Am]))}Ae()};this.activate=function(An){var Am=[],Ap,Ao;Ao=Ab[An];if(Ao){Ag(Ao)}for(Ap=1;Ap<arguments.length;Ap++){Am.push(arguments[Ap])}Ao={featureIds:Am,features:Ah[An]};Ab[An]=Ao;Ai(Ao)};this.deactivate=function(){var Am,An,Ao;for(Am=0;Am<arguments.length;Am++){Ao=arguments[Am];An=Ab[Ao];if(An){delete Ab[Ao];Ag(An)}}};this.updateBox=function(An,Am){AZ=An;AX=Am;if(AX!=Ak||!AV||(AZ[0]<AV[0]||AZ[1]<AV[1]||AZ[2]>AV[2]||AZ[3]>AV[3])){Ae()}};this._handleCoverageData=function(Ao,An){if(An!=AW){return }var Ap,Am;for(Ap in Ao){Am=Ao[Ap];if(typeof Am=="object"&&Am instanceof Array){AY(Ap,Am)}}for(Ap in Ah){Am=Ao[Ap];if(typeof Am=="object"&&Am instanceof Array&&!Ao[Ap]){AY(Ap)}}}};function AQ(AW){var AX=AW.coverage;if(!AX){return }var AZ=AW.mapType,Aa=AX._curMapType;if(AZ!=AX._curMapType){AX.deactivate(Aa);AX.activate(AZ);AX._curMapType=AZ}var AY=AW.getBounds(),AV;if(AY.ul.lng>0&&AY.lr.lng<0){if((AY.ul.lng+AY.lr.lng)>0){AY.ul.lng-=360}else{AY.lr.lng+=360}}AV=[Math.min(AY.ul.lng,AY.lr.lng),Math.min(AY.ul.lat,AY.lr.lat),Math.max(AY.ul.lng,AY.lr.lng),Math.max(AY.ul.lat,AY.lr.lat)];AX.updateBox(AV,AW.getZoomLevel())}B(g.prototype,{onMapInit$After:function(){var AW=this.copyright,AV=new m(AW);AV.subscribe("map","hyb","sat");this.coverage=AV;AQ(this)},onMapTypeChanged$After:function(){AQ(this)},onMoveEnd$After:function(){AQ(this)},onZoomEnd$After:function(){AQ(this)}})})();(function(){var AR=window.MQA;function AS(AT,AU){var AV=AU?H(AU):"";return"w:"+AV+":"+AT}function AQ(AT){this.map=AT;this.registry={};var AV=document.createElement("div");AV.style.position="absolute";AV.style.zIndex="1000";AV.style.left="0px";AV.style.top="0px";AT.display.zlevel("window",true).appendChild(AV);this.screenSurface=AV;var AU=document.createElement("div");AU.style.position="absolute";AU.style.zIndex="1000";AT.display.zlevel("window").appendChild(AU);this.globalSurface=AU;AT.display.addLayer("global-window",this)}AQ.prototype={resetTransform:function(AT){this.each(function(AU){if(AU.resetTransform){AU.resetTransform(AT)}})},each:function(AT){var AV,AW=this.registry,AU;for(AV in AW){if(AV.match(/^w\:/)){AU=AT(AW[AV]);if(AU){return AU}}}},open:function(AT,AU,AV){var AY=this.registry,AX=AS(AT,AU),AW=AY[AX];this.close(AU,AT);AV.opener=AU;AV.id=AT;AY[AX]=AV;if(AV.resetTransform){AV.resetTransform(this.map.display.transform)}AV.onOpen(this);if(AU&&AU.onWindowOpen){AU.onWindowOpen(AV)}},find:function(AT,AU){return this.registry[AS(AT,AU)]},close:function(AT,AU){var AX=this.registry,AW=AS(AT,AU),AV=AX[AW];if(AV){if(AU&&AU.onWindowClose){AU.onWindowClose(AV)}AV.dispose();delete AX[AW]}},closeAll:function(AT,AU){var AV=this;this.each(function(AW){if((AT&&AT!=AW.id)||(AU&&AU!==AW.opener)){return }AV.close(AW.id,AW.opener)})}};B(AR.TileMap.prototype,{onMapInit$After:function(){this.windowManager=new AQ(this)}});AR.WindowManager=AQ})();var AG;(function(){var AX=window.MQA;function AT(){this.items=[];this.guid=AX.Util._getRandomGUID(10);this.collectionName="";this.bestFit=true;this.setName=function(Af){this.collectionName=Af};this.getName=function(){return this.collectionName};this.add=function(Af){var Ag=this.items.length;this.items.push(Af);if(this._onAdd){this._onAdd(Af,Ag)}return Ag+1};this.getSize=function(){return this.items.length};this.getAt=function(Af){return this.items[Af]};this.remove=function(Ag){var Ah,Ai=this.items,Af=Ai[Ag];if(Ag>=Ai.length){return }for(Ah=Ag;Ah<Ai.length;Ah++){Ai[Ah]=Ai[Ah+1]}Ai.length-=1;if(this._onRemove){this._onRemove(Af)}return Af};this.removeAll=function(){var Ag=this.items;this.items=[];if(this._onRemove){for(var Af=0;Af<Ag.length;Af++){this._onRemove(Ag[Af])}}};this.contains=function(Af){var Ah=this.items;for(var Ag=0;Ag<Ah.length;Ag++){if(Ah[Ag]===Af){return true}}};this.getById=function(Ag){var Ai=0,Af=this.items.length,Ah;for(;Ai<Af;Ai++){Ah=this.items[Ai];if(Ah.id&&Ah.id===Ag){return Ah}}return null};this.removeItem=function(Af){var Ah=this.items;for(var Ag=Ah.length-1;Ag>=0;Ag--){if(Ah[Ag]===Af){this.remove(Ag);return }}};this.append=function(Af){for(var Ag=0;Ag<Af.getSize();Ag++){this.add(Af.getAt(Ag))}};this.getItemIndex=function(Af){var Ah=this.items;for(var Ag=0;Ag<Ah.length;Ag++){if(Ah[Ag]===Af){return Ag}}return false}}function AS(Af,Ag){this.ul=Af?new AX.LatLng(Af.lat,Af.lng):new AX.PointLL(0,0);this.lr=Ag?new AX.LatLng(Ag.lat,Ag.lng):new AX.PointLL(0,0);this.extend=function(Ah){if(Ah.lat>this.ul.lat){this.ul.lat=Ah.lat}if(Ah.lng<this.ul.lng){this.ul.lng=Ah.lng}if(Ah.lat<this.lr.lat){this.lr.lat=Ah.lat}if(Ah.lng>this.lr.lng){this.lr.lng=Ah.lng}}}function Aa(){this.guid=AX.Util._getRandomGUID(10);this.className="MQA.base";this.reservedProperties="guid,className,parentCollections";this.parentCollections=[];this.setValue=function(Af,Ag){if(typeof (this[Af])!="undefined"){if(this.reservedProperties.search(Af)!=-1){return false}this[Af]=Ag;if(typeof (this[Af+"_override"])=="undefined"){this._facio(Af,this[Af])}this.facio(Af,this[Af]);return true}else{return false}};this.getValue=function(Af){var Ag;if(typeof (this[Af])!="undefined"){Ag=this.duco(Af);if(typeof (Ag)=="undefined"){Ag=this._duco(Af);if(typeof (Ag)=="undefined"){Ag=this[Af]}}return Ag}};this.setValues=function(Ag){var Af=0;for(key in Ag){if(typeof (this[key])!="undefined"){if(this.setValue(key,Ag[key])){Af++}}}return Af};this.override=function(Af){if(!(Af instanceof Array)){Af=[Af]}for(var Ag=0;Ag<Af.length;Ag++){this[Af[Ag]+"_override"]=1}};this._facio=function(Ag,Af){};this.facio=function(Ag,Af){};this._duco=function(Af){};this.duco=function(Af){};this.draw=function(){};this.dispose=function(){}}function Ae(Af){return(typeof (Af)=="function")?Af:undefined}function AU(Af,Ah){var Ag=Ah.substring(0,1).toUpperCase()+Ah.substring(1);return Ae(Af["get"+Ag])||Ae(Af["is"+Ag])||function(){return Af[Ah]}}function AY(Af,Ah,Ai){var Ag=Ah.substring(0,1).toUpperCase()+Ah.substring(1);return Ae(Af["set"+Ag])||(!Ai&&function(Aj){return Af[Ah]=Aj})}var AR={setValue:function(Ag,Af){AY(this,Ag).call(this,Af)},getValue:function(Af){return AU(this,Af).call(this)},setValues:function(Ah){var Ai={},Ag,Af=0;for(key in Ah){if(Ai[key]){continue}Ag=AY(this,key,true);if(Ag){Ag.call(this,Ah[key]);Af++}}return Af},dispose:function(){},defineProperty:function(Ao,An,Ah,Af){var Ai=Ao.substring(0,1).toUpperCase()+Ao.substring(1),Al="set"+Ai,Am=function(Aq){var Ap=Af;if(An&&Aq!==null&&Aq!==undefined){Aq=An(Aq)}if(this[Ao]!==Aq){this[Ao]=Aq;if(typeof (Ap)=="string"){Ap=this[Ap]}if(typeof (Ap)=="function"){Ap.call(this)}}},Ag="get"+Ai,Ak="is"+Ai,Aj=function(){return this[Ao]};if(!this[Al]){this[Al]=Am}if(!this[Ag]){this[Ag]=Aj}if(An===Boolean&&!this[Ak]){this[Ak]=Aj}if(typeof (Ah)!="undefined"){this[Ao]=Ah}}};function AV(){}AV.prototype=AR;function Ab(Af,Ag){this.setLatLng(Af,Ag)}Ab.prototype={setLatitude:function(Af){this.lat=parseFloat(Af)},getLatitude:function(){return this.lat},setLongitude:function(Af){this.lng=parseFloat(Af)},getLongitude:function(){return this.lng},setLatLng:function(Af,Ag){this.lat=parseFloat(Af);this.lng=parseFloat(Ag)}};function AZ(Ag,Af){this.x=Ag;this.y=Af}AZ.prototype={setX:function(Af){this.x=Af},setY:function(Af){this.y=Af},getX:function(){return this.x},getY:function(){return this.y},setXY:function(Ag,Af){this.x=Ag;this.y=Af}};function Ac(Ag,Af){this.width=parseInt(Ag||0);this.height=parseInt(Af||0)}Ac.prototype={getWidth:function(){return this.width},getHeight:function(){return this.height},setWidth:function(Af){this.width=parseInt(Af)},setHeight:function(Af){this.height=parseInt(Af)},toString:function(){return this.width+","+this.height}};function AW(Ag,Af){if(Ag==null){Ag=AX.MapCorner.TOP_LEFT}if(Af==null){Af=new AX.Size(0,0)}this.mapCorner=Ag;this.offsetSize=new AX.Size(Af.width,Af.height)}AW.prototype={getMapCorner:function(){return this.mapCorner},getOffsetSize:function(){return new AX.Size(this.offsetSize.getWidth(),this.offsetSize.getHeight())}};function Ad(Af){return function(Ag,Ah){this.x=Af(Ag);this.y=Af(Ah)}}function AQ(){var Af=document.createElement("img");Af.setAttribute("unselectable","on");Af.style.MozUserSelect="none";Af.style.display="block";Af.setAttribute("galleryimg","no");return Af}AG=AX.Icon=function(Ah,Ag,Af){this.imageURL=Ah;this.width=parseInt(Ag);this.height=parseInt(Af)};AG.prototype={createElement:function(){var Ag,Ah=this.imageURL,Af=this.width,Aj=this.height,Ai;if(z.ie6&&Ah.indexOf(".png")>=0&&Af&&Aj){Ag=document.createElement("div");Ag.style.width=Af+"px";Ag.style.height=Aj+"px";Ai=document.createElement("v:image");Ai.setAttribute("src",Ah);Ai.style.width=Af+"px";Ai.style.height=Aj+"px";Ag.insertAdjacentElement("beforeEnd",Ai)}else{Ag=AQ();Ag.src=Ah;Ag.setAttribute("width",this.width);Ag.setAttribute("height",this.height)}return Ag}};AX.LatLng=Ab;AX.Point=AZ;AX.LatLngCollection=AT;AX.RectLL=AS;AX.Size=Ac;AX.Component=AV;AX.Base=Aa;AX.MapCornerPlacement=AW;AX.PointXY=Ad(parseInt);AX.PointFloatXY=Ad(parseFloat);AX.PointLL=Ad(parseFloat);AX.TKObjectCollection=AT;AX.Icon=AG})();var U;(function(){var AS=1;function AR(){AL.TKObjectCollection.call(this)}AR.prototype={clone:function(){var AW=new AL.ShapeCollection();AL.mixin(AW,AL.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{AW.add(AL.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 Ab,AX=[];for(var AZ=0;AZ<this.getSize();AZ++){Ab=this.getAt(AZ);if((AL.BasePoi&&Ab instanceof AL.BasePoi)||Ab.getValue("latLng")){if(Ab.getValue("latLng")){AX.push(Ab.getValue("latLng"))}}else{if(AL.ShapeOverlay&&Ab instanceof AL.ShapeOverlay){if(AL.RibbonOverlay&&Ab instanceof AL.RibbonOverlay){var AV=Ab.shapePoints,AW;if(AV){AW=AV.length;for(var Aa=0;Aa<AW;Aa=Aa+2){AX.push({lat:AV[Aa],lng:AV[Aa+1]})}}}else{}}}}var Ac=new AL.RectLL(AX[0],AX[0]);for(var AY=1;AY<AX.length;AY++){Ac.extend(AX[AY])}return Ac}};U=function(AW,AV){this.display=AW;this.collection=AV;var AX=AW.zlevel("shape");this.elt=AX;this.shapes={};this._initCollection();this.resetTransform()};U.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(){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(b(AV)){AW=this.shapes[AV];AX(AW)}}},addShape:function(AY){var AV=H(AY),AX;try{AX=AY.createPeer();this._addPeer(AX,AV)}catch(AW){}h(this.display.map,"shapeadded");return AV},removeShape:function(AX){var AV=H(AX),AW=this.shapes[AV];if(AW){this._removePeer(AW,AV)}h(AX,"removed",new u(AX.className+".removed",AX));h(this.display.map,"shaperemoved")},_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 AT(AW){var AY,AX=AW.display,AV=AW._defaultShapeCollection;if(!AV){AV=new AR();AW._defaultShapeCollection=AV;AY=new U(AX,AV);AX.addLayer(AU,AY)}return AV}function AQ(AV){var AX="_shapeCollectionRegistry",AW=AV[AX];if(!AW){AW=new AL.TKObjectCollection();AV[AX]=AW}return AW}AH(AL.TileMap.prototype,{_clearCollectionContentsOnRemoval:true,addShape:function(AV){AT(this).add(AV);return AV},removeAllShapes:function(){AT(this).removeAll()},removeShape:function(AV){AT(this).removeItem(AV)},getShapes:function(AV){},getByKey:function(AV){return AT(this).getByKey(AV)},addShapes:function(AV){},replaceShapes:function(AV){},addShapeCollection:function(AZ){var AX="custom.shape.layer."+(AS++),AV=this.display,AY,AW=AQ(this);if(AW.contains(AZ)){return }try{if(this.declutter){this.declutter.suspend()}AY=new U(AV,AZ);AY.key=AX;AV.addLayer(AX,AY);AW.add(AZ)}finally{if(this.declutter){this.declutter.resume()}}},removeShapeCollection:function(AY){var AX,AV=this.getShapeCollection(AY),AW=AQ(this);if(!AV){return }AX=AV._peer;if(!AX){return }try{if(this.declutter){this.declutter.suspend()}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=AQ(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=AQ(this);if(AV){AY.push(AT(this))}for(AX=0;AX<AW.getSize();AX++){AY.push(AW.getAt(AX))}return AY},getShapeCollectionNames:function(){var AW,AX,AY=[],AV=AQ(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 AQ(this).getSize()}});AL.TileMap.prototype.getShapeByKey=AL.TileMap.getByKey;AL.TileMap.prototype.addPoi=AL.TileMap.addShape;AL.TileMap.prototype.removePoi=AL.TileMap.removePoi;AL.ShapeCollection=AR})();var AB;(function(){AB=function(Ad){var AY,AZ,Ae;for(AY=0;AY<Ad.length;AY++){Ae=Ad[AY].bounds;Ae.w=Math.abs(Ae.ulX-Ae.lrX);Ae.h=Math.abs(Ae.ulY-Ae.lrY);Ae.ix=Ae.ulX;Ae.iy=Ae.ulY}Ad.sort(AW);var Ab=AR(Ad);AU(Ab,Ad);var Ac=[],Aa=[Ac];for(AY=0;AY<Ad.length;AY++){if(Ad[AY].bounds.bias){Ac.push(Ad[AY])}else{Aa.push(Ad[AY])}}return Aa};function AV(AY,Aa){for(var AZ=0;AZ<AY.length;AZ++){if(AY[AZ]==Aa){return AZ}}return -1}function AR(Ad){var Ab=[],AY=[],Ae=0,Ac;for(var AZ=0;AZ<Ad.length;AZ++){if(AV(Ab,AZ)>=0){continue}Ac=false;for(var Aa=AZ+1;Aa<Ad.length;Aa++){if(AV(Ab,Aa)>=0){continue}if(AT(Ad[AZ].bounds,Ad[Aa].bounds)){if(!Ac){AY[Ae]=[AZ];Ab.push(AZ);Ac=true}AY[Ae].push(Aa);Ab.push(Aa)}}if(AY[Ae]&&AY[Ae].length>0){Ae++}}return AY}function AU(An,Ar){var Ad={ulX:0,ulY:0,lrX:0,lrY:0};var Ab=3.14;var Al,Ak;var At,Au;var Ae,Am;var Aq;var As;var Aa;var Ap;var Af=false;var Aj;if(An.length==1&&An[0].length==Ar.length){Af=true;Al=360/An[0].length;Ak=1350/Al;Ak=(Ak<75)?75:Ak}else{Al=10;Ak=75}var Ao;var Av,Aw;for(var AY=0,Ag=An.length;AY<Ag;AY++){Ae=-180;Am=AX(An[AY],Ar);Aq=1;Ao=Ak;for(var AZ=0,Ah=An[AY].length;AZ<Ah;AZ++){As=Ar[An[AY][AZ]];Av=Math.ceil(As.bounds.w/2);Aw=Math.ceil(As.bounds.h/2);if(!As.moveable){continue}for(var Ax=Ae;;Ax+=Al){if(Ax>=180){++Aq;Ax-=360;if(Aq>2){Ao+=30}}if(Aq>4){break}At=Math.round(Ao*Math.cos(Ab*Ax/180));Au=-Math.round(Ao*Math.sin(Ab*Ax/180));Ad.ulX=Am.x+At-Av;Ad.ulY=Am.y+Au-Aw;Ad.lrY=Ad.ulY+As.bounds.h;Ad.lrX=Ad.ulX+As.bounds.w;Aa=false;for(var Ac=0,Ai=Ar.length;Ac<Ai;Ac++){Aj=AV(An[AY],Ac);if(!Ar[Ac].moveable||(Ar[Ac].bounds.ix!=Ar[Ac].bounds.ulX)||(Ar[Ac].bounds.iy!=Ar[Ac].bounds.ulY)){if(AS(Ar[Ac].bounds.ix+Av,Ar[Ac].bounds.iy+Aw,Ar[Ac].bounds.ulX+Av,Ar[Ac].bounds.ulY+Aw,As.bounds.ix+Av,As.bounds.iy+Aw,Ad.ulX+Av,Ad.ulY+Aw)){Aa=true;break}}if(Aj<0){if((AT(Ad,Ar[Ac].bounds))||((Aq<2)&&AQ((As.bounds.ix+Av),(As.bounds.iy+Aw),Ad.ulX+Av,Ad.ulY+Aw,Ar[Ac].bounds))){Aa=true;break}else{if((Aq<2)&&(!Ar[Ac].moveable||(Ar[Ac].bounds.ix!=Ar[Ac].bounds.ulX)||(Ar[Ac].bounds.iy!=Ar[Ac].bounds.ulY))){if(AQ(Ar[Ac].bounds.ix+(Ar[Ac].bounds.w/2),Ar[Ac].bounds.iy+(Ar[Ac].bounds.h/2),Ar[Ac].bounds.ulX+Av,Ar[Ac].bounds.ulY+Aw,Ad)){Aa=true;break}}}}else{if((Aj>=0)&&(Aj<AZ)&&(AT(Ad,Ar[Ac].bounds))){Aa=true;break}}}if(Aa){continue}Ae=Ax+Al;Ap=As;As.bounds.ulX=Ad.ulX;As.bounds.ulY=Ad.ulY;As.bounds.lrX=Ad.ulX+As.bounds.w;As.bounds.lrY=Ad.ulY+As.bounds.h;As.bounds.bias={x:Ad.ulX-As.bounds.ix,y:Ad.ulY-As.bounds.iy};if(!As.bounds.bias.x&&!As.bounds.bias.y){As.bounds.bias=null}break}}}}function AT(Ag,Ah){var Ae=Ag.ulX,AY=Ag.ulY,AZ=Ag.lrX,Ac=Ag.lrY,Af=Ah.ulX,Aa=Ah.ulY,Ab=Ah.lrX,Ad=Ah.lrY;return !(Af>=AZ||Ab<=Ae||Aa>=Ac||Ad<=AY)}function AX(Aa,Ae){var Ac=0;var Ad=0;var AY;var AZ=Aa.length;for(var Ab=0;Ab<AZ;Ab++){AY=Ae[Aa[Ab]].bounds;Ac+=AY.ix+AY.w/2;Ad+=AY.iy+AY.h/2}return{x:Math.round(Ac/AZ),y:Math.round(Ad/AZ)}}function AS(Ai,Ac,Al,Ae,Ah,Ab,Aj,Ad){var AY=(Al-Ai==0)?(Ae-Ac)/1e-8:(Ae-Ac)/(Al-Ai);var Ak=Ac-AY*Ai;var Aa=(Aj-Ah==0)?(Ad-Ab)/1e-8:(Ad-Ab)/(Aj-Ah);var Am=Ab-Aa*Ah;var Af,Ag;Af=Math.round(0-(Ak-Am)/(AY-Aa));Ag=(Math.abs(AY)<Math.abs(Aa))?Math.round(Ak+AY*Af):Math.round(Am+Aa*Af);if(((Ai<=Af&&Al>=Af)||(Ai>=Af&&Al<=Af))&&((Ah<=Af&&Aj>=Af)||(Ah>=Af&&Aj<=Af))&&((Ac<=Ag&&Ae>=Ag)||(Ac>=Ag&&Ae<=Ag))&&((Ab<=Ag&&Ad>=Ag)||(Ab>=Ag&&Ad<=Ag))){var AZ=3;if(((Math.abs(Ai-Af)<=AZ)&&(Math.abs(Ac-Ag)<=AZ))||((Math.abs(Ah-Af)<=AZ)&&(Math.abs(Ab-Ag)<=AZ))||((Math.abs(Al-Af)<=AZ)&&(Math.abs(Ae-Ag)<=AZ))||((Math.abs(Aj-Af)<=AZ)&&(Math.abs(Ad-Ag)<=AZ))){return(false)}return(true)}return(false)}function AQ(Ak,Aa,Am,Ac,Ao){var AY=(Am-Ak==0)?(Ac-Aa)/1e-8:(Ac-Aa)/(Am-Ak);var Aj=Aa-AY*Ak;var Af=0;var Ae=Ao.h/1e-8;var Ai,AZ,Al,Ab;var An,Ad,Ah;for(var Ag=1;Ag<=4;Ag++){switch(Ag){case 1:Ai=Ao.ulX;AZ=Ao.ulY;Al=Ao.lrX;Ab=Ao.lrY;break;case 2:Ai=Ao.lrX;AZ=Ao.ulY;Al=Ao.lrX;Ab=Ao.lrY;break;case 3:Ai=Ao.ulX;AZ=Ao.lrY;Al=Ao.lrX;Ab=Ao.lrY;break;case 4:Ai=Ao.ulX;AZ=Ao.ulY;Al=Ao.ulX;Ab=Ao.lrY;break}if(Ag%2==1){An=AZ;Ad=Math.round(0-(Aj-An)/AY);Ah=An}else{An=AZ-Ae*Ai;Ad=Math.round(0-(Aj-An)/(AY-Ae));Ah=(Math.abs(AY)<Math.abs(Ae))?Math.round(Aj+AY*Ad):Math.round(An+Ae*Ad)}if(((Ak<=Ad&&Am>=Ad)||(Ak>=Ad&&Am<=Ad))&&((Ai<=Ad&&Al>=Ad)||(Ai>=Ad&&Al<=Ad))&&((Aa<=Ah&&Ac>=Ah)||(Aa>=Ah&&Ac<=Ah))&&((AZ<=Ah&&Ab>=Ah)||(AZ>=Ah&&Ab<=Ah))){return(true)}}return(false)}function AW(AY,AZ){return AY.bounds.ulX-AZ.bounds.ulX}})();(function(){function AQ(AR){this.map=AR;this._enabled=0;this._markers=O()}AQ.prototype={register:function(AR){if(!AR.getNeededBounds||!AR.setBias||!AR.shouldDeclutter){return }if(!this._markers.put(AR,AR)&&AR.shouldDeclutter()){this.invalidate()}},unregister:function(AR){if(this._markers.remove(AR)){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(AS,AR){this.suspend();try{if(arguments.length>1){return AR.call(AS)}else{return AS()}}finally{this.resume()}},_execute:function(){this._invalid=false;var AS=this.map.display.transform,AX=[];this._markers.each(function(Aa){AX.push({marker:Aa,bounds:Aa.getNeededBounds(AS),moveable:Aa.shouldDeclutter()=="moveable"})});var AV,AT,AU,AW,AY,AR,AZ=AB(AX);for(AY=0;AY<AZ.length;AY++){AW=AZ[AY];if(AW.marker){AW.marker.setBias(null)}else{for(AR=0;AR<AW.length;AR++){AV=AW[AR];AT=AV.marker.bias;AU=AV.bounds.bias;if(!AT||!AU||AT.x!=AU.x||AT.y!=AU.y){AV.marker.setBias(AU)}}}}}};B(g.prototype,{onMapInit$After:function(){this.declutter=new AQ(this)},getDeclutter:function(){return this.declutter},onZoomEnd$After:function(){this.declutter.invalidate()}});B(U.prototype,{_addPeer$After:function(AR){if(typeof AR.shouldDeclutter=="function"&&AR.shouldDeclutter()){var AS=this.display.map.declutter;AR._declutterCnt=AS;AS.register(AR)}},_removePeer$After:function(AR){if(AR._declutterCnt){this.display.map.declutter.unregister(AR)}}})})();var k;(function(){k=function(){this._cnts=O();this._pxX=0;this._pxY=0};var AT=AH(new AL.Component(),{createPeer:function(){return this},layerInit:function(AW,AV){this.map=AV;this.layer=AW;var AU=this;this._cnts.each(function(AX){AS(AU,AX)})},dispose:function(){var AU=this;this._cnts.each(function(AV){AQ(AU,AV);if(AV.parentNode){AV.parentNode.removeChild(AV)}})},_onDOMEvent:function(AU){},resetTransform:function(AU){this._updatePosition()},_updatePosition:function(){if(!this.map){return }if(!this._updateVisibility()){return }var AX=this.map.display.transform,AU=AX.latLngToDisplay(this.latLng.lat,this.latLng.lng),AV,AW,AZ=this.bias,AY=this._elt;if(AZ&&(AZ.x||AZ.y)){AV=AU.x+AZ.x;AW=AU.y+AZ.y;this._updateBias(AU.x,AU.y,AZ.x,AZ.y)}else{AV=AU.x;AW=AU.y;this._updateBias(AV,AW,0,0)}if(this._pxX!=AV||this._pxY!=AW){this._pxX=AV;this._pxY=AW;this._cnts.each(function(Aa){var Ab=Aa._poiOfs;Aa.style.top=(Ab.y+AW)+"px";Aa.style.left=(Ab.x+AV)+"px"});h(this,"move",new u("Poi.move",this))}},_updateBias:function(AX,AU,AV,AW){},_actIsVisible:function(){if(!this.layer){return false}var AU=(this.map?this.map.zoom:0),AV=this.layer.collection;return this.visible&&this.latLng&&AU>=Math.max(this.minZoomLevel,AV.getMinZoomLevel())&&AU<=Math.min(this.maxZoomLevel,AV.getMaxZoomLevel())},_updateVisibility:function(){var AU=this._actIsVisible();this._cnts.each(function(AV){AV.style.display=((AU&&AV._poiV)?"block":"none")});return AU},setContent:function(AV,AY,AZ,Aa,Ab,AU){var AX=this._cnts,Ac=AX.remove(AV),AW;if(Ac){AQ(this,Ac);if(Ac.parentNode){Ac.parentNode.removeChild(Ac)}}if(AY){r(AY);AY.style.position="absolute";AY._poiOfs={x:AZ,y:Aa};AY._poiZ=AU;AY._poiV=true;AX.put(AV,AY);if(Ac&&Ac.parentNode){Ac.parentNode.removeChild(Ac)}AS(this,AY);AR(this,AY,Ab)}},setContentOffset:function(AW,AV,AX){var AU=this._cnts.get(AW);if(AU){AU._poiOfs={x:AV,y:AX};AS(this,AU)}},getContent:function(AU){return this._cnts.get(AU)},setContentZIndex:function(AV,AW){var AU=this._cnts.get(AV);if(AU){AU._poiZ=AW;AS(this,AU)}},setContentVisible:function(AW,AU){var AV=this._cnts.get(AW);if(AV){AV._poiV=AU;AV.style.display=(this._actIsVisible()&&AU)?"block":"none"}},clone:function(){var AU=new k();AL.mixin(AU,AL.Util._cloneValue(this));return AU}});k.prototype=AT;AE(AT);function AR(AV,AW,AU){AW._eventGroup=AU;if(AU){AV._wireDOMEvents(AW)}}function AQ(AU,AV){if(!AV||!AV._eventGroup){return }if(AV._eventGroup){AU._unwireDOMEvents(AV)}AV._eventGroup=null}function AS(AU,AV){var AY=AU.layer,AX,AZ=AV._poiZ,AW=AV._poiOfs;if(!AY){return }AX=AY.display.zlevel(AZ||I.poi);AV.style.top=(AW.y+AU._pxY)+"px";AV.style.left=(AW.x+AU._pxX)+"px";if(AX!==AV.parentNode){AX.appendChild(AV)}}AT.defineProperty("key",null,"");AT.defineProperty("visible",null,true,"_updateVisibility");AT.defineProperty("latLng",function(AU){return{lat:AU.lat,lng:AU.lng}},null,"_updatePosition");AT.defineProperty("bias",function(AU){return{x:AU.x,y:AU.y}},null,"_updatePosition");AT.defineProperty("minZoomLevel",parseInt,1,"_updateVisibility");AT.defineProperty("maxZoomLevel",parseInt,16,"_updateVisibility")})();AL.BasePoi=k;AL.Poi=k;var f;(function(){function AT(AW){var AZ,Ab,Aa,AX,AY;this.dragStart=function(){AZ=AW.getLatLng();Ab=this.display.transform.latLngToDisplay(AZ.lat,AZ.lng);Aa=AW.getBias();AX=AW.getZIndex();AW.setZIndex("poi_drag");AW.snapback=false};this.dragMove=function(){if(!AY){h(AW,"dragstart",new u("StdPoi.dragstart",AW));AY=true;AW._dragging=true}if(AW.draggable=="bias"||(AW.declutter&&!AW.draggable)){AW.setBias({x:this.dragXY.x-Ab.x,y:this.dragXY.y-Ab.y})}else{AW.setBias(null);AW.setLatLng(this.dragLatLng)}h(AW,"drag",new u("StdPoi.drag",AW))};this.dragCancelled=function(){AW.setLatLng(AZ);AW.setBias(Aa);AW.setZIndex(AX);var Ac=new u("StdPoi.dragend",AW);Ac.cancelled=true;h(AW,"dragend",Ac)};this.dragEnd=function(){AW.setZIndex(AX);if(AY){AW._dragging=false;if(AW.snapback){this.dragCancelled()}else{h(AW,"dragend",new u("StdPoi.dragend",AW))}}}}function AQ(AW,AX){this.stateName=AW;this.cursor="default";if(AX){this.icon=new AG(AA("images/poi/star.png"),29,29)}this.shadow=new AG(AA("images/poi/shadow.png"),23,7)}AQ.prototype={isValid:function(){return !!this.icon},activate:function(){var AW=this.poi;AW.setContentVisible(this.stateName+"-icon",true);AW.setContentVisible(this.stateName+"-shadow",true);this.activated=true;if(!this.inited){this.applyIcon();this.applyShadow();this.inited=true}},deactivate:function(){var AW=this.poi;AW.setContentVisible(this.stateName+"-icon",false);AW.setContentVisible(this.stateName+"-shadow",false);this.activated=false},shadowAnchor:function(){var AX=this.getIconOffset(),AY=this.icon,AW=(AY&&AY.height)||0;return{x:AX.x,y:AX.y+AW}},getIconOffset:function(){var AW=this.iconOffset,AX=this.icon;if(!AW){AW=AX?{x:-parseInt(AX.width/2),y:-parseInt(AX.height/2)}:{x:0,y:0}}return AW},setIconOffset:function(AW){this.iconOffset=AW;this.applyIcon(true);this.applyShadow(true)},getIcon:function(){return this.icon},setIcon:function(AW){this.icon=AW;this.applyIcon();this.applyShadow(true)},applyIcon:function(Aa){var AW=this.poi,AY=this.icon,AX=this.getIconOffset()||{x:0,y:0},AZ;if(AW){if(Aa){AW.setContentOffset(this.stateName+"-icon",AX.x,AX.y)}else{AZ=AY&&AY.createElement();if(AZ){AZ.style.cursor=this.cursor}AW.setContent(this.stateName+"-icon",AZ,AX.x,AX.y,"icon",AW.zIndex);AW.setContentVisible(this.stateName+"-icon",this.activated)}}},getCursor:function(){return this.cursor},setCursor:function(AW){this.cursor=AW;var AX=this.poi,AY;if(AX){AY=AX.getContent(this.stateName+"-icon");if(AY){AY.style.cursor=AW}}},getShadow:function(){return this.icon},setShadow:function(AW){this.shadow=AW;this.applyShadow()},getShadowOffset:function(){return this.shadowOffset||{x:6,y:-4}},setShadowOffset:function(AW){this.shadowOffset=AW;this.applyShadow()},applyShadow:function(Aa){var AW=this.poi,Ac=this.shadow,AX=this.getShadowOffset(),AY=this.shadowAnchor(),Ab=AY.x+AX.x,Ad=AY.y+AX.y;if(AW){if(Aa){AW.setContentOffset(this.stateName+"-shadow",Ab,Ad)}else{var AZ=Ac&&Ac.createElement();if(AZ){AZ._zbg=true}AW.setContent(this.stateName+"-shadow",AZ,Ab,Ad,null,"poi_shadow");AW.setContentVisible(this.stateName+"-shadow",this.activated)}}},getBounds:function(Aa,Ac){var Ab=this.getIconOffset(),AZ=this.icon,AX=this.getShadowOffset(),AY=this.shadow,AW=this.shadowAnchor(),Ae;Ae={x:Aa,y:Ac,anchorX:Aa,anchorY:Ac,width:0,height:0,icon:{x:Ab.x,y:Ab.y,width:(AZ&&AZ.width)||0,height:(AZ&&AZ.height)||0},shadow:{x:AX.x+AW.x,y:AX.y+AW.y,width:(AY&&AY.width)||0,height:(AY&&AY.height)||0}};function Ad(Ah){Ah.offsetX=Ah.x;Ah.offsetY=Ah.y;Ah.x+=Aa;Ah.y+=Ac;var Af=Ah.x+Ah.width,Ag=Ah.y+Ah.height;lrX=Ae.x+Ae.width,lrY=Ae.y+Ae.height;if(Ae.x>Ah.x){Ae.x=Ah.x}if(Ae.y>Ah.y){Ae.y=Ah.y}if(lrX<Af){Ae.width+=(Af-lrX)}if(lrY<Ag){Ae.height+=(Ag-lrY)}}Ad(Ae.icon);Ad(Ae.shadow);return Ae}};f=function(AX,AW){k.call(this);this.zIndex="poi";this._dspStates={"":new AQ("",true)};this.stateStack=[""];if(AX){if(AX.lat&&(typeof AX.lat=="string")){AX.lat=parseFloat(AX.lat)}if(AX.lng&&(typeof AX.lng=="string")){AX.lng=parseFloat(AX.lng)}this.setLatLng(AX)}if(AW){this.setIcon(AW)}this.draggable=false;this.addDOMEvent("mousedown","mouseup","dblclick","mouseover","mouseout")};function AR(AX,AY,AW){AY._eventGroup=AW;if(AW){AX._wireDOMEvents(AY)}}function AV(AW,AX){if(!AX||!AX._eventGroup){return }if(AX._eventGroup){AW._unwireDOMEvents(AX)}AX._eventGroup=null}var AS=q(k,{_onDOMEvent:function(AX){if(AX.type=="click"){return }var AY=new u("MQA.Poi."+AX.type,this),AW;AY.button=W(AX)?AL.BUTTON_MQ_LEFT:AL.BUTTON_MQ_RIGHT;AY.domEvent=AX;h(this,AX.type,AY);AW=this["_onDOM"+AX.type];if(AW){AW.call(this,AX)}},_fakeClick:function(AX){var AY=new u("MQA.Poi.click"),AW;AY.button=W(AX)?AL.BUTTON_MQ_LEFT:AL.BUTTON_MQ_RIGHT;AY.domEvent=AX;AY.srcObject=this;h(this,"click",AY)},_onDOMmousedown:function(AW){if(this.draggable||this.declutter){this.map.display.startDrag(AW,new AT(this))}P(AW)},_onDOMmouseup:function(AW){if(!this._dragging){this._fakeClick(AW)}else{}},_onDOMclick:function(AW){},layerInit$After:function(){this._activated=true;this.setState(this.state);this.setBias(this.bias)},getDisplayState:function(AW){var AX=this._dspStates[AW||""];if(!AX){AX=this._dspStates[AW||""]=new AQ(AW)}return AX},setIcon:function(AX,AW){this.getDisplayState(AW).setIcon(AX)},getIcon:function(AW){return this.getDisplayState(AW).icon},setIconOffset:function(AW,AX){this.getDisplayState(AX).setIconOffset(AW)},getIconOffset:function(AW){return this.getDisplayState(AW).iconOffset||{x:0,y:0}},setShadow:function(AW,AX){this.getDisplayState(AX).setShadow(AW)},getShadow:function(AW){return this.getDisplayState(AW).getShadow()},setShadowOffset:function(AX,AW){this.getDisplayState(AW).setShadowOffset(AX)},getShadowOffset:function(AW){return this.getDisplayState(AW).getShadowOffset()},getCursor:function(AW){return this.getDisplayState(AW).getCursor()},setCursor:function(AW,AX){this.getDisplayState(AX).setCursor(AW)},setAltStateFlag:function(AW){if(AW!=this.altStateFlag){if(AW){this.setState("alt")}else{this.setState("")}}this.altStateFlag=AW},setState:function(AW){this.stateStack=[AW];if(!this._dspStates[AW]){this._dspStates[AW]=new AQ(AW)}return this._applyState(AW)},_applyState:function(AX){if(this._activated){var AY=this._dspStates[AX||""],AW=this._curDspState;if(AY&&AY.isValid()){if(AW){AW.deactivate()}AY.poi=this;AY.activate();this._curDspState=AY;return true}else{return false}}else{return false}},getState:function(){return this.stateStack[this.stateStack.length-1]||""},pushState:function(AW){this.stateStack.push(AW);this._applyState(AW)},popState:function(){if(this.stateStack.length>1){var AW=this.stateStack.pop();this._applyState(AW)}else{this.stateStack=[""];this._applyState("")}},_updateBias:function(Ah,Aj,An,Ao){if(!this._activated){return }var Ai,Ak,Al,AX=this.getIcon(),Af=this.getIconOffset();if(!An&&!Ao){if(this.getState()!=""){this.setState("")}this.setContent("leader",null);return }else{if(!this.draggable){this.draggable="bias"}if(this.getState()!="bias"){this.setState("bias");this._dspStates.bias.icon=AX;this._dspStates.bias.iconOffset=Af}}if(Q){var Aa=Math.abs(An),Ae=Math.abs(Ao),AZ=6,Am,Ac,Ad,AW,AY,Ag,Ab;Ai=Q.createSurface(Aa+2*AZ,Ae+2*AZ);Am=Ai.element();if(An>0){Ac=AZ;AW=Aa+AZ;Ak=(-An-AZ)}else{Ac=Aa+AZ;AW=AZ;Ak=(-AZ)}if(Ao>0){Ad=AZ;AY=Ae+AZ;Al=(-Ao-AZ)}else{Ad=Ae+AZ;AY=AZ;Al=(-AZ)}Ag=Ai.line();Ag.setPoints([{x:Ac,y:Ad},{x:AW,y:AY}]);Ag.setColor("#000000");Ag.setBorderWidth(2);Ag.add();Ab=Ai.ellipse();Ab.setPoints([{x:Ac-AZ/2,y:Ad-AZ/2},{x:Ac+AZ/2,y:Ad+AZ/2}]);Ab.setFillColor("#000000");Ab.add();this.setContent("leader",Am,Ak,Al,null,"poi_leader")}},shouldDeclutter:function(){var AW=this.layer;if(this.declutter||(AW&&AW.collection.declutter)){return this.declutterFixed?"fixed":"moveable"}else{return false}},getNeededBounds:function(Aa){var AZ=this.getIcon(),AX=(AZ&&AZ.width)||0,AW=(AZ&&AZ.height)||0,AY=(Aa||this.map.display.transform).latLngToDisplay(this.latLng.lat,this.latLng.lng);return{xy:AY,ulX:AY.x-AX/2,ulY:AY.y-AW/2,lrX:AY.x+AX/2,lrY:AY.y+AW/2}},getCurrentBounds:function(){var AY=this._elt,AW=this._dspStates[this.getState()],AZ=this.bias,AX=AW.getBounds(this._pxX,this._pxY);AX.biasX=(AZ&&AZ.x)||0;AX.biasY=(AZ&&AZ.y)||0;return AX},getDeclutterMode:function(){return this.declutter},setDeclutterMode:function(AW){this.setDeclutter(AW)},_applyZIndex:function(){var AX=this.zIndex,AW=this;this._cnts.each(function(AZ,AY){if(AY.match(/\-icon/)){AW.setContentZIndex(AY,AX)}})},dispose:function(){var AW=this;this._cnts.each(function(AX){AV(AW,AX);if(AX.parentNode){AX.parentNode.removeChild(AX)}});this._cnts=O();this._dspStates={"":new AQ("",true)};this.stateStack=[""];this.addDOMEvent("mousedown","mouseup","dblclick","mouseover","mouseout");h(this,"poidispose")}});f.prototype=AS;AS.defineProperty("altStateFlag");AS.defineProperty("declutter");AS.defineProperty("declutterFixed");AS.defineProperty("infoTitleHTML",null,null,function(){this.setCursor("pointer","")});AS.defineProperty("infoContentHTML",null,null,function(){this.setCursor("pointer","")});AS.defineProperty("rolloverContent",null,null,function(){this.setCursor("pointer","")});AS.defineProperty("draggable",null,null,function(){if(this.draggable){this.setCursor("pointer","")}else{this.setCursor("default","")}});AS.defineProperty("snapback");AS.defineProperty("zIndex",null,"poi","_applyZIndex");function AU(AX,AY){var AW=f.prototype;AW["get"+AY+"Icon"]=function(){return this.getIcon(AX)};AW["set"+AY+"Icon"]=function(AZ){this.setIcon(AZ,AX)};AW["get"+AY+"Shadow"]=function(){return this.getIcon(AX)};AW["set"+AY+"Shadow"]=function(AZ){this.setIcon(AZ,AX)};AW["get"+AY+"IconOffset"]=function(){return this.getIconOffset(AX)};AW["set"+AY+"IconOffset"]=function(AZ){this.setIconOffset(AZ,AX)};AW["get"+AY+"ShadowOffset"]=function(){return this.getIconOffset(AX)};AW["set"+AY+"ShadowOffset"]=function(AZ){this.setShadowOffset(AZ,AX)}}AU("bias","Bias");AU("bias","Declutter");AU("alt","Alt")})();AL.StdPoi=f;AL.Poi=f;var Q;(function(){var AQ="http://www.w3.org/2000/svg";function AX(){}var AW=new AL.Component();AX.prototype=AW;AH(AW,{init:function(Ak,Al){this.surface=Ak;this.elt=document.createElementNS(AQ,Al)},add:function(){this.surface.elt.appendChild(this.elt)},remove:function(){var Ak=this.elt;if(Ak.parentNode){Ak.parentNode.removeChild(Ak)}},dispose:function(){if(this.elt){this.remove()}this.elt=null},element:function(){return this.elt}});function AY(Ao,An,Al,Am,Ak){Ao.defineProperty(An,null,Ak,function(){var Ap=this[An];if(Am){Ap=Am(Ap)}if(!this["_no"+Al]){this.elt.setAttribute(Al,Ap)}})}AY(AW,"color","stroke",d);AY(AW,"colorAlpha","stroke-opacity",null,"1.0");AY(AW,"borderWidth","stroke-width",null,"0");AY(AW,"fillColor","fill",d);AY(AW,"fillColorAlpha","fill-opacity",null,"1.0");AY(AW,"rotation","transform",null,"");function AS(Ak){this.init(Ak,"rect")}var AZ=new AX();AS.prototype=AZ;AZ.defineProperty("points",null,null,function(){var Ap=this.points,Am=Ap[0].x,Ao=Ap[0].y,Ak=Ap[1].x,An=Ap[1].y,Al=this.elt;Al.setAttribute("x",Am);Al.setAttribute("y",Ao);Al.setAttribute("width",Ak-Am);Al.setAttribute("height",An-Ao)});function AR(Ak){this.init(Ak,"path")}var Aa=new AX();AR.prototype=Aa;Aa.defineProperty("points",null,null,function(){var Am=this.points,Al,Ak=[];for(Al=0;Al<Am.length;Al++){Ak.push(Al==0?"M":"L");Ak.push(Am[Al].x);Ak.push(Am[Al].y)}Ak.push("z");this.elt.setAttribute("d",Ak.join(" "))});function Ae(Ak){this.init(Ak,"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 AT=new AX();Ae.prototype=AT;AT.defineProperty("points",null,null,function(){var Am=this.points,Al,Ak=[];for(Al=0;Al<Am.length;Al++){Ak.push(Am[Al].x+","+Am[Al].y)}this.elt.setAttribute("points",Ak.join(" "))});function Ag(Ak){this.init(Ak,"polyline");this["_nofill"]=true;this["_nofill-opacity"]=true}var AU=new AL.Component();AH(AU,{init:function(Ak,Al){this.surface=Ak},add:function(){},remove:function(){var Al=this.surface.elt;for(var Ak=0;Ak<Al.childNodes.length;Ak++){var Am=Al.childNodes[Ak];Al.removeChild(Am)}},dispose:function(){if(this.elt){this.remove()}this.elt=null},elements:function(){var Ak=[],Am=this.surface.elt;for(var Al=0;Al<Am.childNodes.length;Al++){var An=Am.childNodes[Al];if(An.nodeName=="polyline"){Ak.push(An)}}return Ak}});Ag.prototype=AU;AU.defineProperty("points",null,null,function(){for(var Ak=0;Ak<this.points.length;Ak++){var Al=document.createElementNS(AQ,"polyline");var Ao=this.points[Ak],An,Am=[];for(An=0;An<Ao.length;An++){Am.push(Ao[An].x+","+Ao[An].y)}Al.setAttribute("points",Am.join(" "));Al.setAttribute("fill","none");this.surface.elt.appendChild(Al)}});AV(AU,"color","stroke",d);AV(AU,"colorAlpha","stroke-opacity",null,"1.0");AV(AU,"borderWidth","stroke-width",null,"0");AV(AU,"fillColor","fill",d);AV(AU,"fillColorAlpha","fill-opacity",null,"1.0");AV(AU,"rotation","transform",null,"");function AV(Ao,An,Al,Am,Ak){Ao.defineProperty(An,null,Ak,function(){var Ar=this[An];if(Am){Ar=Am(Ar)}if(!this["_no"+Al]){var Ap=this.surface;var As=Ap.elt.childNodes;for(var Aq=0;Aq<As.length;Aq++){var At=As[Aq];if(At.nodeName=="polyline"){At.setAttribute(Al,Ar)}}}})}function Ab(Ak){this.init(Ak,"ellipse")}var Ac=new AX();Ab.prototype=Ac;Ac.defineProperty("points",null,null,function(){var At=this.points,Am=At[0].x,As=At[0].y,Ak=At[1].x,Aq=At[1].y,Al=Ak-Am,Au=Aq-As,Ar=parseInt(Al/2),Ao=parseInt(Au/2),An=Ak-Ar,Ap=Aq-Ao;elt=this.elt;elt.setAttribute("cx",An);elt.setAttribute("cy",Ap);elt.setAttribute("rx",Ar);elt.setAttribute("ry",Ao)});function Af(Ak){this.init(Ak,"circle")}var Ad=new AX();Af.prototype=Ad;Ad.defineProperty("radius",null,null,null);Ad.defineProperty("points",null,null,function(){var Am=this.points,Al=this.elt,Ak=this.radius;Al.setAttribute("r",Ak);Al.setAttribute("cx",Am[0].x);Al.setAttribute("cy",Am[0].y)});function Ai(Ak){this.init(Ak,"path")}var Aj=new AX();Ai.prototype=Aj;Aj.defineProperty("path",null,null,function(){this.elt.setAttribute("d",this.path)});function Ah(Am,Ak){var Al=document.createElementNS(AQ,"svg");this.elt=Al;if(!Al.style){Al.style={}}Al.setAttribute("height",Ak);Al.setAttribute("width",Am);Al.setAttribute("xmlns",AQ);Al.setAttribute("version","1.1");Al.setAttribute("viewBox","0 0 "+Am+" "+Ak);Al.appendChild(document.createElement("defs"));this.width=Am;this.height=Ak}Ah.prototype={element:function(){return this.elt},rect:function(){return new AS(this)},polygon:function(){return new AR(this)},ellipse:function(){return new Ab(this)},line:function(){return new Ae(this)},circle:function(){return new Af(this)},multiline:function(){return new Ag(this)},path:function(){return new Ai(this)},dispose:function(){var Ak=this.elt;if(Ak){Ak.parentNode.removeChild(Ak)}this.elt=null}};AL.Graphics_SVG={name:"svg",initialize:function(){},createSurface:function(Al,Ak){return new Ah(Al,Ak)},supportsSVG:function(){if(!document.createElementNS){return false}var Ak=document.createElementNS(AQ,"svg");return Ak.width!="undefined"?true:false}}})();(function(){function AU(Aj){var Ai=Infinity,Al=Infinity,Ak;for(Ak=0;Ak<Aj.length;Ak++){if(Ai>Aj[Ak].x){Ai=Aj[Ak].x}if(Al>Aj[Ak].y){Al=Aj[Ak].y}}return{x:Ai,y:Al}}function AW(){}var AV=new AL.Component();AW.prototype=AV;AH(AV,{init:function(Ai,Ak){this.surface=Ai;var Aj=document.createElement(Ak);this.elt=Aj},add:function(){this.surface.elt.appendChild(this.elt)},remove:function(){var Ai=this.elt;if(Ai.parentNode){Ai.parentNode.removeChild(Ai)}},dispose:function(){if(this.elt){this.remove()}this.elt=null},element:function(){return this.elt}});function Ac(Am,Al,Aj,Ak,Ai){Am.defineProperty(Al,null,Ai,function(){var An=this[Al];if(Ak){An=Ak(An)}this.elt.setAttribute(Aj,An)})}AV.defineProperty("color");AV.defineProperty("colorAlpha",null,"1.0");AV.defineProperty("borderWidth",null,"0");AV.defineProperty("fillColor");AV.defineProperty("fillColorAlpha",null,"1.0");AV.defineProperty("rotation",null,"");function AR(Ai){this.init(Ai,"v:rect");var Aj=this.elt,Al,Ak;this.elt.style.position="absolute";this.elt.setAttribute("stroked","true");Al=document.createElement("v:fill");Aj.appendChild(Al);this.fill=Al;Ak=document.createElement("v:stroke");Ak.setAttribute("miterlimit","8.0");Ak.setAttribute("joinstyle","miter");Ak.setAttribute("endcap","flat");this.stroke=Ak;Aj.appendChild(Ak)}var AX=new AW();AR.prototype=AX;AX.defineProperty("points",null,null,function(){var An=this.points,Ak=An[0].x,Am=An[0].y,Ai=An[1].x,Al=An[1].y,Aj=this.elt;Aj.style.left=Ak+"px";Aj.style.top=Am+"px";Aj.style.width=(Ai-Ak)+"px";Aj.style.height=(Al-Am)+"px"});AH(AX,{setColor:function(Ai){this.color=Ai;this.stroke.setAttribute("color",Ai)},setColorAlpha:function(Ai){this.colorAlpha=Ai;this.stroke.setAttribute("opacity",Ai)},setBorderWidth:function(Ai){this.borderWidth=Ai;this.stroke.setAttribute("weight",Ai)},setFillColor:function(Ai){this.fillColor=Ai;this.fill.setAttribute("color",Ai)},setFillColorAlpha:function(Ai){this.fillColorAlpha=Ai;this.fill.setAttribute("opacity",Ai)}});function AQ(Ai){this.init(Ai,"v:shape");var Aj=this.elt,Am,Al,Ak;Aj.style.width=Ai.width;Aj.style.height=Ai.height;Aj.style.position="absolute";Aj.setAttribute("stroked","true");Aj.setAttribute("coordsize",Ai.width+" "+Ai.height);Aj.setAttribute("coordorigin","0 0");Am=document.createElement("v:fill");Aj.appendChild(Am);this.fill=Am;Al=document.createElement("v:stroke");Al.setAttribute("miterlimit","8.0");Al.setAttribute("joinstyle","miter");Al.setAttribute("endcap","flat");this.stroke=Al;Aj.appendChild(Al);Ak=document.createElement("v:path");Aj.appendChild(Ak);this.path=Ak}var AY=new AW();AQ.prototype=AY;AY.defineProperty("points",null,null,function(){var Ak=this.points,Aj,Ai=[];for(Aj=0;Aj<Ak.length;Aj++){Ai.push(Aj==0?"M":"l");Ai.push(Aj==0?(Ak[Aj].x+" "+Ak[Aj].y):(Ak[Aj].x+","+Ak[Aj].y))}Ai.push("x e");this.path.setAttribute("v",Ai.join(" "))});AH(AY,{setColor:function(Ai){this.color=Ai;this.stroke.setAttribute("color",Ai)},setColorAlpha:function(Ai){this.colorAlpha=Ai;this.stroke.setAttribute("opacity",Ai)},setBorderWidth:function(Ai){this.borderWidth=Ai;this.stroke.setAttribute("weight",Ai)},setFillColor:function(Ai){this.fillColor=Ai;this.fill.setAttribute("color",Ai)},setFillColorAlpha:function(Ai){this.fillColorAlpha=Ai;this.fill.setAttribute("opacity",Ai)},setRotation:function(Ai){this.rotation=Ai;this.elt.style.rotation=Ai}});function Ad(Ai){this.init(Ai,"v:polyline");var Aj=this.elt,Ak;Aj.style.width=Ai.width+"px";Aj.style.height=Ai.height+"px";Aj.style.position="absolute";Aj.style.top="0px";Aj.style.left="0px";Aj.setAttribute("stroked","true");Aj.setAttribute("coordsize",Ai.width+" "+Ai.height);Aj.setAttribute("filled","false");Ak=document.createElement("v:stroke");Ak.setAttribute("miterlimit","8.0");Ak.setAttribute("joinstyle","round");Ak.setAttribute("endcap","round");Ak.setAttribute("weight","0px");this.stroke=Ak;Aj.appendChild(Ak)}var AS=new AW();Ad.prototype=AS;AS.defineProperty("points",null,null,function(){var Al=this.points,Ak,Aj=[],Am=AU(Al),Ai=this.elt;for(Ak=0;Ak<Al.length;Ak++){Aj.push((Al[Ak].x-Am.x)+","+(Al[Ak].y-Am.y))}Ai.setAttribute("points",Aj.join(" "));Ai.style.left=Am.x+"px";Ai.style.top=Am.y+"px"});AH(AS,{setColor:function(Ai){this.color=Ai;this.stroke.setAttribute("color",Ai)},setColorAlpha:function(Ai){this.colorAlpha=Ai;this.stroke.setAttribute("opacity",Ai)},setBorderWidth:function(Ai){this.borderWidth=Ai;this.stroke.setAttribute("weight",Ai+"px")}});function Ae(Ai){this.init(Ai,"v:polyline")}var AT=new AL.Component();Ae.prototype=AT;AT.defineProperty("points",null,null,function(){var Ap=this.points,Aj=this.surface;AC("Set Points");for(var Am=0;Am<this.points.length;Am++){var Al=document.createElement("v:polyline");var Ai=this.points[Am],An,Ak=[];var Ao=AU(Ai);for(An=0;An<Ai.length;An++){Ak.push((Ai[An].x-Ao.x)+","+(Ai[An].y-Ao.y))}Al.setAttribute("points",Ak.join(" "));Al.setAttribute("fill","none");Al.setAttribute("stroked","true");Al.setAttribute("coordsize",Aj.width+" "+Aj.height);Al.setAttribute("filled","false");Al.style.left=Ao.x+"px";Al.style.top=Ao.y+"px";Al.style.position="absolute";var Aq=document.createElement("v:stroke");Aq.setAttribute("miterlimit","8.0");Aq.setAttribute("joinstyle","round");Aq.setAttribute("endcap","round");Aq.setAttribute("color",this.color);Aq.setAttribute("opacity",this.colorAlpha);Aq.setAttribute("weight",this.BorderWidth+"px");Al.appendChild(Aq);this.surface.elt.appendChild(Al)}});AH(AT,{init:function(Ai,Aj){this.surface=Ai},add:function(){},remove:function(){var Aj=this.surface.elt;for(var Ai=0;Ai<Aj.childNodes.length;Ai++){var Ak=Aj.childNodes[Ai];Aj.removeChild(Ak)}},dispose:function(){if(this.elt){this.remove()}this.elt=null},elements:function(){var Ai=[],Ak=this.surface.elt;for(var Aj=0;Aj<Ak.childNodes.length;Aj++){var Al=Ak.childNodes[Aj];if(Al.nodeName=="polyline"){Ai.push(Al)}}return Ai}});function Aa(Am,Al,Aj,Ak,Ai){Am.defineProperty(Al,null,Ai,function(){var Ar=this[Al];if(Ak){Ar=Ak(Ar)}var An=this.surface;var As=An.elt.childNodes;for(var Aq=0;Aq<As.length;Aq++){var Au=As[Aq];if(Au.nodeName=="polyline"){Au.setAttribute(Aj,Ar);var Ap=Au.childNodes;for(var Ao=0;Ao<Ap.length;Ao++){var At=Ap[Ao];if(At.nodeName=="stroke"){At.setAttribute(Aj,Ar)}}}}})}Aa(AT,"color","color",null,"#000000");Aa(AT,"colorAlpha","opacity",null,"1.0");Aa(AT,"borderWidth","weight",null,"5");function AZ(Ai){this.init(Ai,"v:oval");var Aj=this.elt,Al,Ak;Aj.style.position="absolute";Aj.setAttribute("stroked","true");Al=document.createElement("v:fill");Aj.appendChild(Al);this.fill=Al;Ak=document.createElement("v:stroke");Ak.setAttribute("miterlimit","8.0");Ak.setAttribute("joinstyle","miter");Ak.setAttribute("endcap","flat");this.stroke=Ak;Aj.appendChild(Ak)}var Ab=new AW();AZ.prototype=Ab;Ab.defineProperty("points",null,null,function(){var Ap=this.points,Al=Ap[0].x,Ao=Ap[0].y,Aj=Ap[1].x,Am=Ap[1].y,An=Aj-Al,Ai=Am-Ao,Ak=this.elt;Ak.style.left=Al+"px";Ak.style.top=Ao+"px";Ak.style.width=An;Ak.style.height=Ai});AH(Ab,{setColor:function(Ai){this.color=Ai;this.stroke.setAttribute("color",Ai)},setColorAlpha:function(Ai){this.colorAlpha=Ai;this.stroke.setAttribute("opacity",Ai)},setBorderWidth:function(Ai){this.borderWidth=Ai;this.stroke.setAttribute("weight",Ai)},setFillColor:function(Ai){this.fillColor=Ai;this.fill.setAttribute("color",Ai)},setFillColorAlpha:function(Ai){this.fillColorAlpha=Ai;this.fill.setAttribute("opacity",Ai)}});function Ag(Ai){this.init(Ai,"v:shape");var Aj=this.elt,Al,Ak,Am;Aj.style.width=Ai.width;Aj.style.height=Ai.height;Aj.style.position="absolute";Aj.setAttribute("stroked","true");Aj.setAttribute("coordsize",Ai.width+" "+Ai.height);Aj.setAttribute("coordorigin","0 0");Al=document.createElement("v:fill");Aj.appendChild(Al);this.fill=Al;Ak=document.createElement("v:stroke");Ak.setAttribute("miterlimit","8.0");Ak.setAttribute("joinstyle","miter");Ak.setAttribute("endcap","flat");this.stroke=Ak;Aj.appendChild(Ak);Am=document.createElement("v:path");Aj.appendChild(Am);this.pathElt=Am}var Ah=new AW();Ag.prototype=Ah;Ah.defineProperty("path",null,null,function(){this.pathElt.setAttribute("v",this.path)});AH(Ah,{setColor:function(Ai){this.color=Ai;this.stroke.setAttribute("color",Ai)},setColorAlpha:function(Ai){this.colorAlpha=Ai;this.stroke.setAttribute("opacity",Ai)},setBorderWidth:function(Ai){this.borderWidth=Ai;this.stroke.setAttribute("weight",Ai)},setFillColor:function(Ai){this.fillColor=Ai;this.fill.setAttribute("color",Ai)},setFillColorAlpha:function(Ai){this.fillColorAlpha=Ai;this.fill.setAttribute("opacity",Ai)},setRotation:function(Ai){this.rotation=Ai;this.elt.style.rotation=Ai}});function Af(Ak,Ai){var Aj=document.createElement("div");Aj.style.width=Ak+"px";Aj.style.height=Ai+"px";this.elt=Aj;this.width=Ak;this.height=Ai}Af.prototype={element:function(){return this.elt},rect:function(){return new AR(this)},polygon:function(){return new AQ(this)},ellipse:function(){return new AZ(this)},line:function(){return new Ad(this)},circle:function(){return new Circle(this)},multiline:function(){return new Ae(this)},path:function(){return new Ag(this)},dispose:function(){var Ai=this.elt;if(Ai){Ai.parentNode.removeChild(Ai)}this.elt=null}};AL.Graphics_VML={name:"vml",initialize:function(Ai){if(Ai){AL.Graphics=Q=this}if(this._inited){return }this._inited=true;document.namespaces.add("v","urn:schemas-microsoft-com:vml");var Aj;if(document.styleSheets.length==0){document.getElementsByTagName("head")[0].appendChild(document.createElement("style"))}Aj=document.styleSheets[0];if(!document.documentMode||document.documentMode<8){Aj.addRule("v\\:*","behavior: url(#default#VML);display: inline-block;")}if(document.documentMode&&document.documentMode>=8){var Ak="behavior: url(#default#VML);display: inline-block;";Aj.addRule("v\\:shape",Ak);Aj.addRule("v\\:group",Ak);Aj.addRule("v\\:polyline",Ak);Aj.addRule("v\\:stroke",Ak);Aj.addRule("v\\:fill",Ak);Aj.addRule("v\\:rect",Ak);Aj.addRule("v\\:oval",Ak);Aj.addRule("v\\:path",Ak)}},createSurface:function(Aj,Ai){return new Af(Aj,Ai)}}})();if(z.name=="msie"){Q=AL.Graphics_VML}else{if(AL.Graphics_SVG&&AL.Graphics_SVG.supportsSVG()){Q=AL.Graphics_SVG}else{Q=null}}AL.Graphics=Q;if(Q){Q.initialize()}(function(){var Ad=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,Ae,AU,Ag={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function AQ(Ah){Ad.lastIndex=0;return Ad.test(Ah)?'"'+Ah.replace(Ad,function(Ai){var Aj=Ag[Ai];return typeof Aj==="string"?Aj:"\\u"+("0000"+Ai.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+Ah+'"'}function Aa(Ao,Al){var Aj,Ai,Ap,Ah,Am=Ae,Ak,An=Al[Ao];switch(typeof An){case"string":return AQ(An);case"number":return isFinite(An)?String(An):"null";case"boolean":case"null":return String(An);case"object":if(!An){return"null"}Ae+=AU;Ak=[];if((Object.prototype.toString.apply(An)==="[object Array]")||(typeof (An)=="object"&&typeof (An.length)=="number"&&(An.length===0||typeof ((An[0]))!="undefined"))){Ah=An.length;for(Aj=0;Aj<Ah;Aj+=1){Ak[Aj]=Aa(Aj,An)||"null"}Ap=Ak.length===0?"[]":Ae?"[\n"+Ae+Ak.join(",\n"+Ae)+"\n"+Am+"]":"["+Ak.join(",")+"]";Ae=Am;return Ap}for(Ai in An){if(Object.hasOwnProperty.call(An,Ai)){Ap=Aa(Ai,An);if(Ap){Ak.push(AQ(Ai)+(Ae?": ":":")+Ap)}}}Ap=Ak.length===0?"{}":Ae?"{\n"+Ae+Ak.join(",\n"+Ae)+"\n"+Am+"}":"{"+Ak.join(",")+"}";Ae=Am;return Ap}}function AT(Ah){if(window.JSON&&window.JSON.stringify){return window.JSON.stringify(Ah)}return Aa("",{"":Ah})}function Ab(Ak){var Ai=[],Aj={},Ah;for(Ah in Ak){if(!Aj[Ah]){Ai.push(encodeURIComponent(Ah)+"="+encodeURIComponent(String(Ak[Ah])))}}return Ai.join("&")}function Ac(){function Ah(Aj){try{return new ActiveXObject(Aj)}catch(Ak){return undefined}}if(window.XMLHttpRequest){return new window.XMLHttpRequest()}if(window.ActiveXObject){var Ai=Ah("Msxml2.XMLHTTP.6.0")||Ah("Msxml2.XMLHTTP.3.0")||Ah("Msxml2.XMLHTTP")||Ah("Microsoft.XMLHTTP");if(Ai){return Ai}}throw new Error("Current browser configuration does not support XMLHttpRequest")}function AR(Ah){try{if(window.JSON&&window.JSON.parse){return window.JSON.parse(Ah)}return AL._jsEval("("+Ah+")")}catch(Ai){return undefined}}function AV(Ah,Ai,Am){if(!Ai){Ai={}}var Ap=Ac(),An,Ao,Aj=Ai.verb||"GET",Ak=(typeof Ai.async!="undefined")?Ai.async:true;setup=Ai.setup;Ap.open(Aj,Ah,Ak);if(setup){setup(Ap)}if((Aj=="GET")&&(AL.browser.name=="msie")){Ap.setRequestHeader("If-Modified-Since","Thu, 1 Jan 1970 00:00:00 GMT")}var Al=function(){Ap.onreadystatechange=AO;var Aq,Au;try{Aq=Ap.status}catch(At){}Au=Ap;Ap=null;if(Ao){clearTimeout(Ao)}if(Aq>=200&&Aq<=299){Am(Au,false)}else{var As;try{As=Au.responseText}catch(Ar){}Am(Au,{reason:"HTTP error",statusCode:Aq,responseText:As})}};Ap.onreadystatechange=function(){if(An){return }if(Ap.readyState==4){Al()}};if(Ai.timeout){Ao=setTimeout(function(){if(An){return }An=true;Ap.onreadystatechange=AO;Ap.abort();Am(Ap,{reason:"Request timed out"});Ap=null},Ai.timeout)}if(Ai.postData){}if(Ai.formUrlEncoded){Ap.setRequestHeader("Content-type","application/x-www-form-urlencoded");Ap.setRequestHeader("Content-length",Ai.postData.length);Ap.setRequestHeader("Connection","close")}Ap.send(Ai.postData||null);if(!Ak&&(AL.browser.name=="firefox")){Al()}return function(){if(Ap){An=true;Ap.onreadystatechange=AO;Ap.abort();Ap=null;if(Ao){clearTimeout(Ao)}}}}function AZ(Ah,Ai,Aj){return AV(Ah,Ai,function(Al,Am){if(Am){Aj(false,Am)}else{var Ak=AR(Al.responseText);if(!Ak){Aj(false,{reason:"Parse Error",responseText:Al.responseText})}else{Aj(Ak,null,Al.responseText)}}})}function AX(Ah,Ak,Ai,Aj){Ai=AH(Ai,{verb:"POST",setup:function(Al){Al.setRequestHeader("Content-Type","application/json; charset=UTF-8")},postData:AT(Ak)});return AZ(Ah,Ai,Aj)}function Af(Ah,Ai){var Aj=document.createElement("script");Aj.src=Ah;Aj.type="text/javascript";document.body.appendChild(Aj);return function(){}}function AY(Ah,Ai,Ak){var Aj=document.createElement("script");Aj.src=Ah;Aj.type="text/javascript";if(AL.browser.name=="msie"){Aj.onreadystatechange=function(){Ak()}}else{Aj.onload=function(){Ak()}}document.body.appendChild(Aj);return function(){}}var AS=0;function AW(){return(new Date().getTime()+","+(++AS))}AL.IO={toQueryString:Ab,parseJSON:AR,doXhr:AV,doGetJSON:AZ,doPostJSON:AX,doJSONP:Af,doJSONV:AY,stringifyJSON:AT,cacheBust:AW}})();var T;(function(){function AQ(AS,AT){this.stateName=AS;this.cursor="pointer";if(AT){}}AQ.prototype={isValid:function(){return true},activate:function(){var AS=this.poi;if(this.icon){AS.setContentVisible("-icon",true)}this.activated=true;if(this.icon){if(!this.inited){this.applyIcon();this.inited=true}}},deactivate:function(){var AS=this.poi;AS.setContentVisible("-icon",false);this.activated=false},getIconOffset:function(){var AS=this.iconOffset,AT=this.icon;if(!AS){AS=AT?{x:-parseInt(AT.width/2),y:-parseInt(AT.height/2)}:{x:0,y:0}}return AS},setIconOffset:function(AS){this.iconOffset=AS;this.applyIcon(true)},getIcon:function(){return this.icon},setIcon:function(AS){this.icon=AS;this.applyIcon()},applyIcon:function(AW){var AS=this.poi,AU=this.icon,AT=this.getIconOffset()||{x:0,y:0},AV;if(AS){if(AW){AS.setContentOffset(this.stateName+"-icon",AT.x,AT.y)}else{AV=AU&&AU.createElement();if(AV){AV.style.cursor=this.cursor}AS.setContent(this.stateName+"-icon",AV,AT.x,AT.y,"icon",AS.zIndex);AS.setContentVisible(this.stateName+"-icon",this.activated)}}},getBounds:function(AY,AS){var AT=this.poi,AV=this.getIconOffset(),AX=this.icon,AW;AW={x:AY,y:AS,anchorX:AY,anchorY:AS,width:0,height:0,icon:{x:AV.x,y:AV.y,width:(AX&&AX.width)||0,height:(AX&&AX.height)||0}};function AU(Ab){Ab.offsetX=Ab.x;Ab.offsetY=Ab.y;Ab.x+=AY;Ab.y+=AS;var AZ=Ab.x+Ab.width,Aa=Ab.y+Ab.height;lrX=AW.x+AW.width,lrY=AW.y+AW.height;if(AW.x>Ab.x){AW.x=Ab.x}if(AW.y>Ab.y){AW.y=Ab.y}if(lrX<AZ){AW.width+=(AZ-lrX)}if(lrY<Aa){AW.height+=(Aa-lrY)}}AU(AW.icon);return AW}};T=function(AT,AS){k.call(this);this.zIndex="hover_poi";this.xmlUrl="";this.xmlUrlVideo="";this._dspStates={"":new AQ("",true)};this.stateStack=[""];if(AT){this.setLatLng(AT)}if(AS){this.setIcon(AS)}this.draggable=false;this.addDOMEvent("click","mouseover","mouseout","mousedown")};var AR=q(k,{_onDOMEvent:function(AT){if(AT.type=="mousedown"){this._isDown=true;P(AT);return }else{if(AT.type=="mouseup"&&this._isDown){this._isDown=false;P(AT);alert("Clicked");return }}AS=this["_onDOM"+AT.type];if(AS){AS.call(this,AT)}else{var AU=new u("MQA.HoverPoi."+AT.type,this),AS;AU.button=W(AT)?AL.BUTTON_MQ_LEFT:AL.BUTTON_MQ_RIGHT;AU.domEvent=AT;h(this,AT.type,AU)}},_onDOMclick:function(AT){var AU=new u("MQA.HoverPoi.click"),AS;AU.button=W(AT)?AL.BUTTON_MQ_LEFT:AL.BUTTON_MQ_RIGHT;AU.domEvent=AT;AU.srcObject=this;AU.xmlUrl=this.xmlUrl;AU.xmlUrlVideo=this.xmlUrlVideo;h(this,"click",AU)},layerInit$After:function(){this._activated=true;this.setState(this.state);this.setBias(this.bias)},getDisplayState:function(AS){var AT=this._dspStates[AS||""];if(!AT){AT=this._dspStates[AS||""]=new AQ(AS)}return AT},setIconOffset:function(AS,AT){this.getDisplayState(AT).setIconOffset(AS)},getIconOffset:function(AS){return this.getDisplayState(AS).iconOffset||{x:0,y:0}},setIcon:function(AT,AS){this.getDisplayState(AS).setIcon(AT)},getIcon:function(AS){return this.getDisplayState(AS).icon},getCursor:function(){return this.cursor},setCursor:function(AS){this.cursor=AS;var AT=this.poi,AU;if(AT){AU=AT.getContent("-icon");if(AU){AU.style.cursor=AS}}},setState:function(AS){this.stateStack=[AS];return this._applyState(AS)},_applyState:function(AT){if(this._activated){var AU=this._dspStates[AT||""],AS=this._curDspState;if(AU&&AU.isValid()){if(AS){AS.deactivate()}AU.poi=this;AU.activate();this._curDspState=AU;return true}else{return false}}else{return false}},getState:function(){return this.stateStack[this.stateStack.length-1]||""},getCurrentBounds:function(){var AU=this._elt,AS=this._dspStates[this.getState()],AV=this.bias,AT=AS.getBounds(this._pxX,this._pxY);AT.biasX=(AV&&AV.x)||0;AT.biasY=(AV&&AV.y)||0;return AT},_applyZIndex:function(){var AT=this.zIndex,AS=this;this._cnts.each(function(AV,AU){if(AU.match(/\-icon/)){AS.setContentZIndex(AU,AT)}})}});T.prototype=AR;AR.defineProperty("infoTitleHTML");AR.defineProperty("infoContentHTML");AR.defineProperty("rolloverContent");AR.defineProperty("zIndex",null,"poi","_applyZIndex");B(T.prototype,{dispose$Before:function(){if(!this.map){return }var AS=this.map.windowManager;AS.close("rolloverwindow",this)},onEvent$After:function(AU,AS){var AT=this.map.windowManager;switch(AU){case"mouseover":if(this._isMouseOver){return }this._isMouseOver=true;AT.onPoiMouseOver(this,true);P(AS);break;case"mouseout":if(this._isMouseOver){this._isMouseOver=false;AT.onPoiMouseOver(this,false)}P(AS);break}},onEvent$Before:function(AU,AS){var AT=this.map.windowManager;switch(AU){case"click":P(AS);break}},onWindowClose:function(AS){if(AS===this.rolloverWindow){delete this.rolloverWindow;this._isRollover=0}}})})();AL.HoverPoi=T;(function(){var AS=window.MQA,AV=AS.Log.debug,AW=AS.extend,AR=AS.attach,AT=AS.Util.getLocalCoords,AU=AS.EventUtil.hitch,AQ=AS.EventUtil.stop;AW(AS.TileMap.prototype,{_mouseWheel:{init:false,enabled:false,timerId:null,newZoom:null,newLatLng:null,options:{}},_resetMouseWheelZoom:function(){var AZ=this,AY=AZ._mouseWheel.newZoom,AX=AZ._mouseWheel.newLatLng;if(AX&&AY){AZ.setCenter(AX,AY)}else{if(AY){AZ.setZoomLevel(AY)}}AZ._mouseWheel.timerId=null;AZ._mouseWheel.newZoom=null;AZ._mouseWheel.newLatLng=null},_handleMouseWheelScroll:function(Ab){var Aa=this,Ab=(Ab?Ab:window.event),AX=Aa._mouseWheel.options,AY=Aa._mouseWheel.newZoom||Aa.getZoomLevel(),Ac;if(!Aa._mouseWheel.enabled){return }if(Aa._mouseWheel.timerId){clearTimeout(Aa._mouseWheel.timerId);Aa._mouseWheel.timerId=null}if(Ab.detail){Ac=Ab.detail<0?1:-1}else{if(Ab.wheelDelta){Ac=Ab.wheelDelta<0?-1:1;if(AS.browser.name==="opera"){Ac=Ac*-1}}}AY=AY+Ac;if(AY>16){AY=16}if(AY<1){AY=1}Aa._mouseWheel.newZoom=AY;if((Ac>0&&AX.centerOnZoomIn)||(Ac<0&&AX.centerOnZoomOut)){var AZ=AT(Aa.parent,Ab);Aa._mouseWheel.newLatLng=Aa.getCenterOffset(AZ,AY)}Aa._mouseWheel.timerId=setTimeout(AU(Aa,"_resetMouseWheelZoom"),AX.zoomInterval);AQ(Ab)},enableMouseWheelZoom:function(AX){var AY=this,AX=AX||{},AZ="mousewheel";AX.centerOnZoomIn=AX.centerOnZoomIn||true;AX.centerOnZoomOut=AX.centerOnZoomOut||true;AX.zoomInterval=AX.zoomInterval||200;AY._mouseWheel.options=AX;if(AS.browser.name==="firefox"){AZ="DOMMouseScroll"}if(!AY._mouseWheel.init){AY.addDOMEvent(AZ);AR(AY,"_onDOMEvent","before",function(Aa){if(Aa.type==AZ){this._handleMouseWheelScroll(Aa,this)}});AY._mouseWheel.init=true}AY._mouseWheel.enabled=true},disableMouseWheelZoom:function(){this._mouseWheel.enabled=false}});AS.Loader._moduleLoaded("mousewheel")})();(function(){var AS=window.MQA,AU=AS.Log.debug,AW=AS.EventManager,AV=AW.addListener,AQ=AW.removeListener;var AR=["dragstart","dragend","movestart","moveend","zoomend","dblclick","click"];function AT(AX){this.map=AX;this.layerKey="dragtrack-"+AS.Util.objectId(this);this.map.display.addLayer(this.layerKey,this);this._inEvent=0;this._pendingChange=false;this.reset();for(var AY=0;AY<AR.length;AY++){AV(this.map,AR[AY],this.handleMapEvent,this)}}AT.prototype={handleMapEvent:function(AY){var AX=AY.eventName.toLowerCase();if(AX.match(/click/)){this._inEvent++}else{if(AX.match(/dragstart/)){this._inEvent++}else{if(AX.match(/movestart/)){this._inEvent++}else{if(AX.match(/moveend/)){if(this._inEvent>0){if(this._pendingChange){this.onChange()}this._pendingChange=false;this._inEvent--}else{this.reset()}}else{if(AX.match(/zoomend/)){this.onChange();this._pendingChange=false;this.reset()}}}}}},dispose:function(){delete this.map.display.layers[this.layerKey];for(var AX=0;AX<AR.length;AX++){AQ(this.map,AR[AX],this.handleMapEvent,this)}},onChange:function(){},reset:function(){var AX=this.map,AY=AX.display,AZ=AY.transform;this.xPercent=0;this.yPercent=0;this.fullDrag=false;this.scaleChange=false;this._lscale=AZ.scale;this._lulX=AY.ulX;this._lulY=AY.ulY;this._lwidth=AY.width;this._lheight=AY.height},setViewport:function(Ag,AX,Af,AY){var Ad=this.map.display.transform,Aa=Ad.scale,Ae=Ag-this._lulX,Ab=AX-this._lulY,Ac=100*(Ae/Af),AZ=100*(Ab/AY);if(Aa!=this._lscale){this.reset();this.scaleChange=true}else{if(Math.abs(Ac)>100||Math.abs(AZ)>100){this.reset();this.fullDrag=true}else{this.xPercent+=Ac;this.yPercent+=AZ;this.scaleChange=false;this._lulX=Ag;this._lulY=AX;this._lwidth=Af;this._lheight=AY;this._lscale=Ad.scale;this.fullDrag=false}}if(this._inEvent>0){this._pendingChange=true}}};AS.DragTracker=AT;AS.Loader._moduleLoaded("dragtrack")})();(function(){var AZ=window.MQA,AW=AZ.Log.debug,Ac=AZ.mixin,AV=AZ.connect,AT=AZ.EventUtil.observe,AQ=AZ.EventManager.trigger,Ab=AZ.EventUtil.hitch,AX=AZ.Event;var AZ=window.MQA;function AR(Ad){return function(){var Af,Ag=[],Ae=this;for(Af=0;Af<arguments.length;Af++){Ag.push(arguments[Af])}AZ.withModule("basicwindow",function(){Ad.apply(Ae,Ag)})}}function AU(Ad,Ae){if(Ad.rolloverContent){Ae.setContent(Ad.rolloverContent)}else{Ae.setTitle(Ad.infoTitleHTML||"");Ae.setTitleBackgroundColor(Ad.titleBackgroundColor||"");Ae.setContent(Ad.infoContentHTML||"")}}function Aa(Ad,Ae){Ae.setTitle(Ad.infoTitleHTML||"");Ae.setTitleBackgroundColor(Ad.titleBackgroundColor||"");Ae.setContent(Ad.infoContentHTML||"")}function AS(Ag,Ae,Ai){var Ah=Ae.getCurrentBounds();Ai.setPosition({lat:Ae.latLng.lat,lng:Ae.latLng.lng,offsetX:Ah.biasX,offsetY:Ah.biasY+Ah.icon.offsetY,iconHeight:Ah.icon.height,iconWidth:Ah.icon.width});var Ad=Ag.windowManager.maxSizeDivisor||1,Af=Ai.getNaturalDimensions(),Aj=Ai.maxWidth||Ag.width/Ad,Ak=Ai.maxHeight||Ag.height/Ad;if(Ai.settings.titleVisible){Af.width+=20}if(Af.width>Aj){Af.width=Aj}if(Af.height>Ak){Af.height=Ak}Ai.setDimensions(Af.width,Af.height)}function AY(Ag,Ai){var Ah=Ag.display,Ad=Ai.getBounds(),Ak=Ag.windowManager,Aj={x1:Ah.ulX+(Ak.scrollBorderLeft||50),y1:Ah.ulY+(Ak.scrollBorderTop||50),x2:Ah.ulX+Ah.width-(Ak.scrollBorderRight||50),y2:Ah.ulY+Ah.height-(Ak.scrollBorderBottom||50)},Ae=0,Af=0;if(Ad.x1<Aj.x1){Ae=Ad.x1-Aj.x1}else{if(Ad.x2>Aj.x2){Ae=Ad.x2-Aj.x2}}if(Ad.y1<Aj.y1){Af=Ad.y1-Aj.y1}else{if(Ad.y2>Aj.y2){Af=Ad.y2-Aj.y2}}if(Ae||Af){Ag.slideMapToPoint(Ah.width/2+Ae,Ah.height/2+Af)}}AZ.extend(AZ.WindowManager.prototype,{onPoiMouseOver:function(Ad,Ae){var Af=this;if(Ad.infoWindow){return }if(!Ad._isRollover){Ad._isRollover=0}if(!Ae){setTimeout(function(){Ad._isRollover-=1;if(Ad._isRollover<=0){Af.close("rolloverwindow",Ad);Ad._isRollover=0;var Ag=new AX("MQA.DotcomWindowManager.closePoiRollover");Ag.srcObject=Ad;AQ(Ad,"rolloverclose",Ag)}},50)}else{Ad._isRollover+=1;if(Ad._isRollover==1){if(Ad.infoContentHTML||Ad.infoTitleHTML){this.closeAll("rolloverwindow");this.openPoiRollover(Ad)}}}},onPoiActivate:function(Ad,Ag,Af){if(!Ad.infoContentHTML||!Ad.infoTitleHTML){return }this.closeAll("rolloverwindow");var Ae=Ad.infoWindow;if(Ae){Ae.bringToFront();return }this.openPoiWindow(Ad,Ag,Af)},openPoiRollover:AR(function(Ad){if(Ad.infoWindow||!Ad._isRollover){return }var Af=this,Ag=new AZ.BasicWindow();Ag.settings.titleVisible=false;Ag.settings.rollover=true;Ad.rolloverWindow=Ag;AV(Ag,"onEvent","after",this,"_onRolloverEvent",Ad);AU(Ad,Ag);Ag.setCloseVisible(false);this.open("rolloverwindow",Ad,Ag);AS(this.map,Ad,Ag);Ag.setVisible(true);var Ae=new AX("MQA.DotcomWindowManager.openPoiRollover",Ad);AQ(Ad,"rolloveropen",Ae)}),_onRolloverEvent:function(Ad,Af,Ae){switch(Af){case"mouseoverstate":this.onPoiMouseOver(Ad,Ae.isOver);break;case"click":this.onPoiActivate(Ad,true);var Ae=new AZ.Event("MQA.DotcomWindowManager.rollverWindowClick");Ae.srcObject=Ad;AZ.EventManager.trigger(Ad,"rolloverwindowclick",Ae);break}},openPoiWindow:AR(function(Ad,Ah,Ag){if(Ad.infoWindow){return }if(Ad.actionId){$a("MQ10-"+Ad.actionId+"-AlertDetails")}var Af;Af=new AZ.BasicWindow();Ad.infoWindow=Af;Aa(Ad,Af);this.closeAll("infowindow");this.open("infowindow",Ad,Af);AS(this.map,Ad,Af);Af.setVisible(true);if(!Ah){AY(this.map,Af)}var Ae=new AZ.Event("MQA.DotcomWindowManager.infoWindowOpen");if(Ag){Ae.skipOmniture=true}Ae.srcObject=Ad;AZ.EventManager.trigger(Ad,"infowindowopen",Ae)}),resizePoiWindow:function(Ae,Ag,Ad){var Af=this.find("infowindow",Ae);if(Af){Af.setDimensions(Af.settings.width+Ag,Af.settings.height+Ad)}},getPoiWindowSettings:function(Ad){var Ae=this.find("infowindow",Ad);if(Ae){return Ae.settings}return null}});Ac(AZ.TileMap.prototype,{onZoomStart$After:function(){var Ad=this.windowManager;Ad.each(function(Ae){if(Ae.opener&&Ae.opener.keepOpenOnZoom){return }Ad.close(Ae.id,Ae.opener)})}});Ac(AZ.Poi.prototype,{dispose$Before:function(){if(!this.map){return }var Ad=this.map.windowManager;Ad.close("rolloverwindow",this);Ad.close("infowindow",this)},onEvent$After:function(Af,Ad){var Ae=this.map.windowManager;switch(Af){case"mouseover":if(this._isMouseOver||this._dragging){return }this._isMouseOver=true;Ae.onPoiMouseOver(this,true);break;case"mouseout":if(this._isMouseOver){this._isMouseOver=false;Ae.onPoiMouseOver(this,false)}break;case"click":Ae.onPoiActivate(this,true);break;case"dragstart":Ae.close("rolloverwindow",this);Ae.close("infowindow",this);break;case"move":Ae.close("rolloverwindow",this);if(this.infoWindow){AS(this.map,this,this.infoWindow)}break}},onWindowClose:function(Ad){if(Ad===this.infoWindow){delete this.infoWindow}if(Ad===this.rolloverWindow){delete this.rolloverWindow;this._isRollover=0}}});AZ.Loader._moduleLoaded("dotcomwindowmanager")})();(function(){var AT=window.MQA,AW=AT.Collection.map,AQ=AT.IO.toQueryString,AX=AT.IO.doPostJSON,AR=AT.IO.cacheBust,AS=AT.IO.doJSONP,AU=AT.IO.stringifyJSON;function AV(AY,Aa,AZ){this.baseURI=AY||MQROUTEURL;this.noProxy=(typeof Aa=="undefined")?true:Aa;this.noTrim=(typeof AZ=="undefined")?false:AZ}AV.CALLBACKS={};AV.decompress=function(Ak){if(Ak&&Ak.route&&Ak.route.shape&&Ak.route.shape.shapePoints&&Ak.route.options&&(Ak.route.options.shapeFormat=="cmp"||Ak.route.options.shapeFormat=="cmp6")){var Al=Ak.route.shape.shapePoints,Aj,Ai=Ak.route.alternateRoutes;var Ag=Al.length,Ah=0,Ab=0,AZ=0,Ae=[];try{while(Ah<Ag){var Aa,Am=0,AY=0;do{Aa=Al.charCodeAt(Ah++)-63;AY|=(Aa&31)<<Am;Am+=5}while(Aa>=32);var Af=((AY&1)?~(AY>>1):(AY>>1));Ab+=Af;Am=0;AY=0;do{Aa=Al.charCodeAt(Ah++)-63;AY|=(Aa&31)<<Am;Am+=5}while(Aa>=32);var Ac=((AY&1)?~(AY>>1):(AY>>1));AZ+=Ac;if(Ak.route.options.shapeFormat=="cmp"){Ae.push(Ab*0.00001);Ae.push(AZ*0.00001)}else{Ae.push(Ab*0.000001);Ae.push(AZ*0.000001)}}}catch(Ad){}Ak.route.shape.shapePoints=Ae}if(Ai){for(Aj=0;Aj<Ai.length;Aj++){AV.decompress(Ai[Aj])}}return Ak};AT.RouteIO=AV;AV.prototype={_trimLocations:function(Aa){if(!Aa||Aa.length<1){return }var AY,AZ=0;for(;AZ<Aa.length;AZ++){AY=Aa[AZ];if(AY&&AY.linkId){Aa[AZ]={linkId:AY.linkId,latLng:{lat:AY.latLng.lat,lng:AY.latLng.lng},type:AY.type}}}return Aa},route:function(AY,AZ,Ac){if(AY.locations.length>50){Ac({info:{statusCode:-999,description:"Too many locations, MAX=50"}})}else{AY=this._checkShapeFormat(AY);if(!this.noTrim){AY.locations=this._trimLocations(AY.locations)}var Ae=AY.maxRoutes||1,Ad=AR(),Ab="route",Aa;if(Ae>1&&AY.locations.length==2){Ab="alternateroutes"}Aa=this.baseURI+"/"+Ab+"?key="+(window.Key||"")+"&cacheBust="+Ad;if(this.noProxy){Ad="c"+Ad.replace(",","");AT.RouteIO.CALLBACKS[Ad]=function(Af){Ac(AT.RouteIO.decompress(Af))};Aa+="&callback=MQA.RouteIO.CALLBACKS."+Ad+"&json="+AU(AY);return AS(Aa,AZ)}return AX(Aa,AY,AZ,function(Ag,Af){Ac(AT.RouteIO.decompress(Ag),Af)})}},optimizedRoute:function(AZ,Aa,Ac){AZ=this._checkShapeFormat(AZ);if(!this.noTrim){AZ.locations=this._trimLocations(AZ.locations)}var AY=AR(),Ab=this.baseURI+"/optimizedroute?key="+(window.Key||"")+"&cacheBust="+AY;if(this.noProxy){AY="c"+AY.replace(",","");AT.RouteIO.CALLBACKS[AY]=function(Ad){Ac(AT.RouteIO.decompress(Ad))};Ab+="&callback=MQA.RouteIO.CALLBACKS."+AY+"&json="+AU(AZ);return AS(Ab,Aa)}return AX(Ab,AZ,Aa,function(Ad){Ac(AT.RouteIO.decompress(Ad))})},routeShape:function(AZ,Aa,Ac){AZ=this._checkShapeFormat(AZ);var AY=AR(),Ab=this.baseURI+"/routeshape?key="+(window.Key||"")+"&cacheBust="+AY;if(this.noProxy){AY="c"+AY.replace(",","");AT.RouteIO.CALLBACKS[AY]=function(Ad){Ac(AT.RouteIO.decompress(Ad))};Ab+="&callback=MQA.RouteIO.CALLBACKS."+AY+"&json="+AU(AZ);return AS(Ab,Aa)}return AX(Ab,AZ,Aa,function(Ad){Ac(AT.RouteIO.decompress(Ad))})},dragRoute:function(AZ,Aa,Ac){AZ=this._checkShapeFormat(AZ);if(!this.noTrim){AZ.locations=this._trimLocations(AZ.locations)}var AY=AR(),Ab=this.baseURI+"/dragroute?key="+(window.Key||"")+"&cacheBust="+AY;if(this.noProxy){AY="c"+AY.replace(",","");AT.RouteIO.CALLBACKS[AY]=function(Ad){Ac(AT.RouteIO.decompress(Ad).route)};Ab+="&callback=MQA.RouteIO.CALLBACKS."+AY+"&json="+AU(AZ);return AS(Ab,Aa)}return AX(Ab,AZ,Aa,function(Ad){Ac(AT.RouteIO.decompress(Ad).route)})},routeMatrix:function(AZ,Aa,Ac){var AY=AR(),Ab=this.baseURI+"/routematrix?key="+(window.Key||"")+"&cacheBust="+AY;if(this.noProxy){AY="c"+AY.replace(",","");AT.RouteIO.CALLBACKS[AY]=function(Ad){Ac(Ad)};Ab+="&callback=MQA.RouteIO.CALLBACKS."+AY+"&json="+AU(AZ);return AS(Ab,Aa)}return AX(Ab,AZ,Aa,function(Ad){Ac(Ad)})},_checkShapeFormat:function(AY){if(AY.options&&AY.options.shapeFormat&&AY.options.shapeFormat!=""){this.shapeFormat=AY.options.shapeFormat;return AY}if(!AY.options){AY.options={}}if(!AY.options.shapeFormat){AY.options.shapeFormat="cmp6"}return AY}};AT.Loader._moduleLoaded("routeio")})();(function(){var AT=window.MQA,AU=AT.IO.doGetJSON,AQ=AT.IO.doPostJSON,AR=AT.IO.cacheBust,AS=AT.IO.doJSONP,AV=AT.IO.stringifyJSON;function AW(AX,AY){this.baseURI=AX||MQGEOCODEURL;this.noProxy=AY||true}AW.CALLBACKS={};AT.GeocodeIO=AW;AW.prototype={geocode:function(Ab,AZ,Ae,AY){var Af=this.baseURI+"/address?key="+(window.Key||""),Ad=["street","city","state","county","postalCode","country","country","adminArea1","adminArea3","adminArea4","adminArea5"],Ac=0,AX=AR();if(AT.Util.isFunction(Ab.substring)){Af+="&location="+encodeURIComponent(Ab)}else{for(;Ac<Ad.length;Ac++){if(Ab[Ad[Ac]]){Af+="&"+Ad[Ac]+"="+encodeURIComponent(Ab[Ad[Ac]])}}}if(AZ){var Aa=AZ.boundingBox;if(Aa){Af+="&boundingBox="+Aa.ul.lat+","+Aa.ul.lng+","+Aa.lr.lat+","+Aa.lr.lng}if(AZ.thumbMaps){Af+="&thumbMaps="+AZ.thumbMaps}if(AZ.maxResults){Af+="&maxResults="+AZ.maxResults}if(AZ.ignoreLatLngInput){Af+="&ignoreLatLngInput="+AZ.ignoreLatLngInput}if(AZ.delimiter){Af+="&delimiter  ="+AZ.delimiter}}Af+="&cacheBust="+AX;if(this.noProxy){AX="c"+AX.replace(",","");AT.GeocodeIO.CALLBACKS[AX]=function(Ag){AY(Ag)};Af+="&callback=MQA.GeocodeIO.CALLBACKS."+AX;return AS(Af,Ae)}return AU(Af,Ae,function(Ag){AY(Ag.locations,Ag.geoDiffCode)})},batch:function(AY,Aa,AX){var AZ=AR(),Ab=this.baseURI+"/batch?Key="+(window.Key||"")+"&cacheBust="+AZ;if(this.noProxy){AZ="c"+AZ.replace(",","");AT.GeocodeIO.CALLBACKS[AZ]=function(Ac){AX(Ac)};Ab+="&json="+AV(AY)+"&callback=MQA.GeocodeIO.CALLBACKS."+AZ;return AS(Ab,Aa)}return AQ(Ab,locations,Aa,function(Ac){AX(Ac.collections)})},reverse:function(AX,Aa,Ab,AY){var AZ;if(AX.lat&&AX.lng){AZ=AR(),url=this.baseURI+"/reverse?key="+(window.Key||"")+"&lat="+AX.lat+"&lng="+AX.lng+"&cacheBust="+AZ}else{if(AX.indexOf(",")){AZ=AR(),url=this.baseURI+"/reverse?key="+(window.Key||"")+"&lat="+AX.split(",")[0]+"&lng="+AX.split(",")[1]+"&cacheBust="+AZ}}if(this.noProxy){AZ="c"+AZ.replace(",","");AT.GeocodeIO.CALLBACKS[AZ]=function(Ac){AY(Ac.results[0].locations)};url+="&callback=MQA.GeocodeIO.CALLBACKS."+AZ;return AS(url,Ab)}return AU(url,Ab,function(Ac){AY(Ac)});return AU(url,Ab,function(Ac){AY(Ac.results[0].locations)})}};AT.Loader._moduleLoaded("geocodeio")})();(function(){var AX=window.MQA,Ao=AX.Log.debug,AV=AX.mixin,Aa=AX.extend,AU=AX.Graphics,Ad=AX.EventUtil.observe,AT=AX.EventUtil.stopObserving,AR=AX.EventUtil.EventCallback,AW=AX.EventManager.trigger,Ah=AX.Util.getLocalCoords,AY=AX.EventUtil.AddDOMEventProtocol,Ag=AX.ZIndex.set;function Ac(As){if(As instanceof AX.TKObjectCollection){var At=[];for(var Ar=0;Ar<As.getSize();Ar++){var Aq=As.getAt(Ar);if(Aq.lat&&Aq.lng){At.push(Aq.lat);At.push(Aq.lng)}}if(At.length>0){return At}}return As}function AZ(Aq,Ar){return Aq+Ar.substring(0,1).toUpperCase()+Ar.substring(1)}function Ak(){this.addDOMEvent("mousedown","mouseup","dblclick","mouseover","mouseout","click","mousemove")}Ak.prototype=Aa(new AX.Component(),{_curVisibility:true,createPeer:function(){return this},layerInit:function(Ar,Aq){this.layer=Ar;this.map=Aq},getActValue:function(Aq){if(this.altStateFlag){return this[AZ("alt",Aq)]}else{return this[Aq]}},attrUpdated:function(Aq,Ar){},resetAttributes:function(){var Aq=this._attributes;while(Aq){this.attrUpdated(Aq.name,this.getActValue(Aq.name));Aq=Aq.next}},updateVisibility:function(){var At=this.layer,Aq=At.collection,As,Ar;if(At){As=At.display.transform.zoom;if(As>=Math.max(this.minZoomLevel,Aq.getMinZoomLevel())&&As<=Math.min(this.maxZoomLevel,Aq.getMaxZoomLevel())){Ar=this.visible}else{Ar=false}if(this._curVisibility!=Ar){this._curVisibility=Ar;this._setActVisible(Ar)}}},_setActVisible:function(Aq){},_applyZIndex:function(){},updateProperties:function(Aq){if(!Aq){return }if(Aq.color){this.setColor(Aq.color)}if(Aq.colorAlpha){this.setColorAlpha(Aq.colorAlpha)}if(Aq.borderWidth){this.setBorderWidth(Aq.borderWidth)}if(Aq.fillColor){this.setFillColor(Aq.fillColor)}if(Aq.fillColorAlpha){this.setFillColorAlpha(Aq.fillColorAlpha)}if(Aq.zIndex){this.setZIndex(Aq.zIndex)}}});AY(Ak.prototype);function Ae(At,As,Ar,Aq){Ak.prototype.defineProperty(At,As,Ar,Aq)}function AQ(At,Av,As,Ar){function Aq(){if(!this.altStateFlag){this.attrUpdated(Av,this.getActValue(Av))}}function Au(){if(this.altStateFlag){this.attrUpdated(Av,this.getActValue(Av))}}At.defineProperty(Av,As,Ar,Aq);At.defineProperty(AZ("alt",Av),As,Ar,Au);At._attributes={name:Av,next:At._attributes}}Ae("key",String);Ae("altStateFlag",Boolean,false,"resetAttributes");Ae("shapePoints",null,null);Ae("visible",Boolean,true,"updateVisibility");Ae("maxZoomLevel",parseInt,16,"updateVisibility");Ae("minZoomLevel",parseInt,1,"updateVisibility");Ae("zIndex",null,"shape","_applyZIndex");AQ(Ak.prototype,"color",String,"#000000");AQ(Ak.prototype,"colorAlpha",String,"1.0");AQ(Ak.prototype,"fillColor",String,"#000000");AQ(Ak.prototype,"fillColorAlpha",String,"1.0");AQ(Ak.prototype,"borderWidth",String,"3");function Ab(){}Ab.prototype=new Ak();Aa(Ab.prototype,{className:"MQA.BaseGraphicsOverlay",_invalidate:function(){if(this._shape&&this._surface){try{this._unwireDOMEvents()}catch(Aq){}this._surface.dispose()}this._shape=null;this._surface=null},_normalizePoints:function(){var A3=this.layer.display.transform,A0=this.shapePoints,As=[],Aq,A1=Infinity,A2=Infinity,A4=0,Ar=0,Ay,Aw,Az=100;if(!A0){return }if(this.radius&&this.radius>0){var At=AX.Util.distanceBetween(this.map.pixToLL({x:1,y:0}),this.map.pixToLL({x:0,y:0}));Aw=Math.round(this.radius/At);var Au=A3.latLngToDisplay(A0[0],A0[1]);var Av=A3.displayToLatLng(Au.x-Aw,Au.y-Aw);var Ax=A3.displayToLatLng(Au.x+Aw,Au.y+Aw);A0[2]=Av.lat;A0[3]=Av.lng;A0[4]=Av.lat;A0[5]=Av.lng;A0.push(-180);A0.push(-180);A0.push(180);A0.push(180)}if(A0.length){for(Ay=0;Ay<A0.length;Ay+=2){Aq=A3.latLngToDisplay(A0[Ay],A0[Ay+1]);if(Aq.x<A1){A1=Aq.x}if(Aq.y<A2){A2=Aq.y}As[Ay/2]=Aq}}else{if(A0){if(A0.getSize){for(Ay=0;Ay<A0.getSize();Ay++){Aq=A3.latLngToDisplay(A0.getAt(Ay).lat,A0.getAt(Ay).lng);if(Aq.x<A1){A1=Aq.x}if(Aq.y<A2){A2=Aq.y}As[Ay]=Aq}}}}A1-=100;A2-=100;for(Ay=0;Ay<As.length;Ay++){Aq=As[Ay];Aq.x-=A1;Aq.y-=A2;if(Aq.x>A4){A4=Aq.x}if(Aq.y>Ar){Ar=Aq.y}}A4+=100;Ar+=100;this._normShapePoints={xypoints:As,width:A4,height:Ar,anchorX:A1,anchorY:A2,zoom:A3.zoom,radius:Aw}},resetTransform:function(){if(!this.layer){return }if(!this._shape||(this._normShapePoints&&this._normShapePoints.zoom!=this.layer.display.transform.zoom)){this._invalidate();this._createShape()}this.updateVisibility()},_createShape:function(){if(!this.shapePoints||!AU||!this.layer){return }this._normalizePoints();var Aq=this._normShapePoints,Ar=AU.createSurface(Aq.width,Aq.height),As=Ar.element(),At;this._surface=Ar;if(Aq.xypoints.length>0){As.style.position="absolute";As.style.left=Aq.anchorX+"px";As.style.top=Aq.anchorY+"px";At=this._newShape(Ar);if(Aq.radius){At.radius=Aq.radius}At.setPoints(Aq.xypoints);At.add();this._shape=At;this.resetAttributes();this._wireDOMEvents(At.element());this.layer.elt.appendChild(As);this.layer.elt.setAttribute("class","mqa_gs");this._applyZIndex();if(AX.browser.name==="firefox"&&this.zIndex=="route_ribbon"){var Au=this;Ar.elt.onmousemove=function(Aw){var Av=new AX.Event("svgmouseover",this);Av.orginalEvent=Aw;AX.EventManager.trigger(Au.map,"svgmouseover",Av)};Ar.elt.onclick=function(Aw){var Av=new AX.Event("svgclick",this);Av.orginalEvent=Aw;AX.EventManager.trigger(Au.map,"svgclick",Av)}}}},_applyZIndex:function(){var Aq=this._surface;if(Aq){Ag(Aq.element(),this.zIndex)}},_onDOMEvent:function(Ar){var At=new AX.Event(this.className+"."+Ar.type),Aq="on"+Ar.type;At.domEvent=Ar;if(Ar.type.match(/mouse|click/)){var Au=Ah(this.layer.elt,Ar),As=this.layer.display.transform.displayToLatLng(Au.x,Au.y);At.latLng=As}AW(this,Ar.type,At);if(this[Aq]){this[Aq](At)}if(this.ondomevent){this.ondomevent(At)}},dispose:function(){this._invalidate()},setShapePoints:function(Aq){this._invalidate();this.shapePoints=Ac(Aq);this._createShape()},attrUpdated:function(Au,Aq){var Ar=this._shape,As;if(Ar){As=AZ("set",Au);try{if(Ar[As]){Ar[As].call(Ar,Aq)}}catch(At){this._invalidate();this._createShape()}}},_setActVisible:function(Aq){var Ar=this._surface;if(Ar){Ar.element().style.display=Aq?"block":"none"}}});AY(Ab.prototype);function An(){Ak.call(this)}An.prototype=new Ab();Aa(An.prototype,{className:"MQA.LineOverlay",_newShape:function(Aq){return Aq.line()}});function Am(){Ak.call(this)}Am.prototype=new Ab();Aa(Am.prototype,{className:"MQA.MultiLineOverlay",_newShape:function(Aq){return Aq.multiline()},normalizePoint:function(Ar){var Aq=this.layer.display.transform,As;var At=[];As=Aq.latLngToDisplay(Ar.lat,Ar.lng);return As},_normalizePoints:function(){var Az=this.layer.display.transform,Av=this.shapePoints,As=[],Aq,Ax=Infinity,Ay=Infinity,A1=0,Ar=0,At,Au=100;if(Av.length){for(var Aw=0;Aw<Av.length;Aw++){A0=[];var A2=Av[Aw];for(At=0;At<A2.getSize();At++){Aq=Az.latLngToDisplay(A2.getAt(At).lat,A2.getAt(At).lng);if(Aq.x<Ax){Ax=Aq.x}if(Aq.y<Ay){Ay=Aq.y}A0.push(Aq)}As.push(A0)}}Ax-=100;Ay-=100;for(At=0;At<As.length;At++){var A0=As[At];for(var Aw=0;Aw<A0.length;Aw++){Aq=A0[Aw];Aq.x-=Ax;Aq.y-=Ay;if(Aq.x>A1){A1=Aq.x}if(Aq.y>Ar){Ar=Aq.y}}}A1+=100;Ar+=100;this._normShapePoints={xypoints:As,width:A1,height:Ar,anchorX:Ax,anchorY:Ay,zoom:Az.zoom}},_createShape:function(){if(!this.shapePoints||!AU||!this.layer){return }var Aq=this._normShapePoints,Ar=AU.createSurface(Aq.width,Aq.height),At=Ar.element(),Av;this._surface=Ar;if(Aq.xypoints.length>0){At.style.position="absolute";At.style.left=Aq.anchorX+"px";At.style.top=Aq.anchorY+"px";Av=this._newShape(Ar);Av.setPoints(Aq.xypoints);Av.add();this._shape=Av;this.resetAttributes();var As=Av.elements();this.addDOMEvent("mouseover","mouseout","mouseup","mousedown","click","dblclick");for(var Au=0;Au<As.length;Au++){this._wireDOMEvents(As[Au])}this.layer.elt.appendChild(At);this._applyZIndex()}},setShapeArray:function(Ar){this._invalidate();for(var Aq=0;Aq<Ar.length;Aq++){var As=Ar[Aq];As=Ac(As)}this.shapePoints=Ar;this._createShape()}});function Af(){Ak.call(this)}Af.prototype=new Ab();Aa(Af.prototype,{className:"MQA.EllipseOverlay",_newShape:function(Aq){return Aq.ellipse()}});function Ap(){Ak.call(this)}Ap.prototype=new Ab();Aa(Ap.prototype,{className:"MQA.CirlceOverlay",_newShape:function(Aq){return Aq.circle()}});Ap.prototype.defineProperty("radiusUnit",String,"MI",null);Ap.prototype.defineProperty("radius",null,null,null);function Ai(){Ak.call(this)}Ai.prototype=new Ab();Aa(Ai.prototype,{className:"MQA.RectangleOverlay",_newShape:function(Aq){return Aq.rect()}});function Aj(){Ak.call(this)}Aj.prototype=new Ab();Aa(Aj.prototype,{className:"MQA.PolygonOverlay",_newShape:function(Aq){return Aq.polygon()}});function AS(){Ak.call(this)}AS.prototype=new Ab();Aa(AS.prototype,{className:"MQA.PathOverlay",setWidth:function(Aq){this.width=Aq},setHeight:function(Aq){this.height=Aq},setPath:function(Aq){this.path=Aq;this._invalidate();this._createShape()},_newShape:function(Aq){return Aq.path()},_createShape:function(){if(!AU||!this.layer){return }var Aq=AU.createSurface(this.width,this.height),At=Aq.element(),Au;this._surface=Aq;var Ar=-this.width/2,As=-this.height/2;At.style.position="absolute";At.style.left=Ar+"px";At.style.top=As+"px";Au=this._newShape(Aq);Au.setPath(this.path);Au.add();this._shape=Au;this.resetAttributes();this.addDOMEvent("mouseover","mouseout","mouseup","mousedown","click","dblclick");this._wireDOMEvents(Au.element());this.layer.elt.appendChild(At);this._applyZIndex()}});function Al(){Ak.call(this)}Al.prototype=new Ak();Al.prototype.defineProperty("imageURL",String,null,"resetTransform");Al.prototype.defineProperty("imageLevels",null,null,"resetTransform");Al.prototype.defineProperty("imageOpacity",parseFloat,1);Al.prototype.defineProperty("shapePoints",null,null,"resetTransform");AV(Al.prototype,{className:"MQA.ImageOverlay",layerInit$After:function(Aq){var As=document.createElement("img"),Ar=this.imageOpacity;As.style.display="none";As.style.position="absolute";if(AX.browser.name=="msie"){As.style.filter="alpha(opacity="+(Ar*100)+")"}As.style.MozOpacity=Ar;As.style.opacity=Ar;Aq.elt.appendChild(As);this.imgElt=As;this._applyZIndex()},_applyZIndex:function(){var Aq=this.imgElt;if(Aq){Ag(Aq,this.zIndex)}},resetTransform:function(){if(!this.layer){return }var Av=Ac(this.shapePoints),Az,Au,As=this.layer.display,Ax=As.transform,At,Aq,Ay,Ar,Aw=this.imgElt;if(!Av||!Aw){return }if(Av.length<4){return }At=Ax.latLngToDisplay(Av[0],Av[1]);Aq=Ax.latLngToDisplay(Av[2],Av[3]);Ay=Aq.x-At.x;Ar=Aq.y-At.y;Aw.src=this.imageURL;Aw.style.left=At.x+"px";Aw.style.top=At.y+"px";Aw.width=Ay;Aw.height=Ar;Aw.style.display="block";this.updateVisibility()},dispose:function(){var Aq=this.imgElt;if(Aq){Aq.parentNode.removeChild(Aq);delete this.imgElt}},_setActVisible:function(Ar){var Aq=this.imgElt;if(Aq){Aq.style.display=Ar?"block":"none"}}});AX.ShapeOverlay=Ak;AX.ImageOverlay=Al;AX.LineOverlay=An;AX.RectangleOverlay=Ai;AX.EllipseOverlay=Af;AX.PolygonOverlay=Aj;AX.MultiLineOverlay=Am;AX.PathOverlay=AS;AX.CircleOverlay=Ap;AX.Loader._moduleLoaded("shapes")})();AL.withModule("shapes",function(){var AY=window.MQA,AV=AY.Log.debug,AS=AY.mixin,AU=AY.Collection.map,AR=AY.Graphics,Aa=AY.EventUtil.bind,AX=AY.EventUtil.stop,AZ=AY.ZIndex.set;function AW(As,An,Au,Ao,Ak,Av){function Ac(Ax,Aw){return(Au>As?(Ax>=As&&Ax<=Au):(Ax>=Au&&Ax<=As))&&(Ao>An?(Aw>=An&&Aw<=Ao):(Aw>=Ao&&Aw<=An))}if(Au==As){return{x:As,y:Av,dAlong:Math.abs(Av-An),dTotal:Math.abs(Ao-An),dLine:Math.abs(Ak-As),contained:Ac(As,Av)}}if(An==Ao){return{x:Ak,y:An,dAlong:Math.abs(Ak-As),dTotal:Math.abs(Au-As),dLine:Math.abs(Av-An),contained:Ac(Ak,An)}}var Ab=(Au==As)?(Ao>An?1:-1):(Ao-An)/(Au-As),Ap=-1/Ab,Ai=(Av+Ab*As-An-Ap*Ak)/(Ab-Ap),Am=Ab*(Ai-As)+An,Ah=(Ai-As),Al=(Am-An),Aq=Math.sqrt(Ah*Ah+Al*Al),Ag=(Au-As),Aj=(Ao-An),Ad=Math.sqrt(Ag*Ag+Aj*Aj),Ae=(Ai-Ak),Af=(Am-Av),Ar=Math.sqrt(Ae*Ae+Af*Af),At=Ac(Ai,Am);return{x:Ai,y:Am,dAlong:Aq,dTotal:Ad,dLine:Ar,contained:At}}function AQ(Ab){this.dragStart=function(){Ab.dragCount=0;Ab.onDragStart(this)};this.dragMove=function(){Ab.dragPoi.setLatLng(this.dragLatLng);Ab.dragLatLng=this.dragLatLng;Ab.dragXY=this.dragXY;Ab.dragCount++;Ab.onDrag(Ab)};this.dragEnd=function(){Ab.onDrop(Ab);Ac()};this.dragCancelled=function(){Ab.onDragCancel(Ab);Ac()};function Ac(){Ab.state="none";Ab.dragPoi.setVisible(false);Ab.dragPoi.setLatLng(null);Ab.onState(Ab,"none")}}function AT(){AY.LineOverlay.call(this);this.setZIndex("route_ribbon");this.addDOMEvent("mousemove","mouseover","mouseout");var Ab=this.dragPoi=new AY.BasePoi();Ab.addDOMEvent("mousemove","mouseover","mouseout","mousedown");Ab._onDOMEvent=Aa(this,"_onDOMEvent");this.state="none";this._hoverCount=0}AT.prototype=AY.Util.subClass(AY.LineOverlay,{projectPoint:function(Ae){var Am=this.shapePoints,An=this.layer.display.transform,Af,Ai,Ac,Al,Ad,Ag,Ah,Aj=An.latLngToDisplay(Ae.lat,Ae.lng),Ab,Ao=Number(this.borderWidth),Ak;if(Am.length<4){return null}for(Af=0;Af<(Am.length/2)-2;Af++){Ai=Am[Af*2];Ac=Am[Af*2+1];Al=Am[Af*2+2];Ad=Am[Af*2+3];Ag=An.latLngToDisplay(Ai,Ac);Ah=An.latLngToDisplay(Al,Ad);Ab=AW(Ag.x,Ag.y,Ah.x,Ah.y,Aj.x,Aj.y);Ab.shapeIndex=Af;if(!Ak&&Ab.contained){Ak=Ab}else{if(Ab.contained&&Ab.dLine<Ak.dLine){Ak=Ab}}}return Ak},onmouseover:function(Ab){if(this.state=="none"){if(this.projectDragPoi(Ab.latLng)){this._hoverCount=1;this.state="hover";this.onState(this,"hover")}}else{if(this.state=="hover"){this._hoverCount++}}AX(Ab.domEvent)},onmouseout:function(Ac){var Ab=this;if(this.state=="hover"){if(--this._hoverCount<=0){if(this._toutHide){clearTimeout(this._toutHide)}this._toutHide=setTimeout(function(){if(Ab._hoverCount<=0){Ab.dragPoi.setLatLng(null);Ab.dragPoi.setVisible(false);Ab.state="none";Ab.onState(this,"none");AX(Ac.domEvent);Ab._toutHide=null}},1)}}},onmousemove:function(Ab){if(this.state=="hover"){this.projectDragPoi(Ab.latLng);AX(Ab.domEvent)}},onmousedown:function(Ab){if(this.state=="hover"){var Ac=this.layer.display;Ac.startDrag(Ab.domEvent,new AQ(this));AX(Ab.domEvent);if(Ac.currentDrag){this.state="drag";this.onState(this,"drag")}}},projectDragPoi:function(Ab){var Ac=this.projectPoint(Ab);if(!Ac){return false}else{var Ab=this.layer.display.transform.displayToLatLng(Ac.x,Ac.y);this.showDragPoi(Ab);this.anchorLatLng=Ab;this.anchorXY={x:Ac.x,y:Ac.y};this.anchorShapeIndex=Ac.shapeIndex;this.anchorDistance=Ac.dAlong/Ac.dTotal;return true}},setHoverMsg:function(Ab){this.hoverMsg=Ab},showDragPoi:function(Ad){var Af=parseInt(this.borderWidth||"0")+3,Ai=1,Ac=this.dragPoi,Ag=Ac.getContent("dot"),Ah=Ac.getContent("info"),Ab,Ae;if(Af<11){Af=11}if(!Ah){Ah=document.createElement("div");Ah.style.background="#ffffff";Ah.style.border="1px solid #A8CBEE";Ah.style.margin="0";Ah.style.padding="0";Ah.style.opacity=0.85;Ah.style.fontSize="11px";Ah.style.fontFamily="Verdana";Ah.style.filter="alpha(opacity=70)";Ah.style.whiteSpace="nowrap";Ac.setContent("info",Ah,-46,-32,true,"route_dragdot")}Ah.setAttribute("class","mqa_drag_iw");Ah.innerHTML="&nbsp;&nbsp;"+this.hoverMsg+"&nbsp;&nbsp;";if((!Ag||Ac.__forWidth!=Af)&&AR){Ab=AR.createSurface(Af+Ai*2,Af+Ai*2);Ab.element().style.cursor="pointer";Ae=Ab.ellipse();Ae.setPoints([{x:Ai,y:Ai},{x:Af+Ai,y:Af+Ai}]);Ae.setColor("#000000");Ae.setFillColor("#ffffff");Ae.setBorderWidth("1");Ae.add();Ac.__forWidth=Af;Ac.setContent("dot",Ab.element(),-(Af/2+Ai),-(Af/2+Ai),true,"route_dragdot")}Ac.setLatLng(Ad);Ac.setVisible(true)},onState:function(Ac,Ab){},onDragStart:function(Ab){},onDrag:function(Ab){},onDrop:function(Ab){},onDragCancel:function(Ab){}});AY.RibbonOverlay=AT;AY.Loader._moduleLoaded("ribbon")});AL.withModule("ribbon",function(){var AS=window.MQA,Ai=AS.Log.debug,Ad=AS.Log.handleError,AT=AS.extend,Ab=AS.Collection.map,AQ=AS.Graphics,AU=AS.EventUtil.observe,Ah=AS.EventManager.addListener,Ag=AS.EventManager.removeListener,AX=AS.Util.getLocalCoords,AY=AS.EventUtil.hitch,Ac=AS.connect,AZ=AS.StdPoi,AR=AS.Icon,Aa=AS.Loader.resourcePath;var Ae={};AS.Route=Ae;var AW=0;function Af(Aj){}Ae.RouteDelegate=function(){};Ae.RouteDelegate.prototype={widths:[13,13,13,13,11,10,9,8,7,7,7,8,9,10,10,10],ribbonOverscanFactor:5,ribbonRefreshFrac:0.2,dragIntervalMs:333,customizeRibbon:function(Aj){Aj.setColor("#0000ee");Aj.setColorAlpha("0.6");Aj.setBorderWidth(5);if(this.controller&&this.controller.map&&this.controller.options.ribbonOptions&&this.controller.options.ribbonOptions.ribbonDisplay){Aj.updateProperties(this.controller.options.ribbonOptions.ribbonDisplay)}},handleRouteShapeError:function(Aj){if(Aj){}},customizeRibbonAtZoom:function(Aj,Ak){var Al=this.widths[Ak-1];if(Al&&Al!=Aj.getBorderWidth()){Aj.setBorderWidth(Al)}},setupRibbonDragState:function(Aj,Ak){if(Ak){Aj.setColorAlpha(0.3)}else{Aj.setColorAlpha(0.6)}},createStopPoi:function(Am,Aj){var An=new AZ(),Al="stop_"+(Aj-1)+".png",Ak=Aa("images/route/"+Al);An.setZIndex("route_poi");An.setIcon(new AR(Ak,29,29));return An},createViaPoi:function(Al){var Aj=new AZ(),Ak=Aa("images/route/via_icon.png");Aj.setZIndex("route_poi");Aj.setIcon(new AR(Ak,11,11));Aj.setShadow(null);return Aj},customizePoi:function(Aj){},canStartDrag:function(){return true},virtualMapState:function(Aj){var Ak=this.ribbonOverscanFactor;return{center:Aj.getCenter(),width:Math.round(Ak*Aj.width),height:Math.round(Ak*Aj.height),scale:Aj.getScale()}},recomputeChangedRoute:function(Aj){var Ak={mapState:this.virtualMapState(this.controller.map),locations:Aj},Al=this.controller;Ak.options=Al.options.routeOptions;this.controller.io.route(Ak,{timeout:10000},function(Am,An){if(Am&&Am.route){Al.setRouteData(Am.route)}else{Al.clearDragState()}if(Al.routeCallback){Al.routeCallback(Am)}})}};function AV(Ak,An,Al,Am){this.options={routeOptions:{},ribbonOptions:{}};if(Am){if(!Am.routeOptions){Am.routeOptions={}}if(!Am.ribbonOptions){Am.ribbonOptions={}}this.options=Am}this.map=Ak;this.delegate=Al;this.io=An;this.draggable=(Am.ribbonOptions.draggable?true:false);this.poidrag=(Am.ribbonOptions.draggablepoi?true:false);Al.controller=this;if(Am.ribbonOptions.widths){Al.widths=Am.ribbonOptions.widths}var Aj=new AS.ShapeCollection();Aj.collectionName=this.options.shapeCollectionName||("route-"+(AW++));this.sc=Aj;Ak.addShapeCollection(Aj);Ah(Ak,"move",this._validateMap,this);Ah(Ak,"moveend",this._validateMap,this);Ah(Ak,"zoomend",this._validateMap,this);this.state="none"}AV.prototype={setRouteData:function(Ak){this._clear();this.routeData=Ak;try{var Al=Ak.bestFit;if(Al){if(Al.newCenter){this.map.setCenter(Al.newCenter,Al.newLevel+1)}else{this.map.setZoomLevel(Al.newLevel+1)}}if(Ak){this._construct(Ak,Ak.mapState,Ak.shape)}}catch(Aj){this._clear();throw Aj}},_validateMap:function(){var Ak=this._ribbonInfo,Ao,Am,Aq,An,Al=this.map.display,Ap=Al.width,As=Al.height,Aj=this.delegate.ribbonRefreshFrac,Ar=Al.transform.zoom;if(Ak){Ao=Al.ulX-Ak.ulX;Am=Al.ulY-Ak.ulY;Aq=Ak.lrX-(Al.ulX+Ap);An=Ak.lrY-(Al.ulY+As);if(Ar!=Ak.zoom||Ao<0||Am<0||Aq<0||An<0||Ao/Ap<Aj||Am/As<Aj||Aq/Ap<Aj||An/As<Aj){this._schedRibbonUpdate()}}this._validateRibbonAttrs(this.ribbon)},_validateRibbonAttrs:function(Aj){if(!Aj){return }var Ak=this.map.getZoomLevel();if(Aj._attrZoom!=Ak){this.delegate.customizeRibbonAtZoom(Aj,Ak);Aj._attrZoom=Ak}},_clear:function(){this.state="none";this.sc.removeAll();var Ak=this._ribbonInfo,Aj=this.map;if(Ak&&Ak.completion){Ak.completion()}this.ribbon=null;if(this._useRasterRibbon){AS.withModule("rasterroutehighlight",function(){Aj.removeRouteHighlight()})}},_construct:function(Am,An,Ak){var Aq=this.delegate,Ar=this.sc,Ao,Ap=this.map;this.routeData=Am;if(AS.Graphics){Ao=new AS.RibbonOverlay();Ao.setZIndex("route_ribbon");if(AS.GetMessage){Ao.setHoverMsg(AS.GetMessage("ClickToDrag"))}else{Ao.setHoverMsg("Click to Drag")}if(this.draggable){Ao.onDragStart=AY(this,"onRibbonDragStart");Ao.onDrag=AY(this,"onRibbonDrag");Ao.onDrop=AY(this,"onRibbonDrop");Ao.onDragCancel=AY(this,"onRibbonDragCancel");this._validateRibbonAttrs();Ar.add(Ao.dragPoi)}Ar.add(Ao);Aq.customizeRibbon(Ao);this._validateRibbonAttrs(Ao);this.ribbon=Ao;this.state="show";if(An&&Ak&&An.scale==this.map.getScale()){var Al=this.map.llToDisplay(An.center),Aj=this.map.display;this._ribbonInfo={ulX:Al.x-An.width/2,lrX:Al.x+An.width/2,ulY:Al.y-An.height/2,lrY:Al.y+An.height/2,zoom:this.map.getZoomLevel(),loaded:true,shapeResponse:Ak};this.ribbon.setShapePoints(Ak.shapePoints);this.ribbon.shapeResponse=Ak;this._validateMap()}else{this._schedRibbonUpdate()}}else{if(Am.mapServerUrl){this._useRasterRibbon=true;AS.withModule("rasterroutehighlight",function(){Ap.addRouteHighlight(Am.boundingBox,Am.mapServerUrl,Am.sessionId)})}}if(Am.locations){this._constructLocations(Am.locations)}},_constructLocations:function(Am){var Al=this.delegate,Ap,Aj=0,An,Ao,Ak;for(Ap=0;Ap<Am.length;Ap++){An=Am[Ap];switch((An.type||"").toUpperCase()){case"S":Ao=Al.createStopPoi(An,++Aj);Ao.stopNumber=Aj;break;case"V":Ao=Al.createViaPoi(An);break;default:}if(!Ao){continue}if(An.address&&An.address.latLng){An.latLng=An.address.latLng}Ao.setLatLng(An.latLng);Ao.location=An;Ao.locationIndex=Ap;if(this.draggable&&(this.poidrag||An.type==="v")){Ao.setDraggable(true);Ac(Ao,"onEvent","after",this,"_onPoiEvent")}else{Ao.setDraggable("bias")}Al.customizePoi(Ao);this.sc.add(Ao)}},_onPoiEvent:function(Al,Ak){if(!Ak){return }var Aj=Ak.srcObject;switch(Al){case"dragstart":Aj.setSnapback(true);this.clearDragState();break;case"drag":this.onPoiDrag(Aj);break;case"dragend":this.onPoiDrop(Aj,Ak.cancelled);break}},_routeShapeCallback:function(Aj){if(!Aj||!Aj.route||!Aj.route.shape){this.delegate.handleRouteShapeError(Aj.info);this._ribbonInfo=null;return }var Al=Aj.route.shape,Ak=this._ribbonInfo;Ak.loaded=true;Ak.completion=null;Ak.shapeResponse=Al;this.ribbon.setShapePoints(Al.shapePoints);this.ribbon.shapeResponse=Al},_schedRibbonUpdate:function(){if(this.state!="show"){return }if(this._ribbonInfo&&this._ribbonInfo.completion){this._ribbonInfo.completion();this._ribbonInfo=null}var As,At=this.delegate,Ap=this.map,Ak=Ap.display,Al=At.virtualMapState(this.map),Am=Ak.ulX+Ap.width/2,An=Ak.ulY+Ap.height/2,Ao=Al.width,Aq=Al.height,Ar,Aj=this;function Ar(Au){Aj._routeShapeCallback(Au)}As={ulX:Am-Ao/2,lrX:Am+Ao/2,ulY:An-Aq/2,lrY:An+Aq/2,zoom:Ap.getZoomLevel(),loaded:false};this._ribbonInfo=As;As.completion=this.io.routeShape({sessionId:this.routeData.sessionId,mapState:Al},{timeout:10000},Ar);return As},onRibbonDragStart:function(Aj){if(!this.delegate.canStartDrag()){this.map.display.cancelDrag()}this.clearDragState()},onPoiDrag:function(An){if(this.state!="show"){return }var Ao=[],Ar=this.routeData,Aj=Ar.locations,Al,Aq,Ap=this.map,Am=An.location,Ak;for(Al=0;Al<Aj.length;Al++){Ak=Aj[Al];if(Ak!==Am){Ao.push(Ak);Ak.dragPoint=false}else{Ao.push({dragPoint:true,latLng:An.latLng,gefId:0,type:Ak.type})}}Aq={locations:Ao,mapState:{center:Ap.getCenter(),width:Math.round(Ap.width*1.25),height:Math.round(Ap.height*1.25),scale:Ap.getScale()}};Aq.options=this.options.routeOptions;this._draggedPoi=An;this._queueDragRequest(Aq,AY(this,"_dragRouteCallback",false),("s"+An.latLng.lat+","+An.latLng.lng))},onPoiDrop:function(Aj,Ak){if(Ak){this.clearDragState()}else{this.onDrop()}},onRibbonDrag:function(An){if(this.state!="show"){return }var Aq=An.shapeResponse.legIndexes,Am,As=An.anchorShapeIndex,Ao=[],Aj=this.routeData,Ak=Aj.locations,Al,Ar,Ap=this.map;for(Am=0;Am<Aq.length;Am++){if(As<=Aq[Am]){break}}for(Al=0;Al<Am;Al++){Ak[Al].dragPoint=false;Ao.push(Ak[Al])}if(Ao.length==0){Ak[0].dragPoint=false;Ao.push(Ak[0]);Am++}Ao.push({latLng:An.dragLatLng,gefId:0,dragPoint:true,type:"v"});for(Al=Am;Al<Ak.length;Al++){Ak[Al].dragPoint=false;Ao.push(Ak[Al])}Ar={locations:Ao,mapState:{center:Ap.getCenter(),width:Math.round(Ap.width*1.25),height:Math.round(Ap.height*1.25),scale:Ap.getScale()}};Ar.options=this.options.routeOptions;this._queueDragRequest(Ar,AY(this,"_dragRouteCallback",true),("r"+An.dragLatLng.lat+","+An.dragLatLng.lng))},_dragRouteCallback:function(Aw,Am){var As=this.delegate,Ak=this._dragOverlay,At=Am.shape,An=this.ribbon.dragPoi.getContent("info"),Ax=0,Ao=Am.distance.toFixed(2),Au=(Am.options.unit.toUpperCase()=="M")?"mi":"km",Al=Am.time,Aq,Ar,Aj,Ap="",Av;if(!Ak){Ak=this._dragOverlay=new AS.LineOverlay();Ak.setZIndex("route_ribbon_drag");this.sc.add(Ak);As.customizeRibbon(Ak)}As.customizeRibbonAtZoom(Ak,this.map.getZoomLevel());Ak.setShapePoints(At.shapePoints);Ak.setVisible(true);As.setupRibbonDragState(this.ribbon,true);if(this._draggedPoi){this._draggedPoi.snapback=false}if(Aw){for(;Ax<Am.locations.length;Ax++){Av=Am.locations[Ax];if(Av.dragPoint){Aq=Math.floor(Al/86400).toFixed();Ar=Math.floor((Al/3600)%24).toFixed();Aj=Math.floor((Al/60)%60).toFixed();if(Aq!=0){Ap+=Aq+"d "}if(Ar!=0){Ap+=Ar+"h "}if(Aj!=0){Ap+=Aj+"m "}An.innerHTML=Av.street+" ("+Ao+Au+", "+Ap+")"}}}this._dragState={dragResponse:Am,dragOverlay:Ak,isInsert:Aw}},onRibbonDrop:function(Aj){this.onDrop()},onDrop:function(){var Aj=this._dragState;if(!Aj||Aj.dragResponse.locations.length==0){this.clearDragState();return }this._stopDragTimer();this.state="drag";this.ribbon.setVisible(false);var Ak=this.delegate,Ar,An,Ap,Al=Aj.dragResponse.locations,Ao,Aq=[],Am=this.routeData.locations;for(An=0,Ap=0;An<Am.length;An++,Ap++){if(Al[Ap].dragPoint){Ao=Al[Ap];Aq.push(Ao);if(Aj.isInsert){Aq.push(Am[An]);Ap++}}else{Aq.push(Am[An])}}if(Ao&&!this._draggedPoi){Ar=Ak.createViaPoi(Ao);if(Ar){Ar.setLatLng(Ao.latLng);this.sc.add(Ar);Aj.viaPoi=Ar;$a("MQ10dragroute-add-via")}}if(this._draggedPoi&&this._draggedPoi.location.type==="s"){$a("MQ10dragroute-move-stop")}else{if(this._draggedPoi&&this._draggedPoi.location.type==="v"){$a("MQ10dragroute-move-via")}}Ak.recomputeChangedRoute(Aq)},onRibbonDragCancel:function(Aj){this.clearDragState()},clearDragState:function(){var Ak=this._dragOverlay,Aj=this._dragState;this._stopDragTimer();if(Ak){this.sc.removeItem(Ak);this._dragOverlay=null}if(Aj&&Aj.viaPoi){this.sc.removeItem(Aj.viaPoi)}this._dragState=null;this._draggedPoi=null;this.delegate.setupRibbonDragState(this.ribbon,false);this.state="show"},dispose:function(){this._stopDragTimer();this._clear();this.map.removeShapeCollection(this.sc.collectionName);Ag(this.map,"move",this._validateMap,this);Ag(this.map,"zoomend",this._validateMap,this)},_stopDragTimer:function(){if(this._dragIntervalId){clearInterval(this._dragIntervalId);this._dragIntervalId=null}if(this._dragQueue){this._dragQueue.cancel=true;var Aj=this._dragQueue.completionLL;while(Aj){if(!Aj.done){Aj()}Aj=Aj.prevCompletion}this._dragQueue=null}},_queueDragRequest:function(Ak,Aj,Al){var Am=this._dragQueue;if(!Am){this._dragQueue=Am={cnt:0,commitCnt:0}}Am.nextCookie=Al;Am.nextRequest=Ak;Am.nextCallback=Aj;if(!this._dragIntervalId){this._dragIntervalId=setInterval(AY(this,"_dragDispatcher",Am),this.delegate.dragIntervalMs||333)}},_dragDispatcher:function(Al){if(!Al.nextCookie||Al.nextCookie==Al.curCookie){return }Al.curCookie=Al.nextCookie;Al.curRequest=Al.nextRequest;Al.curCallback=Al.nextCallback;Al.cnt++;var Aj=Al.cnt,Ak=Al.completionLL,Am;Am=this.io.dragRoute(Al.curRequest,{timeout:9000},function(Aq,An,Ao){Am.done=true;if(Al.cancel){return }if(!Aq){return }if(!Aq.shape||Aq.shape.shapePoints.length==0){return }if(Aj<Al.commitCnt){return }else{Al.commitCnt=Aj}var Ap=Am.prevCompletion;while(Ap){if(!Ap.done){Ap()}Ap=Ap.prevCompletion}if(Al.completionLL===Am){Al.completionLL=null}Al.curCallback(Aq)});Am.prevCompletion=Ak;if(Ak){Ak.nextCompletion=Am}Al.completionLL=Am}};AT(AS.TileMap.prototype,{createRoute:function(Al,Aj,Am){if(!Am){Am={}}if(!Am.routeOptions){Am.routeOptions={}}if(!Am.ribbonOptions){Am.ribbonOptions={}}var Ak=new AV(this,Aj,Al,Am);return Ak}});AS.Loader._moduleLoaded("route")});(function(){var AR=window.MQA;function AQ(AS){if(!AS.controls){AS.controls=[]}}AR.mixin(AR.TileMap.prototype,{addControl:function(AS,AW){AQ(this);if(AW){AS.position=AW}if(AS.controlVersion=="1.0"){AS.initialize(this);this.controls.push(AS);var AV=AS.position,AT=(AV&&AV.mapCorner)||0;this.controlAnchors[AT].appendChild(AS.elem);this.placeControl(AS);var AU=AS.elem;AU.style.display="block";AU.style.zIndex=0}else{AS.map=this;this.controls.push(AS);AS.draw()}},removeControl:function(AS){AQ(this);var AV,AU=this.controls;for(var AT=0;AT<AU.length;AT++){AV=AU[AT];if(AV&&AV===AS){delete AU[AT];if(AV.controlVersion=="1.0"){if(AV.destructor){AV.destructor()}}else{if(AV.dispose){AV.dispose(false)}}}}},placeControl:function(AT){if(AT.positionWithCSS){return }var AS=AT.position;if(AT.controlVersion=="2.0"){AT.setValue("position",AS)}else{var AX=AS.getMapCorner();var AU;var AV;if(AX==AR.MapCorner.TOP_LEFT){AU=0;AV=0}else{if(AX==AR.MapCorner.TOP_RIGHT){AU=this.width-AT.getWidth();AV=0;var AW=arguments;if(typeof AW[1]=="undefined"){AS.offsetSize.width*=-1}}else{if(AX==AR.MapCorner.BOTTOM_LEFT){AU=0;AV=this.height-AT.getHeight();var AW=arguments;if(typeof AW[1]=="undefined"){AS.offsetSize.height*=-1}}else{if(AX==AR.MapCorner.BOTTOM_RIGHT){AU=this.width-AT.getWidth();AV=this.height-AT.getHeight();var AW=arguments;if(typeof AW[1]=="undefined"){AS.offsetSize.width*=-1;AS.offsetSize.height*=-1}}}}}AU+=AS.offsetSize.width;AV+=AS.offsetSize.height;AT.elem.style.left=AU+"px";AT.elem.style.top=AV+"px"}AR.ZIndex.set(AT.elem,AT.zIndex||"control")},_eachControl:function(AS){var AT,AU,AV=this.controls;for(AT in AV){AU=AV[AT];if(AU&&String(AT).match(/[0-9]+/)){AS.call(this,AU)}}},onZoomEnd$After:function(AS){this._eachControl(function(AT){if(AT.setZoom){AT.setZoom(AS.zoom)}if(AT.unselectZoom){AT.unselectZoom(0)}})},onMapTypeChanged$After:function(AS){this._eachControl(function(AT){if(AT.type==AR.CONTROL_TYPE&&AT.updateControl){AT.updateControl(AS.mapType)}else{}})},onSizeChanged$After:function(AT){var AS=this;this._eachControl(function(AU){AS.placeControl(AU)})}});AR.Control=function(){this.controlVersion="1.0"};AR.Control.prototype={initialize:function(AS){this.map=AS},getPosition:function(){return this.position},getHeight:function(){return this.getHeightInternal(this.elem)},getHeightInternal:function(AS){var AT=AS.childNodes;var AW=0;for(var AU=0,AV=AT.length;AU<AV;AU++){if(AT[AU].childNodes.length>0&&AT[AU].style.overflow!="hidden"){childHeight=this.getHeightInternal(AT[AU]);if(childHeight>AW){AW=childHeight}}if(AT[AU].offsetHeight>AW){AW=AT[AU].offsetHeight}}return AW},getWidth:function(){return this.getWidthInternal(this.elem)},getWidthInternal:function(AS){var AU=AS.childNodes;var AT=0;for(var AV=0,AW=AU.length;AV<AW;AV++){if(AU[AV].childNodes.length>0&&AU[AV].style.overflow!="hidden"){childWidth=this.getWidthInternal(AU[AV]);if(childWidth>AT){AT=childWidth}}if(AU[AV].offsetWidth>AT){AT=AU[AV].offsetWidth}}return AT}}})();AL.Loader._moduleLoaded("controlbase");(function(){var AS=window.MQA,AR=AS.EventUtil,AQ=AR.falseFunction;AS.extend(AS.Util,{getLLToXY:function(AU){var AV=new AS.PointXY(0,0);var AW=AS.getColTile(AU.lng,this.scale);var AX=AS.getRowTile(AU.lat,this.scale);var AY=AS.getColTileOffset(AU.lng,this.scale);var AT=this.tilesize-AS.getRowTileOffset(AU.lat,this.scale);AV.x=parseInt(this.width/2)-((this.m_centerX+this.m_shiftX-AW)*this.tilesize)-(this.m_offsetX-this.m_dragoffX-AY);AV.y=parseInt(this.height/2)+((this.m_centerY-this.m_shiftY-AX)*this.tilesize)-(this.m_offsetY-this.m_dragoffY-AT);AV.x=parseInt(AV.x);AV.y=parseInt(AV.y);return AV},isIntersectedXY:function(AT,AU){var AV=(AT.lr.x>AU.ul.x)&&(AT.ul.x<AU.lr.x)&&(AT.lr.y>AU.ul.y)&&(AT.ul.y<AU.lr.y);return AV},isIntersectedLL:function(AT,AU){var AV=(AT.lr.lat<AU.ul.lat)&&(AT.ul.lat>AU.lr.lat)&&(AT.lr.lng>AU.ul.lng)&&(AT.ul.lng<AU.lr.lng);return AV},isMouseLeaveOrEnter:function(AT,AU){if(AT.type!="mouseout"&&AT.type!="mouseover"){return false}var AV=AT.relatedTarget?AT.relatedTarget:AT.type=="mouseout"?AT.toElement:AT.fromElement;while(AV&&AV!=AU){AV=AV.parentNode}return(AV!=AU)},getTop:function(AU){var AT=0;while(AU){AT+=parseInt(AU.offsetTop);AU=AU.offsetParent}return(AT)},centreElement:function(AT){AT.style.left=(AS.browser.size().width-AT.offsetWidth)/2+"px";AT.style.top=(AS.browser.size().height-AT.offsetHeight)/2+"px"},deleteChildElements:function(AT){if(AT&&AT.childNodes.length>0){for(var AU=(AT.childNodes.length-1);AU>=0;AU--){AT.removeChild(AT.childNodes[AU])}}},deleteElement:function(AT){if(AT){AT.parentNode.removeChild(AT)}},pngFilter:function(AV){if(!document.getElementsByTagName){return }if(AS.browser.name=="msie"&&((AS.browser.version<7)&&AS.browser.version>5)){var AZ=(AV)?AV:document.images;for(var AW=0,AY=AZ.length;AW<AY;AW++){var AX=AZ[AW];var AT=AX.src;if(AT){var AU=AT.length;if(AT.toLowerCase().substring(AU-4,AU)==".png"){if(!AX.title){AX.title=(AX.alt)?AX.alt:""}AX.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+AX.src+"');";AX.src=MQ.art.spacer}}}}},getSuperRect:function(AU,AV){var AT=new AS.RectLL(new AS.PointLL(0,0),new AS.PointLL(0,0));AT.ul.lat=Math.max(AU.ul.lat,AV.ul.lat);AT.ul.lng=Math.min(AU.ul.lng,AV.ul.lng);AT.lr.lat=Math.min(AU.lr.lat,AV.lr.lat);AT.lr.lng=Math.max(AU.lr.lng,AV.lr.lng);return AT},_hasPngExtention:function(AV){var AU=AV.toLowerCase();var AT=AU.lastIndexOf(".png");if((AT!=-1)&&(AT==(AU.length-4))){return true}return false},_createImage:function(AW,AT,AU,AV,AZ,AY){var AX;AX=document.createElement("img");if(AY==null){AY=false}if(AY){AX.isPng=AY}else{AX.isPng=this._hasPngExtention(AW)}if(!AX.isPng){AX.src=AW}else{if(AS.browser.name=="msie"&&((AS.browser.version<7)&&AS.browser.version>5)){AX.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+AW+"', sizingMethod='image')";AX.src="http://img.mqcdn.com/a/a"}else{AX.src=AW}}AX.style.left=AT+"px";AX.style.top=AU+"px";AX.style.width=AV+"px";AX.style.height=AZ+"px";AX.style.position="absolute";AX.style.zIndex=200;AX.style.MozUserSelect="none";AX.style.border="none";AX.style.display="block";AX.unselectable="on";AX.onselectstart=AQ;AX.oncontextmenu=AQ;if(AY==null){AY=false}if(AY){AX.isPng=AY}else{AX.isPng=this._hasPngExtention(AW)}return AX},createImage:function(Aa,AZ,AW,AX,AU,AT){var AV;AV=document.createElement("IMG");AV.galleryimg="no";AV.lt=AZ;AV.tp=AW;var AY=AV.style;AY.width=AS.Util.asPix(AX);AY.height=AS.Util.asPix(AU);AY.position="absolute";AY.left=AS.Util.asPix(AZ);AY.top=AS.Util.asPix(AW);AY.zIndex=AT;AY.MozUserSelect="none";AY.display="block";AY.border="0";if(Aa.length==0){AY.visibility="hidden"}else{AY.visibility="visible";AV.src=Aa}AV.unselectable="on";AV.onselectstart=AQ;AV.oncontextmenu=AQ;return AV},pause:function(AU){var AV=new Date();var AT=AV.getTime()+AU;while(true){AV=new Date();if(AV.getTime()>AT){return }}},asPix:function(AT){return AT+"px"},calcPercentage:function(AT,AU){return Math.round((AT/AU)*100)},stripHTMLTags:function(AT){return AT.replace(/<\/?[^>]+>/gi,"")},panAngle:function(AU,AW,AX,AY){var Aa=(AY-AW);var AT=(AX-AU);if(Aa<0){Aa=Aa*-1}if(AT<0){AT=AT*-1}var AZ=Math.round(Math.sqrt(Aa*Aa+AT*AT));var AV=Math.round((Math.asin(Aa/AZ)*360)/(2*3.14));return AV},isOverLimit:function(AW){var AT=false;var AV=16000;for(var AU=0;AU<AW.length;AU++){if(AW[AU].x>AV||AW[AU].x<-AV||AW[AU].y>AV||AW[AU].y<-AV){AT=true;break}}return AT},InitDojo:function(AT){window.onload=AT},getWindowScrollXY:function(){var AT=new AS.Point(0,0);if(typeof (window.pageYOffset)=="number"){AT.setX(window.pageXOffset);AT.setY(window.pageYOffset)}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){AT.setX(document.body.scrollLeft);AT.setY(document.body.scrollTop)}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){AT.setX(document.documentElement.scrollLeft);AT.setY(document.documentElement.scrollTop)}}}return(AT)},getHTMLSubstring:function(AV,Ac,Aa){var AY=/<\/?[^>]+>/ig;var AX=new Array();var AU=AV.replace(AY,"|");var AT=AU.split("|");AX=AV.match(AY);var AZ="";var AW=false;for(var Ab=charCount=0;Ab<AT.length;Ab++){charCount+=AT[Ab].length;if(charCount>=Ac&&AW==false){charCount-=AT[Ab].length;AT[Ab]=AT[Ab].substr(0,(Ac-charCount))+Aa;AW=true;continue}if(AW==true){AT[Ab]=""}}for(var Ab=0;Ab<AT.length;Ab++){AZ+=AT[Ab];if(AX&&(AX.length>0)&&(Ab<AX.length)){AZ+=AX[Ab]}}return(AZ)},getBrowserSize:function(){size=new AS.Size(0,0);if(document.body.scrollHeight>document.body.offsetHeight){size.width=document.body.scrollWidth;size.height=document.body.scrollHeight}else{size.width=document.body.offsetWidth;size.height=document.body.offsetHeight}if(document.body.clientWidth){size.width=document.body.clientWidth;size.height=document.body.clientHeight}else{size.width=document.body.offsetWidth;size.height=document.body.offsetHeight}if(document.documentElement.clientWidth){size.width=document.documentElement.clientWidth;size.height=document.documentElement.clientHeight}if(self.innerWidth){size.width=self.innerWidth;size.height=self.innerHeight}return size},isSupportedBrowser:function(){browser=AS.browser;switch(browser.name){case"msie":if(browser.version>=6){return true}return false;break;case"firefox":if(browser.version>1.5){return true}return false;break;case"netscape":return false;break;case"opera":return false;break;case"safari":if(browser.version>=2){return true}return false;break}return true},getParentOffset:function(AU){var AV=0,AT=0;do{AV+=AU.offsetTop||0;AT+=AU.offsetLeft||0;AU=AU.offsetParent}while(AU);return(new AS.Point(AT,AV))},indexOf:function(AT,AW){for(var AV=0,AU=AT.length;AV<AU;AV++){if(AT[AV]==AW){return AV}}return -1},getBrowserInfo:function(){browser=new Object();browser.name=browser.version=browser.os="unknown";var AV=navigator.userAgent.toLowerCase();var Aa=new Array("firefox","msie","netscape","opera","safari");var AW=new Array("linux","mac","windows","x11");for(var AX=0,AT=Aa.length;AX<AT;AX++){var AY=AV.indexOf(Aa[AX])+1;if(AY>0){browser.name=Aa[AX];var AZ=AY+browser.name.length;var AU=((browser.name=="safari")||(AV.charAt(AZ+4)>0&&AV.charAt(AZ+4)<9))?5:3;browser.version=AV.substring(AZ,AZ+AU)}}for(var AX=0,AT=AW.length;AX<AT;AX++){var AY=AV.indexOf(AW[AX])+1;if(AY>0){browser.os=AW[AX]}}return browser},createParentDiv:function(AT,Aa,AX,AZ,AY,Ab,AV,Ac,AW){var AU=document.createElement("div");AU.id=AT;AU.lt=Aa;AU.tp=AX;AU.style.position=AZ;AU.style.top=AY+"px";AU.style.left=Ab+"px";if(AV!=null){AU.style.zIndex=AV}if(Ac!=null){AU.style.width=Ac+"px"}if(AW!=null){AU.style.height=AW+"px"}return AU},createImgHolder:function(AT,AX,AW,AU,AY){var AV=document.createElement("img");if(AT!=null){AV.src=AT}AV.unselectable=AX;AV.style.MozUserSelect=AW;AV.style.display=AU;if(AY!=null){AV.style.zIndex=AY}return AV},createImgLogo:function(AW,Aa,AX,Ac,Ab,AY,AU,AT,Ad,AV){var AZ=document.createElement("img");AZ.style.MozUserSelect=AW;AZ.unselectable=Aa;AZ.corner=AX;AZ.offset=Ac;AZ.style.position=Ab;AZ.style.display=AY;AZ.style.zIndex=AU;if(Ad!=null){AZ.width=Ad}if(AV!=null){AZ.height=AV}return AZ},createArea:function(AX,AV,AY,AT,AU){var AW=document.createElement("area");if(AX!=null){AW.shape=AX}if(AV!=null){AW.coords=AV}if(AY!=null){AW.href=AY}if(AT!=null){AW.title=AT}if(AU!=null){AW.alt=AU}return AW},getCurrentDateObject:function(){var AV;iDate=new Date();if((iDate.toString().indexOf("DT",0)!=-1)||(iDate.toString().indexOf("Daylight Time)",0)!=-1)){AV=60}else{AV=0}var AT=new Date();var AU=new Object;AU.year=AT.getFullYear();AU.month=AT.getMonth();AU.day=AT.getDate();AU.hours=AT.getHours();AU.minutes=AT.getMinutes();AU.seconds=AT.getSeconds();AU.ampm=((AU.hours>=12)&&(AU.minutes>0)?"pm":"am");switch(AT.getTimezoneOffset()+AV){case 300:AU.timeZone=(AV>0?"EDT":"EST");break;case 360:AU.timeZone=(AV>0?"CDT":"CST");break;case 420:AU.timeZone=(AV>0?"MDT":"MST");break;case 480:AU.timeZone=(AV>0?"PDT":"PST");break;case 600:AU.timeZone=(AV>0?"HDT":"HST");break}return AU},_cloneValue:function(AV){if(typeof (AV)!=="object"||AV==null){return AV}var AT=AV instanceof Array?[]:{};for(var AW in AV){var AU=AV[AW];if(typeof (AU)=="object"){if(AU instanceof Array){AT[AW]=[];for(var AX=0;AX<AU.length;AX++){if(typeof (AU[AX])!="object"){AT[AW].push(AU[AX])}else{AT[AW].push(this._cloneValue(AU[AX]))}}}else{AT[AW]=this._cloneValue(AU)}}else{AT[AW]=AU}}return AT},_trim:function(AT){return AT.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},_nukeChildren:function(AU){var AT;while(AU.childNodes.length>0){AT=AU.lastChild;this._nukeChildren(AT);if(AT.innerHTML){AT.innerHTML=null}if(AT.outerHTML){this._setOuterHTMLToEmptyString(AT)}if(AT.parentNode){AT.parentNode.removeChild(AT)}AT=null;delete AT}},_deleteDOMObject:function(AT){this._setInnerHTMLToEmptyString(AT);this._setOuterHTMLToEmptyString(AT);this._nukeChildren(AT);if(AT.parentNode){AT.parentNode.removeChild(AT)}AT=null;return null},_setInnerHTMLToEmptyString:function(AT){if(this.getBrowserInfo().name!="msie"&&this.getBrowserInfo().name!="safari"){AT.innerHTML=null}},_setOuterHTMLToEmptyString:function(AT){if(this.getBrowserInfo().name!="safari"&&this.getBrowserInfo().name!="msie"){AT.outerHTML=""}},_purge:function(AU){var AW=AU.attributes,AV,AX,AT;if(AW){AX=AW.length;for(AV=0;AV<AX;AV+=1){AT=AW[AV].name;if(typeof AU[AT]==="function"){AU[AT]=null}}}AW=AU.childNodes;if(AW){AX=AW.length;for(AV=0;AV<AX;AV+=1){this._purge(AU.childNodes[AV])}}},inArray:function(AT,AU){for(var AV=0;AV<AU.length;AV++){if(AT==AU[AV]){return true}}return false}});AS.browser=AS.Util.getBrowserInfo()})();AL.Loader._moduleLoaded("fullUtil");(function(){var AR=window.MQA,AT=AR.extend,AQ=AR.IO,AS=AR.BaseDeserializer,AW=AR.Event,AV=AR.EventManager,AU=AV.trigger;AS=function(){this.isIE=(AR.Util.getBrowserInfo().name=="msie");this.deserialize=function(AY,AX){return null};this._trim=function(AX){return AX.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}};BaseXMLDeserializer=function(){};BaseXMLDeserializer.prototype=AT(new AS(),{getTextValue:function(AX){if(this.isIE){return AX.text}else{return AX.textContent}},convertStringToXMLDocument:function(AZ){var AY=null;if(document.implementation&&document.implementation.createDocument){var AX=new DOMParser();AY=AX.parseFromString(AZ,"text/xml")}else{AY=new ActiveXObject("Microsoft.XMLDOM");AY.async="false";AY.loadXML(AZ)}return AY}});AR.BaseDeserializer=AS;AR.BaseXMLDeserializer=BaseXMLDeserializer;AR.Loader._moduleLoaded("basedeserializer")})();(function(){AL.JSONDeserializer=function(AQ){AL.BaseDeserializer.call(this);this._data=null;if(typeof (AQ)=="undefined"){this._dataProcessor=function(AR){return null}}else{this._dataProcessor=AQ}this.deserializeData=function(AT){var AV,AS,AU;var AR=Array();this._data=AT;AR=this._dataProcessor(this._data);return AR};this.setDataProcessor=function(AR){this._dataProcessor=AR}}})();AL.Loader._moduleLoaded("jsondeserializer");(function(){AL.withModule("shapes","basedeserializer",function(){var AZ=window.MQA,AX=AZ.extend,Aa=AZ.mixin,AU=AZ.Log.debug,AT=AZ.IO,AQ=AZ.BaseDeserializer,AW=AZ.EventUtil,AY=AW.EventCallback,AV=AZ.Event,AR=AZ.EventManager,AS=AR.trigger;RemoteCollection=function(Ad,Ac,Ab){this.url=Ad;this.deserializer=Ac;this.options=Ab;this.loadStrategy="XHR";this.loaded=false;this.loadOnAdd=true;AZ.ShapeCollection.call(this)};RemoteCollection.prototype=AZ.Util.subClass(AZ.ShapeCollection,{load:function(){if(!this.loaded){if(AZ.Util.isFunction(this.deserializer.deserialize)){var Ab=new AY(this,"_handleResponse"+this.loadStrategy);switch(this.loadStrategy){case"XHR":AT.doXhr(this.url,this.options,Ab);break;case"JSONV":AT.doJSONV(this.url,this.options,Ab);break;default:AS(this,"unknown load strategy",new AV("error",this));break}}else{AS(this,"unknown deserializer",new AV("error",this))}}},_loaded:function(){this.loaded=true;AS(this,"loaded",new AV("loaded",this))},reload:function(){this.loaded=false;this.load()},_handleResponseJSONV:function(Ab,Ac){AS(this,"dataretrieved",new AV("dataretrieved",this));this.deserializer.deserialize(null,this);this._loaded()},_handleResponseXHR:function(Ab,Ac){if(Ac){AS(this,"error",new AV("error",this))}else{AS(this,"dataretrieved",new AV("dataretrieved",this));this.deserializer.deserialize(Ab.responseText,this);this._loaded()}},clone:function(){return this}});Aa(AZ.TileMap.prototype,{addShapeCollection$Before:function(Ab){if(AZ.Util.isFunction(Ab.load)){Ab.load()}}});AZ.RemoteCollection=RemoteCollection;AZ.Loader._moduleLoaded("remotecollection")})})();(function(){var AX=window.MQA,AW=AX.extend,AR=AX.BaseDeserializer,AV=AX.Event,AQ=AX.EventManager,AS=AQ.trigger,AU=AQ.addListener,AT=AX.EventUtil.observe;AX.mixin(AX.TileMap.prototype,{onZoomEnd$After:function(AZ){if(this.traffic){this.handleTraffic()}},handleTraffic:function(AZ){var Aa=this,Ab=Aa.controls?Aa.controls[AX.CONTROL_TRAFFIC]:undefined;if(Aa.traffic){Aa.traffic.refresh();if(typeof (Ab)!="undefined"){if(Ab.controlOn){Ab.updateLegendTime();if(AZ){Ab.updateTrafficLegend()}}}}}});AX.TRAFFIC_CONSTRUCTION=1;AX.TRAFFIC_EVENTS=2;AX.TRAFFIC_INCIDENTS=4;AX.GlobalTrafficProcessor=new function(){this.trafficContainer=[];this.trafficMarketData=null;this.trafficIncidentData=null;this.addInstance=function(AZ){this.trafficContainer.push(AZ)}};var AY=function(){var Ac=this.flowBounds,AZ=this.incidentBounds,Ad;if(Ac||AZ){var Aa=this.map.pixToDisplay({x:0,y:0}),Ab={x:Aa.x+this.map.width,y:Aa.y+this.map.height};if(Ac&&this.flowActive&&this.flowCollection.inZoomWindow()){if((Aa.x<=Ac.ul.x)||(Aa.y<=Ac.ul.y)||(Ab.x>=Ac.lr.x)||(Ab.y>=Ac.lr.y)){Ad=true}}if(AZ){if((Aa.x<=AZ.ul.x)||(Aa.y<=AZ.ul.y)||(Ab.x>=AZ.lr.x)||(Ab.y>=AZ.lr.y)){Ad=true}}if(Ad){this.refresh()}}};AX.Traffic=function(AZ){AX.Base.call(this);var Aa=AX.Util.ie6Image;if(typeof (AZ)!="undefined"){this.map=AZ;AZ.traffic=this}else{this.map=null}this.trafficServer="http://"+TRAFFSERVER;this.timeoutDuration=10000;this.guid=AX.Util._getRandomGUID(10);this.available=true;AX.GlobalTrafficProcessor.addInstance(this);this.flowImage=null;this.flowOpacity=0.6;this.flowActive=false;this.marketsActive=false;this.incidentsActive=false;this.autoDisplay=false;this.lastUpdateTime=null;this.flowCollectionName="mqa.traffic_flow";this.marketCollectionName="mqa.traffic_markets";this.incidentCollectionName="mqa.traffic_incidents";this.minIncidentZoomLevel=7;this.maxIncidentZoomLevel=16;this.maxMarketZoomLevel=6;this.minMarketZoomLevel=2;this.minFlowZoomLevel=7;this.maxFlowZoomLevel=16;this.flowCollection=new AX.ShapeCollection();this.flowCollection.bestFit=false;this.flowCollection.setName(this.flowCollectionName);this.flowCollection.setMaxZoomLevel(this.maxFlowZoomLevel);this.flowCollection.setMinZoomLevel(this.minFlowZoomLevel);this.marketCollection=null;this.incidentCollection=null;this.severityColors=[];this.severityColors[0]="#FBEF69";this.severityColors[1]="#FBEF69";this.severityColors[2]="#FF9900";this.severityColors[3]="#FF9900";this.severityColors[4]="#E40404";this.severityText=[];this.severityText[0]="Minimal";this.severityText[1]="Minimal";this.severityText[2]="Moderate";this.severityText[3]="Moderate";this.severityText[4]="Severe";this.infoWindowTitleTextColor=[];this.infoWindowTitleTextColor[0]="#000000";this.infoWindowTitleTextColor[1]="#000000";this.infoWindowTitleTextColor[2]="#000000";this.infoWindowTitleTextColor[3]="#000000";this.infoWindowTitleTextColor[4]="#FFFFFF";this.incidentIcons=[];this.incidentIcons[0]=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/incid_min.png"),29,29);this.incidentIcons[1]=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/incid_min.png"),29,29);this.incidentIcons[2]=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/incid_mod.png"),29,29);this.incidentIcons[3]=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/incid_mod.png"),29,29);this.incidentIcons[4]=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/incid_sev.png"),29,29);this.eventIcons=[];this.eventIcons[0]=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/event_min.png"),29,29);this.eventIcons[1]=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/event_min.png"),29,29);this.eventIcons[2]=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/event_mod.png"),29,29);this.eventIcons[3]=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/event_mod.png"),29,29);this.eventIcons[4]=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/event_sev.png"),29,29);this.constructionIcons=[];this.constructionIcons[0]=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/const_min.png"),29,29);this.constructionIcons[1]=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/const_min.png"),29,29);this.constructionIcons[2]=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/const_mod.png"),29,29);this.constructionIcons[3]=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/const_mod.png"),29,29);this.constructionIcons[4]=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/const_sev.png"),29,29);this.marketIcon=new AX.Icon(Aa("http://img.mqcdn.com/mqtraffic/stoplight.png"),16,30);this.maxInfoWindowWidth=285;this.incidentTitleCallback=null;this.incidentContentCallback=null;this.marketTitleCallback=null;this.marketContentCallback=null;this.infoWindowTitleCallback=null;this.incidentTypeFilter=[AX.TRAFFIC_CONSTRUCTION,AX.TRAFFIC_INCIDENTS];AU(this.map,"moveend",AY,this)};AX.TrafficJSONVDeserializer=function(Ab,Aa,AZ){this.map=Aa;this.traffic=Ab;this.callback=AZ};AX.TrafficJSONVDeserializer.prototype=AW(new AR(),{deserialize:function(Aa,AZ){this.processIncidentData(AX.GlobalTrafficProcessor.trafficIncidentData,AZ);if(AX.Util.isFunction(this.callback)){this.callback()}},processIncidentData:function(Ap,Ae){if(!Ap||this.traffic.incidentTypeFilter.length==0){return[]}var Av=[];var Aj,Au,Am,Aw,Ai=0,Ap=Ap.incidents,Ah=Ap.length;for(;Ai<Ah;Ai++){if(!AX.Util.inArray(Ap[Ai].incidentType,this.traffic.incidentTypeFilter)){continue}Aj=new AX.Poi(new AX.LatLng(Ap[Ai].latitude,Ap[Ai].longitude));Aj.setZIndex("traffic_poi");Aj.actionId="Traffic";Aw="color:"+this.traffic.infoWindowTitleTextColor[Ap[Ai].severity]+";font-weight:bold;font-size:12px";switch(Ap[Ai].incidentType){case 1:Aj.setValue("titleBackgroundColor",this.traffic.severityColors[Ap[Ai].severity]);Am='<span style="'+Aw+'">'+this.traffic.severityText[Ap[Ai].severity]+" Impact Construction</span>";Aj.setValue("icon",this.traffic.constructionIcons[Ap[Ai].severity]);break;case 2:Aj.setValue("titleBackgroundColor",this.traffic.severityColors[Ap[Ai].severity]);Am='<span style="'+Aw+'">'+this.traffic.severityText[Ap[Ai].severity]+" Impact Event</span>";Aj.setValue("icon",this.traffic.eventIcons[Ap[Ai].severity]);break;case 4:Aj.setValue("titleBackgroundColor",this.traffic.severityColors[Ap[Ai].severity]);Am='<span style="'+Aw+'">'+this.traffic.severityText[Ap[Ai].severity]+" Impact Incident</span>";Aj.setValue("icon",this.traffic.incidentIcons[Ap[Ai].severity]);break}Aj.setValue("maxInfoWindowWidth",this.traffic.maxInfoWindowWidth);if(this.traffic.infoWindowTitleCallback){this.traffic.infoWindowTitleCallback(Ap[Ai])}Aj.setValue("infoWindowTitleText",Am);if(this.incidentTitleCallback){Aj.setValue("infoTitleHTML",this.traffic.incidentTitleCallback(Ap[Ai]))}else{Aj.setValue("infoTitleHTML",Am)}if(this.incidentContentCallback){Aj.setValue("infoContentHTML",this.traffic.incidentContentCallback(Ap[Ai]))}else{var Az=document.createElement("div"),Aq="",At=Ap[Ai],AZ=document.createElement("a"),As=this.map,Ab=function(A0,A1){return function(){A0.setCenter(new AX.LatLng(A1.latitude,A1.longitude),14);$a("MQ10-Traffic-ZoomIn");return false}},Aa=AX.GetMessage?AX.GetMessage("startTime"):"Start",Al=AX.GetMessage?AX.GetMessage("endTime"):"End",Ao=AX.GetMessage?AX.GetMessage("expected"):"Expected",Ar=AX.GetMessage?AX.GetMessage("allTimesEstimated"):"All Times Estimated",Ak=AX.GetMessage?AX.GetMessage("expectDelay"):"Expect Some Delays",Ax=AX.GetMessage?AX.GetMessage("construction"):"Construction",Ac=AX.GetMessage?AX.GetMessage("tevent"):"Event",Ad=AX.GetMessage?AX.GetMessage("incident"):"Incident",Ay=AX.GetMessage?AX.GetMessage("zoom"):"Zoom",Af=this.formatTrafficTime(At.startTime,As),An=this.formatTrafficTime(At.endTime,As);switch(At.incidentType){case 1:Aq=Ax;break;case 2:Aq=Ac;break;case 4:Aq=Ad;break}if(Aq!=""){Aq+=" - "}Az.style.width="250px";Az.innerHTML='<div style="font-weight:bold; font-size:12px;">'+Aq+Ak+"</div>"+At.description+"<br/><br/><b>"+Aa+":</b> "+Af+"<br/><b>"+Al+":</b> "+Ao+" "+An+"<br/>("+Ar+")<br/>";AZ.href="javascript:void(0)";AZ.innerHTML=Ay;AT(AZ,"click",Ab(As,Ap[Ai]));Az.appendChild(AZ);Aj.setValue("infoContentHTML",Az)}var Ag=Ap[Ai].title;if(Ag.length>33){Ag=Ag.substr(0,33);Ag+="..."}Aj.setValue("rolloverContent","<span style='white-space:nowrap;font-weight:bold'>"+Ag+"</span>");Ae.add(Aj)}},formatTrafficTime:function(Ac,Ah){var Ab,Ae=new Date(),Ad=new Date(Ac),Ai=Ad.getHours(),Ag=(Ai>12)?(Ai-12):Ai,Af=(Ad.getMinutes()!=0)?Ad.getMinutes():"00",Aa=Ai>11?"PM":"AM",AZ=Ag+":"+Af+" "+Aa;d1=(new Date(Ad.getFullYear(),Ad.getMonth(),Ad.getDate())).toLocaleDateString(),curDay=(new Date(Ae.getFullYear(),Ae.getMonth(),Ae.getDate())).toLocaleDateString(),prevday=(new Date(Ae.getFullYear(),Ae.getMonth(),Ae.getDate()-1)).toLocaleDateString(),nextday=(new Date(Ae.getFullYear(),Ae.getMonth(),Ae.getDate()+1)).toLocaleDateString(),todayTag=AX.GetMessage?AX.GetMessage("today"):"Today",tomorrowTag=AX.GetMessage?AX.GetMessage("tomorrow"):"Tomorrow",yesterdayTag=AX.GetMessage?AX.GetMessage("yesterday"):"Yesterday";if(d1==curDay){Ab=todayTag}else{if(d1==nextday){Ab=tomorrowTag}else{if(d1==prevday){Ab=yesterdayTag}}}if(Ab){return Ab+" "+AZ}else{return Ac.replace(Ac.substring(0,4),"")}}});AX.TrafficMarketJSONVDeserializer=function(Aa,AZ){this.map=Aa;this.callback=AZ;this.marketIcon=new AX.Icon(AX.Util.ie6Image("http://img.mqcdn.com/mqtraffic/stoplight.png"),16,30)};AX.TrafficMarketJSONVDeserializer.prototype=AW(new AR(),{deserialize:function(Aa,AZ){this.processMarketData(AX.GlobalTrafficProcessor.trafficMarketData,AZ);if(AX.Util.isFunction(this.callback)){this.callback()}},processMarketData:function(Ad,Ah){if(!Ad||!Ah){return }var Ab,AZ,An,Ai=0,Ak=Ad.length;for(;Ai<Ak;Ai++){An=Ad[Ai];Ab=new AX.Poi(new AX.LatLng(An.latitude,An.longitude),this.marketIcon);Ab.setZIndex("traffic_poi");Ab.actionId="TRF";if(this.marketTitleCallback){Ab.setValue("infoTitleHTML",this.marketTitleCallback(An))}else{if(!An.city&&!An.state){Ab.setValue("infoTitleHTML","Unknown Market")}else{Ab.setValue("infoTitleHTML",An.city+", "+An.state)}}if(this.marketContentCallback){Ab.setValue("infoContentHTML",this.marketContentCallback(An))}else{var Af=document.createElement("div"),Ao=AX.GetMessage?AX.GetMessage("please"):"Please",Ae=AX.GetMessage?AX.GetMessage("clickHere"):"click here",Aj="to view traffic conditions.";var Al=document.createTextNode(Ao+" ");var Ag=document.createElement("a");Ag.href="javascript:void(0)";Ag.innerHTML=Ae;var Ap=this.map;var Ac=function(Ar,Aq){return function(){Ar.setCenter(new AX.LatLng(Aq.latitude,Aq.longitude),7);$a("MQ10-Traffic-ZoomIn");return false}};AT(Ag,"click",Ac(Ap,An));var Aa=document.createTextNode(" "+Aj);Af.appendChild(Al);Af.appendChild(Ag);Af.appendChild(Aa);Ab.setValue("infoContentHTML",Af)}Ab.setValue("maxInfoWindowWidth");var Am=An.city+", "+An.state;if(Am.length>33){Am=Am.substr(0,33)+"..."}Ab.setValue("rolloverContent","<span style='white-space:nowrap;font-weight:bold'>"+Am+"</span><br/><span style='white-space:nowrap;font-weight:normal'>"+Ab.getValue("infoContentHTML").innerHTML+"</span>");Ah.add(Ab)}}});AX.Traffic.prototype={_facio:function(Aa,AZ){switch(Aa){case"flowOpacity":if(this.flowImage){this.flowImage.setValue("imageOpacity",this.flowOpacity)}break;case"incidentTypeFilter":if(this.incidentsActive){this.addIncidents()}break;case"maxInfoWindowWidth":if(this.marketsActive){for(var Ab=0;Ab<this.marketCollection.getSize();Ab++){this.marketCollection.getAt(Ab).setValue("maxInfoWindowWidth",AZ)}}if(this.incidentsActive){for(var Ab=0;Ab<this.incidentCollection.getSize();Ab++){this.incidentCollection.getAt(Ab).setValue("maxInfoWindowWidth",AZ)}}break}},_duco:function(Aa,AZ){},addFlow:function(){if(!this.map){return }this.lastUpdateTime=AX.Util.getCurrentDateObject();var Aa={},Ab;Aa.centerPoint=this.map.getCenter();Aa.width=this.map.width+1024;Aa.height=this.map.height+1024;Aa.scale=this.map.getScale();Aa.left=-512;Aa.top=-512;Aa.bottom=Aa.top+Aa.height;Aa.right=Aa.left+Aa.width;Aa.src=this.trafficServer+"/traffic/flow?lat="+Aa.centerPoint.getLatitude()+"&lng="+Aa.centerPoint.getLongitude()+"&width="+Aa.width+"&height="+Aa.height+"&scale="+Aa.scale+"&key="+Key+"&rand="+(Math.random()*10);Ab=new AX.ImageOverlay();Ab.setZIndex("traffic_flow");Ab.setValue("imageURL",Aa.src);Ab.setValue("imageOpacity",this.flowOpacity);var AZ=new AX.LatLngCollection();AZ.add(this.map.pixToLL(new AX.Point(Aa.left,Aa.top)));AZ.add(this.map.pixToLL(new AX.Point(Aa.right,Aa.bottom)));Ab.setValue("shapePoints",AZ);if(Ab){if(this.flowActive){this.map.removeShape(this.flowImage);this.flowImage=null}this.flowCollection.removeAll();this.flowActive=true;this.flowImage=Ab;this.flowCollection.add(this.flowImage);if(!this.flowCollection.isOnMap()){this.map.addShapeCollection(this.flowCollection)}if(this.flowImage.shape){this.flowImage.shape.style.zIndex=-1}this.flowBounds={ul:this.map.pixToDisplay({x:Aa.left,y:Aa.top}),lr:this.map.pixToDisplay({x:Aa.left+Aa.width,y:Aa.top+Aa.height})};var Ac=new AV("MQA.Traffic.flowAdded");Ac.srcObject=this;this.onFlowAdded(Ac)}},removeFlow:function(){if(!this.map){return }delete this.flowBounds;this.flowActive=false;if(this.flowCollection){this.flowCollection.removeAll();this.flowImage=null}var AZ=new AV("MQA.Traffic.flowRemoved");AZ.srcObject=this;this.onFlowRemoved(AZ)},onFlowAdded:function(AZ){AS(this,"flowadded",AZ)},onFlowRemoved:function(AZ){AS(this,"flowremoved",AZ)},addMarkets:function(){if(this.marketsActive){this.removeMarkets()}this.marketsActive=true;this.lastUpdateTime=AX.Util.getCurrentDateObject();var Aa=this.trafficServer+"/traffic/markets?format=json&var=MQA.GlobalTrafficProcessor.trafficMarketData&fn=null";Aa+="&rand="+Math.random();this.marketCollection=new AX.RemoteCollection(Aa,new AX.TrafficMarketJSONVDeserializer(this.map));this.marketCollection.loadStrategy="JSONV";this.marketCollection.bestFit=false;this.marketCollection.setName(this.marketCollectionName);this.marketCollection.setDeclutter(false);this.marketCollection.setMaxZoomLevel(this.maxMarketZoomLevel);this.marketCollection.setMinZoomLevel(this.minMarketZoomLevel);this.map.addShapeCollection(this.marketCollection);var AZ=new AV("MQA.Traffic.marketsAdded");AZ.srcObject=this;this.onMarketsAdded(AZ)},removeMarkets:function(){this.marketsActive=false;if(this.map.getInfoWindow&&!this.map.getInfoWindow().isHidden()){this.map.getInfoWindow().hide()}this.map.removeShapeCollection(this.marketCollectionName);this.marketCollection.removeAll();this.marketCollection=null;var AZ=new AV("MQA.Traffic.marketsRemoved");AZ.srcObject=this;this.onMarketsRemoved(AZ)},processMarketCollection:function(AZ){this.map.addShapeCollection(AZ.srcObject)},processMarketTimeout:function(AZ){var AZ=new AV("MQA.Traffic.marketTimeout");AZ.srcObject=this;this.onMarketTimeout(AZ)},onMarketsAdded:function(AZ){AS(this,"marketsadded",AZ)},onMarketsRemoved:function(AZ){AS(this,"marketsremoved",AZ)},onMarketTimeout:function(AZ){AS(this,"markettimeout",AZ)},addIncidents:function(){var Aa=this;if(Aa.incidentsActive){Aa.removeIncidents()}Aa.incidentsActive=true;Aa.lastUpdateTime=AX.Util.getCurrentDateObject();var Ac=Aa._getMapRectInfo();var Ad=new AX.RectLL(new AX.LatLng(Ac.ullat,Ac.ullng),new AX.LatLng(Ac.lrlat,Ac.lrlng));var Ae="&ullat="+Ad.ul.lat+"&ullng="+Ad.ul.lng+"&lrlat="+Ad.lr.lat+"&lrlng="+Ad.lr.lng;var Ab=Aa.trafficServer+"/traffic/incidents?format=json&key="+Key+"&var=MQA.GlobalTrafficProcessor.trafficIncidentData"+Ae+"&fn=null";Ab+="&rand="+Math.random();Aa.incidentCollection=new AX.RemoteCollection(Ab,new AX.TrafficJSONVDeserializer(this,this.map));Aa.incidentCollection.loadStrategy="JSONV";Aa.incidentCollection.bestFit=false;Aa.incidentCollection.setName(Aa.incidentCollectionName);Aa.incidentCollection.setDeclutter(false);Aa.incidentCollection.setMaxZoomLevel(Aa.maxIncidentZoomLevel);Aa.incidentCollection.setMinZoomLevel(Aa.minIncidentZoomLevel);Aa.map.addShapeCollection(Aa.incidentCollection);Aa.incidentBounds={ul:Aa.map.pixToDisplay({x:Ac.left,y:Ac.top}),lr:Aa.map.pixToDisplay({x:Ac.left+Ac.width,y:Ac.top+Ac.height})};var AZ=new AV("MQA.Traffic.incidentsAdded");AZ.srcObject=Aa;Aa.onIncidentsAdded(AZ)},removeIncidents:function(){delete this.incidentBounds;this.incidentsActive=false;if(this.map.getInfoWindow&&!this.map.getInfoWindow().isHidden()){this.map.getInfoWindow().hide()}this.map.removeShapeCollection(this.incidentCollectionName);this.incidentCollection.removeAll();this.incidentCollection=null;var AZ=new AV("MQA.Traffic.incidentsRemoved");AZ.srcObject=this;this.onIncidentsRemoved(AZ)},processIncidentCollection:function(AZ){this.map.addShapeCollection(AZ.srcObject)},processIncidentTimeout:function(AZ){this.available=false;var AZ=new AV("MQA.Traffic.incidentTimeout");AZ.srcObject=this;this.onIncidentTimeout(AZ)},onIncidentsAdded:function(AZ){AS(this,"incidentsadded",AZ)},onIncidentsRemoved:function(AZ){AS(this,"incidentsremoved",AZ)},onIncidentTimeout:function(AZ){AS(this,"incidenttimeout",AZ)},isAvailable:function(){this.getValue("available")},refresh:function(){if(this.flowActive&&this.flowCollection.inZoomWindow()){this.addFlow()}if(this.incidentsActive&&this.incidentCollection.inZoomWindow()){this.addIncidents()}AS(this,"refresh")},_getMapRectInfo:function(){if(!this.map){return null}var Ac=512,Aa=-512,Ab=-512,Ae=new AX.Point(Aa,Ab),Ag=new AX.Point(this.map.width+Ac,this.map.height+Ac),Ah=this.map.pixToLL(Ae),Ad=this.map.pixToLL(Ag),Af=new AX.RectLL(Ah,Ad),Ai=Ag.x-Ae.x,Aj=Ag.y-Ae.y,AZ=new Object;AZ.ullat=Ah.getLatitude();AZ.ullng=Ah.getLongitude();AZ.lrlat=Ad.getLatitude();AZ.lrlng=Ad.getLongitude();AZ.scale=this.map.getScale();AZ.width=Ai;AZ.height=Aj;AZ.left=Aa;AZ.top=Ab;return AZ}}})();AL.Loader._moduleLoaded("traffic");(function(){var AT=window.MQA,AU=AT.IO.doGetJSON,AQ=AT.IO.doPostJSON,AR=AT.IO.cacheBust,AS=AT.IO.doJSONP,AV=AT.IO.stringifyJSON;function AW(AY,AX,AZ){this.baseURI=AX;this.noProxy=AZ||false;this.map=AY}AW.CALLBACKS={};AT.StreetView360IO=AW;AW.prototype={getOverlayUrl:function(AY,AZ){var Aa=this.baseURI;var AX=(AT.browser.name=="msie"&&AT.browser.version<7)?"gif":"png";Aa+="?id=1&service=mq_imc_spatial&method=get_sv_styled_overlay&lrlat="+AY.lr.lat+"&ullng="+AY.ul.lng+"&ullat="+AY.ul.lat+"&lrlng="+AY.lr.lng+"&image_format="+AX+"&overlay_type="+AZ.overlay_type+"&fill_color="+AZ.fill_color.replace("#","%23")+"&outline_color="+AZ.outline_color.replace("#","%23")+"&thickness="+AZ.line_thickness+"&outline_thickness="+AZ.outline_thickness+"&image_width="+AY.width+"&image_height="+AY.height+"&cacheBust="+AR();return Aa},findNearestPoint:function(AY,Aa,Ac){var AZ;if(AY.search_radius){AZ=AY.search_radius}else{if(AY.zoomLevel>14){AZ="0.00008"}else{if(AY.zoomLevel>13){AZ="0.000095"}else{if(AY.zoomLevel>12){AZ="0.0009"}else{if(AY.zoomLevel>11){AZ="0.0005"}else{if(AY.zoomLevel>10){AZ="0.005"}else{AZ="0.0025"}}}}}}if(AY.latLng){var Ad=AY.latLng.lat+","+AY.latLng.lng;var Ab=this.baseURI+"?id="+Ad+"&service=mq_imc_spatial&method=find_nearest_point&lat="+AY.latLng.lat+"&lon="+AY.latLng.lng+"&search_radius="+AZ,AX=AR();Ab+="&cacheBust="+AX;if(this.noProxy){AX="c"+AX.replace(",","");AT.StreetView360IO.CALLBACKS[AX]=function(Ae){Ac(Ae)};Ab+="&callback=MQA.StreetView360IO.CALLBACKS."+AX;return AS(Ab,Aa)}return AU(Ab,Aa,Ac)}return null},getVideos:function(AZ,Aa,AX){var Ab=this.baseURI+"?id=1&service=mq_imc_spatial&method=find_bounded_vpois&lrlat="+AZ.lrlat+"&ullng="+AZ.ullng+"&ullat="+AZ.ullat+"&lrlng="+AZ.lrlng,AY=AR();Ab+="&cacheBust="+AY;if(this.noProxy){AY="c"+AY.replace(",","");AT.StreetView360IO.CALLBACKS[AY]=function(Ac){AX(Ac)};Ab+="&callback=MQA.StreetView360IO.CALLBACKS."+AY;return AS(Ab,Aa)}return AU(Ab,Aa,AX)},getMarkets:function(AY,Aa,Ac){var AZ,Ab=null;var Ad=false;if(AY){if(AY.baseURI){AZ=AY.baseURI;Ad=true}}if(!AZ){AZ=this.baseURI}var Ab=AZ+"?version=1&format=json&method=get_sv_coverages&service=mq_imc_spatial&id=1",AX=AR();Ab+="&cacheBust="+AX;if(this.noProxy){if(Ad==false){AX="c"+AX.replace(",","");Ab+="&callback=MQA.StreetView360IO.CALLBACKS."+AX}else{Ab="http://"+AZ;AX="coverages"}AT.StreetView360IO.CALLBACKS[AX]=function(Ae){Ac(Ae)};AT.Log.debug("getMarkets: "+Ab);return AS(Ab,Aa)}return AU(Ab,Aa,Ac)},getStyling:function(AY,Aa,AX){var AZ,Ab=null;if(AY){if(AY.baseURI){AZ=AY.baseURI;static_file=true}}if(!AZ){AZ=this.baseURI}if(this.noProxy){Ab="http://"+AZ;cachebust="styling";AT.StreetView360IO.CALLBACKS[cachebust]=function(Ac){AX(Ac)};AT.Log.debug("getStyling: "+Ab);return AS(Ab,Aa)}}};AT.Loader._moduleLoaded("streetview360io")})();(function(){var AY=window.MQA,AU=AY.Log.debug,Ab=AY.Graphics,AV=AY.Event,AR=AY.EventManager,AW=AY.EventUtil,AX=AW.EventCallback,Ad=AR.trigger,AT=AR.addListener,Aa=AR.removeListener,AS=AY.EventUtil.observe,AQ=AY.EventUtil.hitch,Ac=AY.Util.getLocalCoords,AZ=AY.Loader.resourcePath;AY.mixin(AY.TileMap.prototype,{onZoomEnd$After:function(Ag){var Ae=this,Af=Ae.streetview360;Ae.overlayAddInFlight=false;Ae.overlayAddInFlightMapBounds=null;if(!Af){if(Ae.streetview360togglecontrol){Ae.streetview360togglecontrol.hideToggleDropdown()}return }Ae.handleStreetView360()}});AY.StreetView360=function(Af){AY.Base.call(this);if(typeof (Af)!="undefined"){this.map=Af;Af.streetview360=this}else{this.map=null}this.styling_callinflight=false;this.coverages_callinflight=false;this.inFlightOverlayCalls=[];this.playerHeight=Af.height;this.playerWidth=550;this.minMiniMapWidth=300;this.hideToggleNoCoverage=0;this.nocovgToggleMessage=1;this.featuredCities=null;this.timeoutDuration=10000;this.guid=AY.Util._getRandomGUID(10);this.currentOverlayGUID=null;var Ae=this.map,Ai="none",Aj=null,Ag=AY.Util.ie6Image;this.available=true;this.imgOverlay=null;this.overlayActive=false;this.marketsActive=false;this.imgOverlayCollName="mqa.streetview_streetview360overlay";this.marketCollName="mqa.streetview_markets";this.continentalCollName="mqa.streetview_markets_continental";this.regionalCollName="mqa.streetview_markets_regional";this.overlayLevels=null;this.OverlayColl=new AY.ShapeCollection();this.OverlayColl.setName(this.imgOverlayCollName);this.OverlayColl.bestFit=false;this.marketColl=null;this.continentalColl=null;this.regionalColl=null;this.currCoverageArea=null;this.currCoverageBounds=null;this.marketsJSON=null;this.marketsFailure=false;this.IMCPlayer=null;this.currentLatLng=null;this._marketIcon=new AY.Icon(AZ("images/streetview/icon-360.png"),30,30);this.io=new AY.StreetView360IO(this.map,STREETVIEWVIEWLETSERVER,true);this.geocodeio=new AY.GeocodeIO("/_svc/geocodeio",true);this._facio=function(Al,Ak){switch(Al){case"overlayOpacity":if(this.imgOverlay){this.imgOverlay.setValue("imageOpacity",this.overlayOpacity)}break;case"maxInfoWindowWidth":break}};this._duco=function(Al,Ak){};this.isEnabled=function(){var Ak=this.map.streetview360togglecontrol;return Ak.enabled&&(Ak.checked===undefined||Ak.checked)};this.retrieveZoomLevelStyling=function(){var Al=this,An=this.io,Am,Ak={};Ak.baseURI=STREETVIEWSTYLING;if(!Al.sv_styling&&!Al.styling_callinflight){Al.styling_callinflight=true;this.io.getStyling(Ak,{timeout:10000},function(Aq,Ao){if(Aq){Al.sv_styling=Aq;Al.styling_callinflight=false;Al.overlayLevels=[];for(var Ap=0;Ap<Al.sv_styling.level_based.length;Ap++){style=Al.sv_styling.level_based[Ap];if((style.overlay_type=="coverage_polygons")||(style.overlay_type=="coverage_lines")){Al.overlayLevels.push(style.level)}}Al.minOverlayZoomLvl=Al.arrayMin(Al.overlayLevels);Al.maxOverlayZoomLvl=Al.arrayMax(Al.overlayLevels);Al.stylingFailure=false;if(Al.map.streetview360togglecontrol.postInitialization){Al.map.streetview360togglecontrol.postInitialization()}return true}else{Al.styling_callinflight=false;Al.stylingFailure=true;return false}})}};this.retrieveStreetViewMarkets=function(){var Al=this,An=this.io,Am,Ak={};Ak.baseURI=STREETVIEWCOVERAGES;if(!Al.marketsJSON&&!Al.coverages_callinflight){Al.coverages_callinflight=true;this.io.getMarkets(Ak,{timeout:10000},function(Ap,Ao){if(Ap){Al.marketsJSON=Ap;if(Al.isEnabled()){Al.refreshToggleDisplay()}Al.retrieveZoomLevelStyling();Al.coverages_callinflight=false;return true}else{Al.marketsFailure=true;Al.coverages_callinflight=false;return false}})}};this.arrayMax=function(Ak){return Math.max.apply(Math,Ak)};this.arrayMin=function(Ak){return Math.min.apply(Math,Ak)};this.addStreetViewMarkets=function(Ak){var As=this,Av;if(As.marketsActive){As.removeStreetViewMarkets()}if(!As.isEnabled()){return }As.marketsActive=true;As.marketColl=new AY.ShapeCollection();As.continentalColl=new AY.ShapeCollection();As.regionalColl=new AY.ShapeCollection();if(As.marketsJSON){var Au=function(Aw,Ay){var Ax=As.map.streetview360togglecontrol;if(Ax.customizeMarketPoiCallback){Ax.customizeMarketPoiCallback(Aw,Ay)}};for(Av=0;Av<As.marketsJSON.length;Av++){continental_coverage=As.marketsJSON[Av];var Aq={city:continental_coverage.name_ui,latitude:continental_coverage.location.latitude,longitude:continental_coverage.location.longitude},At=new AY.StdPoi(new AY.LatLng(Aq.latitude,Aq.longitude),As._marketIcon);At.setZIndex("poi");At.actionId="VID";Au(At,Aq);As.continentalColl.add(At);for(var Al=0;Al<As.marketsJSON[Av].coverages.length;Al++){regional_coverage=As.marketsJSON[Av].coverages[Al];var Am={city:regional_coverage.name_ui,latitude:regional_coverage.location.latitude,longitude:regional_coverage.location.longitude};var Ar=new AY.StdPoi(new AY.LatLng(Am.latitude,Am.longitude),As._marketIcon);Ar.actionId="VID";Au(Ar,Am);As.regionalColl.add(Ar);for(var An=0;An<As.marketsJSON[Av].coverages[Al].coverages.length;An++){coverage=As.marketsJSON[Av].coverages[Al].coverages[An];city_state=coverage.name_ui.split(",");var Ao={city:city_state[0],state:city_state[1],latitude:coverage.location.latitude,longitude:coverage.location.longitude};var Ap=new AY.StdPoi(new AY.LatLng(Ao.latitude,Ao.longitude),As._marketIcon);Ap.setZIndex("poi");Ap.actionId="VID";Ap.zoomToLevel=coverage.preferred_zoom_level;Au(Ap,Ao);As.marketColl.add(Ap)}}}}As.continentalColl.setName(As.continentalCollName);As.continentalColl.setDeclutter(false);As.regionalColl.setName(As.regionalCollName);As.regionalColl.setDeclutter(false);As.marketColl.setName(As.marketCollName);As.marketColl.setDeclutter(false);As.continentalColl.bestFit=false;As.regionalColl.bestFit=false;As.marketColl.bestFit=false;if(As.sv_styling){if(As.sv_styling.range_based[0].coverage_icons_1[0].max!="none"){As.regionalColl.setMinZoomLevel(As.sv_styling.range_based[0].coverage_icons_1[0].min);As.regionalColl.setMaxZoomLevel(As.sv_styling.range_based[0].coverage_icons_1[0].max);Ae.addShapeCollection(As.regionalColl)}if(As.sv_styling.range_based[0].coverage_icons_0[0].max!="none"){if(!Ak){As.marketColl.setMaxZoomLevel(As.sv_styling.range_based[0].coverage_icons_0[0].max);As.marketColl.setMinZoomLevel(As.sv_styling.range_based[0].coverage_icons_0[0].min)}Ae.addShapeCollection(As.marketColl)}if(As.sv_styling.range_based[0].coverage_icons_2[0].max!="none"){As.continentalColl.setMinZoomLevel(As.sv_styling.range_based[0].coverage_icons_2[0].max);As.continentalColl.setMaxZoomLevel(As.sv_styling.range_based[0].coverage_icons_2[0].min);Ae.addShapeCollection(As.continentalColl)}for(Av=0;Av<As.marketColl.getSize();Av++){m3.Selenium.addIndexClass(As.marketColl.getAt(Av).getContent("-icon"),Av)}}};this.removeStreetViewMarkets=function(){var Ak=this;if(Ak.marketColl){Ak.marketsActive=false;if(Ak.map.getInfoWindow&&!Ak.map.getInfoWindow().isHidden()){Ak.map.getInfoWindow().hide()}Ak.map.removeShapeCollection(Ak.marketCollName);Ak.marketColl.removeAll();Ak.marketColl=null}};this.getOverlayInfo=function(Ar){var Au=1024,Ak=1024,As=this;for(var At=0;At<As.sv_styling.level_based.length;At++){style=As.sv_styling.level_based[At];if(style.level==Ar){if(style.geometry_type=="image"){if((As.map.width+Au)>2048){Au=2048-As.map.width}if((As.map.height+Ak)>2048){Ak=2048-As.map.height}}}}var Aq={};Aq.centerPoint=As.map.getCenter();Aq.width=As.map.width+Au;Aq.height=As.map.height+Ak;Aq.scale=As.map.getScale();Aq.left=-0.5*Au;Aq.top=-0.5*Ak;Aq.bottom=Aq.top+Aq.height;Aq.right=Aq.left+Aq.width;var Am=new AY.Point(Aq.left,Aq.top),An=new AY.Point(Aq.right,Aq.bottom),Ao=As.map.pixToLL(Am),Al=As.map.pixToLL(An),Ap={};Ap.ul=Ao;Ap.lr=Al;Aq.bounds=Ap;return Aq};this.addStreetView360Overlay=function(){var An=this,Ap,Ao=this.map.getZoomLevel();if(!An.map||An.marketsFailure){return }if(An.overlayAddInFlight){return }if(!An.isEnabled()){return }if(An.imgOverlay){AU("[StreetView360] Removing existing overlay");An.removeStreetView360Overlay()}An.overlayAddInFlight=true;An.overlayAddInFlightMapBounds=An.map.getBounds();An.overlayActive=true;if(An.marketInMapBounds()){overlayInfo=An.getOverlayInfo(Ao);for(var Ar=0;Ar<An.sv_styling.level_based.length;Ar++){style=An.sv_styling.level_based[Ar];if(style.level==Ao){if(style.overlay_type=="coverage_icons"){An.removeInvisibleStreetViewLayer();An.addStreetViewMarkets(false);An.overlayAddInFlightMapBounds=null;An.overlayAddInFlight=false}else{An.removeStreetViewMarkets()}if((style.overlay_type=="coverage_lines")&&(style.geometry_type=="vector")){An.addInvisibleStreetViewRouteLayer(style,overlayInfo);An.overlayAddInFlightMapBounds=null;An.overlayAddInFlight=false}else{if(style.geometry_type=="image"){An.removeInvisibleStreetViewLayer();Ap=overlayInfo.bounds;var Am="4326",Al="routes_mqproj",Aq={ul:new AY.LatLng(Ap.ul.getLatitude(),Ap.ul.getLongitude()),lr:new AY.LatLng(Ap.lr.getLatitude(),Ap.lr.getLongitude()),height:overlayInfo.height,width:overlayInfo.width};overlayInfo.src=An.io.getOverlayUrl(Aq,style);An.opacity=style.opacity;AY.withModule("hoverimageoverlay",function(){var Au=An.map.getBounds(),As=An.overlayAddInFlightMapBounds;if((Au.lr.getLatitude()!=As.lr.getLatitude())||(Au.lr.getLongitude()!=As.lr.getLongitude())||(Au.ul.getLatitude()!=As.ul.getLatitude())||(Au.ul.getLongitude()!=As.ul.getLongitude())){An.overlayAddInFlightMapBounds=null;An.overlayAddInFlight=false;An.addStreetView360Overlay();AU("[StreetView360] Aborting hover overlay, map bounds have changed! Re-issuing addOverlay call.");return }AU("[StreetView360] Adding hover overlay");for(var Av=0;Av<An.OverlayColl.getSize();Av++){overlay=An.OverlayColl.getAt(Av);overlay.clearEventListeners()}An.imgOverlay=null;An.imgOverlay=new AY.HoverImageOverlay(An.io,An.map);Aj=An.imgOverlay;An.imgOverlay.setZIndex("streetview360path");An.imgOverlay.setValue("imageURL",overlayInfo.src);An.imgOverlay.setValue("imageOpacity",An.opacity/10);var At=new AY.LatLngCollection();At.add(An.map.pixToLL(new AY.Point(overlayInfo.left,overlayInfo.top)));At.add(An.map.pixToLL(new AY.Point(overlayInfo.right,overlayInfo.bottom)));An.imgOverlay.setValue("shapePoints",At);An.OverlayColl.removeAll();An.OverlayColl.setMaxZoomLevel(An.map.getZoomLevel());An.OverlayColl.setMinZoomLevel(An.map.getZoomLevel());AU("[StreetView360] Adding new overlay to overlay collection");this.currentOverlayGUID=AY.Util._getRandomGUID(10);An.imgOverlay.setGUID(this.currentOverlayGUID);An.OverlayColl.add(An.imgOverlay);An.OverlayColl.bestFit=false;An.imgOverlay.geocodeio=An.geocodeio;if(!An.OverlayColl.isOnMap()){An.map.addShapeCollection(An.OverlayColl)}if(An.imgOverlay.shape){An.imgOverlay.shape.style.zIndex=-1}if(An.previouslyDisabled){An.OverlayColl.removeAll()}An.overlayAddInFlightMapBounds=null;An.overlayAddInFlight=false})}}break}}An.streetview360overlayBounds={ul:An.map.pixToDisplay({x:overlayInfo.left,y:overlayInfo.top}),lr:An.map.pixToDisplay({x:overlayInfo.left+overlayInfo.width,y:overlayInfo.top+overlayInfo.height})};var Ak=new AV("MQA.StreetView360.streetview360overlayAdded");Ak.srcObject=An;An.onStreetView360OverlayAdded(Ak)}else{this.streetview360overlayBounds=null;An.overlayAddInFlightMapBounds=null;An.overlayAddInFlight=false}};this.removeStreetView360Overlay=function(){var Al=this;if(Al.imgOverlay){Al.imgOverlay.removeHoverPoi()}for(var Am=0;Am<Al.OverlayColl.getSize();Am++){overlay=Al.OverlayColl.getAt(Am);overlay.clearEventListeners()}delete Al.streetview360overlayBounds;Al.overlayActive=false;if(Al.OverlayColl){Al.OverlayColl.removeAll();Al.imgOverlay=null}Al.map.removeShapeCollection("mqa.streetview_streetview360overlay");var Ak=new AV("MQA.StreetView360.streetview360overlayRemoved");Ak.srcObject=this;Al.onStreetView360OverlayRemoved(Ak)};this.onStreetView360OverlayAdded=function(Ak){Ad(this,"streetview360overlayadded",Ak)};this.onStreetView360OverlayRemoved=function(Ak){Ad(this,"streetview360overlayremoved",Ak)};this.convertSecondsForDisplay=function(Ak){var Am=Math.floor(parseInt(Ak,10)/60),Al=parseInt(Ak,10)%60;if(Al<10){Al="0"+Al}return Am+":"+Al};this.isAvailable=function(){this.getValue("available")};this.refresh=function(){var Ak=this;Ak.addStreetView360Overlay();Ad(Ak,"refresh")};this.addInvisibleStreetViewRouteLayer=function(Al,Ao){var Ak=this,An=this.io,Am;AY.withModule("streetview360path",function(){if(Ak.pathController){}else{Am=new AY.StreetView360Path.PathDelegate();Ak.pathController=Ae.createStreetView360Path(Am,An)}if(Ak.pathController){An.getPaths(Ao,{timeout:10000},function(Ap){if(Ak.pathController){Ak.pathController.setPathData(Ap);if(Ak.pathController.overlay){Ak.pathController.overlay.setColor(Al.fill_color);Ak.pathController.overlay.setColorAlpha(Al.opacity/10);Ak.pathController.overlay.setBorderWidth(Al.line_thickness)}}})}})};this.removeInvisibleStreetViewLayer=function(){var Ak=this.pathController;if(Ak){Ak.dispose();Ak=null;this.pathController=null}};this.resizePlayer=function(Am){var Al=this;if(Al.IMCPlayer){try{Al.IMCPlayer.resize()}catch(Ak){}}};this.hideInfoWindows=function(){var Al=this,Am=null,Ak=Al.map.windowManager;Ak.each(function(An){if(An.id=="infowindow"){An.setVisible(false)}})};this.removePlayer=function(Am){var Ak=this,Al=this.map.streetview360togglecontrol;if(!Ak.IMCPlayer){return }if(!Ak.IMCPlayer.loaded||Ak.loadingPlayer){setTimeout(function(){Ak.removePlayer(Am)},2000);return }if(!Ak.reloadingPlayer){Ak.map.removeShapeCollection("tracker");if(Ak.playerDiv){Ak.playerDiv.style.display="none"}if(Ak.IMCPlayer){Ak.IMCPlayer.dispose();Ak.IMCPlayer=null}if(Ak.playerDiv){Ak.playerDiv.parentNode.removeChild(Ak.playerDiv);Ak.playerDiv=null}if(Al.toggleLeftPane){Al.toggleLeftPane(true)}Al.uncheck()}};this.raiseConcern=function(Am){var Al=this,Ak=Al.map.streetview360togglecontrol;$a("MQ10360RaiseConcern");if(Ak.customerServiceRaiseConcernCallback){Ak.customerServiceRaiseConcernCallback(Am.data.type,Am.data.dataurl,Am.data.url,Am.data.time,Am.data.subject,Am.data.displaytext)}};this.reloadPlayer=function(Al){if(!Al.data.data_url){return }var Ak=this;Ak.reloadingPlayer=true;Ak.removePlayer(null);Ak.reloadData=Al.data;setTimeout(function(){var Am=new AV("360Player.reload");Am.xmlUrl=Ak.reloadData.data_url;Am.lat=Ak.reloadData.lat;Am.lon=Ak.reloadData.lng;Am.rgData=Ak.reloadData.rgData;Am.yaw=Ak.reloadData.yaw;Am.heading=Ak.reloadData.heading;Ak.reloadData=null;Ak.loadPlayer(Am);Ak.reloadingPlayer=false},2000)};this.raiseConcernClosed=function(){var Al=this;Al.map.removeControl(Al.raiseConcernCover);Al.raiseConcernCover=null;try{Al.IMCPlayer.resize()}catch(Ak){}};this.createVerticalSplitPane=function(Am){var Ao=this.playerWidth,Al,Ap=this,An,Ak=document.getElementById("contentCell");if(Ap.map.streetview360togglecontrol.toggleLeftPane){Ap.map.streetview360togglecontrol.toggleLeftPane(false)}else{if(Ap._controller){if(Ap._controller.toggleLeftPane){Ap._controller.toggleLeftPane(false)}}}Ap.playerDiv=An=document.createElement("div");An.style.width=Ao+"px";An.style.height=Ak.offsetHeight+"px";An.className="playerDiv";Ak.appendChild(An);var Aq;if(Am.zoomLevel){Aq=Am.zoomLevel}else{Aq=Ap.map.getZoomLevel();if(Aq<12){Aq=12}}if(Ap.map.streetview360togglecontrol.playerActivated){Ap.map.streetview360togglecontrol.playerActivated()}else{if(Ap._controller&&Ap._controller.playerActivated){Ap._controller.playerActivated()}}Ap.map.setZoomLevel(Aq);Ap.addTrackingIcon(Ap.map)};this.forcePlayer=function(Am){var Al=this;if(Al.playerForced){return }if(Al.map.streetview360togglecontrol.forceEnabled){Al.playerForced=true}if(Am.streetViewPlayerFile){var An=new AV("360ForcePlayer");An.xmlUrl=Am.streetViewPlayerFile;if(Am.location.latLng){An.lat=Am.location.latLng.lat;An.lon=Am.location.latLng.lng}else{if(Am.location.latitude){An.lat=Am.location.latitude;An.lon=Am.location.longitude}else{An.lat=Al.map.getCenter().getLatitude();An.lon=Al.map.getCenter().getLongitude()}}An.config=Am;if(AY.browser.name!="msie"){Al.loadPlayer(An)}else{setTimeout(function(){Al.loadPlayer(An)},300)}}else{if(Am.location){var Ak={};if(Am.location.latLng){Ak.latLng=Am.location.latLng}else{if(Am.location.latitude){Ak.latLng=new AY.LatLng(Am.location.latitude,Am.location.longitude)}else{Ak.latLng=Al.map.getCenter()}}Ak.search_radius="0.003";Ak.zoomLevel=12;Al.io.findNearestPoint(Ak,{timeout:3500},function(Ap,Ao){if(Ap&&Ap.result){Al.ll=new AY.LatLng(Ap.result.lat,Ap.result.lon);Al.rgAndLaunchPlayer(Al.ll,Ap.result.xml_url,"360ForcePlayer");return true}})}}};this.rgAndLaunchPlayer=function(Ao,Ar,An,Al){var Aq=this,Am=this.geocodeio,Ak;if(!Aq.isEnabled()){Aq.map.streetview360togglecontrol.toggle(true)}Aq.loadingPlayer=true;if(Am){Am.reverse(Ao,{timeout:10000},null,function(As){var At=new AV(An);At.xmlUrl=Ar;At.lat=Ao.lat;At.lon=Ao.lng;At.rgData=As;if((Al)||(An=="POI.StreetViewClick")){At.skipOmniture=true}Ak=As;if(AY.browser.name!="msie"){Aq.loadPlayer(At)}else{setTimeout(function(){Aq.loadPlayer(At)},500)}if(Al){Al(Ak)}})}else{var Ap=new AV(An);Ap.xmlUrl=Ar;Ap.lat=Ao.lat;Ap.lon=Ao.lng;if((Al)||(An=="POI.StreetViewClick")){Ap.skipOmniture=true}if(AY.browser.name!="msie"){Aq.loadPlayer(Ap)}else{setTimeout(function(){Aq.loadPlayer(Ap)},500)}if(Al){Al(Ak)}}};this.loadPlayer=function(Am){var Ao=this,Ap,An=Ao.map.streetview360togglecontrol;if(Am.srcObject){Ao.currentLatLng=Am.srcObject.getLatLng()}if(Am.lat){Ao.currentLatLng=new AY.LatLng(Am.lat,Am.lon)}if(typeof DetectFlashVer!="function"){var Ak=document.createElement("script");Ak.src="http://"+STREETVIEWORIGINSERVER+"/sv/ac/"+STREETVIEWPLAYERVERSION+"/implayer.js";var Al=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];if(!Al){}Al.appendChild(Ak);setTimeout(function(){Ao.loadPlayer(Am)},3000);return }AY.withModule("immersivewrapper",function(){var Aq=DetectFlashVer(9,0,0);if(!Aq){if(An.updateFlashVersionCallback){An.updateFlashVersionCallback()}return }if(Ao.map.searchControl){Ao.map.searchControl.elements.root.style.display="none"}if(!Ao.reloadingPlayer){if(!Ao.playerDiv){Ao.createVerticalSplitPane(Am)}}if(Ao.IMCPlayer==null){if(!Am.poi&&!Am.skipOmniture){$a("360View-HoverPOI-OpenImage")}if(Am.xmlUrl){Ao.IMCPlayer=new AY.ImmersiveWrapper(Ao.playerDiv,"default",Am.xmlUrl,Am,An.cdn_path)}else{if(Am.srcObject){if(Am.srcObject.xmlUrl){Ao.IMCPlayer=new AY.ImmersiveWrapper(Ao.playerDiv,"default",Am.srcObject.xmlUrl,Am,An.cdn_path)}}}Ao.IMCPlayer.geocodeio=Ao.geocodeio;AT(Ao.IMCPlayer,"360locationchange",function(Ar){Ao.loadingPlayer=false;if(!Ao.map.streetview360togglecontrol.checked){return }var At=Ar.location,As=Ao.map.getShapeCollection("tracker").getAt(0);Ao.map.setCenter(At);As.setLatLng(At);this.currentLatLng=At;Ao.trackerpoi.setVisible(true)});AT(Ao.IMCPlayer,"360headingchange",function(Ar){var As=Ar.heading;if(!Ao.map.streetview360togglecontrol.checked){return }if(As!=0){Ao.lastRotation=As;Ao.tracker.setRotation("rotate("+As+" 14 14)")}});AT(Ao.IMCPlayer,"360playerclosed",function(Ar){Ao.removePlayer(Ar)});AT(Ao.IMCPlayer,"360raiseconcern",function(Ar){Ao.raiseConcern(Ar)});AT(Ao.IMCPlayer,"360playerreload",function(Ar){Ao.reloadPlayer(Ar)})}else{if(Am.xmlUrl){Ao.IMCPlayer.loadData("default",Am.xmlUrl,Am.rgData)}else{if(Am.srcObject){if(Am.srcObject.xmlUrl){if(Am.srcObject.xmlUrl!=""){Ao.IMCPlayer.loadData("default",Am.srcObject.xmlUrl,Am.srcObject)}}}}}})};this.addTrackingIcon=function(Ak){var An=this,Ap=new AY.ShapeCollection(),Ao=28,Al=1,Am=Ab.createSurface(Ao+Al*2,Ao+Al*2);An.trackerpoi=new AY.StdPoi();Ap.setName("tracker");An.trackerpoi.setDraggable(true);AT(An.trackerpoi,"dragstart",function(){An.trackerDS=An.trackerpoi.getLatLng()});AT(An.trackerpoi,"dragend",function(){data={};data.search_radius="0.005";data.latLng=An.trackerpoi.getLatLng();data.zoomLevel=Ak.getZoomLevel();$a("MQ10360GreenArrow");An.io.findNearestPoint(data,{timeout:3500},function(Ar,Aq){if(Ar&&Ar.result){An.ll=new AY.LatLng(Ar.result.lat,Ar.result.lon);Ak.setCenter(An.ll);AY.EventManager.removeListener(An.trackerpoi,"dragstart",An.dragStartTrackingIcon);AY.EventManager.removeListener(An.trackerpoi,"dragend",An.dragEndTrackingIcon);Ak.removeShapeCollection("tracker");An.trackerpoi=null;An.tracker=null;An.addTrackingIcon(Ak);An.rgAndLaunchPlayer(An.ll,Ar.result.xml_url,"360Tracker.click");return true}else{An.trackerpoi.setLatLng(An.trackerDS)}})});An.trackerpoi.setIcon(null);An.tracker=Am.polygon();An.tracker.setPoints([{x:14,y:0},{x:4,y:28},{x:14,y:18},{x:24,y:28}]);An.tracker.setColor("#466D10");An.tracker.setFillColor("#71a42b");An.tracker.setBorderWidth("2");An.tracker.add();An.trackerpoi.__forWidth=Ao;An.trackerpoi.setContent("dot",Am.element(),-(Ao/2+Al),-(Ao/2+Al),true,"tracker_360");An.trackerpoi.setLatLng(Ak.getCenter());if(An.lastRotation){An.tracker.setRotation("rotate("+An.lastRotation+" 14 14)")}An.trackerpoi.setVisible(true);Ap.add(An.trackerpoi);Ak.addShapeCollection(Ap)};this.refreshToggleDisplay=function(Al){var Ao=this,Ak=Ao.marketInMapBounds(),Am=this.map.getZoomLevel(),An=Ao.map.streetview360togglecontrol;if(!Ao.isEnabled()){return }if(Ao.IMCPlayer||Ao.loadingPlayer){An.showToggleDropdown("exactcoverage");return }if(!Al){if(Ao.getLevelStyling(Ao.map.getZoomLevel())=="coverage_icons"){An.hideToggleDropdown();return }if(Ao.hideToggleNoCoverage){if(Ak){An.showToggle()}else{An.hideToggle()}}if(Ao.nocovgToggleMessage){if(Ao.isEnabled()&&(!Ak)){An.showToggleDropdown("nocoverage")}else{An.showToggleDropdown("noexactcoverage")}}}else{if(Ao.getLevelStyling(Am)!="coverage_icons"){An.showToggleDropdown(Al)}}};this.boundsIntersect=function(Ak,Al){if(Ak.lr){if(Ak.ul.getLongitude()<0){return !((parseFloat(Al.upper_left_longitude)>parseFloat(Ak.lr.getLongitude()))||(parseFloat(Al.lower_right_longitude)<parseFloat(Ak.ul.getLongitude()))||(parseFloat(Al.upper_left_latitude)<parseFloat(Ak.lr.getLatitude()))||(parseFloat(Al.lower_right_latitude)>parseFloat(Ak.ul.getLatitude())))}else{return !((parseFloat(Al.upper_left_longitude)>parseFloat(Ak.lr.getLongitude()))||(parseFloat(Al.lower_right_longitude)>=parseFloat(Ak.ul.getLongitude()))||(parseFloat(Al.upper_left_latitude)<parseFloat(Ak.lr.getLatitude()))||(parseFloat(Al.lower_right_latitude)>parseFloat(Ak.ul.getLatitude())))}}else{if(Ak.ullng<0){return !((parseFloat(Al.upper_left_longitude)>parseFloat(Ak.lrlng))||(parseFloat(Al.lower_right_longitude)<parseFloat(Ak.ullng))||(parseFloat(Al.upper_left_latitude)<parseFloat(Ak.lrlat))||(parseFloat(Al.lower_right_latitude)>parseFloat(Ak.ullat)))}else{return !((parseFloat(Al.upper_left_longitude)>parseFloat(Ak.lrlng))||(parseFloat(Al.lower_right_longitude)>=parseFloat(Ak.ullng))||(parseFloat(Al.upper_left_latitude)<parseFloat(Ak.lrlat))||(parseFloat(Al.lower_right_latitude)>parseFloat(Ak.ullat)))}}};this.pointInMarketBounds=function(Ao){var An=this,Al,Ar;if(Ao.latitude){Al=Ao.latitude;Ar=Ao.longitude}else{Al=Ao.lat;Ar=Ao.lng}if(An.marketsJSON){for(var Aq=0;Aq<An.marketsJSON.length;Aq++){for(var Ak=0;Ak<An.marketsJSON[Aq].coverages.length;Ak++){for(var Am=0;Am<An.marketsJSON[Aq].coverages[Ak].coverages.length;Am++){var Ap=An.marketsJSON[Aq].coverages[Ak].coverages[Am].coverage_bounds;if(Ap.upper_left_longitude<=Ar&&Ap.lower_right_longitude>=Ar&&Ap.upper_left_latitude>=Al&&Ap.lower_right_latitude<=Al){return true}}}}return false}return false};this.getCoverageZoomLevel=function(Am,Ak){var Ao=this;if(Ao.marketsJSON){for(var Aq=0;Aq<Ao.marketsJSON.length;Aq++){for(var Al=0;Al<Ao.marketsJSON[Aq].coverages.length;Al++){for(var An=0;An<Ao.marketsJSON[Aq].coverages[Al].coverages.length;An++){var Ap=Ao.marketsJSON[Aq].coverages[Al].coverages[An].coverage_bounds;if(Ap.upper_left_longitude<=Ak&&Ap.lower_right_longitude>=Ak&&Ap.upper_left_latitude>=Am&&Ap.lower_right_latitude<=Am){Ao.currCoverageBounds=Ao.marketsJSON[Aq].coverages[Al].coverages[An].preferred_zoom_level||11;return Ao.currCoverageBounds}}}}return 11}return 11};this.getLevelStyling=function(Am){var An=this,Ak;if(An.sv_styling){for(var Al=0;Al<An.sv_styling.level_based.length;Al++){Ak=An.sv_styling.level_based[Al];if(Ak.level==Am){return Ak.overlay_type}}}return""};this.marketInMapBounds=function(){var An=this,Ao=An.map.getBounds();if(!An.marketsJSON){return false}if(An.marketsJSON){for(var Ak=0;Ak<An.marketsJSON.length;Ak++){for(var Al=0;Al<An.marketsJSON[Ak].coverages.length;Al++){for(var Am=0;Am<An.marketsJSON[Ak].coverages[Al].coverages.length;Am++){if(An.boundsIntersect(Ao,An.marketsJSON[Ak].coverages[Al].coverages[Am].coverage_bounds)){if(An.currCoverageArea!=An.marketsJSON[Ak].coverages[Al].coverages[Am].name_ui){An.currCoverageArea=An.marketsJSON[Ak].coverages[Al].coverages[Am].name_ui;An.currCoverageBounds=An.marketsJSON[Ak].coverages[Al].coverages[Am].coverage_bounds}return true}}}}return false}return false};function Ah(){var An=this,Ak=An.streetview360overlayBounds,Ao=true;if(!An.map.streetview360togglecontrol){return false}if(!An.isEnabled()){return false}An.map.streetview360.styling_callinflight=false;if(Ak){var Al=An.map.pixToDisplay({x:0,y:0}),Am={x:Al.x+An.map.width,y:Al.y+An.map.height};if(Ak){if(Al.x<=Ak.ul.x||Al.y<=Ak.ul.y||Am.x>=Ak.lr.x||Am.y>=Ak.lr.y){Ao=true}else{Ao=false}}}An.refreshToggleDisplay();if(Ao){An.refresh()}}AT(Ae,"moveend",Ah,this)};AY.TileMap.prototype.handleStreetView360=function(Ae){var Af=this,Ag=this.streetview360;Ae=(typeof (Ae)!="undefined"?Ae:false);if(Ag){if(Ag.imgOverlay){Ag.imgOverlay.removeHoverPoi()}Ag.refresh();Ag.refreshToggleDisplay()}}})();AL.Loader._moduleLoaded("streetview360");AL.Loader.registerCss("insetmapcontrol",".dotcom-insetmap-ctrl .highlight-rect{border:2px solid #d55406;background-color:#fff;position:absolute;left:60px;top:50px;width:60px;height:20px;filter:alpha(opacity=70);opacity:.7;z-index:502;}.dotcom-insetmap-ctrl .map-rect{position:absolute;left:0;top:0;width:180px;height:120px;z-index:502;border:1px solid #928874;}.dotcom-insetmap-ctrl .min{position:absolute;top:4px;right:4px;cursor:pointer;background:transparent url(/cdn/toolkit/lite/images/min_max.png) no-repeat -20px -80px;height:16px;width:18px;filter:alpha(opacity=80);opacity:.8;}.dotcom-insetmap-ctrl .max{position:absolute;cursor:pointer;bottom:2px;right:2px;background:transparent url(/cdn/toolkit/lite/images/min_max.png) no-repeat 0 -80px;height:16px;width:18px;filter:alpha(opacity=80);opacity:.8;}.dotcom-insetmap-ctrl{z-index:501;overflow:hidden;position:absolute;}");AL.withModule("controlbase",function(){var Ac=window.MQA,AV=Ac.Log.debug,AY=Ac.EventUtil,Ab=AY.EventCallback,AT=AY.observe,AS=AY.element,AX=AY.stopObserving,AQ=Ac.Util.getLocalCoords,Aa=AY.stop,AR=Ac.EventManager,AW=AR.addListener,AZ=AR.removeListener;Ac.Loader.requireCss("insetmapcontrol");var Ad="['div#root.dotcom-insetmap-ctrl',[0,'div#maprect.map-rect',[0,'div#highlightrect.highlight-rect',[],0],0]]";function AU(Ah){var Af=Ac.Util.html(Ad),Ai=this,Ag,Ae;Ai.elements=Af;Ac.Util.ie6Class(Af.root);Ai.sDragging=false;Ai.sDragStartX=null;Ai.sDragStartY=null;Ai.sRectDragStartX=null;Ai.sRectDragStartY=null;if(!Ah){Ah={size:{width:150,height:120},mapType:"map",zoom:3,minimized:false,retainAspectRatio:false,maxZoom:11,slideWhenClicked:false}}Ai.options=Ah;Ai.cWidth=Ah.size.width;Ai.cHeight=Ah.size.height;Ai.minimized=Ah.minimized;Ai.cZoomOffset=Ah.zoom;Ai.bInitialized=false;Ai.userControlled=true;Ai.insetMapMove=false;Ai.rectangleMove=false;Ai.minDiv=document.createElement("div");Ai.minDiv.className="min";Ai.maxDiv=document.createElement("div");Ai.maxDiv.className="max"}AU.prototype={calcHighlightRect:function(){var Af=this,Aj=Af.elements.highlightrect;if(Af.map&&Af.insetMap&&(Af.insetMap.getZoomLevel()>3)&&(Aj.display!="none")){var Ah=Af.map.getBounds(),Ag=Af.insetMap.llToPix(Ah.ul),Ak=Af.insetMap.llToPix(Ah.lr),Ae=Ak.y-Ag.y,Ai=Ak.x-Ag.x;Aj.style.height=Ae+"px";Aj.style.width=Ai+"px";Aj.style.left=Ag.x+"px";Aj.style.top=Ag.y+"px";if((Ae>Af.cHeight*0.7)||(Ai>Af.cWidth*0.7)){Af.insetMap.setZoomLevel(Af.insetMap.getZoomLevel()-1);Af.calcHighlightRect()}else{if((Ae<Af.cHeight*0.2)&&(Ai<Af.cWidth*0.2)){Af.insetMap.setZoomLevel(Af.insetMap.getZoomLevel()+1);Af.calcHighlightRect()}}}},calcAspectRatioHeight:function(){var Ag=this,Ae,Af,Ah=Ag.cWidth,Ai;if(!Ag.options.retainAspectRatio){return }if(Ag.minimized){return }Ae=Ag.map.height;Af=Ag.map.width;Ai=parseInt((Ae*Ah)/Af);Ag.options.size.height=Ai;Ag.cHeight=Ai;Ag.updatePosition()},draw:function(){var Ag=this,Ah=Ag.elements.root,Aj=Ag.elements.maprect,Ak=Ag.maxDiv,Ai=Ag.minDiv,Ae=Ag.map,Af;Ag.map.insetMapControl=Ag;Ag.map.parent2.appendChild(Ag.elements.root);Ag.elem=Ah;if(this.position.getMapCorner()==Ac.MapCorner.BOTTOM_RIGHT){Aj.style.borderRight="0px";Aj.style.borderBottom="0px"}if(!Ag.minimized){Ag.calcAspectRatioHeight()}Ag.elements.root.style.width=Ag.cWidth+"px";Ag.elements.root.style.height=Ag.cHeight+"px";Aj.style.width=Ag.cWidth-1+"px";Aj.style.height=Ag.cHeight-1+"px";Af=Ae.getZoomLevel()-Ag.cZoomOffset;if(Af<1){Af=1}if(Af>Ag.options.maxZoom){Af=Ag.options.maxZoom}if(!Ag.insetMap){Ag.insetMap=new Ac.TileMap(Aj,Af,Ae.getCenter(),Ag.options.mapType);if(!Ag.options.slideWhenClicked){Ag.insetMap.handleClickEvent=function(Am,An){var Al=new u("MQA.TileMap.click");Al.srcObject=this;Al.xy={x:Am,y:An};Al.ll=this.pixToLL(Al.xy);this.onClick(Al)};Ag.insetMap.handleRightClickEvent=function(Am,Al){};Ag.insetMap.handleDblClickEvent=function(Am,Al){}}Ag.hideLogos();Ag.connectEvents()}if(Af>3){Ag.elements.highlightrect.style.display="block";Ag.calcHighlightRect()}else{Ag.elements.highlightrect.style.display="none"}Aj.appendChild(Ai);Ag.elements.root.appendChild(Ak);if(!Ag.minimized){Ak.style.display="none";Ah.style.display="block";if(this.map){this.map.copyright.elt.style.right=this.cWidth+5+"px"}}else{Ak.style.display="block";Aj.style.display="none"}},hideLogos:function(){var Ag=this;var Ae=Ag.insetMap.logos;for(var Af=0;Af<Ae.length;Af++){logo=Ae[Af];logo.style.display="none"}Ag.insetMap.copyright.elt.parentNode.removeChild(Ag.insetMap.copyright.elt)},handleMinMouseEvt:function(Ae){this.handleMin(false);if(this.updateUserPreferenceSetting){this.updateUserPreferenceSetting("min")}},handleMin:function(Ae){if(!Ae){$a("Map-InsetMapMin-Click")}this.minimized=true;this.maxDiv.style.display="block";this.elements.maprect.style.display="none";this.elements.root.style.width="22px";this.elements.root.style.height="22px";this.cHeight="22";this.cWidth="22";if(this.position.getMapCorner()==Ac.MapCorner.BOTTOM_RIGHT){this.elements.root.style.left=this.map.width-24+"px";this.elements.root.style.top=this.map.height-24+"px";if(this.map){this.map.copyright.elt.style.right="25px"}}else{if(this.position.getMapCorner()==Ac.MapCorner.BOTTOM_LEFT){this.elements.root.style.left="4px";this.elements.root.style.top=this.map.height-24+"px"}}if(this.map){this.map.placeControl(this)}},handleMaxMouseEvt:function(){this.handleMax(false);if(this.updateUserPreferenceSetting){this.updateUserPreferenceSetting("max")}},handleMax:function(Ae){if(!Ae){$a("Map-InsetMapMax-Click")}this.minimized=false;this.maxDiv.style.display="none";this.elements.maprect.style.display="block";this.calcAspectRatioHeight();this.updatePosition();if(this.map){this.map.copyright.elt.style.right=this.cWidth+5+"px"}this.draw()},handleMapTypeChanged:function(){if(this.map&&this.insetMap){this.insetMap.setMapType(this.map.getMapType())}},updatePosition:function(){this.cWidth=this.options.size.width;this.cHeight=this.options.size.height;this.elements.root.style.width=this.cWidth+"px";this.elements.root.style.height=this.cHeight+"px";this.elements.root.style.left=this.map.width-this.cWidth+"px";this.elements.root.style.top=this.map.height-this.cHeight+"px";if(this.insetMap){this.insetMap.setSize({width:this.cWidth,height:this.cHeight})}this.map.placeControl(this)},connectEvents:function(){var Ae=this;AW(Ae.insetMap,"DragEnd",Ae.handleInsetMapMove,Ae);AW(Ae.map,"ZoomEnd",Ae.handleMapZoom,Ae);AW(Ae.map,"MoveEnd",Ae.handleMapMove,Ae);AW(Ae.map,"SizeChanged",Ae.handleMapResized,Ae);AW(Ae.map,"MapTypeChanged",Ae.handleMapTypeChanged,Ae);Ae.eRectDragHandler=Ab(Ae,"handleHighlightRectDrag");Ae.eMinHandler=Ab(Ae,"handleMinMouseEvt");Ae.eMaxHandler=Ab(Ae,"handleMaxMouseEvt");AT(Ae.elements.highlightrect,"mousemove",Ae.eRectDragHandler);AT(Ae.elements.highlightrect,"mouseup",Ae.eRectDragHandler);AT(Ae.elements.highlightrect,"mousedown",Ae.eRectDragHandler);AT(Ae.insetMap.display.elt,"mousemove",Ae.eRectDragHandler);AT(Ae.insetMap.display.elt,"mouseup",Ae.eRectDragHandler);AT(Ae.minDiv,"click",Ae.eMinHandler);AT(Ae.maxDiv,"click",Ae.eMaxHandler)},setUserControlled:function(Ae){this.userControlled=Ae},handleHighlightRectDrag:function(Aj){var Af=this,Am=Af.elements;if(Am.highlightrect.style.display=="none"){return }switch(Aj.type){case"mouseover":break;case"mouseout":break;case"mousedown":Af.sDragging=true;Af.sDragStartY=Aj.clientY;Af.sDragStartX=Aj.clientX;Af.sRectDragStartY=parseInt(Am.highlightrect.style.top);Af.sRectDragStartX=parseInt(Am.highlightrect.style.left);Am.highlightrect.style.cursor="move";Aa(Aj);break;case"mouseup":var Al,Ag,Ak;Af.sDragging=false;Am.highlightrect.style.cursor="move";Al=parseInt(Am.highlightrect.style.left)+parseInt(Am.highlightrect.style.width)/2,centerY=parseInt(Am.highlightrect.style.top)+parseInt(Am.highlightrect.style.height)/2,coords={x:Al,y:centerY},point=Af.insetMap.pixToLL(coords);Af.userControlled=false;Af.map.setCenter(point);Af.userControlled=true;Af.calcHighlightRect();if(Af.insetMapMove==false){Af.rectangleMove=true;$a("Map-InsetInteract")}else{Af.insetMapMove=false}break;case"mousemove":if(Af.sDragging){var Ah=Aj.clientY-Af.sDragStartY,Ai=Af.sRectDragStartY+Ah,Ae=Aj.clientX-Af.sDragStartX,An=Af.sRectDragStartX+Ae;if(An<0){An=0}if(Ai<0){Ai=0}if(An>Af.cWidth-parseInt(Am.highlightrect.style.width)){An=Af.cWidth-parseInt(Am.highlightrect.style.width)}if(Ai>Af.cHeight-parseInt(Am.highlightrect.style.height)){Ai=Af.cHeight-parseInt(Am.highlightrect.style.height)}Am.highlightrect.style.top=Ai+"px";Am.highlightrect.style.left=An+"px";Aa(Aj)}break}},handleInsetMapMove:function(){var Ae=this;if(Ae.userControlled){if(Ae.rectangleMove==false){Ae.insetMapMove=true;$a("Map-InsetInteract")}else{Ae.rectangleMove=false}}Ae.userControlled=false;Ae.map.setCenter(Ae.insetMap.getCenter());Ae.userControlled=true;Ae.sDragging=false},handleMapMove:function(){var Ae=this;Ae.bInitialized=true;Ae.insetMap.setCenter(Ae.map.getCenter());Ae.sDragging=false},handleMapResized:function(){var Ae=this;Ae.insetMap.setCenter(Ae.map.getCenter());if(Ae.options.retainAspectRatio){Ae.calcAspectRatioHeight()}Ae.calcHighlightRect();Ae.sDragging=false},handleMapZoom:function(){var Af=this,Ae=Af.map.getZoomLevel()-Af.cZoomOffset;if(Ae<1){Ae=1}if(Ae>Af.options.maxZoom){Ae=Af.options.maxZoom}Af.insetMap.setZoomLevel(Ae);Af.insetMap.setCenter(Af.map.getCenter());if(Ae>3){Af.elements.highlightrect.style.display="block"}else{Af.elements.highlightrect.style.display="none"}Af.calcHighlightRect()},setZoomOffset:function(Ae){var Af=this;Af.cZoomOffset=Ae;Af.insetMap.setZoomLevel(Af.map.getZoomLevel()-Af.cZoomOffset)},setWidth:function(Ae){this.cWidth=Ae},setHeight:function(Ae){this.cHeight=Ae},getWidth:function(){return this.cWidth},getHeight:function(){return this.cHeight},dispose:function(){var Af=this,Ae=Af.elements,Ah=Af._eDOM,Ag=Ae.root;AZ(Af.insetMap,"DragEnd",Af.handleInsetMapMove,Af);AZ(Af.map,"ZoomEnd",Af.handleMapZoom,Af);AZ(Af.map,"MoveEnd",Af.handleMapMove,Af);AZ(Af.map,"SizeChanged",Af.handleMapResized,Af);AZ(Af.map,"MapTypeChanged",Af.handleMapTypeChanged,Af);AX(Af.elements.highlightrect,"mousemove",Af.eRectDragHandler);AX(Af.elements.highlightrect,"mouseup",Af.eRectDragHandler);AX(Af.elements.highlightrect,"mousedown",Af.eRectDragHandler);AX(Af.minDiv,"click",Af.eMinHandler);AX(Af.maxDiv,"click",Af.eMaxHandler);if(Ag.parentNode){Ag.parentNode.removeChild(Ag)}}};Ac.InsetMapControl=AU;Ac.Loader._moduleLoaded("insetmapcontrol")});AL.Loader.registerCss("immersivewrapper",".dotcom-immersivewrapper-ctrl{position:absolute;right:0;top:0;z-index:1005;}.dotcom-immersivewrapper-ctrl{visibility:visible;}");AL.withModule("controlbase",function(){var AR=window.MQA,AU=AR.Log.debug,AW=AR.EventUtil,AY=AW.EventCallback,AT=AW.observe,AV=AW.stopObserving,AS=AW.element,AQ=AR.Loader.resourcePath;AR.Loader.requireCss("immersivewrapper",".dotcom-immersivewrapper-ctrl { visibility: visible; }");function AX(AZ){if(AZ){strArray=AZ.split("/");strPath=strArray[strArray.length-3]+"/"+strArray[strArray.length-2]+"/"+strArray[strArray.length-1];return strPath}return""}AR.ImmersiveWrapper=function(Ae,Ac,AZ,Aa,Ab){var Ad=this;Ad.loaded=false;Ad.parent=Ae;Ad.mousedown=false;Ad.DownTime=null;Ad.DownYaw=0;Ad.DownPitch=0;Ad.TotalDownTime=0;Ad.destroyPlayerAfter=75;Ad.playerLoadCount=0;Ad.positionWithCSS=true;Ad.reload=false;Ad.reloadYaw=null;if(Aa.srcObject){if(Aa.srcObject.rgData){Ad.reverseGeocodedData=Aa.rgData}}if(Aa){if(Aa.yaw){Ad.reloadYaw=Aa.yaw}else{if(Aa.heading){Ad.reloadHeading=Aa.heading}}if(Aa.config){Ad.forceLoadConfig=Aa.config}}Ad.mapImage=true;Ad.mode=Ac;Ad.mapTriggered=false;Ad.closePath=Ab+"/close-360-view-button-up.png";Ad.closePathHover=Ab+"/close-360-view-button-over.png";Ad.raisePath=Ab+"/raiseaconcern-button-up.png";Ad.raisePathHover=Ab+"/raiseaconcern-button-over.png";imSetPlayerPath("http://"+STREETVIEWORIGINSERVER+"/sv/ac/"+STREETVIEWPLAYERVERSION+"/");Ad.imcPlayer=new imPlayer(Ad.parent,"config.xml");Ad.loadIMCPlayer=function(Af){Ad.playerLoadCount=0;Ad.imcPlayer.onDataLoad=function(){Ad.FromDataLoad=true};Ad.imcPlayer.onLoad=function(){var Ag=parseInt(Ad.parent.style.width)-100;var Ah=Ad.imcPlayer.addButton("close",Ad.closePath,Ad.closePathHover,Ag,10);Ad.closePlayer=function(){$a("360View-PlayerClose-Click");Ad.triggerEvents("360playerclosed","close")};Ah.onClick=function(){Ad.closePlayer()};Ad.closeBtn=Ah;var Ai,Aj;if(Ac!="default"){Ai=parseInt(Ad.parent.style.width)-90;Aj=parseInt(Ad.parent.style.height)-48}else{Ai=parseInt(Ad.parent.style.width)-90;Aj=parseInt(Ad.parent.style.height)-18}var Al=Ad.imcPlayer.addButton("raise",Ad.raisePath,Ad.raisePathHover,Ai,Aj);Ad.racBtn=Al;Ad.raiseConcern=function(){var Ar,Ao,At,Ap,As="";As=Ad.imcPlayer.getLoadDataUrl();if(Ad.imcPlayer.isVideoLoaded()){Ap=Ad.imcPlayer.getLastVideoUrl();At=Ad.imcPlayer.getMediaTime();Ar=Ad.videoName;Ao="Video"}else{Ap=Ad.imcPlayer.getLastStillUrl();if(Ad.imcPlayer.getAddressString()){if(Ad.imcPlayer.getAddressString()!=""){var Aq=Ad.imcPlayer.getAddressString().split(",");Ar=Aq[0]+"<br/>"+Aq[1]+", "+Aq[2]+" <font style='font-size:10px;'>- Address is approximate</font>"}}Ao="Still"}var An={type:Ao,url:Ap,dataurl:As,time:At,subject:"360 Street View [ Raise a Concern ]",displaytext:Ar};Ad.triggerEvents("360raiseconcern",An)};Al.onClick=function(){Ad.raiseConcern()};var Am=true;if(Ad.forceLoadConfig){if(Ad.forceLoadConfig.streetViewPlayerRotation||Ad.forceLoadConfig.streetViewPlayerPitch){Am=false}}if(Ac=="default"){if(Af){if(Af.indexOf("http")<0){Ad.imcPlayer.loadData(Ad.imcPlayer.makeURL("frame_xml_root",AX(Af)),Am)}else{Ad.imcPlayer.loadData(Af,Am)}}else{Ad.imcPlayer.loadStill(still_url,Ad.lastHeading)}}else{var Ak=AX(Af);setTimeout(function(){Ad.imcPlayer.loadData(Ad.imcPlayer.makeURL("poi_root",Ak))},500)}Ad.loaded=true};Ad.imcPlayer.onResize=function(Ag,Ai){var Ah=Ag-107;if(Ad.closeBtn){Ad.closeBtn.setPos(Ah,10)}if(Ad.racBtn){if(Ad.imcPlayer.isVideoLoaded()){posXRaise=Ag-90;posYRaise=Ai-48}else{posXRaise=Ag-90;posYRaise=Ai-18}Ad.racBtn.setPos(posXRaise,posYRaise)}};Ad.imcPlayer.onMouseUp=function(){if(Ad.DownTime!=null){Ad.mousedown=false}};Ad.imcPlayer.onMouseDown=function(){Ad.DownTime=new Date();Ad.mousedown=true;Ad.FromDataLoad=false;return true};Ad.imcPlayer.onAddressDataSet=function(Ai,Aj,Ag,Ak,Ah){if(Ad.imcPlayer){Ad.imcPlayer.setAddress("");Ad.imcPlayer.setStreet("");Ad.imcPlayer.setCity("");Ad.imcPlayer.setState("");Ad.imcPlayer.setZip("");Ad.imcPlayer.setCountry("")}};Ad.imcPlayer.onLocationChange=function(Ai,Ag,Ah){if(!Ag){return }if(Ag==0||Ai==0){return }Ad.reverseGeocodeLat=Ag;Ad.reverseGeocodeLng=Ai;if(!Ad.imcPlayer.isVideoLoaded()){Ad.triggerEvents("360locationchange",new AR.LatLng(Ag,Ai))}};Ad.imcPlayer.onNodesLoaded=function(){if(Ad.playerLoadCount==Ad.destroyPlayerAfter){Ad.reload=true;g_imPlayerInstanceCount=0}};Ad.imcPlayer.onNodeLoad=function(Ag){};Ad.imcPlayer.onStillLoaded=function(Ag){Ad.playerLoadCount++;Ad.loading=false;if(Ad.mapImage==true){Ad.mapImage=false}else{$a("360View-MoveImage")}if(Ad.reverseGeocodedData){if(Ad.imcPlayer){Ad.imcPlayer.setAddress("");Ad.imcPlayer.setStreet(Ad.reverseGeocodedData.address.street);Ad.imcPlayer.setCity(" "+Ad.reverseGeocodedData.address.adminArea);Ad.imcPlayer.setState(Ad.reverseGeocodedData.adress.region)}Ad.reverseGDReload=Ad.reverseGeocodedData;Ad.reverseGeocodedData=null}else{if(Ad.geocodeio){data=Ad.geocodeio.reverse(new AR.LatLng(Ad.reverseGeocodeLat,Ad.reverseGeocodeLng),{timeout:10000},null,function(Ah){if(!Ah){return }if(!Ah[0]){return }if(Ad.imcPlayer){Ad.imcPlayer.setAddress("");Ad.imcPlayer.setStreet(Ah[0].address.street);Ad.imcPlayer.setCity(" "+Ah[0].address.adminArea);Ad.imcPlayer.setState(Ah[0].address.region)}Ad.reverseGDReload=Ah})}}};Ad.imcPlayer.onViewHeadingChange=function(Ag,Ah){if((Ad.playerLoadCount==Ad.destroyPlayerAfter)&&(Ad.reload)){Ad.reload=false;var Ai={data_url:Ad.imcPlayer.getLoadDataUrl(),lat:Ad.reverseGeocodeLat,lng:Ad.reverseGeocodeLng,rgData:Ad.reverseGDReload,yaw:Ad.imcPlayer.getYaw(USER_NODE_ID),heading:Ad.lastHeading};Ad.triggerEvents("360playerreload",Ai);return true}if(!Ad.reloadYaw&&!Ad.forceLoadConfig){Ad.lastHeading=Ag;Ad.lastPitch=Ad.imcPlayer.getPitch(USER_NODE_ID);Ad.lastDataURL=Ad.imcPlayer.getLoadDataUrl();if((Ad.imcPlayer.getYaw(USER_NODE_ID)!=0)&&(Ad.playerLoadCount==Ad.destroyPlayerAfter)){Ad.lastYaw=Ad.imcPlayer.getYaw(USER_NODE_ID)}Ad.triggerEvents("360headingchange",Ag)}if(Ad.FromDataLoad&&Ad.reloadYaw){Ad.lastHeading=Ad.reloadHeading;Ad.lastPitch=Ad.imcPlayer.getPitch(USER_NODE_ID);Ad.lastDataURL=Ad.imcPlayer.getLoadDataUrl();Ad.imcPlayer.setYaw(USER_NODE_ID,Ad.reloadYaw);Ad.triggerEvents("360headingchange",Ad.reloadHeading);if(Ad.playerLoadCount==1){Ad.reloadYaw=null;Ad.reloadHeading=null}}if(Ad.FromDataLoad==false){$a("MQ08360ImageInteract")}if(Ad.forceLoadConfig&&Ad.playerLoadCount==1){if(!Ad.forceLoadConfig.streetViewPlayerPitch){Ad.forceLoadConfig.streetViewPlayerPitch=20}Ad.lastPitch=Ad.timeoutPitch=Ad.forceLoadConfig.streetViewPlayerPitch;if(Ad.forceLoadConfig.streetViewPlayerRotation){Ad.lastHeading=Ad.timeoutRotation=Ad.forceLoadConfig.streetViewPlayerRotation;Ad.triggerEvents("360headingchange",Ad.forceLoadConfig.streetViewPlayerRotation);Ad.imcPlayer.setRotations(USER_NODE_ID,Ad.timeoutRotation,Ad.timeoutPitch,0)}Ad.forceLoadConfig=null}};Ad.imcPlayer.onVideoStateChange=function(Ag){Ad.triggerEvents("360videostatechange",Ag)}};Ad.loadIMCPlayer(AZ)};AR.ImmersiveWrapper.prototype={triggerEvents:function(Aa,Ab){var AZ=this,Ac=new AR.Event(Aa);Ac.player_inst=AZ.imcPlayer.id;if(Aa=="360locationchange"){Ac.location=Ab}else{if(Aa=="360headingchange"){Ac.heading=Ab}else{if(Aa=="360videostatechange"){Ac.newState=Ab}else{Ac.data=Ab}}}AR.EventManager.trigger(AZ,Aa,Ac)},setVideoInformation:function(Aa,AZ){this.videoName=Aa;this.videoDescription=AZ},pauseVideo:function(){var AZ=this;if(AZ.imcPlayer.isVideoLoaded()){AZ.imcPlayer.pauseVideo()}},playVideo:function(){var AZ=this;if(AZ.imcPlayer.isVideoLoaded()){AZ.imcPlayer.playVideo()}},getLastDataURL:function(){var AZ=this;if(AZ.imcPlayer){return AZ.lastDataURL}return null},getRotation:function(){var AZ=this;if(AZ.imcPlayer){return AZ.lastHeading}return null},getPitch:function(){var AZ=this;if(AZ.imcPlayer){return AZ.lastPitch}return null},loadData:function(Ac,Aa,AZ){var Ae=this,Ab;Ae.loading=true;$a("MQ08360MapImage","r");this.mapImage=true;if(AZ){Ae.reverseGeocodedData=AZ.rgData}try{if(Ac=="default"){Ab=Ae.imcPlayer.makeURL("frame_xml_root",AX(Aa));posXRaise=parseInt(Ae.parent.style.width)-90;posYRaise=parseInt(Ae.parent.style.height)-18}else{Ab=Ae.imcPlayer.makeURL("poi_root",AX(Aa));posXRaise=parseInt(Ae.parent.style.width)-90;posYRaise=parseInt(Ae.parent.style.height)-48}Ae.mapTriggered=true;Ae.FromDataLoad=true;if(Ae.racBtn){Ae.racBtn.setPos(posXRaise,posYRaise)}Ae.imcPlayer.loadData(Ab,true)}catch(Ad){AU(Ad)}}};AR.ImmersiveWrapper.prototype.constructor=AR.ImmersiveWrapper;AR.ImmersiveWrapper.prototype.initialize=function(){this.position=new AR.MapCornerPlacement(AR.MapCorner.TOP_RIGHT,new AR.Size(5,0));this.type=AR.CONTROL_TYPE};AR.ImmersiveWrapper.prototype.dispose=function(){AR.Log.debug("disposing player");this.map=null;this.position=null;this.imcPlayer=null};AR.ImmersiveWrapper.prototype.exitFullScreen=function(){this.imcPlayer.exitFullScreen()};AR.ImmersiveWrapper.prototype.resize=function(){if(this.imcPlayer){this.imcPlayer.resize()}};AR.ImmersiveWrapper.prototype.replayVideo=function(){this.imcPlayer.setMediaTime(0);this.imcPlayer.playVideo()};AR.ImmersiveWrapper.prototype.getPlayer=function(){return this.imcPlayer};AR.ImmersiveWrapper.prototype.eventmonitor=function(AZ){};AR.ImmersiveWrapper.prototype.getHeight=function(){return 400};AR.ImmersiveWrapper.prototype.getWidth=function(){return this.map.style.width};AR.Loader._moduleLoaded("immersivewrapper")});(function(){var AW=window.MQA,Ai=AW.Log.debug,AX=AW.extend,AY=AW.EventUtil.observe,AQ=AW.EventManager.clearAllListeners,Ad=AW.EventUtil.hitch,Ab=AW.IO.doJSONP,Af=AW.connect,AV=AW.EventManager.trigger,AS=AW.IO.cacheBust,AR=AW.EventUtil.EventCallback;var Ac="mqa_searchLayer_",Ag=0,AT="/layer/search/",Ah="mqa_searchlayer",AU="mqa_searchlayer_poi",Aa=[];function Ae(An,Ao,Aq,Ar,Al){var Ak="",Am=Aa.length,As,Ap;for(var Aj=0;Aj<Am;Aj++){As=Aa[Aj];Ak+=As.term+"["+As.color+":255:rgb(0,0,0):1:120:7]";if(Aj+1<Am){Ak+=";"}}An.id=["mqasl",Ao,Aq,Ar].join("_");Ak=Ak.replace(/#/g,"!");Ap=["http://",MQSEARCHLAYERSERVERS[Ao%MQSEARCHLAYERSERVERS.length],AT,Ak,"/tile?s=",Al,"&y=",Aq,"&x=",Ao];return Ap.join("")}function AZ(){}AZ.prototype=new AW.Kernel.ImageTile();AZ.prototype.setupImage=function(An,Am,Aj,Al,Ak){An.style.visibility="hidden";if(Al>9){An.src=Ae(An,Am,Aj,Al,Ak);An.onload=function(){this.style.visibility=""}}};SearchLayer=function(Aj){this.map=Aj,this.layer,this.dataQueue={},this.dataStack={},this.pixelBox=5;this.currentCoords;if(this.map){Af(Aj,"onZoomEnd","after",this,"_removeRolloverPoi");Af(Aj.windowManager,"openPoiWindow","before",this,"_removeRolloverPoi")}if(AW.browser.name=="firefox"){var Ak=this;this.svgMouseOverListener=AW.EventManager.addListener(this.map,"svgmouseover",function(Ao){if(Ak.layer&&Aa.length>0){var Am=Ao.orginalEvent,Al=Ak.map.display.ancestorEventCoords(Am),Ar=Ak.map.display.transform.displayToGridCoord(Al.display.x,Al.display.y),Aq=Ak.map.getZoomLevel(),An=document.getElementById("mqasl_"+Ar.col+"_"+Ar.row+"_"+Aq),Ap={target:An,clientX:Al.display.x,clientY:Al.display.y};if(An&&An.src){Ak._handleMouseMove(Ap,Ao.orginalEvent)}}});this.svgClickListener=AW.EventManager.addListener(this.map,"svgclick",function(Ao){if(Ak.layer&&Aa.length>0){var Am=Ao.orginalEvent,Al=Ak.map.display.ancestorEventCoords(Am),Ar=Ak.map.display.transform.displayToGridCoord(Al.display.x,Al.display.y),Aq=Ak.map.getZoomLevel(),An=document.getElementById("mqasl_"+Ar.col+"_"+Ar.row+"_"+Aq),Ap={target:An,clientX:Al.display.x,clientY:Al.display.y};Ak._handleClickEvent(Ap,Ao.orginalEvent)}})}};SearchLayer.CALLBACKS={};SearchLayer.prototype={_removeRolloverPoi:function(){var Aj=this.map.getShapeCollection(Ah);if(Aj){Aj.removeAll()}},_handleMouseMove:function(Al,Am){if(this.disableMouseMove){return }var Aj=Al.target?Al.target.src:false,An=Am?this._getMouseAcutalPositionOnMap(Am):this._getMouseAcutalPositionOnMap(Al);if(!Aj){Aj=Al.srcElement?Al.srcElement.src:false}this.currentCoords=An;if(Aj){var Ak=this._lookForData(Aj,An);if(Ak&&Ak.length>0){this._showData(Ak,An)}}},_lookForData:function(Aj,Ak){if(Aj===undefined){return[]}if(Aj){data=this.dataStack[Aj];this.currentCoords=Ak;if(data===undefined){if(this.dataQueue[Aj]===undefined){this.dataQueue[Aj]=true;this._requestData(Aj,Ak)}}else{return data}}},_createPOI:function(Ak,Al){if(!Al){Al=document.createElement("div")}var Aj=new AW.BasePoi();Aj.setContent("info",Al,-46,-32,true,"mqa_searchlayer_poi");Aj.setLatLng(Ak);return Aj},createMouseOverInfoWindow:function(Aj,Ak){return this._createMouseOverInfoWindow(Aj,Ak)},_createMouseOverInfoWindow:function(Am,Ar,As){var Ap=document.createElement("div"),Aq=this._createPOI(Ar,Ap),Al=0,Aj=Am.length,Ak="",Ao,An;for(;Al<Aj;Al++){if(Al==5){Ak+="<div>&nbsp;&nbsp;"+Aj+" more...&nbsp;&nbsp;</div>";break}Ak+="<div>&nbsp;&nbsp;"+Am[Al].name+"&nbsp;&nbsp;</div>"}Ap.innerHTML=Ak;Ao=Ap.style;Ao.background="#ffffff";Ao.border="1px solid #A8CBEE";Ao.margin="0";Ao.padding="3px 0px";Ao.opacity=0.9;Ao.fontSize="12px";Ao.fontFamily="Arial";Ao.filter="alpha(opacity=90)";Ao.whiteSpace="nowrap";An=Aj>5?-90:Aj>4?-70:Aj>3?-50:Aj>2?-30:Aj>1?-10:7;Aq.setBias({x:0,y:An});return Aq},createInfoWindow:function(Aj){this._createInfoWindow(Aj)},_createInfoWindow:function(Am){var An=this.map.getShapeCollection(AU),Ak=this.map.getShapeCollection(Ah),Ap=Am.ll,Aj=Am.searchLayerData,Ao=new AW.Poi(),Al="";this._removeRolloverPoi();if(Ak){Ak.removeAll()}Ao.setContent("info",document.createElement("div"),-46,-32,true,"mqa_searchlayer_poi");Ao.setLatLng(Ap);Ao.setIcon();if(!An){An=new AW.ShapeCollection();An.collectionName=AU;this.map.addShapeCollection(An)}else{An.removeAll()}this.populateInfoWindow(Ao,Aj,0);An.add(Ao);this.map.windowManager.openPoiWindow(Ao,true,false)},updateInfoWindow:function(Aj,Ak,Al){this._updateInfoWindow(Aj,Ak,Al)},_updateInfoWindow:function(Aj,Ak,Al){this.map.windowManager.closeAll();this._populateInfoWindow(Aj,Ak,Al);this.map.windowManager.openPoiWindow(Aj,true,false)},generateNextTarget:function(An,Aj,Am){var Al=this.map["$mqa.id$"],Ak=Al+"next";SearchLayer.CALLBACKS[Ak]=Ad(this,"updateInfoWindow",An,Aj,Am+1);return"SearchLayer.CALLBACKS['"+Ak+"']"},generatePreviousTarget:function(An,Aj,Am){var Al=this.map["$mqa.id$"],Ak=Al+"_previous";SearchLayer.CALLBACKS[Ak]=Ad(this,"updateInfoWindow",An,Aj,Am-1);return"SearchLayer.CALLBACKS['"+Ak+"']"},populateInfoWindow:function(Aj,Ak){this._populateInfoWindow(Aj,Ak)},_populateInfoWindow:function(An,Aj,Am){if(!Am){Am=0}var Ak="",Al=Aj.length,Ao=Aj[Am];An.setInfoTitleHTML(Ao.name);Ak+="<div>"+Ao.name+"</div>";Ak+="<div>"+Ao.id+":"+Ao.lat+","+Ao.lng+"</div>";if(Al!=1){if(Am>0){Ak+='<a href="javascript:'+this.generatePreviousTarget(An,Aj,Am)+'()">Previous</a> '}if(Am!=Al-1){Ak+='<a href="javascript:'+this.generateNextTarget(An,Aj,Am)+'()">Next</a> '}}An.setInfoContentHTML(Ak)},_getMouseAcutalPositionOnMap:function(Aj){var Ao=AW.Util.getParentOffset(this.map.parent),Ap=document.documentElement,Am=document.body,Al=(Ap&&Ap.scrollLeft)?Ap.scrollLeft:window.pageXOffset||self.pageXOffset||Am.scrollLeft,Aq=(Ap&&Ap.scrollTop)?Ap.scrollTop:window.pageYOffset||self.pageYOffset||Am.scrollTop,An=(Aj.clientX+Al)-Ao.x,Ak=(Aj.clientY+Aq)-Ao.y;return{x:An,y:Ak}},_findValidDataForCoords:function(An,Aq){var Aj=Aq.x,Al=Aq.y,Ak=this.pixelBox,Ap=this.map.pixToLL({x:Aj-Ak,y:Al-Ak}),At=this.map.pixToLL({x:Aj+Ak,y:Al+Ak}),Am=An.length,Ao=0,Ar,As=[];for(;Ao<An.length;Ao++){Ar=An[Ao];if(Ar.lat<Ap.lat&&Ar.lat>At.lat&&Ar.lng>Ap.lng&&Ar.lng<At.lng){As.push(Ar)}}return As},_showData:function(Al,Ak){var An=this._findValidDataForCoords(Al,Ak),Am=this.map.pixToLL({x:Ak.x,y:Ak.y}),Ao=this.map.getShapeCollection(Ah),Aj;if(An.length==0){this.map.parent.style.cursor=this.map._grab_mousecursor;if(Ao){Ao.removeAll()}return }this.map.parent.style.cursor=this.map._point_mousecursor;Aj=this.createMouseOverInfoWindow(An,Am);if(!Ao){Ao=new AW.ShapeCollection();Ao.setName(Ah);this.map.addShapeCollection(Ao)}else{Ao.removeAll()}Ao.add(Aj)},_recieveData:function(Am,Ak,Al){var Aj=this.currentCoords;this.dataStack[Am]=Al;if(Aj&&Ak){if(Ak.x==Aj.x&&Ak.y==Aj.y){this._showData(Al,Ak)}}},_requestData:function(Al,Ak){var Aj=AS(),Aj="c"+Aj.replace(",",""),Am=Al.replace(/\/tile\?/,"/data?")+"&cachebust="+Aj+"&callback=MQA.SearchLayer.CALLBACKS."+Aj;SearchLayer.CALLBACKS[Aj]=Ad(this,"_recieveData",Al,Ak);Ab(Am,{})},_handleClickEvent:function(Am,An){var Ao=true,Ap=An?this._getMouseAcutalPositionOnMap(An):this._getMouseAcutalPositionOnMap(Am),Al=Am.target?Am.target.src:false,Ak=this;Ak.disableMouseMove=true;Ak._removeRolloverPoi();setTimeout(function(){Ak.disableMouseMove=false},1000);if(!Al){Al=Am.srcElement?Am.srcElement.src:false}if(Al){var Aq=this._lookForData(Al);if(Aq){Aq=this._findValidDataForCoords(Aq,Ap);if(Aq.length>0){var Aj=new AW.Event("MQA.SearchLayer.click");Aj.srcObject=Am;Aj.xy=Ap;Aj.ll=this.map.pixToLL(Ap);Aj.searchLayerData=Aq;AV(this,"click",Aj);this.createInfoWindow(Aj)}}}},displayOnlyThisLayer:function(Ak,Al){var Aj=0,Am=Aa.length,An;for(;Aj<Am;Aj++){An=Aa[Aj];if(An.term==Ak){return }}Aa=[];this.addLayer(Ak,Al)},replaceLayer:function(Ak,Al){var Aj=0,Am=Aa.length;searchCriteria=[];for(;Aj<Am;Aj++){var An=Aa[Aj];if(An.color!=Al){searchCriteria.push(An)}}Aa=searchCriteria;this.addLayer(Ak,Al)},addLayer:function(Am,Al){if(Al){Al=this.convertColor(Al)}if(Am){var Ar=[],An=Aa.length;Ar.push({term:Am,color:Al});for(var Ak=0;Ak<An;Ak++){var Ap=Aa[Ak];if(Ap.term!=Am){Ar.push(Ap)}}Aa=Ar}var Aj;if(Aa.length>0){Aj=new AW.Kernel.TileLayer(this.map.display,AZ),key=Ac+(Ag+1);this.map.display.addLayer(key,Aj);Aj.enable()}var As=Ac+Ag,Aq=this;this.map.display.removeLayer(As);var Ao=AR(this,"_handleMouseMove"),At=AR(this,"_handleClickEvent");AY(Aj.elt,"mousemove",Ao);AY(Aj.elt,"click",At);Ag=Ag+1;this.layer=Aj},removeLayer:function(Aj){var Am=false;if(Aj){var Ao=[],Al=Aa.length;for(var Ak=0;Ak<Al;Ak++){var An=Aa[Ak];if(An.term!=Aj){Ao.push(An)}}Aa=Ao;if(Ao.length>0){this.addLayer()}else{Am=true}}else{Am=true;Aa=[]}if(Am==true){AQ(this.layer.elt);this.map.display.removeLayer(Ac+Ag)}},convertColor:function(Aj){return Aj}};AW.SearchLayer=SearchLayer;AX(AW.TileMap.prototype,{searchLayer:false,addSearchLayer:function(Aj,Ak){if(!this.searchLayer){this.searchLayer=new AW.SearchLayer(this)}this.searchLayer.addLayer(Aj,Ak)},replaceSearchLayer:function(Aj,Ak){if(!this.searchLayer){this.addSearchLayer(Aj,Ak)}this.searchLayer.replaceLayer(Aj,Ak)},removeSearchLayerByColor:function(Am){var Ak=0,Al=Aa.length,Aj;for(;Ak<Al;Ak++){Aj=Aa[Ak];if(Aj.color==Am){this.removeSearchLayer(Aj.term);return }}},displayOnlyThisLayer:function(Aj,Ak){if(!this.searchLayer){this.addSearchLayer(Aj,Ak)}else{this.searchLayer.displayOnlyThisLayer(Aj,Ak)}},removeSearchLayer:function(Aj){if(this.searchLayer){this.searchLayer.removeLayer(Aj)}}});AW.Loader._moduleLoaded("searchlayer")})()})(MQA);

