// Copyright 2005 Microsoft Corporation
function ap(b){return b?b:window.event;}function aC(b){b.cancelBubble=true;}function G(b){b=ap(b);aC(b);return false;}function bh(b){var gj=0;if(b.pageX){gj=b.pageX;}else if(b.clientX){if(document.documentElement&&document.documentElement.scrollLeft){gj=b.clientX+document.documentElement.scrollLeft;}else if(document.body){gj=b.clientX+document.body.scrollLeft;}}return gj;}function ca(b){var gk=0;if(b.pageY){gk=b.pageY;}else if(b.clientY){if(document.documentElement&&document.documentElement.scrollTop){gk=b.clientY+document.documentElement.scrollTop;}else if(document.body){gk=b.clientY+document.body.scrollTop;}}return gk;}function kp(b){if(b.wheelDelta){return b.wheelDelta;}else if(b.detail){return-b.detail;}return 0;}function rD(b){if(!b){b=window.event;}var T=null;if(b.srcElement){T=b.srcElement;}else if(b.target){T=b.target;}if(T&&T.nodeType){if(T.nodeType==3){T=rk.parentNode;}}return T;}function hZ(cU){var cn=cU;var jg=0;while(cn){jg+=cn.offsetLeft;cn=cn.offsetParent;}if(navigator.userAgent.indexOf("Mac")!=-1&&typeof(document.body.leftMargin)!="undefined"){jg+=document.body.leftMargin;}return jg;}function gh(cU){var cn=cU;var iZ=0;while(cn){iZ+=cn.offsetTop;cn=cn.offsetParent;}if(navigator.userAgent.indexOf("Mac")!=-1&&typeof(document.body.topMargin)!="undefined"){iZ+=document.body.topMargin;}return iZ;}function ak(d){return Math.floor(d);}function cx(d){return Math.ceil(d);}function dJ(d,f){return Math.max(d,f);}function dX(d,f){return Math.min(d,f);}function aZ(d){return Math.abs(d);}function aj(d){return Math.round(d);}function cw(az){return az*Math.PI/180.0;}function gL(oG){return oG*180.0/Math.PI;}function lS(ah,X){if(!ah||!X||ah[0].length!=X.length){return;}var p=ah.length;var q=X[0].length;var aU=new Array(p);var bc=X.length;for(var a=0;a
0){var ad=K.pop();ad.RemoveFromMap();}K=null;while(an.length){an.pop().Destroy();}an=null;ju();if(eC){eC.Destroy();eC=null;}if(R){R.detachEvent("onmousedown",G);R.detachEvent("onmouseup",G);R.detachEvent("onmousemove",G);R.detachEvent("onmousewheel",G);R.detachEvent("ondblclick",G);R.detachEvent("oncontextmenu",G);R.detachEvent("onkeydown",G);R.detachEvent("onkeyup",G);y.removeChild(R);R=null;}if(bN){ee("onendzoom",bN.Update);ee("onendcontinuouspan",bN.Update);ee("onresize",bN.Reposition);bN.Destroy();bN=null;}if(di){di.Destroy();di=null;}if(cs){cs.Destroy();cs=null;}if(dp){dp.Destroy();dp=null;}if(z){z.Destroy();z=null;}if(cE){cE.Destroy();cE=null;}if(dE){dE.Destroy();dE=null;}mR();y=h=null;};function jj(){d=hZ(y);f=gh(y);q=y.offsetWidth;p=y.offsetHeight;}function pa(d,f,aT){if(!aT){aT=Msn.VE.DashboardSize.Normal;}if(aT==Msn.VE.DashboardSize.Tiny){aT=Msn.VE.DashboardSize.Small;}R=document.createElement("div");y.appendChild(R);R.className="Dashboard Dashboard_"+aT;R.style.top=f+"px";R.style.left=d+"px";R.attachEvent("onmousedown",G);R.attachEvent("onmouseup",G);R.attachEvent("onmousemove",G);R.attachEvent("onmousewheel",G);R.attachEvent("ondblclick",G);R.attachEvent("oncontextmenu",G);R.attachEvent("onkeydown",G);R.attachEvent("onkeyup",G);eC=new Msn.VE.Dashboard(R,h,aT);eC.Init();}function kX(){var e=new Msn.VE.MapView();e.SetCenterLatLong(new Msn.VE.LatLong(0.0,0.0));e.SetZoomLevel(1);e.SetMapStyle(cY);av(e);}function hn(A,L){var e=au.MakeCopy();e.SetCenterLatLong(new Msn.VE.LatLong(A,L));av(e);}function cc(Z,bS,il){var e=c.MakeCopy();e.SetMapStyle(lK(Z),bS,il);if(c.mapStyle!=Z){if(Z==aS){e.SetZoomLevel(1);hY=c.zoomLevel;iM=c.mapStyle;}else if(c.mapStyle==aS){e.SetZoomLevel(hY);}}av(e);}function lK(Z){if(Z==eT||Z==eq||Z==aS){return Z;}else{return cY;}}function qL(){return c.latlong.latitude;}function oS(){return c.latlong.longitude;}function lV(pm){c.latlong=x.PixelToLatLong(c.center,c.zoomLevel);if(pm){au.Copy(c);}if(z){z.UpdateAvailability();}}function ix(f){var l=new Msn.VE.Pixel(I+af+q/2,H+ag+f);var o=x.PixelToLatLong(l,c.zoomLevel);if(!o){return null;}return o.latitude;}function hF(d){var l=new Msn.VE.Pixel(I+af+d,H+ag+p/2);var o=x.PixelToLatLong(l,c.zoomLevel);if(!o){return null;}return o.longitude;}function hJ(A){var o=new Msn.VE.LatLong(A,c.center.longitude);var l=x.LatLongToPixel(o,c.zoomLevel);if(!l){return null;}return aj(l.y-H-ag);}function hK(L){var o=new Msn.VE.LatLong(c.center.latitude,L);var l=x.LatLongToPixel(o,c.zoomLevel);if(!l){return null;}return aj(l.x-I-af);}function cQ(o){var l=x.LatLongToPixel(o,c.zoomLevel);l.x-=I+af;l.y-=H+ag;return l;}function du(l){var pj=new Msn.VE.Pixel(l.x+I+af,l.y+H+ag);var o=x.PixelToLatLong(pj,c.zoomLevel);return o;}function qB(){return c.zoomLevel;}function oK(){return c.mapStyle;}function mJ(A,m){if(!A){A=c.latlong.latitude;}if(!m){m=c.zoomLevel;}return Math.cos(cw(A))*x.MetersPerPixel(m);}function qF(aK,aM){if(!aK||!aM||aK<=0||aM<=0){return;}q=aK;p=aM;y.style.width=q;y.style.height=p;pz(c);cs.Reposition();if(di){di.Reposition();}aq("onresize");}function ps(){return z?z.IsAvailable():false;}function qJ(){return z?z.GetScene():null;}function re(ef){dV=ef;}function nw(){return dV;}function pJ(F){if(z){cc(aS,F,null);}}function ng(ea){if(z){cc(aS,null,ea);}}function ht(az){ga=az;for(var a=0;a(aE-ds)){return((aE-ds-aT)/2)-fK+ds;}else if(fK+cqaE){return aE-fK-aT;}return cq;}function nI(J){var ax=document.createElement("div");var ai=document.createElement("div");var eM=13;this.Init=function(){ax.className="Copyright CopyrightBackground";ai.className="Copyright CopyrightForeground";bz();J.appendChild(ax);J.appendChild(ai);};this.Destroy=function(){J.removeChild(ax);J.removeChild(ai);ax=ai=null;};function bz(){ax.style.top=(p-eM)+"px";ax.style.left=(q-234)+"px";ax.style.display="block";ai.style.top=(p-eM-1)+"px";ai.style.left=(q-235)+"px";ai.style.display="block";}function cu(){var k="© 2005 Microsoft Corp";eM=13;if(c.zoomLevel>=5&&(c.mapStyle==cY||c.mapStyle==eq)){k+=" © 2004 NAVTEQ";}if(c.mapStyle==eq||c.mapStyle==eT){k+="
";eM=21;if(c.zoomLevel<=8){k+="Image courtesy of NASA";}else if(c.zoomLevel<=13){k+="© Harris Corp, Earthstar Geographics LLC";}else{k+="Image courtesy of USGS";}}else if(c.mapStyle==aS){k+="
© 2005 Pictometry International Corp.";eM=21;}ax.innerHTML=k;ai.innerHTML=k;bz();}this.Reposition=bz;this.Update=cu;}function ni(e,gt,fi){this.view=e;this.oblique=gt;this.error=fi;}function fL(o,m,fi){var e=c.MakeCopy();if(o!=undefined){e.latlong=o;}if(m!=undefined){e.zoomLevel=m;}if(fi==undefined){fi="";}var gt=null;if(z){gt=z.GetEventInfo();}return new ni(e,gt,fi);}function eu(aR,cX){var am=dk[aR];if(!am){am=new Array();dk[aR]=am;}for(var a=0;a0)bk.pop().Destroy();}function mP(){for(var a=0;abs[0].latitude?bu[0].latitude:bs[0].latitude;var en=bu[0].longitude>bs[0].longitude?bu[0].longitude:bs[0].longitude;var eG=bu[1].latitude=0){go--;}jx(cM[go],aW);oz(aW);}function jx(et,aW){if(oB(et.boundingRectangle[0],et.boundingRectangle[1])){return;}if(et.childRegions!=null){for(var a=0;a=eG&&cJ<=ez&&da>=ey&&da<=en;}function oB(gz,fU){return((gz.latitude>ez&&fU.latitude>ez)||(gz.latitudeen&&fU.longitude>en)||(gz.longitude0){gn();}else if(cq<0){gK();}return false;}function lH(b){b=ap(b);aC(b);var fD=I+af+bh(b)-d;var fE=H+ag+ca(b)-f;var gD=fL(x.PixelToLatLong(new Msn.VE.Pixel(fD,fE),c.zoomLevel));aq("oncontextmenu",gD);return false;}function gZ(bB,by){if(bB==0&&by==0){return;}lT(c,hu,bB,by);af=c.center.x-I-q/2;ag=c.center.y-H-p/2;j.style.top=-ag+"px";j.style.left=-af+"px";cs.Update();window.setTimeout(pn,1);window.setTimeout(mV,2);}function hj(bB,by,eo,bY){if(bi){return;}if(!eo){eo=-1;}fA=bB;fB=by;gB=eo;if(!bB&&!by){fa();return;}iH=bY;if(!aQ){aQ=true;lW();aq("onstartcontinuouspan");}}function lW(){if(aQ){gZ(fA,fB);if(gB>0)gB--;if(gB!=0)window.setTimeout(lW,10);else fa();}}function fa(){fA=0;fB=0;aQ=false;iH=false;if(eI!=null&&fH!=null){var o=new Msn.VE.LatLong(eI,fH);var l=x.LatLongToPixel(o,c.zoomLevel);var aI=l.x-(I+af+q/2);var aJ=l.y-(H+ag+p/2);gZ(aI,aJ);c.latlong.latitude=eI;c.latlong.longitude=fH;au.Copy(c);eI=null;fH=null;if(z){z.UpdateAvailability();}}else{lV(true);}aq("onendcontinuouspan");aq("onchangeview");}function mF(A,L){eI=A;fH=L;jt(x.LatLongToPixel(new Msn.VE.LatLong(A,L),c.zoomLevel));}function pz(e){jt(e.center);}function jt(l){if(c.mapStyle==aS){var g=z.GetScene();if(!g||!g.ContainsPixel(l,c.zoomLevel)){var e=au.MakeCopy();e.sceneId=null;e.SetCenterLatLong(z.PixelToLatLong(l,c.zoomLevel));av(e);return;}}var aI=l.x-(I+af+q/2);var aJ=l.y-(H+ag+p/2);var bg=Math.sqrt(aI*aI+aJ*aJ);if(!dV||aZ(aI)>2*q||aZ(aJ)>2*p||bg>1.5*Math.sqrt(q*q+p*p)){var e=au.MakeCopy();e.SetCenter(l);av(e);return;}var dD=Math.atan2(aJ,aI);var eo=cx(bg/mf);var mI=aj(bg/eo);aI=aj(Math.cos(dD)*mI);aJ=aj(Math.sin(dD)*mI);hj(aI,aJ,eo);}function qh(F,cJ,da,q,p,is,iu,aY){var E=new pY();E.Init(F,cJ,da,q,p,is,iu,aY);an.push(E);return E.pin;}function oH(F){for(var a=0;a0)an.pop().RemoveFromMap();}function qi(){for(var a=0;a0){bo.pop();}while(bn.length>0){bn.pop();}};this.GetLatitude=function(){return bU.latitude;};this.GetLongitude=function(){return bU.longitude;};function gV(){var aL=cg;for(var a=0;a<=aL;a++){bo[a]=C-aK/2;bn[a]=B-aM/2;}}function cW(){var aL=cg;for(var a=0;a<=aL;a++){var ah=a/aL;var X=1.0-ah;bo[a]=ak(X*C+ah*O-aK/2)+"px";bn[a]=ak(X*B+ah*P-aM/2)+"px";}}function es(a){E.style.left=bo[a];E.style.top=bn[a];}function gI(){var T=0;T=C;C=O;O=T;T=B;B=P;P=T;}function bz(){var l=x.LatLongToPixel(bU,c.zoomLevel);if(l){C=aj(l.x-I);B=aj(l.y-H);gV();es(0);E.style.display="block";}else{E.style.display="none";}}function mO(bM,bP,bf){C-=af;B-=ag;var l=x.LatLongToPixel(bU,bf);if(l){O=aj(l.x-bM);P=aj(l.y-bP);cW();E.style.display="block";}else{E.style.display="none";}}function cI(){if(E.parentNode==j){j.removeChild(E);}}function jN(b){b=ap(b);aC(b);if(aQ||bi){return false;}var e=au.MakeCopy();e.SetCenterLatLong(bU);if(b.altKey){e.SetZoomLevel(c.zoomLevel-1);}else{e.SetZoomLevel(c.zoomLevel+1);}av(e);return false;}function er(b){b=ap(b);aC(b);if(aQ||bi){return false;}var cq=kp(b);if(cq>0){gn();}else if(cq<0){gK();}return false;}this.ClearSteps=gV;this.PrecomputeSteps=cW;this.SetFactor=es;this.SwapStates=gI;this.Reposition=bz;this.PrepareForZoom=mO;this.RemoveFromMap=cI;}function ov(J){var cZ=document.createElement("div");var cS=document.createElement("div");var cK=document.createElement("div");var dq=document.createElement("div");var lA=150;this.Init=function(){cZ.className="ScaleBarLabel ScaleBarLabelBackground";cS.className="ScaleBarLabel ScaleBarLabelForeground";cK.className="ScaleBar ScaleBarBackground";dq.className="ScaleBar ScaleBarForeground";cu();bz();J.appendChild(cZ);J.appendChild(cS);J.appendChild(cK);J.appendChild(dq);};this.Destroy=function(){J.removeChild(cZ);J.removeChild(cS);J.removeChild(cK);J.removeChild(dq);cZ=cS=cK=ro=null;};function bz(){cZ.style.top=(p-45)+"px";cZ.style.left=(q-160)+"px";cZ.style.display="block";cS.style.top=(p-46)+"px";cS.style.left=(q-161)+"px";cS.style.display="block";cK.style.top=(p-30)+"px";cK.style.left=(q-160)+"px";cK.style.display="block";dq.style.top=(p-31)+"px";dq.style.left=(q-161)+"px";dq.style.display="block";}function rp(fp){return fp*0.001;}function qY(fp){return fp*0.000621371192;}function qr(fp){return fp*1.0936133;}function cu(){try{var cm=mJ();var jF=cm*lA;var fQ="mi";var fT=qY(jF);var gW=lu(fT);if(gW<0.5){fQ="yds";fT=qr(jF);gW=lu(fT);}pq("us",fQ,gW,Math.round(gW/fT*lA));}catch(dw){}}function lu(ki){var nl=Math.log(ki)/Math.log(10);var oW=Math.floor(nl);var jc=Math.pow(10,oW);var kc=ki/jc;var lt=Math.floor(kc);if(lt>=3.0){return lt*jc;}var oi=Math.floor(kc*2.0)*0.5;return oi*jc;}function pq(rC,fQ,dR,q){if(dR<1){dR=dR.toFixed(1);}var jD=dR+" "+fQ;cZ.innerHTML=jD;cS.innerHTML=jD;cK.style.width=q;dq.style.width=q;}this.Update=cu;this.Reposition=bz;}var ij=0;var fY=0;var le=0;var ew=new Array();ew[cY]=[325,975];ew[eT]=[350,1050];ew[eq]=[425,1275];ew[aS]=[450,1350];var bC=[0,0,0];function fz(d,f,bc,s){var T=new nJ();T.Init(d,f,bc,s,(d*M-I),(f*M-H));return T;}function kF(ku){while(ku.length>0){var ad=ku.pop();ad.Destroy();ad=null;}}function or(){var hB=0;for(var a=0;a0){bo.pop();}while(bn.length>0){bn.pop();}while(ei.length>0){ei.pop();}while(ep.length>0){ep.pop();}bo=bn=ei=ep=null;};function hN(d,f,aK,aM){C=d;B=f;cB=aK;cV=aM;}this.SetCurrentState=hN;function jo(d,f,aK,aM){O=d;P=f;ec=aK;ek=aM;}this.SetNextState=jo;function gV(){for(var a=0;a<=cg;a++){bo[a]=C+"px";bn[a]=B+"px";ei[a]=cB+"px";ep[a]=cV+"px";}}this.ClearSteps=gV;function cW(){for(var a=0;a<=cg;a++){var ah=a/cg;var X=1.0-ah;bo[a]=ak(X*C+ah*O)+"px";bn[a]=ak(X*B+ah*P)+"px";ei[a]=cx(X*cB+ah*ec)+"px";ep[a]=cx(X*cV+ah*ek)+"px";}}this.PrecomputeSteps=cW;function es(a){if(at==null||(bi&&!ho)){return;}var dg=at.style;dg.left=bo[a];dg.top=bn[a];dg.width=ei[a];dg.height=ep[a];var gQ=bw.style;if(ga&&a==0){dg.border="1px dashed red";gQ.left=bo[a];gQ.top=bn[a];}if(at.parentNode!=j){dg.position="absolute";dg.cursor="pointer";dg.zIndex=aY;j.appendChild(at);if(ga&&bw.parentNode!=j){var cj=at.src;bw.innerHTML=cj.substring(cj.lastIndexOf("/")+1,cj.lastIndexOf("."));gQ.position="absolute";gQ.zIndex=(aY+1);j.appendChild(bw);}}}this.SetFactor=es;function gI(){var T=0;T=C;C=O;O=T;T=B;B=P;P=T;T=cB;cB=ec;ec=T;T=cV;cV=ek;ek=T;}this.SwapStates=gI;function cI(){if(ay){ay.onload=null;ay.onerror=null;ay=null;}if(at){if(at.parentNode==j){j.removeChild(at);}at=null;}if(bw){if(bw.parentNode==j){j.removeChild(bw);}bw=null;}}this.RemoveFromMap=cI;function nf(){if(eW!=c.zoomLevel||ay==null){return;}var iT=new Date();var eF=iT.getTime()-hV.getTime();jU(eF);ij+=eF;fY++;if(ga){window.status="last="+eF+", average="+(ij/fY);}ay.onload=null;ay.onerror=null;at=ay;at.onmousedown=function(b){return false;};ay=null;if(!bi){es(cG);}}function Error(){if(eW!=c.zoomLevel||ay==null){return;}var iT=new Date();var eF=iT.getTime()-hV.getTime();jU(eF);ij+=eF;fY++;le++;ay.onload=null;ay.onerror=null;ay=null;}function jU(qx){for(var a=0;aci-mn||acck-jK);gI();cW();aY=lP;}this.PrepareSwapTile=nD;function ht(az){if(at!=null){at.style.border=az?"1px dashed red":"0px";}bw.style.display=az?"block":"none";}this.Debug=ht;}function mh(){kF(K);j.style.top="0px";j.style.left="0px";I=aj(c.center.x-q/2);H=aj(c.center.y-p/2);af=0;ag=0;bV=ak((I-bH)/M);bL=ak((H-bH)/M);ci=ak((I+q+bH)/M);ck=ak((H+p+bH)/M);aB=ci-bV+1;cb=ck-bL+1;for(var f=bL;f<=ck;f++){for(var d=bV;d<=ci;d++){var ad=fz(d,f,c.zoomLevel,c.mapStyle);K.push(ad);}}}function pn(){if(bi){return;}var jv=I+af;var jq=H+ag;var C=ak((jv-bH)/M);var B=ak((jq-bH)/M);var O=ak((jv+q+bH)/M);var P=ak((jq+p+bH)/M);while(bV=0;f--){var ad=K.splice(f*aB,1)[0];ad.RemoveFromMap();}bV++;aB--;}while(bV>C){bV--;aB++;for(var f=0;fB){bL--;cb++;for(var d=aB-1;d>=0;d--){var ad=fz(bV+d,bL,c.zoomLevel,c.mapStyle);K.unshift(ad);}}while(ci>O){for(var f=cb-1;f>=0;f--){var ad=K.splice(f*aB+aB-1,1)[0];ad.RemoveFromMap();}ci--;aB--;}while(ciP){for(var d=0;dkl){return kl;}return aL;}function rc(){var d=null;try{d=new ActiveXObject("Msxml2.XMLHTTP");}catch(dw){try{d=new ActiveXObject("Microsoft.XMLHTTP");}catch(dw){d=null;}}if(!d&&typeof XMLHttpRequest!="undefined"){d=new XMLHttpRequest();}return d;}function qv(m){var e=au.MakeCopy();e.SetZoomLevel(m);av(e);}function gn(){var e=au.MakeCopy();e.SetZoomLevel(c.zoomLevel+1);av(e);}function gK(){var e=au.MakeCopy();e.SetZoomLevel(c.zoomLevel-1);av(e);}function qZ(A,L,m){var e=au.MakeCopy();e.sceneId=null;e.SetCenterLatLong(new Msn.VE.LatLong(A,L));e.SetZoomLevel(m);av(e);}function qP(){var g=null;var ba=false;var hc=false;var br=null;var ib=null;var gi=false;var fu=null;var dN=-1;var t=[__mapControlObliqueBounds__];this.Init=function(ok){ib=ok;};this.Destroy=function(){};function fy(W,ac,m){return g.IsValidTile(W,ac,m);}function hv(W,ac,cd){return g.GetTileFilename(W,ac,cd);}function ce(m){if(!g){return 0;}var l=new Msn.VE.Pixel(aj(I+af+q/2),aj(H+ag+p/2));var jz=g.PixelToLatLong(l,m);l.x++;var jA=g.PixelToLatLong(l,m);var eU=Math.sin(cw(jz.latitude));var eK=Math.sin(cw(jA.latitude));var lg=bm/2*aZ(Math.log((1+eU)/(1-eU))-Math.log((1+eK)/(1-eK)));var kq=bm*aZ(cw(jz.longitude)-cw(jA.longitude));return Math.sqrt(kq*kq+lg*lg);}function du(l,m){return g?g.PixelToLatLong(l,m):null;}function cQ(o,m){return g?g.LatLongToPixel(o,m):null;}function hg(e){if(e.zoomLevel<1){e.SetZoomLevel(1);}else if(e.zoomLevel>2){e.SetZoomLevel(2);}}function nh(){return g;}function dj(){return g.GetBounds();}function qO(){return ba;}function nW(){if(!ba){return null;}var qo=new Object();return qo;}function ou(){if(c.mapStyle==aS){return;}if(c.zoomLevel<12){g=null;hc=ba;ba=false;it();return;}mr(c.latlong,"North",false,__obliqueUpdateDelay__);}function mr(o,ea,pb,kz){he();gi=pb;if(!nb(o)){g=null;hc=ba;ba=false;it();return;}fu=ib+"?lat="+o.latitude+"&lon="+o.longitude;if(ea){fu+="&o="+ea;}if(kz){dN=window.setTimeout(iJ,kz);}else{iJ();dN=-1;}}function pE(F){if(g&&g.GetID()==F){return;}he();gi=true;fu=ib+"?id="+F;iJ();}function he(){try{if(dN!=-1){window.clearTimeout(dN);}}catch(dw){}dN=-1;try{if(br){br.onreadystatechange=null;br.abort();}}catch(dw){}}function iJ(){he();if(!fu){return;}if(!br){br=rc();}if(br){br.open("POST",fu,true);br.onreadystatechange=oY;br.send("");}}function oY(){if(!br||br.readyState!=4){return;}dN=-1;hc=ba;var lQ=br.responseText;if(lQ){try{g=eval(lQ);ba=true;}catch(dw){g=null;ba=false;}}else{g=null;ba=false;}it();}function it(){if(gi){gi=false;if(ba){var e=au.MakeCopy();e.SetMapStyle(aS,g.GetID(),g.GetOrientation());av(e);aq("onobliquechange");}else{var e=au.MakeCopy();e.SetMapStyle(iM);if(e.GetViewType()!="latlongRect"){e.SetZoomLevel(hY);}av(e);aq("onerror",fL(c.latlong,c.zoomLevel,"Bird's Eye images are not available for this area."));}}if(hc!=ba){if(ba){aq("onobliqueenter");}else{aq("onobliqueleave");}}}function nb(o){if(!o||!t||t.length==0){return false;}var bF=qm(o,t[0].length);return ic(bF,0,t.length-1);}function qm(o,m){var l=dp.LatLongToPixel(o,m);var W=ak(l.x/M);var ac=ak(l.y/M);var bF="";for(var a=m;a>0;a--){var ao=0;var eR=1<<(a-1);if((W&eR)!=0){ao++;}if((ac&eR)!=0){ao+=2;}bF+=(ao+"");}return bF;}function ic(bF,bu,bs){if(bs=0&&ac>=0&&W0;a--){ao=0;var eR=1<<(a-1);if((W&eR)!=0){ao++;}if((ac&eR)!=0){ao+=2;}jT+=ao+"";}return"http://"+c.mapStyle+ao+".__orthoTileServer__"+c.mapStyle+jT+(c.mapStyle==cY?".png":".jpeg")+"?g="+ej[c.mapStyle];}function ce(m){return fX/((1<=fc&&d<=fo&&f>=fb&&f<=eN){if(m>=t[a].z1&&m<=t[a].z2){return t[a];}}}}function hg(e){var d=e.center.x;var f=e.center.y;var fh=0;for(var a=0;a=fc&&d<=fo&&f>=fb&&f<=eN){if(t[a].z2>=e.zoomLevel){return;}else if(t[a].z2>fh){fh=t[a].z2;}}}e.SetZoomLevel(fh);}this.IsValidTile=fy;this.GetFilename=hv;this.MetersPerPixel=ce;this.PixelToLatLong=du;this.LatLongToPixel=cQ;this.GetBounds=dj;this.ValidateZoomLevel=hg;}function nu(){var ax=document.createElement("div");var ai=document.createElement("div");var C=0,B=0,O=0,P=0;this.Init=function(){ax.className="ZoomBox_bg";ai.className="ZoomBox_fg";ax.attachEvent("onmouseup",bt);ai.attachEvent("onmouseup",bt);j.appendChild(ax);j.appendChild(ai);};this.Destroy=function(){ax.detachEvent("onmouseup",bt);ai.detachEvent("onmouseup",bt);j.removeChild(ax);j.removeChild(ai);};function hy(b){C=O=bh(b)-d+af;B=P=ca(b)-f+ag;ld(C,B,1,1);aN();if(ai.setCapture){ai.setCapture();}}function iO(b){O=bh(b)-d+af;P=ca(b)-f+ag;ld(dX(C,O),dX(B,P),dJ(1,aZ(O-C)),dJ(1,aZ(P-B)));}function iq(b){if(aZ(C-O)>1&&aZ(B-P)>1){var e=au.MakeCopy();e.SetZoomLevel(c.zoomLevel);e.SetPixelRectangle(new Msn.VE.PixelRectangle(new Msn.VE.Pixel(I+C,H+B),new Msn.VE.Pixel(I+O,H+P)));av(e);}as();if(ai.releaseCapture){ai.releaseCapture();}}function ld(d,f,aK,aM){kW(ax,d+1,f+1,aK,aM);kW(ai,d,f,aK,aM);}function kW(cU,d,f,aK,aM){cU.style.left=d+"px";cU.style.top=f+"px";cU.style.width=aK+"px";cU.style.height=aM+"px";}function aN(){ax.style.display="block";ai.style.display="block";}function as(){ax.style.display="none";ai.style.display="none";}this.OnMouseDown=hy;this.OnMouseMove=iO;this.OnMouseUp=iq;}function oT(){var gF=false;this.Init=function(){};this.Destroy=function(){};function hy(b){gF=false;iF=bh(b);iC=ca(b);if(y.setCapture){y.setCapture();}var fD=I+af+bh(b)-d;var fE=H+ag+ca(b)-f;aq("onstartcontinuouspan",fL(x.PixelToLatLong(new Msn.VE.Pixel(fD,fE),c.zoomLevel)));}function iO(b){var cv=bh(b);var lp=ca(b);gZ(iF-cv,iC-lp);iF=cv;iC=lp;gF=true;}function iq(b){lV(true);if(y.releaseCapture){y.releaseCapture();}if(gF){aq("onendcontinuouspan");aq("onchangeview");gF=false;}var fD=I+af+bh(b)-d;var fE=H+ag+ca(b)-f;var gD=fL(x.PixelToLatLong(new Msn.VE.Pixel(fD,fE),c.zoomLevel));aq("onmouseup",gD);aq("onclick",gD);}this.OnMouseDown=hy;this.OnMouseMove=iO;this.OnMouseUp=iq;}this.SetCenter=hn;this.SetMapStyle=cc;this.GetCenterLatitude=qL;this.GetCenterLongitude=oS;this.GetLatitude=ix;this.GetLongitude=hF;this.GetY=hJ;this.GetX=hK;this.LatLongToPixel=cQ;this.PixelToLatLong=du;this.GetZoomLevel=qB;this.GetMapStyle=oK;this.GetMetersPerPixel=mJ;this.Resize=qF;this.PanMap=gZ;this.ContinuousPan=hj;this.StopContinuousPan=fa;this.PanToLatLong=mF;this.AddPushpin=qh;this.RemovePushpin=oH;this.ClearPushpins=mY;this.SetViewport=lG;this.SetBestMapView=kQ;this.IncludePointInViewport=nt;this.SetZoom=qv;this.ZoomIn=gn;this.ZoomOut=gK;this.SetCenterAndZoom=qZ;this.AddLine=pR;this.RemoveLine=pe;this.ClearLines=ju;this.AttachEvent=eu;this.DetachEvent=ee;this.IsObliqueAvailable=ps;this.GetObliqueScene=qJ;this.SetAnimationEnabled=re;this.IsAnimationEnabled=nw;this.SetObliqueScene=pJ;this.SetObliqueOrientation=ng;this.SetView=av;this.Debug=ht;this.GetResponseRangeCounts=or;this.ResetResponseRangeCounts=nr;this.GetFailureRate=pu;};
Msn.VE.Bounds=function(fd,eY,C,B,O,P){this.z1=fd;this.z2=eY;this.x1=C;this.y1=B;this.x2=O;this.y2=P;};
Msn.VE.Dashboard=function(i,j,aT){var gE=document.createElement("div");var gw=document.createElement("div");var dO=document.createElement("div");var gp=null;var jI=document.createElement("hr");var be=document.createElement("div");var cr=document.createElement("input");var kh=true;var bq=null;var dr=null;var em=null;var de=null;var bG=null;var ch=null;var hX=document.createElement("table");hX.className="dashboardContainerTable";var iS=document.createElement("tbody");var iG=document.createElement("tr");hX.appendChild(iS);iS.appendChild(iG);var ig=document.createElement("td");var dT=document.createElement("td");dT.vAlign="top";var dL=document.createElement("td");dL.colSpan=2;dL.setAttribute("colspan",2);dL.className="obliqueSelectorTable";iG.appendChild(ig);iG.appendChild(dT);var kS=document.createElement("tr");kS.appendChild(dL);iS.appendChild(kS);this.Init=function(){var Z=j.GetMapStyle();iD(gE,"road",mH);iD(gw,"aerial",lJ);iD(dO,"bird's eye",iL);jI.className="Dashboard_separator";i.appendChild(jI);i.appendChild(hX);if(!aT||aT==Msn.VE.DashboardSize.Normal){bq=new ql(ig,5,30);bq.Init();bq.Show();}dr=new pi(ig);dr.Hide();em=new qt(dT,100,30);em.Init();de=new pH(dT);oR();nS();ch=new nU(dL);ch.Init();j.AttachEvent("onendzoom",me);j.AttachEvent("onobliqueenter",mz);j.AttachEvent("onobliqueleave",jO);j.AttachEvent("onchangemapstyle",ks);j.AttachEvent("onobliquechange",nN);if(j.IsObliqueAvailable()){mK();}else{jM();}switch(Z){case'r':kM();break;case'a':case'h':mx();break;case'o':mq();break;}};this.Destroy=function(){hD(gE,mH);hD(gw,lJ);hD(dO,iL);gp=gE=gw=dO=null;be.removeChild(cr);dT.removeChild(be);be.detachEvent("onclick",kY);be=cr=null;if(bq){bq.Destroy();bq=null;}if(de){de.Destroy();de=null;}if(ch){ch.Destroy();ch=null;}if(j){j.DetachEvent("onendzoom",me);j.DetachEvent("onobliqueenter",mz);j.DetachEvent("onobliqueleave",jO);j.DetachEvent("onchangemapstyle",ks);j=null;}};this.GetY=function(){return gh(i);};this.GetHeight=function(){return i.offsetHeight;};function iD(bI,aR,cX,rz){bI.className="Dashboard_tab Dashboard_unselected";bI.href="javascript:void(0)";bI.innerText=aR;bI.attachEvent("onclick",cX);i.appendChild(bI);}function hD(bI,cX){bI.detachEvent("onclick",cX);i.removeChild(bI);}function je(bI){if(gp){gp.className="Dashboard_tab Dashboard_unselected";}bI.className="Dashboard_tab Dashboard_selected";gp=bI;}function oR(){cr.type="checkbox";be.className="Dashboard_toggler";be.style.display="none";be.attachEvent("onclick",kY);be.appendChild(cr);be.appendChild(document.createTextNode("Show labels"));dT.appendChild(be);}function nS(){bG=document.createElement("div");bG.className="Dashboard_notification";bG.innerHTML="
There is Bird's Eye imagery available for this location.";bG.style.display="none";bG.onclick=iL;dL.appendChild(bG);}function kM(){je(gE);be.style.display="none";ch.Hide();de.Hide();em.Show();if(j.IsObliqueAvailable()){bG.style.display="block";}if(bq){bq.Show();}dr.Hide();}function mx(){je(gw);be.style.display="block";ch.Hide();de.Hide();em.Show();if(j.GetMapStyle()=='h'){cr.checked=true;}else{cr.checked=false;}if(j.IsObliqueAvailable()){bG.style.display="block";}if(bq){bq.Show();}dr.Hide();}function mq(){je(dO);be.style.display="none";bG.style.display="none";ch.Show();em.Hide();de.Show();if(bq){bq.Hide();}dr.Show();}function mK(){dO.className="Dashboard_tab Dashboard_unselected";bG.style.display="block";}function jM(){dO.className="Dashboard_tab Dashboard_disabled";bG.style.display="none";}function mH(){j.SetMapStyle('r');}function lJ(){if(kh||cr.checked){j.SetMapStyle('h');}else{j.SetMapStyle('a');}kh=false;}function iL(){j.SetMapStyle('o');}function kY(b){var Z=j.GetMapStyle();if(Z=='a'){j.SetMapStyle('h');cr.checked=true;}else if(Z=='h'){j.SetMapStyle('a');cr.checked=false;}}function me(b){em.UpdateFromMap();de.UpdateFromMap();}function mz(b){if(j.GetMapStyle()=="o"){return;}mK();dr.UpdateFromMap();}function jO(b){jM();}function ks(b){switch(b.view.mapStyle){case'r':kM();break;case'a':case'h':mx();break;case'o':mq();break;}}function nN(b){ch.Update();dr.UpdateFromMap();}function ql(J){var i=document.createElement("div");var d=0,f=0;var aQ=false;var cA=15;this.Init=function(){i.className="Compass";i.attachEvent("onmousedown",dc);i.attachEvent("onmouseup",bt);i.attachEvent("onmousemove",cz);i.attachEvent("ondblclick",G);J.appendChild(i);};this.Destroy=function(){i.detachEvent("onmousedown",dc);i.detachEvent("onmouseup",bt);i.detachEvent("onmousemove",cz);i.detachEvent("ondblclick",G);i=null;};function dc(b){b=ap(b);aC(b);d=hZ(i);f=gh(i);if(i.setCapture){i.setCapture();}var aI=bh(b)-d-(i.offsetWidth/2);var aJ=ca(b)-f-(i.offsetHeight/2);aI=Math.min(Math.max(aI,-cA),cA);aJ=Math.min(Math.max(aJ,-cA),cA);j.ContinuousPan(aI,aJ);aQ=true;return false;}function cz(b){b=ap(b);aC(b);if(aQ){var aI=bh(b)-d-(i.offsetWidth/2);var aJ=ca(b)-f-(i.offsetHeight/2);aI=Math.min(Math.max(aI,-cA),cA);aJ=Math.min(Math.max(aJ,-cA),cA);j.ContinuousPan(aI,aJ);}return false;}function bt(b){b=ap(b);aC(b);if(i.releaseCapture){i.releaseCapture();}j.StopContinuousPan();aQ=false;return false;}function as(){i.style.display="none";}function aN(){i.style.display="block";}this.Hide=as;this.Show=aN;}function nU(J){var i=document.createElement("table");var u=new Array(3);this.Init=function(){i.className="obliqueSelectorTable";as();J.appendChild(i);var jh=document.createElement("tbody");jh.className="obliqueSelectorTable";i.appendChild(jh);for(var a=0;a<3;a++){var lk=document.createElement("tr");jh.appendChild(lk);u[a]=new Array(3);for(var Y=0;Y<3;Y++){var al=document.createElement("div");var ao=document.createElement("td");lk.appendChild(ao);ao.appendChild(al);al.className="Dashboard_thumbnail";if(a==1&&Y==1){u[a][Y]=new jJ(al,false);ao.className="obliqueSelectorCellCenter";}else{u[a][Y]=new jJ(al,true);ao.className="obliqueSelectorCellOff";}u[a][Y].Init();}}};this.Destroy=function(){J.removeChild(i);i=null;for(var a=0;a";if(ef){al.style.cursor="pointer";}}else{al.innerHTML="";al.style.cursor="default";}if(ef){al.parentNode.className="obliqueSelectorCellOff";}};function gO(){if(!g){return;}j.SetObliqueScene(g.GetID());}function eO(b){al.parentNode.className="obliqueSelectorCellOn";}function gy(b){al.parentNode.className="obliqueSelectorCellOff";}}this.Update=cu;this.Show=aN;this.Hide=as;}function qt(J){var w=document.createElement("div");var dI=document.createElement("div");var bv=document.createElement("div");var aa=document.createElement("div");var cL=document.createElement("div");var d=0,f=0;var cR=false;this.Init=function(){cL.className="ZoomBar_minus";cL.unselectable="on";cL.attachEvent("onclick",jL);aa.className="ZoomBar_slider";aa.unselectable="on";aa.attachEvent("onmousedown",dc);aa.attachEvent("onmousemove",cz);aa.attachEvent("onmouseup",bt);aa.attachEvent("onclick",G);bv.className="ZoomBar_bar";bv.unselectable="on";bv.appendChild(aa);bv.attachEvent("onclick",jm);dI.className="ZoomBar_plus";dI.unselectable="on";dI.attachEvent("onclick",mG);w.className="ZoomBar";w.appendChild(cL);w.appendChild(bv);w.appendChild(dI);w.attachEvent("onmousedown",G);w.attachEvent("onmouseup",G);w.attachEvent("onclick",G);w.attachEvent("ondblclick",G);J.appendChild(w);cC();};this.Destroy=function(){cL.detachEvent("onclick",jL);aa.detachEvent("onmousedown",dc);aa.detachEvent("onmousemove",cz);aa.detachEvent("onmouseup",bt);aa.detachEvent("onclick",G);bv.removeChild(aa);bv.detachEvent("onclick",jm);dI.detachEvent("onclick",mG);w.removeChild(dI);w.removeChild(bv);w.removeChild(cL);w.detachEvent("onmousedown",G);w.detachEvent("onmousedown",G);w.detachEvent("onclick",G);w.detachEvent("ondblclick",G);J.removeChild(w);j.DetachEvent("onendzoom",cC);cL=aa=bv=dI=w=J=j=null;};function aN(){w.style.display="block";}function as(){w.style.display="none";}function lv(){d=hZ(w);f=gh(w);}function dc(b){b=ap(b);aC(b);lv();if(aa.setCapture){aa.setCapture();}cR=true;return false;}function cz(b){b=ap(b);aC(b);if(cR){aa.style.left=hL(bh(b))+"px";}return false;}function bt(b){b=ap(b);aC(b);if(aa.releaseCapture){aa.releaseCapture();}cR=false;kJ(hL(bh(b)));return false;}function mG(b){j.ZoomIn();}function jL(b){j.ZoomOut();}function jm(b){b=ap(b);aC(b);lv();kJ(hL(bh(b)));return false;}function hL(cv){cv-=d+cL.offsetWidth+aa.offsetWidth;var aE=bv.offsetWidth-aa.offsetWidth;if(cv<0){cv=0;}else if(cv>aE){cv=aE;}return cv;}function kJ(ar){var aE=bv.offsetWidth-aa.offsetWidth;var cd=1+aj(ar/aE*18);j.SetZoom(cd);}function cC(){var aE=bv.offsetWidth-aa.offsetWidth;var ar=(j.GetZoomLevel()-1)/18*aE;aa.style.left=ar+"px";}this.UpdateFromMap=cC;this.Show=aN;this.Hide=as;}function pH(J){var w=document.createElement("div");var bK=document.createElement("div");var bW=document.createElement("div");w.title="Select the desired zoom level for the image.";w.setAttribute("id","obliqueZoomContainer");bK.setAttribute("id","obliqueZoomSmall");bK.className="obliqueZoomSmallOn";bW.setAttribute("id","obliqueZoomLarge");bW.className="obliqueZoomLargeOff";bK.attachEvent("onclick",kN);bW.attachEvent("onclick",kH);w.appendChild(bK);w.appendChild(bW);J.appendChild(w);function aN(){w.style.display="block";}function as(){w.style.display="none";}function kN(b){j.ZoomOut();bK.className="obliqueZoomSmallOn";bW.className="obliqueZoomLargeOff";}function kH(b){j.ZoomIn();bK.className="obliqueZoomSmallOff";bW.className="obliqueZoomLargeOn";}function bZ(){bK.detachEvent("onclick",kN);bW.detachEvent("onclick",kH);w.removeChild(bK);w.removeChild(bW);bK=null;bW=null;w.parentNode.removeChild(w);w=null;}function cC(){if(j.GetZoomLevel()==1){bK.className="obliqueZoomSmallOn";bW.className="obliqueZoomLargeOff";}else{bK.className="obliqueZoomSmallOff";bW.className="obliqueZoomLargeOn";}}this.Destroy=bZ;this.Show=aN;this.Hide=as;this.UpdateFromMap=cC;}function fV(F,ny,ar){var i=document.createElement("div");i.setAttribute("id",F);i.innerHTML=ny;var fN="obliqueCompassPointOff";var jp=ar;i.onmouseover=eO;i.onmouseout=gy;i.onclick=gO;this.onclick=null;this.onmouseover=null;this.onmouseout=null;var ed=this;var eV=false;var lR=new nM(i,17,17);function eO(b){if(eV){return;}fN=i.className;i.className="obliqueCompassPointHover";if(ed.onmouseover){ed.onmouseover(b);}}function gO(b){if(eV){return;}eO(b);fN="obliqueCompassPointOn";if(ed.onclick){ed.onclick(b);}}function gy(b){if(eV){return;}i.className=fN;if(ed.onmouseout){ed.onmouseout(b);}}function lX(){fN="obliqueCompassPointOn";i.className="obliqueCompassPointOn";}function jr(){fN="obliqueCompassPointOff";i.className="obliqueCompassPointOff";}function pQ(){eV=true;jr();}function lU(){eV=false;lX();}function ox(){return i;}function no(){return jp;}function oN(ar){jp=ar;}function ip(){lR.Reset();lU();}function pr(lY){i.style.left=lY.left;i.style.top=lY.top;}function nM(bJ,qk,qu){var i=bJ;var bX=0;var hh=0.3;var jd=0;var oZ=40;var ms=25;var ha=false;var mT=Math.PI/2;var jY=true;var hi=hh+0.1;function qC(hi,kC,kD){if(kC>=kD-hi&&kC<=kD+hi){return true;}return false;}function lb(){bX+=hh;if(bX>Math.PI*2)bX-=Math.PI*2;else if(bX<0){bX+=Math.PI*2}if(qC(hi,bX,jd)){hh=0.3;bX=jd;lj(bX);ha=false;return;}lj(bX);window.setTimeout(lb,oZ);}function lj(dD){var d=qk+(ms*Math.sin(dD));var f=qu+(ms*Math.cos(dD));i.style.left=d+"px";i.style.top=f+"px";}function mE(dD){if(ha)return;ha=true;jd=dD;lb();}function mW(hs,of){jY=of;if(!jY){hh*=-1;}mE(mT*hs);}function ip(){ha=false;bX=0;}this.RotateTo=mE;this.RotateToIndex=mW;this.Reset=ip;}function bZ(){i.parentNode.removeChild(i);i.onmouseover=null;i.onmouseout=null;i.onclick=null;i=null;}this.GetElement=ox;this.GetCurrentPositionIndex=no;this.SetCurrentPositionIndex=oN;this.SetCurrentPosition=pr;this.On=lX;this.Off=jr;this.RotateToIndex=lR.RotateToIndex;this.Reset=ip;this.Disable=pQ;this.Enable=lU;this.Destroy=bZ;}function pi(w){var gc=new Array();gc.push({"top":"-8px","left":"17px"});gc.push({"top":"17px","left":"42px"});gc.push({"top":"42px","left":"17px"});gc.push({"top":"17px","left":"-8px"});var bj=document.createElement("div");bj.setAttribute("id","obliqueCompassContainer");bj.title="Select the direction you want to look toward.";var aD=new fV("obliqueCompassPointN","N",0);aD.onclick=oD;aD.onmouseover=pL;aD.onmouseout=eZ;var aF=new fV("obliqueCompassPointE","E",1);aF.onclick=qW;aF.onmouseover=ne;aF.onmouseout=eZ;var aG=new fV("obliqueCompassPointS","S",2);aG.onclick=on;aG.onmouseover=oe;aG.onmouseout=eZ;var aH=new fV("obliqueCompassPointW","W",3);aH.onclick=qK;aH.onmouseover=pB;aH.onmouseout=eZ;var fe=document.createElement("div");bj.appendChild(aD.GetElement());bj.appendChild(aF.GetElement());bj.appendChild(aG.GetElement());bj.appendChild(aH.GetElement());bj.appendChild(fe);w.appendChild(bj);cC();function gY(ar){if(ar<0){ar=4-Math.abs(ar);}return ar;}function cP(oy){var ar=oy.GetCurrentPositionIndex();aF.SetCurrentPositionIndex(gY(aF.GetCurrentPositionIndex()-ar));aH.SetCurrentPositionIndex(gY(aH.GetCurrentPositionIndex()-ar));aD.SetCurrentPositionIndex(gY(aD.GetCurrentPositionIndex()-ar));aG.SetCurrentPositionIndex(gY(aG.GetCurrentPositionIndex()-ar));var fk=true;if(ar==3){fk=false;}aD.RotateToIndex(2-aD.GetCurrentPositionIndex()<0?aD.GetCurrentPositionIndex():2-aD.GetCurrentPositionIndex(),fk);aF.RotateToIndex(2-aF.GetCurrentPositionIndex()<0?aF.GetCurrentPositionIndex():2-aF.GetCurrentPositionIndex(),fk);aG.RotateToIndex(2-aG.GetCurrentPositionIndex()<0?aG.GetCurrentPositionIndex():2-aG.GetCurrentPositionIndex(),fk);aH.RotateToIndex(2-aH.GetCurrentPositionIndex()<0?aH.GetCurrentPositionIndex():2-aH.GetCurrentPositionIndex(),fk);}function cp(hs){switch(hs){case 0:eZ();break;case 1:nX();break;case 2:oL();break;case 3:nq();break;}}function eZ(){fe.className="obliqueCompassArrowU";}function oL(){fe.className="obliqueCompassArrowD";}function nX(){fe.className="obliqueCompassArrowR";}function nq(){fe.className="obliqueCompassArrowL";}function on(b){cP(aG);cp(0);var g=j.GetObliqueScene();if(g){var dn=g.GetRotation("South");if(dn){j.SetObliqueOrientation("South");}}}function oD(b){cP(aD);cp(0);var g=j.GetObliqueScene();if(g){var dn=g.GetRotation("North");if(dn){j.SetObliqueOrientation("North");}}}function qW(b){cP(aF);cp(0);var g=j.GetObliqueScene();if(g){var dn=g.GetRotation("East");if(dn){j.SetObliqueOrientation("East");}}}function qK(b){cP(aH);cp(0);var g=j.GetObliqueScene();if(g){var dn=g.GetRotation("West");if(dn){j.SetObliqueOrientation("West");}}}function oe(b){cp(aG.GetCurrentPositionIndex());}function ne(b){cp(aF.GetCurrentPositionIndex());}function pB(b){cp(aH.GetCurrentPositionIndex());}function pL(b){cp(aD.GetCurrentPositionIndex());}function as(){bj.style.display="none";}function aN(){bj.style.display="block";}function cC(){var g=j.GetObliqueScene();if(!g){return;}switch(g.GetOrientation()){case"North":cP(aD);break;case"South":cP(aG);break;case"East":cP(aF);break;case"West":cP(aH);break;}cp(0);if(g.GetRotation("North")){aD.Enable();}else{aD.Disable();}if(g.GetRotation("South")){aG.Enable();}else{aG.Disable();}if(g.GetRotation("East")){aF.Enable();}else{aF.Disable();}if(g.GetRotation("West")){aH.Enable();}else{aH.Disable();}}function bZ(){aD.Destroy();aF.Destroy();aG.Destroy();aH.Destroy();bj.parentNode.removeChild(bj);bj=null;}this.Hide=as;this.Show=aN;this.UpdateFromMap=cC;}};
Msn.VE.DashboardSize=new function(){this.Normal="normal";this.Small="small";this.Tiny="tiny";};
Msn.VE.LatLong=function(A,L){this.latitude=A;this.longitude=L;this.ToString=function(){return"("+this.latitude+", "+this.longitude+")";};this.Copy=function(o){if(!o){return;}this.latitude=o.latitude;this.longitude=o.longitude;};};
Msn.VE.LatLongRectangle=function(iz,hr){this.northwest=iz;this.southeast=hr;this.ToString=function(){return"("+(this.northwest?this.northwest.ToString():"null")+", "+(this.southeast?this.southeast.ToString():"null")+")";};this.Copy=function(bA){if(!bA){return;}if(!this.northwest){this.northwest=new Msn.VE.LatLong();}if(!this.southeast){this.southeast=new Msn.VE.LatLong();}this.northwest.Copy(bA.northwest);this.southeast.Copy(bA.southeast);};this.Center=function(){var eU=Math.sin(this.northwest.latitude*Math.PI/180.0);var eK=Math.sin(this.southeast.latitude*Math.PI/180.0);var rf=0.25*(Math.log((1.0+eU)/(1.0-eU))+Math.log((1.0+eK)/(1.0-eK)));var bU=new Msn.VE.LatLong();bU.latitude=Math.atan(Math.exp(rf))*360.0/Math.PI-90.0;bU.longitude=0.5*(this.northwest.longitude+this.southeast.longitude);return bU;};this.Contains=function(o){return o.latitude<=iz.latitude&&o.longitude>=iz.longitude&&o.latitude>=hr.latitude&&o.longitude<=hr.longitude;};};
Msn.VE.MapStyle=new function(){this.Road="r";this.Aerial="a";this.Hybrid="h";this.Oblique="o";};
Msn.VE.MapView=function(){this.zoomLevel=0;this.mapStyle=null;this.center=new Msn.VE.Pixel();this.latlong=new Msn.VE.LatLong();this.pixelRect=new Msn.VE.PixelRectangle();this.latlongRect=new Msn.VE.LatLongRectangle();this.sceneId=null;this.sceneOrientation=null;var h=this;var bE="pixel";this.Destroy=function(){this.center=this.latlong=h=null;};this.GetViewType=function(){return bE;};function qM(){var ky=new Msn.VE.MapView();ky.Copy(h);return ky;}function np(e){h.zoomLevel=e.zoomLevel;h.mapStyle=e.mapStyle;h.center.Copy(e.center);h.latlong.Copy(e.latlong);h.pixelRect.Copy(e.pixelRect);h.latlongRect.Copy(e.latlongRect);h.sceneId=e.sceneId;h.sceneOrientation=e.sceneOrientation;bE=e.GetViewType();}function mU(e){return e!=null&&h.zoomLevel==e.zoomLevel&&h.mapStyle==e.mapStyle&&aZ(h.center.x-e.center.x)<0.000001&&aZ(h.center.y-e.center.y)<0.000001&&h.sceneId==e.sceneId&&h.sceneOrientation==e.sceneOrientation;}function iQ(){return"("+h.latlong.ToString()+", "+h.zoomLevel+", "+h.mapStyle+")";}function hn(l){if(!l){return;}h.center=l;bE="pixel";}function qy(o){if(!o){return;}h.latlong=o;bE="latlong";}function pG(mS){h.pixelRect=mS;bE="pixelRect";}function rd(nx){h.latlongRect=nx;bE="latlongRect";}function kt(m){if(m<=0){return;}switch(bE){case"pixel":var ab=Math.pow(2,m-h.zoomLevel);h.center.x*=ab;h.center.y*=ab;break;case"pixelRect":var ab=Math.pow(2,m-h.zoomLevel);h.pixelRect.topLeft.x*=ab;h.pixelRect.topLeft.y*=ab;h.pixelRect.bottomRight.x*=ab;h.pixelRect.bottomRight.y*=ab;break;}h.zoomLevel=m;}function cc(Z,bS,il){h.mapStyle=Z;if(bE=="pixel"){bE="latlong";}if(Z!='o'){h.sceneId=null;h.sceneOrientation=null}else{h.sceneId=bS;h.sceneOrientation=il;}}function hK(m){if(m){return h.center.x*Math.pow(2,m-h.zoomLevel);}return h.center.x;}function hJ(m){if(m){return h.center.y*Math.pow(2,m-h.zoomLevel);}return h.center.y;}function oX(m){if(m==undefined){return h.center;}return new Msn.VE.Pixel(h.GetX(m),h.GetY(m));}function rg(bd,q,p){switch(bE){case"pixel":h.latlong=bd.PixelToLatLong(h.center,h.zoomLevel);break;case"latlong":h.center=bd.LatLongToPixel(h.latlong,h.zoomLevel);break;case"pixelRect":hR(bd,q,p);break;case"latlongRect":if(h.mapStyle=="o"){h.zoomLevel=1;var g=bd.GetScene();if(!g.ContainsLatLong(h.latlongRect.northwest)||!g.ContainsLatLong(h.latlongRect.southeast)){h.latlong=h.latlongRect.Center();h.center=bd.LatLongToPixel(h.latlong,h.zoomLevel);}else{h.pixelRect.topLeft=bd.LatLongToPixel(h.latlongRect.northwest,h.zoomLevel);h.pixelRect.bottomRight=bd.LatLongToPixel(h.latlongRect.southeast,h.zoomLevel);hR(bd,q,p);}}else{h.zoomLevel=12;h.pixelRect.topLeft=bd.LatLongToPixel(h.latlongRect.northwest,h.zoomLevel);h.pixelRect.bottomRight=bd.LatLongToPixel(h.latlongRect.southeast,h.zoomLevel);hR(bd,q,p);}break;}bE="pixel";}function hR(bd,q,p){var hS=19;var U=Math.pow(2,hS-h.zoomLevel);var pf=dJ(1,aZ(h.pixelRect.topLeft.x-h.pixelRect.bottomRight.x)*U);var qU=dJ(1,aZ(h.pixelRect.topLeft.y-h.pixelRect.bottomRight.y)*U);var lZ=Math.log(2);var qg=hS-Math.ceil(Math.log(pf/q)/lZ);var pv=hS-Math.ceil(Math.log(qU/p)/lZ);var bf=dX(qg,pv);U=Math.pow(2,bf-h.zoomLevel);h.center.x=0.5*(h.pixelRect.topLeft.x+h.pixelRect.bottomRight.x)*U;h.center.y=0.5*(h.pixelRect.topLeft.y+h.pixelRect.bottomRight.y)*U;h.zoomLevel=bf;h.latlong=bd.PixelToLatLong(h.center,h.zoomLevel);}this.MakeCopy=qM;this.Copy=np;this.Equals=mU;this.ToString=iQ;this.SetCenter=hn;this.SetCenterLatLong=qy;this.SetPixelRectangle=pG;this.SetLatLongRectangle=rd;this.SetZoomLevel=kt;this.SetMapStyle=cc;this.GetX=hK;this.GetY=hJ;this.GetCenter=oX;this.Resolve=rg;this.SetZoomLevel=kt;};
Msn.VE.ObliqueScene=function(F,bF,pZ,ea,nP,nQ,eg,gJ,pW,pU,oo,oI){var M=256;var t=new Msn.VE.Bounds(1,2,0,0,eg/2,gJ/2);function du(l,m){var U=Math.pow(2,m-2);var iI=[[l.x/U],[l.y/U],[1]];var aU=lS(pW,iI);var o=new Msn.VE.LatLong();o.longitude=aU[0][0]/aU[2][0];o.latitude=aU[1][0]/aU[2][0];return o;}function cQ(o,m){var U=Math.pow(2,m-2);var iI=[[o.longitude],[o.latitude],[1]];var aU=lS(pU,iI);var l=new Msn.VE.Pixel();l.x=aU[0][0]/aU[2][0]*U;l.y=aU[1][0]/aU[2][0]*U;return l;}function fy(W,ac,m){if(W<0||ac<0){return false;}if(m==1){return W<(eg/2)&&ac<(gJ/2);}return W=0&&f>=0&&d