var L_invalidinvoketarget_text="Invalid invoke target specified.",L_invaliddirections_text="Invalid argument passed; both start and end must be present.",L_invalidpageindex_text="Invalid search results page index is passed.",L_invalidelement_text="Invalid element id; unable to find the element in the document body.",L_noheadelement_text="Head element is missing for the current document; cannot initialize the API framework.",L_noserviceurl_text="Either a service url or script url is required to create VENetwork instance.",L_noscripturl_text="Invalid script source url is assigned; cannot download the assigned script.",L_nostylesurl_text="Invalid style source url is assigned; cannot attach the assigned styles.",L_invalidwhatwhere_text="Invalid what/where parameters; either 'what' or 'where' must be present.",L_notinitialized_text="Map is not loaded; cannot perform this operation.",L_noroute_text="Cannot calculate route at this point; try again later.",L_invalidpushpin_text="Invalid pushpin instance.",L_invalidpushpinid_text="Invalid pushpin id; either id is empty or another pushpin already exists with that id.",L_invalidpolylineid_text="Invalid polyline id; either id is empty or another polyline already exists with that id.",L_invalidpolygonid_text="Invalid polygon id; either id is empty or another polygon already exists with that id.",L_invalidargument_text="Invalid argument; input argument '%1' is not a valid '%2' value.",L_invalidlayerid_text="Invalid layer id; either id is empty or another layer already exists with that id.",L_invalidlayertype_text="Invalid layer type.",L_invalidlayersource_text="Invalid layer source; either layer is empty or does not exist.",L_invalidsourceid_text="Invalid source id; either id is empty or another tile source already exists with that id.",L_invalidminmaxzoom_text="Min zoom is greater than max zoom.",L_invalidopacity_text="Invalid opacity value.",L_loadxml_text="Unable to load source file.",L_Help_Text="Help",L_ErrorServerBusy_Text="The server is temporarily unavailable. Try again later.",L_error_text="Error",L_close_text="close",L_what_text="What",L_where_text="Where",L_find_text="Find",L_selectlocation_text="Select a location",L_Start_Text="Start",L_End_Text="End",L_DirectionsGetDirections_Text="Get directions",L_loading_text=".. Loading ..",L_arriveat_text="Arrive at",L_startat_text="Start at",L_step_text="Step %1 of %2",L_DirectionsStep_Text="Step",L_invalidroute_Text="Virtual Earth cannot find a route for the locations you entered. Ensure that your start and end locations are correct, and try again.",L_invalidlocation_Text="The location you entered cannot be found.",L_CollectionManagerViewerDefaultTitle_Text="Shared Collection",L_CollectionManagerUnsavedCollectionTitle_Text="Unsaved Collection",L_AnnotationConfDefaultTitle_Text="Untitled item",L_TrafficPopupSeverity_Text="Severity",L_TrafficPopupLocation_Text="Location",L_TrafficPopupDescription_Text="Description",L_TrafficPopupStartTime_Text="Start time",L_TrafficPopupEstEndTime_Text="Est. end time",L_TrafficManagerSerious_Text="Serious",L_TrafficManagerModerate_Text="Moderate",L_TrafficManagerMinor_Text="Minor",L_TrafficManager_Zoomout_Text="Zoom out to view Traffic information",L_TrafficManager_Zoomin_Text="Zoom in to view Traffic information",L_ClientTokenInvalid_Text="Invalid client token.",L_ClientTokenExpired_Text="Expired client token.",L_Shp_IncorrectPoints_Text="The number of points does not match the specified VEShape type.",L_Shp_IncorrectLineWidth_Text="The line width must be a positive integer.",L_Shp_IncorrectZoomLevel_Text="The specified  zoom level is invalid.  The valid range is 1 to 21,inclusive.",L_Shp_IncorrectZoomLevel2_Text="Max zoom is less than min zoom.",L_shp_Notinitialized_text="Shape is not initialized.",L_ShpExist_text="This shape has already been added to layer.",L_invalidzindex_text="Invalid z-Index parameters; either 'icon' or 'polyshape' must be present.",L_altitudemodemismatch_Text="All altitudes must have the same altitudeMode in a VEShape.",L_invalidwhere_text="Invalid argument; input argument 'where' is not a valid 'string, VELatLong, VELatLongRectangle, or VEPlace ' value.",L_invalidnonnegativeint_text="Invalid argument; input argument '%1' must be a non-negative int value.",L_invalidbetweenint_text="Invalid argument; input argument '%1' must be between %2 and %3, inclusive.",L_invalidsearchlocation_Text="%1 could not find a match for the location. Please check your spelling, enter the complete address including country name and commas, and try again.",L_ClusterDefaultTitle_Text="%1 locations near here",L_ClusterDefaultDescription_Text="Zoom in for details.",L_InvalidClusterLayer_Text="Cannot apply clustering to a cluster layer.",L_DashboardBirdsEye_Text="Bird's eye",L_DashboardBirdsEyeText_Text="See this location in bird's eye view",L_Dashboard3DText_Text="See this location in Virtual Earth 3D",L_Dashboard3DInstalled_Text="Virtual Earth 3D has finished updating",L_ObliqueCompassSelectDirection_Text="Change the direction of the view",L_ObliqueModeImageNotAvailable_Text="Sorry, bird's eye images aren't available here.",L_MinimapHybrid_Text="H",L_MinimapRoad_Text="R",L_MinimapHideToolTip_Text="Hide the mini map",L_MinimapShowToolTip_Text="Show the mini map",L_MinimapLargerToolTip_Text="Larger mini map",L_MinimapSmallerToolTip_Text="Smaller mini map",L_MinimapRoadToolTip_Text="Switch to road view",L_MinimapHybridToolTip_Text="Switch to hybrid view",L_MinimapDragToolTip_Text="Drag to move the map",L_MinimapReticuleDragToolTip_Text="Drag to center map",L_ScaleBarMiles_Text="miles",L_ScaleBarKilometers_Text="km",L_ScaleBarMeters_Text="m",L_ScaleBarYards_Text="yds",L_NavActionFlatland_Text="2D",L_NavActionView3D_Text="3D",L_NavActionRoad_Text="Road",L_NavActionAerial_Text="Aerial",L_NavActionHybrid_Text="Hybrid",L_NavActionLabels_Text="Labels",L_NavActionTraffic_Text="Traffic",L_NavActionHideToolTip_Text="Hide the view control",L_NavActionShowToolTip_Text="Show the view control",L_NavActionFlatlandToolTip_Text="View map in 2D mode",L_NavActionView3DToolTip_Text="View map in 3D mode with Virtual Earth 3D (Beta)",L_NavActionOrthoToolTip_Text="Switch to map view",L_NavActionObliqueToolTip_Text="Switch to bird's eye view",L_NavActionStreetSideToolTip_Text="Street-level view",L_NavAction3DOrthoToolTip_Text="Look down",L_NavAction3DObliqueToolTip_Text="Look down at an angle",L_NavAction3DStreetSideToolTip_Text="Look toward horizon",L_NavActionShowTrafficToolTip_Text="Show traffic on the map",L_NavActionHideTrafficToolTip_Text="Hide traffic on the map",L_NavActionRoadToolTip_Text="Switch to road view",L_NavActionAerialToolTip_Text="Switch to aerial view",L_NavActionHybridToolTip_Text="Switch to hybrid view",L_NavActionObliqueRotationToolTip_CW_Text="Rotate the camera angle counterclockwise",L_NavActionObliqueRotationToolTip_CCW_Text="Rotate the camera angle clockwise",L_NavActionShowObliqueToolTip_Text="Show bird's eye images on the map",L_NavActionHideObliqueToolTip_Text="Hide bird's eye images on the map",L_NavActionShowLabels_Text="Show labels",L_NavActionHideLabels_Text="Hide labels",L_North_Text="north",L_East_Text="east",L_South_Text="south",L_West_Text="west",L_ObliqueSkippingOneDirection_Text="A bird's eye image facing %2 isn't available for this location. Facing %1 instead.",L_ObliqueSkippingTwoDirections_Text="Bird's eye images facing %2 or %3 aren't available for this location. Facing %1 instead.",L_ObliqueSpinNoOtherImagery_Text="No other bird's eye images are available for this location. Continuing to face %1.",L_ObliqueNoImageryInRequestedDirection_Text="Bird's eye images facing %2 aren't available for this location. Continuing to face %1.",L_NavActionCompassPan_Text="Pan in any direction",L_ZoomBarMinusToolTip_Text="Zoom out. To zoom continuously, click and hold this button.",L_ZoomBarPlusToolTip_Text="Zoom in. To zoom continuously, click and hold this button.",L_ZoomBarSliderToolTip_Text="Move slider to zoom in or zoom out",L_BrowserNotSupported_Text="To use this feature, open Live Search in Windows Internet Explorer version 6 or 7. For more information, and to download the latest version, visit the Microsoft Internet Explorer website (%1%3%2).",L_BrowserNotSupported3D_Text="Virtual Earth 3D is currently not supported for your browser. For a list of supported browsers, see Help.",L_NoHardwareAcceleration_Text="Virtual Earth 3D has detected that hardware acceleration is turned off.",L_3DLoading_Text="Initializing Virtual Earth 3D (Beta).",L_UnableToDisplay3DVIAModel_Text="Unable to display 3D models in collections at this time. Please try again later.",L_InstallVE3DVIATitle_Text="Virtual Earth - 3DVIA (Beta) installation",L_LaunchVE3DVIA_Text="Launching Virtual Earth - 3DVIA (Beta)",L_PluginFeatureNotAvailable_Text="Feature is currently not available. Please try again later.",L_MapLegendTrafficSlow_Text="Slow",L_MapLegendTrafficFast_Text="Fast",L_GeoRssInvalidFormatError_Text="The GeoRSS file you have tried to import is improperly formatted.",L_MapCopyrightMicrosoft="&copy; 2008 Microsoft Corporation",L_MapCopyrightTraffic="Traffic.com",L_MapControlPlatformName_Text="Virtual Earth",L_SupportedBrowserDownloadUrl_Text="http://www.microsoft.com/windows/ie/downloads/default.mspx";_VERegisterNamespaces("MapControl");MapControl.Features={PlatformName:L_MapControlPlatformName_Text,Image:{PoweredLogo:"logo_powered_by.png"},MapStyle:{Road:true,Shaded:true,Aerial:true,Hybrid:true,BirdsEye:true,View3D:true},BirdsEyeAtZoomLevel:10,ScaleBarKilometers:false,Traffic:{Flow:{Slow:"0-25 mph",Moderate:"25-45 mph",Fast:"45+ mph"}},Minimap:{ShowByDefault:false}};function _VERegisterNamespaces(){for(var d=0;d<arguments.length;d++){var b=arguments[d].split("."),c=window;for(var a=0;a<b.length;a++){if(!c[b[a]])c[b[a]]={};c=c[b[a]]}}}_VERegisterNamespaces("Msn.MVC");Msn.MVC.AbstractView=function(){this._contextPin=null};Msn.MVC.AbstractView.prototype.OnBeforeSwitchAway=function(){};Msn.MVC.AbstractView.prototype.ShowShimIfSupported=function(){};Msn.MVC.AbstractView.prototype.UpdateShimIfSupported=function(){};_VERegisterNamespaces("Msn.MVC");Msn.MVC.FlatlandView=function(){this._superObj=Msn.MVC.FlatlandView.prototype;this._mapDrawingView=null};Msn.MVC.FlatlandView.prototype=new Msn.MVC.AbstractView;Msn.MVC.FlatlandView.prototype.OnBeforeSwitchAway=function(){if(window.__drawingLoaded){this._ClearAllCollectionLayers();VE_MapDispatch.Clear()}};_VERegisterNamespaces("Msn.MVC");Msn.MVC.View3D=function(){this._superObj=Msn.MVC.View3D.prototype;this._hackUniqueLayerId="UniqueLayer_Hack";this._entityIdShapePostfix="_Shape";this._spacecontrol=null};Msn.MVC.View3D.prototype=new Msn.MVC.AbstractView;Msn.MVC.View3D.prototype.OnBeforeSwitchAway=function(){this._SetView3DControl(null)};Msn.MVC.View3D.prototype._SetView3DControl=function(a){this._spacecontrol=a};Msn.MVC.View3D.prototype.ShowShimIfSupported=function(b,a){ShowShim(b,a)};Msn.MVC.View3D.prototype.UpdateShimIfSupported=function(b,a){UpdateIFrameShim(b,a)};_VERegisterNamespaces("Msn.MVC");Msn.MVC.ViewFacade=function(){this._mvcFlatlandView=null;this._mvcView3D=null;this._curMvcView=null};Msn.MVC.ViewFacade.prototype.OnSwitchToFlatlandView=function(){if(this._mvcFlatlandView==null)this._mvcFlatlandView=new Msn.MVC.FlatlandView;if(this._curMvcView==this._mvcFlatlandView)return;if(this._curMvcView!=null)this._curMvcView.OnBeforeSwitchAway();this._curMvcView=this._mvcFlatlandView;if(window.__drawingLoaded)this._curMvcView.OnAllCollectionLayersRepaint()};Msn.MVC.ViewFacade.prototype.OnSwitchToView3D=function(a){if(this._mvcView3D==null)this._mvcView3D=new Msn.MVC.View3D;this._mvcView3D._SetView3DControl(a);if(this._curMvcView==this._mvcView3D)return;if(this._curMvcView!=null)this._curMvcView.OnBeforeSwitchAway();this._curMvcView=this._mvcView3D;if(window.__drawingLoaded)this._curMvcView.OnAllCollectionLayersRepaint()};Msn.MVC.ViewFacade.prototype.ShowShimIfSupported=function(b,a){if(this._curMvcView==null)return;return this._curMvcView.ShowShimIfSupported(b,a)};Msn.MVC.ViewFacade.prototype.UpdateShimIfSupported=function(b,a){if(this._curMvcView==null)return;return this._curMvcView.UpdateShimIfSupported(b,a)};var mvcViewFacade=new Msn.MVC.ViewFacade,windowWidth=0,windowHeight=0,scrollbarWidth=null;function $ID(a){var b=document;return b.getElementById(a)}function $CE(a){var b=document;return b.createElement(a)}function $CENS(a){var b=document;return b.createElementNS(a)}function GetWindowWidth(){var a=0;if(typeof window.innerWidth=="number")a=window.innerWidth;else if(document.documentElement&&document.documentElement.clientWidth)a=document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth)a=document.body.clientWidth;if(!a||a<100)a=100;return a}function GetWindowHeight(){var a=0;if(typeof window.innerHeight=="number")a=window.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)a=document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)a=document.body.clientHeight;if(!a||a<100)a=100;return a}function GetScrollbarWidth(){if(scrollbarWidth)return scrollbarWidth;if(navigator.userAgent.indexOf("IE")>=0){var a=document.createElement("div"),b=null;a.style.visible="hidden";a.style.overflowY="scroll";a.style.position="absolute";a.style.width=0;document.body.insertAdjacentElement("afterBegin",a);b=a.offsetWidth;a.parentNode.removeChild(a);if(!b)b=16;scrollbarWidth=b;return b}else return 0}function GetUrlPrefix(){var a=window.location.pathname.lastIndexOf("/"),b=window.location.protocol+"//"+window.location.hostname+window.location.pathname.substring(0,a+1);return b}function GetUrlParameterString(){var a=window.location.search;if(a.length==0||a.indexOf("?")==-1)return "";return a.substr(a.indexOf("?")+1)}function CheckWipExistence(){var a=GetUrlParameterString();if(a!=""&&a.indexOf("wip=")>-1)return true;return false}function GetUrlParameters(){var b=[],d=GetUrlParameterString();if(!d)return b;var e=d.split("&");for(var c=0;c<e.length;c++){var a=e[c].split("=");if(a.length==2&&a[0]&&a[1]){b.push(unescape(a[0]));b.push(unescape(a[1]))}}return b}function ParseShiftKeyForLinks(a){if(a.shiftKey)return false;return true}function GetEvent(a){return a?a:window.event}function CancelEvent(a){a.cancelBubble=true;a.returnValue=false}function IgnoreEvent(a){a=GetEvent(a);CancelEvent(a);return false}function GetMouseScrollDelta(a){if(a.wheelDelta)return a.wheelDelta;else if(a.detail)return -a.detail;return 0}function IsLeftMouseButton(a){var b=Msn.VE.Environment.BrowserInfo;if(b.Type==Msn.VE.BrowserType.MSIE)return a.button==1||a.button==3||a.type=="click";else if(b.Type==Msn.VE.BrowserType.Firefox)return a.which==1;else return false}function IsRightMouseButton(a){var b=Msn.VE.Environment.BrowserInfo;if(b.Type==Msn.VE.BrowserType.MSIE)return a.button==2||a.button==3||a.type=="contextmenu";else if(b.Type==Msn.VE.BrowserType.Firefox)return a.which==3;else return false}function IsMiddleMouseButton(b){var a=Msn.VE.Environment.BrowserInfo;if(a.Type==Msn.VE.BrowserType.MSIE)return b.button==4;else if(a.Type==Msn.VE.BrowserType.Firefox)return b.which==2;else return false}_VERegisterNamespaces("Msn.VE");Msn.VE.DistanceUnit={Kilometers:"km",Miles:"mi"};Msn.VE.DistanceUnit.IsValidType=function(a){if(typeof a=="string")if(a==Msn.VE.DistanceUnit.Miles||a==Msn.VE.DistanceUnit.Kilometers)return true;return false};function VEException(b,c,a){this.source=b;this.name=c;this.message=a}VEException.prototype.Name=this.name;VEException.prototype.Source=this.source;VEException.prototype.Message=this.message;function MathFloor(a){return Math.floor(a)}function MathCeil(a){return Math.ceil(a)}function MathMax(a,b){return Math.max(a,b)}function MathMin(a,b){return Math.min(a,b)}function MathAbs(a){return Math.abs(a)}function MathRound(a){return Math.round(a)}function DegToRad(a){return a*Math.PI/180}function RadToDeg(a){return a*180/Math.PI}function MatrixMultiply(e,b){if(!e||!b||e[0].length!=b.length)return;var g=e.length,h=b[0].length,d=new Array(g),i=b.length;for(var a=0;a<g;a++){d[a]=new Array(h);for(var c=0;c<h;c++){d[a][c]=0;for(var f=0;f<i;f++)d[a][c]+=e[a][f]*b[f][c]}}return d}function VEParameter(b,a){this.Name=b;this.Value=a}VEParameter.prototype.Name=this.name;VEParameter.prototype.Value=this.value;function VENetwork(c,a,b){if(c!=null&&c!="undefined")this.ServiceUrl=c;this.UseCloseDep=false;if(a!=null&&a!="undefined")Msn.VE.API.Globals.veonbegininvokeevent=a;if(b!=null&&b!="undefined")Msn.VE.API.Globals.veonendinvokeevent=b}function BeginInvoke(f,d,h,g,j){if(this.ServiceUrl==null||this.ServiceUrl=="undefined"||this.ServiceUrl.length==0)throw new VEException("VENetwork:BeginInvoke","err_noserviceurl",L_noserviceurl_text);if(Msn.VE.API&&Msn.VE.API.Globals.veonbegininvokeevent)Msn.VE.API.Globals.veonbegininvokeevent();var c=j;if(!c)c=VENetwork.GetExecutionID();if(d){var b=this.ServiceUrl+"?";for(var e=0;e<d.length;e++){b=b+d[e].Name;b=b+"=";b=b+d[e].Value;b=b+"&"}}else var b=this.ServiceUrl;var a=document.createElement("script");a.type="text/javascript";a.language="javascript";a.id=c;a.src=b;if(this.UseCloseDep==true){var i=openDependency("BEGIN_INVOKE::"+c,function(){EndInvoke(g,h,f,a,c)},c);if(i)VENetwork.GetAttachTarget().appendChild(a)}else{if(navigator.userAgent.indexOf("IE")>=0)a.onreadystatechange=function(){if(a&&("loaded"==a.readyState||"complete"==a.readyState)){a.onreadystatechange=null;EndInvoke(g,h,f,a,c)}};else a.onload=function(){a.onload=null;EndInvoke(g,h,f,a,c)};VENetwork.GetAttachTarget().appendChild(a)}}function EndInvoke(endInvokeTarget,fnCallback,endInvokeMethod,elScript,executionId){var objects=null;if(endInvokeMethod)eval("if(typeof "+endInvokeMethod+" == 'function') {objects = "+endInvokeMethod+"();}");setTimeout(function(){if(elScript.parentNode)elScript.parentNode.removeChild(elScript);elScript=null},100);if(fnCallback!=null&&fnCallback!="undefined")fnCallback(objects,endInvokeTarget);if(Msn.VE.API&&Msn.VE.API.Globals.veonendinvokeevent)Msn.VE.API.Globals.veonendinvokeevent()}VENetwork.GetExecutionID=function(){var a=new Date,b=Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds());b+=Math.round(Math.random()*1000000);return b};function GetXmlHttp(){var a=null;if(window.XMLHttpRequest)a=new XMLHttpRequest;else if(window.ActiveXObject)try{a=new ActiveXObject("Msxml2.XmlHttp.6.0")}catch(b){try{a=new ActiveXObject("Msxml2.XmlHttp.3.0")}catch(c){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(d){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}}}else throw"XMLHTTP Required: Browser not supported";return a}VENetwork.AttachStyleSheetCallback=function(a){if(a)a()};VENetwork.AttachStyleSheet=function(a,b,d,c){if(a==null||a=="undefined"||a.length==0)throw new VEException("VENetwork:AttachStylesheet","err_nostylesurl","");elStyle=document.createElement("link");if(d==true)elStyle.rel="alternate stylesheet";else elStyle.rel="stylesheet";if(c)elStyle.media=c;elStyle.type="text/css";elStyle.rev="stylesheet";elStyle.id=VENetwork.GetExecutionID();elStyle.href=a;VENetwork.GetAttachTarget().appendChild(elStyle);if(navigator.userAgent.indexOf("IE")>=0)elStyle.onreadystatechange=function(){if(elStyle&&("loaded"==elStyle.readyState||"complete"==elStyle.readyState)){elStyle.onreadystatechange=null;VENetwork.AttachStyleSheetCallback(b)}};else VENetwork.AttachStyleSheetCallback(b);return};VENetwork.DownloadScriptCallback=function(a,b){if(a)a(b)};VENetwork.DownloadScript=function(b,c,d){if(b==null||b=="undefined"||b.length==0)throw new VEException("VENetwork:DownloadScript","err_noscripturl",L_noscripturl_text);var a=document.createElement("script");a.type="text/javascript";a.language="javascript";a.id=VENetwork.GetExecutionID();a.src=b;if(navigator.userAgent.indexOf("IE")>=0)a.onreadystatechange=function(){if(a&&("loaded"==a.readyState||"complete"==a.readyState)){a.onreadystatechange=null;VENetwork.DownloadScriptCallback(c,d)}};else a.onload=function(){a.onload=null;VENetwork.DownloadScriptCallback(c,d)};VENetwork.GetAttachTarget().appendChild(a);return a.id};VENetwork.DownloadXml=function(e,c,b,d){var a=GetXmlHttp();a.open(c,e,true);a.onreadystatechange=function(){if(a.readyState==4){if(b)b(a.responseXML,d);a=null}};a.send(null)};VENetwork.GetAttachTarget=function(){if(document.getElementsByTagName("head")[0]!=null)return document.getElementsByTagName("head")[0];else throw new VEException("VENetwork:cstr","err_noheadelement",L_noheadelement_text)};VENetwork.prototype.BeginInvoke=BeginInvoke;VENetwork.prototype.EndInvoke=EndInvoke;function JSONConstant(){}JSONConstant.culture="culture";JSONConstant.format="format";JSONConstant.json="json";JSONConstant.requestid="rid";function JSONRequestInvoke(f,a,e){var c=new VENetwork,b=VENetwork.GetExecutionID();c.UseCloseDep=true;c.ServiceUrl=f;if(!a)a=[];var d=Msn.VE.API?Msn.VE.API.Globals.locale:window.serviceLocale;a.push(new VEParameter(JSONConstant.culture,'"'+d+'"'));a.push(new VEParameter(JSONConstant.format,JSONConstant.json));a.push(new VEParameter(JSONConstant.requestid,b));c.BeginInvoke("_f"+b,a,e,null,b)}_VERegisterNamespaces("Msn.Drawing");var MC_PointID=10000,MC_PolylineID=30000,MC_PolygonID=50000,MC_SYMBOL_IID=70000,MC_TEXT_IID=90000,MC_ENTITY_IID=200000,MC_COL_IID=1000,MC_GEO_TYPE_SYMBOL="Symbol",MC_GEO_TYPE_POINT="Point",MC_GEO_TYPE_POLYLINE="Polyline",MC_GEO_TYPE_POLYGON="Polygon",MC_GEO_TYPE_TEXT="Text",MC_GEO_TYPE_COL="Collection",MC_GEO_TYPE_ENTITY="Entity",VEShapeType={Pushpin:"Point",Polyline:"Polyline",Polygon:"Polygon"},VEMapserviceType={None:"None",MapCruncher:"MapCruncher",KML:"KML",WMS:"WMS"},VEMapserviceTypeList=[VEMapserviceType.None,VEMapserviceType.MapCruncher,VEMapserviceType.KML,VEMapserviceType.WMS];VEMapserviceTypeIndex=function(c){var b=-1;if(VEMapserviceTypeList!=null)for(var a=0;a<VEMapserviceTypeList.length;a++)if(c==VEMapserviceTypeList[a]){b=a;break}return b};IsValidMapserviceType=function(a){return a!=null&&typeof a!="undefined"&&a!=""&&VEMapserviceTypeIndex(a)!=-1};IsValidMapserviceSource=function(a){return a!=null&&typeof a!="undefined"&&a!=""};IsValidMapserviceMetadata=function(a){return a!=null&&typeof a!="undefined"&&a!=""};IsValidMapserviceOpacity=function(a){return a!=null&&typeof a!="undefined"&&a>=0&&a<=1};Msn.Drawing.GetGeoUID=function(b){var a="";switch(b){case VEShapeType.Polygon:a=MC_PolygonID++;break;case VEShapeType.Pushpin:a=MC_PointID++;break;case VEShapeType.Polyline:a=MC_PolylineID++;break;case MC_GEO_TYPE_SYMBOL:a=MC_SYMBOL_IID++;break;case MC_GEO_TYPE_TEXT:a=MC_TEXT_IID++;break;case MC_GEO_TYPE_COL:a=MC_COL_IID++;break;case MC_GEO_TYPE_ENTITY:a=MC_ENTITY_IID++}return a.toString()};Msn.Drawing.Exception=function(a){this.message=a;this.name="Msn.Drawing.Exception"};Msn.Drawing.Exception.prototype.toString=function(){return this.name+": "+this.message};Msn.Drawing.Point=function(a,b){this.id=0;this.points=[];this.points.push(a);this.points.push(b);this.iid=Msn.Drawing.GetGeoUID(VEShapeType.Pushpin)};Msn.Drawing.Point.prototype.altitudes=null;Msn.Drawing.Point.prototype.altitudeMode="Ground";Msn.Drawing.Point.prototype.type=VEShapeType.Pushpin;Msn.Drawing.Point.prototype.name=null;Msn.Drawing.Point.prototype.symbol=null;Msn.Drawing.Point.prototype.isLabel=true;Msn.Drawing.Point.prototype.isOnLegend=false;Msn.Drawing.Point.prototype.Destroy=function(){this.symbol=null;this.points=null;this.altitudes=null;this.altitudeMode=null};Msn.Drawing.Point.prototype.toString=function(){return this.points[0]+","+this.points[1]};Msn.Drawing.PolyLine=function(a){this.id=0;this.iid=Msn.Drawing.GetGeoUID(VEShapeType.Polyline);this.points=a?a:[];this.minX=null;this.minY=null;this.maxX=null;this.maxY=null;this.length=-1};Msn.Drawing.PolyLine.prototype.toString=function(){if(this.points!=null)return this.points.join(" ");else return ""};Msn.Drawing.PolyLine.prototype.altitudes=null;Msn.Drawing.PolyLine.prototype.altitudeMode="Ground";Msn.Drawing.PolyLine.prototype.extruded=false;Msn.Drawing.PolyLine.prototype.minZ=null;Msn.Drawing.PolyLine.prototype.maxZ=null;Msn.Drawing.PolyLine.prototype.minX=null;Msn.Drawing.PolyLine.prototype.minY=null;Msn.Drawing.PolyLine.prototype.maxX=null;Msn.Drawing.PolyLine.prototype.maxY=null;Msn.Drawing.PolyLine.prototype.iid=Msn.Drawing.GetGeoUID(VEShapeType.Polyline);Msn.Drawing.PolyLine.prototype.labelPosX=null;Msn.Drawing.PolyLine.prototype.labelPosY=null;Msn.Drawing.PolyLine.prototype.labelPosZ=null;Msn.Drawing.PolyLine.prototype.name=null;Msn.Drawing.PolyLine.prototype.type=VEShapeType.Polyline;Msn.Drawing.PolyLine.prototype.symbol=null;Msn.Drawing.PolyLine.prototype.isLabel=true;Msn.Drawing.PolyLine.prototype.isOnLegend=false;Msn.Drawing.PolyLine.prototype.Destroy=function(){this.symbol=null;this.points=null;this.altitudes=null;this.altitudeMode=null;this.extruded=null;this.minX=null;this.minY=null;this.maxX=null;this.maxY=null;this.minZ=null;this.maxZ=null};Msn.Drawing.PolyLine.prototype.GetLength=function(){if(this.length<0)this.length=CalculateShapeLengthP(this.points);return this.length};Msn.Drawing.PolyLine.prototype.SetLength=function(a){this.length=a};Msn.Drawing.Polygon=function(a){this.id=0;this.iid=Msn.Drawing.GetGeoUID(VEShapeType.Polygon);this.points=a;this.length=-1;this.area=-1;this.minX=null;this.minY=null;this.maxX=null;this.maxY=null};Msn.Drawing.Polygon.prototype.altitudes=null;Msn.Drawing.Polygon.prototype.altitudeMode="Ground";Msn.Drawing.Polygon.prototype.extruded=false;Msn.Drawing.Polygon.prototype.minZ=null;Msn.Drawing.Polygon.prototype.maxZ=null;Msn.Drawing.Polygon.prototype.labelPosX=null;Msn.Drawing.Polygon.prototype.labelPosY=null;Msn.Drawing.Polygon.prototype.labelPosZ=null;Msn.Drawing.Polygon.prototype.symbol=null;Msn.Drawing.Polygon.prototype.isLabel=true;Msn.Drawing.Polygon.prototype.isOnLegend=false;Msn.Drawing.Polygon.prototype.type=VEShapeType.Polygon;Msn.Drawing.Polygon.prototype.name=null;Msn.Drawing.Polygon.prototype.Destroy=function(){this.symbol=null;this.points=null;this.altitudes=null;this.altitudeMode=null;this.extruded=null;this.minX=null;this.minY=null;this.maxX=null;this.maxY=null;this.minZ=null;this.maxZ=null};Msn.Drawing.Polygon.prototype.GetLength=function(){if(this.length<0)this.length=CalculateShapeLength(this);return this.length};Msn.Drawing.Polygon.prototype.SetLength=function(a){this.length=a};Msn.Drawing.Polygon.prototype.GetArea=function(){if(this.area<0)this.area=CalculateAreaP(this.points);if(this.area<0)this.area=CalculateAreaP(this.points,false);return this.area};Msn.Drawing.Polygon.prototype.SetArea=function(a){this.area=a};Msn.Drawing.Stroke=function(){this.width=1;this.linecap="round";this.opacity=1;this.linejoin="miter";this.color=new Msn.Drawing.Color(255,255,255,1);this.fillcolor=new Msn.Drawing.Color(0,255,0,1)};Msn.Drawing.Color=function(d,c,b,a){this.R=d?d:0;this.G=c?c:0;this.B=b?b:0;this.A=a?a:0;this.ToHexString=function(){return VEColorToHexString(this.R,this.G,this.B)}};VEShapeStyle=function(){this.iid=Msn.Drawing.GetGeoUID(MC_GEO_TYPE_SYMBOL);this.id=this.iid};VEShapeStyle.prototype.point_type="v:rect";VEShapeStyle.prototype.name="symbol";VEShapeStyle.prototype.highlight_stroke_color="#336666";VEShapeStyle.prototype.highlight_fill_color="#FFCC33";VEShapeStyle.prototype.shape_drawtype="v:shape";VEShapeStyle.prototype.shape_fill="false";VEShapeStyle.prototype.shape_filled="false";VEShapeStyle.prototype.shape_unselectable="off";VEShapeStyle.prototype.style_zIndex=60;VEShapeStyle.prototype.style_zIndex_polyshape=50;VEShapeStyle.prototype.style_position="absolute";VEShapeStyle.prototype.style_filter="alpha(opacity=30)";VEShapeStyle.prototype.style_width="10";VEShapeStyle.prototype.style_height="10";VEShapeStyle.prototype.style_visibility="visible";VEShapeStyle.prototype.style_display="block";VEShapeStyle.prototype.stroke_drawtype="v:stroke";VEShapeStyle.prototype.stroke_on="true";VEShapeStyle.prototype.stroke_joinstyle="miter";VEShapeStyle.prototype.stroke_endcap="round";VEShapeStyle.prototype.stroke_opacity="1";VEShapeStyle.prototype.stroke_color="#0000FF";VEShapeStyle.prototype.stroke_weight="2pt";VEShapeStyle.prototype.stroke_style="Single";VEShapeStyle.prototype.stroke_filltype="solid";VEShapeStyle.prototype.stroke_color2="#FF0000";VEShapeStyle.prototype.stroke_dashstyle="Solid";VEShapeStyle.prototype.stroke_startarrow="none";VEShapeStyle.prototype.stroke_startarrowwidth="medium";VEShapeStyle.prototype.stroke_startarrowlength="medium";VEShapeStyle.prototype.stroke_endarrow="none";VEShapeStyle.prototype.stroke_endarrowwidth="medium";VEShapeStyle.prototype.stroke_endarrowlength="medium";VEShapeStyle.prototype.fill_drawtype="v:fill";VEShapeStyle.prototype.fill_color="#008000";VEShapeStyle.prototype.fill_colors="30% yellow";VEShapeStyle.prototype.fill_color2="#0000FF";VEShapeStyle.prototype.fill_type="solid";VEShapeStyle.prototype.fill_opacity="0.3";VEShapeStyle.prototype.fill_on="false";VEShapeStyle.prototype.textbox_drawtype="v:textbox";VEShapeStyle.prototype.textbox_text="name";VEShapeStyle.prototype.textbox_color="#FFFFFF";VEShapeStyle.prototype.textbox_bold=false;VEShapeStyle.prototype.textbox_italic=false;VEShapeStyle.prototype.textbox_underscore=false;VEShapeStyle.prototype.textbox_font="Arial";VEShapeStyle.prototype.textbox_size=7;VEShapeStyle.prototype.imagedata_on=false;VEShapeStyle.prototype.imagedata_src=null;VEShapeStyle.prototype.isOn=false;VEShapeStyle.prototype.textbox_OffsetX=0;VEShapeStyle.prototype.textbox_OffsetY=0;VEShapeStyle.prototype.textbox_backcolor="#0000FF";VEShapeStyle.textbox_color_opacity="1";VEShapeStyle.textbox_backcolor_opacity="1";VEShapeStyle.prototype.img_offsetX=0;VEShapeStyle.prototype.img_offsetY=0;VEShapeStyle.prototype.img_width=22;VEShapeStyle.prototype.img_height=22;VEShapeStyle.prototype.Clone=function(){var a=new VEShapeStyle;a.point_type=this.point_type;a.name=this.name;a.line_color=this.line_color;a.line_width=this.line_width;a.line_dasharray=this.line_dasharray;a.highlight_stroke_color=this.highlight_stroke_color;a.highlight_fill_color=this.highlight_fill_color;a.shape_drawtype=this.shape_drawtype;a.shape_fill=this.shape_fill;a.shape_filled=this.shape_filled;a.shape_unselectable=this.shape_unselectable;a.style_zIndex=this.style_zIndex;a.style_zIndex_polyshape=this.style_zIndex_polyshape;a.style_position=this.style_position;a.style_filter=this.style_filter;a.style_width=this.style_width;a.style_height=this.style_height;a.style_visibility=this.style_visibility;a.style_display=this.style_display;a.stroke_drawtype=this.stroke_drawtype;a.stroke_on=this.stroke_on;a.stroke_joinstyle=this.stroke_joinstyle;a.stroke_endcap=this.stroke_endcap;a.stroke_opacity=this.stroke_opacity;a.stroke_color=this.stroke_color;a.stroke_weight=this.stroke_weight;a.stroke_style=this.stroke_style;a.stroke_filltype=this.stroke_filltype;a.stroke_color2=this.stroke_color2;a.stroke_dashstyle=this.stroke_dashstyle;a.stroke_startarrow=this.stroke_startarrow;a.stroke_startarrowwidth=this.stroke_startarrowwidth;a.stroke_startarrowlength=this.stroke_startarrowlength;a.stroke_endarrow=this.stroke_endarrow;a.stroke_endarrowwidth=this.stroke_endarrowwidth;a.stroke_endarrowlength=this.stroke_endarrowlength;a.fill_drawtype=this.fill_drawtype;a.fill_color=this.fill_color;a.fill_colors=this.fill_colors;a.fill_color2=this.fill_color2;a.fill_type=this.fill_type;a.fill_opacity=this.fill_opacity;a.fill_on=this.fill_on;a.textbox_drawtype=this.textbox_drawtype;a.textbox_text=this.textbox_text;a.textbox_color=this.textbox_color;a.textbox_bold=this.textbox_bold;a.textbox_italic=this.textbox_italic;a.textbox_underscore=this.textbox_underscore;a.textbox_backcolor=this.textbox_backcolor;a.imagedata_on=this.imagedata_on;a.imagedata_src=this.imagedata_src;a.isOn=this.isOn;a.textbox_OffsetX=this.textbox_OffsetX;a.textbox_OffsetY=this.textbox_OffsetY;a.img_offsetX=this.img_offsetX;a.img_offsetY=this.img_offsetY;a.img_width=this.img_width;a.img_height=this.img_height;return a};function VE_MapLineClip(){var b=-360,c=360,d=-180,e=180,a={LEFT:1,RIGHT:2,BOTTOM:4,TOP:8};function h(i,s,u,t,v){b=s;c=t;d=u;e=v;if(typeof i=="undefined"||i==null||i.length<4)return null;var m=false,o=i.length;if(i[o-2]==i[0]&&i[o-1]==i[1])m=true;var f=[];for(var l=0;l<i.length;l++)f.push(i[l]);var k=a.LEFT;while(k<=8){var q=f[f.length-2],r=f[f.length-1];f.push(q);f.push(r);var h=[],p=f.length;for(var j=0;j<p-2;j=j+2)g(h,k,f[j],f[j+1],f[j+2],f[j+3]);if(m){var n=h.length;if(h[n-2]!=h[0]||h[n-1]!=h[1]){h.push(h[0]);h.push(h[1])}}f=null;k=k*2;f=h}return f}function g(g,j,h,i,k,l){var n=f(h,i),o=f(k,l);if((j&n)==0&&(j&o)==0){g.push(h);g.push(i)}else if((j&n)==0||(j&o)==0){var m=(j&n)==0?true:false;if(j==a.LEFT){var q=i+(l-i)*(b-h)/(k-h);if(m){g.push(h);g.push(i)}g.push(b);g.push(q)}else if(j==a.RIGHT){var q=i+(l-i)*(c-h)/(k-h);if(m){g.push(h);g.push(i)}g.push(c);g.push(q)}else if(j==a.TOP){var p=h+(k-h)*(e-i)/(l-i);if(m){g.push(h);g.push(i)}g.push(p);g.push(e)}else if(j==a.BOTTOM){var p=h+(k-h)*(d-i)/(l-i);if(m){g.push(h);g.push(i)}g.push(p);g.push(d)}};}function f(g,h){var f=0;if(g<b)f=f|a.LEFT;else if(g>c)f=f|a.RIGHT;if(h<d)f=f|a.BOTTOM;else if(h>e)f=f|a.TOP;return f}this.Clip=h}VE_LineClip=new VE_MapLineClip;var L_GraphicsInitError_Text="Your Web browser does not support SVG or VML. Some graphics features may not function properly.";_VERegisterNamespaces("Msn.Drawing");Msn.Drawing.Graphic=function(){};Msn.Drawing.Graphic.CreateGraphic=function(e,b){if(document.all)return new Msn.Drawing.VMLGraphic(e,b);else{if(navigator.userAgent.indexOf("KHTML")!==-1||Gimme.Browser.isOpera)return new Msn.Drawing.SVGGraphic(e,b);var c=0,f=0,g=new RegExp("Firefox/(.*)"),d=g.exec(navigator.userAgent);if(d&&d.length>=2){var a=d[1].split(".");if(a){c=a[0];f=a[1];if(parseInt(c)>0&&parseInt(f)>=5||parseInt(c)>=2)return new Msn.Drawing.SVGGraphic(e,b)}}throw new Msn.Drawing.Exception(L_GraphicsInitError_Text)}};Msn.Drawing.BaseGraphic=function(){this._stroke=new Msn.Drawing.Stroke};Msn.Drawing.BaseGraphic.prototype.CreatePrimitive=function(){};Msn.Drawing.BaseGraphic.prototype.DrawPrimitive=function(d,c,a){var b=new VEShapeStyle;if(a._stroke){b.stroke_weight=a._stroke.width;b.stroke_joinstyle=a._stroke.linejoin;b.stroke_color=a._stroke.color.ToHexString();b.stroke_dashstyle=a._stroke.linecap;b.stroke_opacity=a._stroke.color.A.toString();b.fill_color=a._stroke.fillcolor.ToHexString();b.fill_opacity=a._stroke.fillcolor.A.toString()}c.symbol=b;var e=a.CreatePrimitive(d,c,"");return e};Msn.Drawing.BaseGraphic.prototype.SetStroke=function(a){this._stroke=a};Msn.Drawing.VMLGraphic=function(c,d){Msn.Drawing.BaseGraphic.call();var g=new Msn.Drawing.Color(255,0,0,1),f=new Msn.Drawing.Color(255,0,0,1),e=1,a=c;c.unselectable="on";var b=[];this.DrawPrimitive=function(f,e){var c=Msn.Drawing.VMLGraphic.prototype.DrawPrimitive(d,f,this);if(a&&c){if(e)a.appendChild(wrapVmlElementInDiv(c));else a.appendChild(c);b.push(c)}};this.resetOffset=function(){};this.SetZIndex=function(a){e=a};this.Clear=function(){var a=null,c=null;while(a=b.pop()){c=a.parentElement;if(c)c.removeChild(a);a=null}};this.Destroy=function(){this.Clear();a=null}};Msn.Drawing.VMLGraphic.prototype=new Msn.Drawing.BaseGraphic;Msn.Drawing.VMLGraphic.prototype.CreatePrimitive=function(d,a){var b=null;if(a.type==VEShapeType.Pushpin){if(a.symbol.shape_drawtype=="v:oval"||a.symbol.shape_drawtype=="v:rect"||a.symbol.shape_drawtype=="v:roundrect")b=document.createElement(a.symbol.shape_drawtype);else b=document.createElement("v:roundrect");var f=LatLongtoRoundedPixel(d,a.points[1],a.points[0]);b.style.width=a.symbol.style_width;b.style.height=a.symbol.style_height;b.style.left=-5+f.x+d.GetOffsetX()+"px";b.style.top=-5+f.y+d.GetOffsetY()+"px";b.style.position=a.symbol.style_position}else{b=document.createElement("v:shape");b.className="MSVE_Shape";var g=null;g=GetVmlPath(d,a);var h=d.GetMapWidth(),i=d.GetMapHeight();b.style.top="0px";b.style.left="0px";b.style.width=h+"px";b.style.height=i+"px";b.coordsize=h+" "+i;b.style.position=a.symbol.style_position;b.path=g}b.id=a.id!=0?a.id:a.iid;b.style.zIndex=a.symbol.style_zIndex_polyshape;b.unselectable=a.symbol.shape_unselectable;var c=document.createElement("v:stroke");c.joinstyle=a.symbol.stroke_joinstyle;c.endcap=a.symbol.stroke_endcap;c.opacity=a.symbol.stroke_opacity;c.dashstyle=a.symbol.stroke_dashstyle;c.filltype=a.symbol.stroke_filltype;c.color2=a.symbol.stroke_color2;c.color=a.symbol.stroke_color;c.weight=a.symbol.stroke_weight;c.linestyle=a.symbol.stroke_style;if(a.type==VEShapeType.Polygon){var e=document.createElement("v:fill");e.color=a.symbol.fill_color;e.colors=a.symbol.fill_colors;e.color2=a.symbol.fill_color2;e.type=a.symbol.fill_type;e.opacity=a.symbol.fill_opacity;b.appendChild(e)}else if(a.type==VEShapeType.Polyline){b.fill=false;b.filled=false}else if(a.type==VEShapeType.Pushpin){b.style.filter=a.symbol.style_filter;b.style.zIndex=a.symbol.style_zIndex;b.style.display=a.symbol.style_display;b.unselectable=a.symbol.shape_unselectable;b.fill=true;b.filled=true;b.fillcolor=a.symbol.fill_color}b.appendChild(c);return b};Msn.Drawing.VMLGraphic.prototype.UpdatePoints=function(d,a,b,c){if(c&&(a.type==VEShapeType.Polyline||a.type==VEShapeType.Polygon)){var e=GetVmlPath(d,a);b.path=e}return b};Msn.Drawing.VMLGraphic.prototype.UpdateStyle=function(f,a,e){e.style.zIndex=a.symbol.style_zIndex_polyshape;e.unselectable=a.symbol.shape_unselectable;var c=e.firstChild,b=null,d=null;while(c!=null){if(c.tagName=="stroke")b=c;else if(c.tagName=="fill")d=c;c=c.nextSibling}if(b){b.joinstyle=a.symbol.stroke_joinstyle;b.endcap=a.symbol.stroke_endcap;b.opacity=a.symbol.stroke_opacity;b.dashstyle=a.symbol.stroke_dashstyle;b.filltype=a.symbol.stroke_filltype;b.color2=a.symbol.stroke_color2;b.color=a.symbol.stroke_color;b.weight=a.symbol.stroke_weight;b.linestyle=a.symbol.stroke_style}if(a.type==VEShapeType.Polygon&&d){d.color=a.symbol.fill_color;d.color2=a.symbol.fill_color2;d.type=a.symbol.fill_type;d.opacity=a.symbol.fill_opacity}return e};Msn.Drawing.VMLGraphic.prototype._printable=false;Msn.Drawing.VMLGraphic.prototype._printTilesLayer=null;Msn.Drawing.VMLGraphic.prototype._printTopLayer=null;Msn.Drawing.VMLGraphic.prototype.CreatePrintLayer=function(a,d,c,b){if(!this._printable){this._printTilesLayer=document.createElement("div");this._printTilesLayer.className="MSVE_Print_TileLayer";this._printTilesLayer.innerHTML="<xml:namespace ns='urn:schemas-microsoft-com:vml' prefix='v'/>";a.appendChild(this._printTilesLayer);this._printTopLayer=document.createElement("div");this._printTopLayer.className="MSVE_Print_TopLayer";this._printTopLayer.innerHTML="<xml:namespace ns='urn:schemas-microsoft-com:vml' prefix='v'/>";this._printTopLayer.style.width=c;this._printTopLayer.style.height=b;this._printTopLayer.zIndex=100;a.parentNode.appendChild(this._printTopLayer);this._printable=true}};Msn.Drawing.VMLGraphic.prototype.RemovePrintLayer=function(){if(this._printable){this._printable=false;this._printTilesLayer.parentNode.removeChild(this._printTilesLayer);this._printTopLayer.parentNode.removeChild(this._printTopLayer);this._printTilesLayer=null;this._printTopLayer=null}};Msn.Drawing.VMLGraphic.prototype.AddPrintTile=function(f,g,e,d,b,h,c){var a=null;if(this._printable){a=document.createElement("div");a.style.position="absolute";a.style.top=g;a.style.left=e;a.style.width=d+1;a.style.height=b+1;a.style.zIndex=c;a.innerHTML="<v:image src='"+f+"' style='width:100%;height:100%;left:0px;top:0px;behavior:url(#default#VML);display:inline-block;'></v:image>";this._printTilesLayer.appendChild(a)}return a};Msn.Drawing.VMLGraphic.prototype.RemovePrintTile=function(a){if(a.parentNode)a.parentNode.removeChild(a)};Msn.Drawing.VMLGraphic.prototype.AddLogo=function(b){if(this._printable){var a=document.createElement("v:image");a.src=b;a.className="MSVE_PoweredByLogo_print";this._printTopLayer.appendChild(a)}};Msn.Drawing.SVGGraphic=function(c,b){Msn.Drawing.BaseGraphic.call();var g=new Msn.Drawing.Color(255,0,0,1),f=new Msn.Drawing.Color(0,255,0,1);_curmap=b;this._svgLayer=null;var d=60,e=c,a=[];this.DrawPrimitive=function(d){var c=Msn.Drawing.SVGGraphic.prototype.DrawPrimitive(b,d,this);if(c)a.push(c)};this.resetOffset=function(){_curmap.resetSvgLayer()};this.SetZIndex=function(a){d=a;if(this._svgLayer!=null)this._svgLayer.SetZIndex(a)};this.Destroy=function(){this.Clear()};this.Clear=function(){if(this._svgLayer==null)return;var b=null,c=null;while(b=a.pop()){c=b.parentNode;if(c)c.removeChild(b);b=null}}};Msn.Drawing.SVGGraphic.prototype=new Msn.Drawing.BaseGraphic;Msn.Drawing.SVGGraphic.prototype.CreatePrimitive=function(a,b,c){this._svgLayer=a.getSvgLayer();return this._svgLayer.addShape(b,c)};Msn.Drawing.SVGGraphic.prototype.UpdatePoints=function(a,b,c){this._svgLayer=a.getSvgLayer();return this._svgLayer.UpdatePoints(b,c)};Msn.Drawing.SVGGraphic.prototype.UpdateStyle=function(a,b,c){this._svgLayer=a.getSvgLayer();return this._svgLayer.UpdateStyle(b,c)};Msn.Drawing.SVGGraphic.prototype._printable=false;Msn.Drawing.SVGGraphic.prototype._printTilesLayer=null;Msn.Drawing.SVGGraphic.prototype._printTopLayer=null;Msn.Drawing.SVGGraphic.prototype._printLogo=null;Msn.Drawing.SVGGraphic.prototype._offsetX=null;Msn.Drawing.SVGGraphic.prototype._offsetY=null;Msn.Drawing.SVGGraphic.prototype.CreatePrintLayer=function(d,a,c,b){if(!this._printable){this._svgLayer=a.getSvgLayer();this._printTopLayer=this._svgLayer.CreatePrintLayer("MSVE_Print_TopLayer");this._printTopLayer.setAttributeNS(null,"width",parseInt(c));this._printTopLayer.setAttributeNS(null,"height",parseInt(b));this._printTilesLayer=this._svgLayer.CreatePrintLayer("MSVE_Print_TileLayer");this._printable=true}};Msn.Drawing.SVGGraphic.prototype.RemovePrintLayer=function(){if(this._printable){this._printTilesLayer.parentNode.removeChild(this._printTilesLayer);this._printTopLayer.parentNode.removeChild(this._printTopLayer);this._printTilesLayer=null;this._printTopLayer=null;this._printLogo=null;this._printable=false}};Msn.Drawing.SVGGraphic.prototype.AddPrintTile=function(g,h,f,e,c,b,d){var a=null;if(this._printable){a=document.createElementNS("http://www.w3.org/2000/svg","image");a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",g);a.setAttributeNS(null,"preserveAspectRatio","none");a.setAttributeNS(null,"x",f-this._offsetX);a.setAttributeNS(null,"y",h-this._offsetY);a.setAttributeNS(null,"width",e);a.setAttributeNS(null,"height",c);a.setAttributeNS(null,"opacity",b);this.AddPrintTileToLayer(a,d)}return a};Msn.Drawing.SVGGraphic.prototype.AddPrintTileToLayer=function(d,b){var a=this._printTilesLayer.firstChild;while(a&&a.style.zIndex<b)a=a.nextSibling;if(!a||a.style.zIndex!=b){var c=document.createElementNS("http://www.w3.org/2000/svg","g");c.style.zIndex=b;this._printTilesLayer.insertBefore(c,a);a=c}a.appendChild(d)};Msn.Drawing.SVGGraphic.prototype.RemovePrintTile=function(a){if(this._printable)a.parentElement.removeChild(a)};Msn.Drawing.SVGGraphic.prototype.RePositionPrintTile=function(a,c,b){a.setAttributeNS(null,"x",b-this._offsetX);a.setAttributeNS(null,"y",c-this._offsetY)};Msn.Drawing.SVGGraphic.prototype.SetOffset=function(a,b){this._offsetX=a;this._offsetY=b};Msn.Drawing.SVGGraphic.prototype.AddLogo=function(b){if(this._printable){var a=document.createElementNS("http://www.w3.org/2000/svg","image");a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",b);a.setAttributeNS(null,"class","MSVE_PoweredByLogo_print");a.setAttributeNS(null,"x",6);a.setAttributeNS(null,"y",parseInt(this._printTopLayer.getAttribute("height"))-79);this._printLogo=a;this._printTopLayer.appendChild(a)}};Msn.Drawing.SVGGraphic.prototype.RepositionLogo=function(b,a){if(this._printable&&this._printLogo)this._printLogo.setAttributeNS(null,"y",parseInt(a)-79)};Msn.Drawing.SvgLayer=function(f,g){var c=g,b=null,e=false,h=false;if(e==false){e=true;b=document.createElementNS("http://www.w3.org/2000/svg","svg");b.setAttribute("height","100%");b.setAttribute("width","100%");f.appendChild(b);this.lineDashStyles=[];var a=this.lineDashStyles;a[0]=["Solid","none"];a[1]=["ShortDash","6,2"];a[2]=["ShortDot","2,2"];a[3]=["ShortDashDot","6,2,2,2"];a[4]=["ShortDashDotDot","6,2,2,2,2,2"];a[5]=["Dot","2,6"];a[6]=["Dash","10,6"];a[7]=["LongDash","20,6"];a[8]=["DashDot","10,6,2,6"];a[9]=["LongDashDot","20,6,2,6"];a[10]=["LongDashDotDot","20,6,2,6,2,6"]}this.addShape=function(e){if(b==null)return;var a=null;if(e.type==VEShapeType.Pushpin){a=document.createElementNS("http://www.w3.org/2000/svg","rect");var i=LatLongtoRoundedPixel(c,e.points[1],e.points[0]);a.setAttribute("x",i.x-4);a.setAttribute("y",i.y-4);a.setAttribute("width","8pt");a.setAttribute("height","8pt");a.setAttribute("stroke-width",e.symbol.stroke_weight);a.setAttribute("stroke",e.symbol.stroke_color);a.setAttribute("fill",e.symbol.fill_color);b.appendChild(a)}else if(e.type==VEShapeType.Polyline||e.type==VEShapeType.Polygon){var h=e.type==VEShapeType.Polygon?true:false;a=document.createElementNS("http://www.w3.org/2000/svg",h?"polygon":"polyline");a.setAttributeNS(null,"class","MSVE_Shape");a.setAttribute("points",GetSvgPath(c,e.points));a.setAttribute("stroke",e.symbol.stroke_color);a.setAttribute("stroke-width",e.symbol.stroke_weight);a.setAttribute("stroke-linejoin",e.symbol.stroke_joinstyle);a.setAttribute("stroke-opacity",d(e.symbol.stroke_opacity));var g=this.lineDashStyles;for(var f=0;f<g.length;f++)if(e.symbol.stroke_dashstyle==g[f][0])a.setAttribute("stroke-dasharray",g[f][1]);if(!h)a.setAttribute("fill","none");else{a.setAttribute("fill-rule","evenodd");a.setAttribute("fill",e.symbol.fill_color);a.setAttribute("fill-opacity",d(e.symbol.fill_opacity))}}if(a){a.setAttribute("id",e.id!=0?e.id:e.iid);b.appendChild(a)}return a};function d(b){var a=parseFloat(b);if(a==NaN)a=.3;else if(a>1)a/=100;else if(a<0)a=0;return a}this.SetZIndex=function(a){if(!c.bShowSVG)return;c.GetsvgDiv().style.zIndex=a};this.UpdatePoints=function(a,b){if(a.type==VEShapeType.Polyline||a.type==VEShapeType.Polygon)b.setAttribute("points",GetSvgPath(c,a.points))};this.UpdateStyle=function(a,c){if(b==null)return;if(a.type!=VEShapeType.Pushpin){c.setAttribute("stroke",a.symbol.stroke_color);c.setAttribute("stroke-width",a.symbol.stroke_weight);c.setAttribute("stroke-linejoin",a.symbol.stroke_joinstyle);c.setAttribute("stroke-opacity",d(a.symbol.stroke_opacity));var f=this.lineDashStyles;for(var e=0;e<f.length;e++)if(a.symbol.stroke_dashstyle==f[e][0])c.setAttribute("stroke-dasharray",f[e][1]);if(a.type==VEShapeType.Polyline)c.setAttribute("fill","none");else{c.setAttribute("fill",a.symbol.fill_color);c.setAttribute("fill-opacity",d(a.symbol.fill_opacity))}}return a};this.CreatePrintLayer=function(c){var a=null;if(b){a=document.createElementNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"class",c);b.insertBefore(a,b.firstChild)}return a}};function GetSvgPath(j,e){if(!e)return null;var a=0,k=e.length,f=k/2,i=0,c=new Array(Math.max(128,Math.round(k/8))),b=null,l=0,m=0,g=0,h=0;while(a<f){g=e[a*2];h=e[a*2+1];if(a==f-1||a==0||VE_IsDisplayLatLon(j,l,m,g,h,f)){b=LatLongtoRoundedPixel(j,h,g);if(!b)return;var d="";if(a<f-1)d=d.concat(b.x,",",b.y,",");else d=d.concat(b.x,",",b.y);if(i>=c.length)c.length+=Math.round(c.length/4);c[i++]=d;l=g;m=h}a++}if(i>0)c.length=i;return c.join("")}function LatLongtoRoundedPixel(b,d,e){var c;if(typeof VEMap!="undefined"&&b instanceof VEMap)c=new VELatLong(d,e);else c=new Msn.VE.LatLong(d,e);var a=b.LatLongToPixel(c,b.GetZoomLevel());if(!a)return null;a.x=MathRound(a.x);a.y=MathRound(a.y);return a}VE_LatLongThreshold={PixelDiff:8,DistDiff:.5,OriginLat:0,OriginLon:0,LatDiff:0,LonDiff:0,UseThreshold:true,IsNotInit:true};function VE_SetLatLonThreshold(c,e,d){VE_LatLongThreshold.IsNotInit=false;if(e!=null&&d!=null){VE_LatLongThreshold.OriginLat=d;VE_LatLongThreshold.OriginLon=e}var a,b=LatLongtoRoundedPixel(c,VE_LatLongThreshold.OriginLat,VE_LatLongThreshold.OriginLon);if(b){a=c.PixelToLatLong(new VEPixel(b.x+VE_LatLongThreshold.PixelDiff,b.y+VE_LatLongThreshold.PixelDiff));VE_LatLongThreshold.LatDiff=Math.abs(a.latitude-VE_LatLongThreshold.OriginLat);VE_LatLongThreshold.LonDiff=Math.abs(a.longitude-VE_LatLongThreshold.OriginLon)}}function VE_IsDisplayLatLon(e,i,h,b,a){if(!VE_LatLongThreshold.UseThreshold)return true;var c=Math.abs(VE_LatLongThreshold.OriginLat-a),d=Math.abs(VE_LatLongThreshold.OriginLon-b);if(Math.max(c,d)>VE_LatLongThreshold.DistDiff||VE_LatLongThreshold.IsNotInit)VE_SetLatLonThreshold(e,b,a);var f=Math.abs(a-h),g=Math.abs(b-i);if(f>VE_LatLongThreshold.LatDiff||g>VE_LatLongThreshold.LonDiff)return true;return false}function GetVmlPath(j,a){var h=a.points;if(!h)return null;var g=0,l=h.length,m=l/2,e=0,b=new Array(Math.max(128,Math.round(l/8)));b[e++]="m ";var q=MathRound(j.GetOffsetY()),p=MathRound(j.GetOffsetX()),f=null,n=0,o=0,c=0,d=0;if(l>=4){c=h[g*2];d=h[g*2+1];f=LatLongtoRoundedPixel(j,d,c);if(!f)return null;var i="";i=i.concat(f.x+p,",",f.y+q," l ");if(e>=b.length)b.length+=Math.round(b.length/4);b[e++]=i;n=c;o=d;++g}var k=false;if(a.type!=VEShapeType.Pushpin)if(a.minX==null||a.minY==null||a.maxX==null||a.maxY==null){k=false;a.minX=360;a.minY=360;a.maxX=-360;a.maxY=-360}else k=true;while(g<m){c=h[g*2];d=h[g*2+1];if(!k){a.minX=Math.min(a.minX,c);a.minY=Math.min(a.minY,d);a.maxX=Math.max(a.maxX,c);a.maxY=Math.max(a.maxY,d)}if(VE_IsDisplayLatLon(j,n,o,c,d,m)||g==m-1){f=LatLongtoRoundedPixel(j,d,c);if(!f)return null;var i="";i=i.concat(f.x+p,",",f.y+q," ");if(e>=b.length)b.length+=Math.round(b.length/4);b[e++]=i;n=c;o=d}++g}if(e>=b.length)b.length+=1;b[e++]=" e";if(e>0)b.length=e;return b.join("")}function GetCurrentMapViewBounds(b){var o=b.GetCenterLongitude(),p=b.GetCenterLatitude(),a=b.LatLongToPixel(new Msn.VE.LatLong(p,o)),h=b.GetMapWidth(),g=b.GetMapHeight();if(!a||isNaN(a.x)||isNaN(a.y))return new Msn.VE.Bounds(0,0,-Infinity,-Infinity,Infinity,Infinity);var l,n,k,m,j=false,q=b.GetMapStyle(),c=b.PixelToLatLong(new VEPixel(a.x-h/2,a.y+g/2)),d=b.PixelToLatLong(new VEPixel(a.x+h/2,a.y-g/2));if(Msn.VE.MapStyle.IsViewOblique(q)){var e=b.PixelToLatLong(new VEPixel(a.x-h/2,a.y-g/2)),f=b.PixelToLatLong(new VEPixel(a.x+h/2,a.y+g/2));if(c!=null&&d!=null&&e!=null&&f!=null){l=Math.min(c.longitude,d.longitude,e.longitude,f.longitude);n=Math.min(c.latitude,d.latitude,e.latitude,f.latitude);k=Math.max(c.longitude,d.longitude,e.longitude,f.longitude);m=Math.max(c.latitude,d.latitude,e.latitude,f.latitude)}else j=true}else if(c!=null&&d!=null){l=Math.min(c.longitude,d.longitude);n=Math.min(c.latitude,d.latitude);k=Math.max(c.longitude,d.longitude);m=Math.max(c.latitude,d.latitude)}else j=true;var i=null;if(j)i=new Msn.VE.Bounds(0,0,-Infinity,-Infinity,Infinity,Infinity);else i=new Msn.VE.Bounds(0,0,l,n,k,m);return i}function GetBufferedMapViewBounds(b,a){var c=null,e=Math.abs(a.x2-a.x1),d=Math.abs(a.y2-a.y1);c=new Msn.VE.Bounds(0,0,a.x1-b*e,a.y1-b*d,a.x2+b*e,a.y2+b*d);return c}function IsContainedInView(a,b){var c=false;if(b.x1>a.x1&&b.y1>a.y1&&b.x2<a.x2&&b.y2<a.y2)c=true;return c}Msn.Drawing.ComputeBoundingBox=function(a){if(typeof a=="undefined"||a==null||a.length==0)return null;var c=[],f=Infinity,g=Infinity,d=-Infinity,e=-Infinity;for(var b=0;b<a.length;b=b+2){f=Math.min(f,a[b]);g=Math.min(g,a[b+1]);d=Math.max(d,a[b]);e=Math.max(e,a[b+1])}c[0]=f;c[1]=g;c[2]=d;c[3]=e;return c};function IsBoundsIntersect(a,b){if(a==null)return true;if(b==null)return true;if(a.x2<b.x1||a.x1>b.x2||a.y2<b.y1||a.y1>b.y2)return false;return true}function IsDisplayShape(d,c,e,g,f,h){if(c==0)return true;if(e==f&&g==h)return true;var a=null,b=null;a=d.LatLongToPixel(new Msn.VE.LatLong(g,e));b=d.LatLongToPixel(new Msn.VE.LatLong(h,f));if(a==null||b==null)return true;if(Math.abs(b.y-a.y)>c||Math.abs(b.x-a.x)>c)return true;else return false}function IsRecIntersect(c,d,a,b,g,h,e,f){if(a<g||c>e||b<h||d>f)return false;return true}function wrapVmlElementInDiv(a){var c=Msn.VE.Css.Functions.getComputedStyle,b=document.createElement("div");b.className="VmlContainer";b.style.left=c(a,"left");b.style.top=c(a,"top");b.style.width=c(a,"width");b.style.height=c(a,"height");a.style.position="relative";a.style.left="0px";a.style.top="0px";a.style.width="100%";a.style.height="100%";b.appendChild(a);return b}function VEColorToHexString(c,b,a){return "#"+(c<16?"0":"")+Number(c).toString(16)+(b<16?"0":"")+Number(b).toString(16)+(a<16?"0":"")+Number(a).toString(16)}function VEHexStringToColor(){this.Convert=function(a){a=a.toUpperCase();var b=hTov(a.substring(0,1)),c=hTov(a.substring(1,2)),d=hTov(a.substring(2,3)),e=hTov(a.substring(3,4)),f=hTov(a.substring(4,5)),g=hTov(a.substring(5,6)),h=b*16+c,i=d*16+e,j=f*16+g;return new VEColor(h,i,j,1)};function hTov(h){var v=0;if(h=="A")v=10;else if(h=="B")v=11;else if(h=="C")v=12;else if(h=="D")v=13;else if(h=="E")v=14;else if(h=="F")v=15;else v=eval(h);return v}}_VERegisterNamespaces("Msn.VE");$MVEM=new function(){this.IsEnabled=function(a){if(a==undefined)throw new VEException("$MVEM.IsEnabled","err_invalidfeature","Specified feature is invalid.");return a}};function VEException(b,c,a){this.source=b;this.name=c;this.message=a}VEException.prototype.Name=this.name;VEException.prototype.Source=this.source;VEException.prototype.Message=this.message;function pseudoHover(a){if(!document.all)return;var d=function(){a.className+=" ms_pseudoHover"},c=function(){a.className=a.className.replace(/\s*ms_pseudoHover/g,"")};a.attachEvent("onmouseenter",d);a.attachEvent("onmouseleave",c);window.attachEvent("onunload",b);function b(){a.detachEvent("onmouseenter",d);a.detachEvent("onmouseleave",c);window.detachEvent("onunload",b)}}function pseudoHoverForChildren(d,a){if(!document.all)return;if(!a)a="LI";var c=d.getElementsByTagName(a);for(var b=0;b<c.length;b++)this.pseudoHover(c[b])}function pseudoHoverRemove(a){if(!document.all)return;a.className=a.className.replace(/\s*ms_pseudoHover/g,"")}_VERegisterNamespaces("Msn.VE.Css");Msn.VE.CurrentDomain=typeof Msn.VE.API!="undefined"&&Msn.VE.API!=null?Msn.VE.API.Globals.vecurrentdomain:".";Msn.VE.Css={Cursors:{Auto:"auto",Default:"default",Crosshair:"crosshair",Pointer:"pointer",Move:"move",Wait:"wait",Text:"text",Help:"help",NResize:"n-resize",NEResize:"ne-resize",NWResize:"nw-resize",SResize:"s-resize",SEResize:"se-resize",SWResize:"sw-resize",EResize:"e-resize",WResize:"w-resize",CustomCursors:null,defineCustomCursors:function(c){Msn.VE.Css.Cursors.CustomCursors=c;var b,d=c.length;for(b=0;b<d;b++){var a=c[b];if(navigator.userAgent.indexOf(" Safari/")>-1)Msn.VE.Css.Cursors[a.name]=a.fallback;else Msn.VE.Css.Cursors[a.name]='url("'+a.domain+a.path+'"), '+a.fallback}}},RegEx:{RectClip:/rect\((auto|\d+px|\d*\.*\d+em|\d*\.*\d+pt)\s*,*\s*(auto|\d+px|\d*\.*\d+em|\d*\.*\d+pt)\s*,*\s*(auto|\d+px|\d*\.*\d+em|\d*\.*\d+pt)\s*,*\s*(auto|\d+px|\d*\.*\d+em|\d*\.*\d+pt)\)/},Functions:{addClass:function(a){this.alterClass(a,arguments,true)},removeClass:function(a){this.alterClass(a,arguments,false)},alterClass:function(a,e,g){var c,h=e.length;for(c=1;c<h;c++){var d=e[c],d=e[c].replace(/^\s*/,"").replace(/\s*$/,"");if(d.indexOf(" ")!=-1)continue;var f=new RegExp("(^| )"+d+"( |$)","i");if(g){if(!f.test(a.className))if(a.className=="")a.className=d;else a.className+=" "+d}else{var b=a.className;b=b.replace(f,"$1");b=b.replace(/ $/,"");a.className=b}}},getComputedStyle:function(b,c){var a=null;if(document.defaultView&&document.defaultView.getComputedStyle&&typeof document.defaultView.getComputedStyle!="undefined")a=document.defaultView.getComputedStyle(b,null);else a=b.currentStyle;return a[c]},setClip:function(c,d,e){var b=Msn.VE.Css.Functions.getClip(c,0),f=Msn.VE.Css.RegEx.RectClip,a=f.exec(b);a[d]=e;if(d==0)c.style.clip=a[0];else{a[d]=e;a.shift();b="rect("+a.join(" ")+")";c.style.clip=b}},getClip:function(d,e){var b=d.style.clip;if(b==""){var b=(window.opera?"auto":Msn.VE.Css.Functions.getComputedStyle(d,"clip"))||"auto";if(b=="auto")b="rect(auto auto auto auto)";else if(typeof b=="undefined"||b==null){var c=d.currentStyle;if(typeof c!="undefined"&&c!=null)b="rect("+c.clipTop+" "+c.clipRight+" "+c.clipBottom+" "+c.clipLeft+")"}}var f=Msn.VE.Css.RegEx.RectClip,a=f.exec(b);if(e==0)return a[0];a[1]=a[1]=="auto"?0:a[1];a[4]=a[4]=="auto"?0:a[4];a[2]=a[2]=="auto"?d.offsetWidth:a[2];a[3]=a[3]=="auto"?d.offsetHeight:a[3];if(e==5)return a;else return a[e]}}};_VERegisterNamespaces("Msn.VE");Msn.VE.OSType={Windows:1,Windows95:2,Windows98:3,WindowsMillenium:4,WindowsNT:5,WindowsNT4:6,Windows2000:7,Windows2000SP1:8,WindowsXP:9,WindowsXPSP2:10,WindowsServer2003:11,WindowsServer2003SP1:12,WindowsVista:13,MacOS:30,MacOS9:31,MacOSX:32,Linux:40,Unknown:100};Msn.VE.CLRType={CLR10:1,CLR11:2,CLR20:4,CLR30:8};Msn.VE.BrowserType={Firefox:1,MSIE:2,Opera:3,Unknown:10};Msn.VE.BrowserCaps={VML:1,SVG:2,WindowlessSelectElement:4,RightMouseButton:8,AddFavourite:16,VectorCapable:3};Msn.VE.BrowserInfo=function(){var a=this;this.Type=null;this.BrowserCaps=0;this.CLRType=0;this.MajorVersion=null;this.MinorVersion=null;this.versionString=null;this.UserAgent=null;this.OSType=null;this.Locale=null;if(arguments.length==0){this.UserAgent=window.navigator.userAgent;this.currentBrowser=true}else{this.UserAgent=arguments[0];this.currentBrowser=false;if(arguments.length>=2)this.Locale=arguments[1]}this.IsCompatibleWith=function(c){for(var b=0;b<c.length;b++){var a=c[b];if(a.Type==this.Type&&(this.MajorVersion>a.MajorVersion||a.MajorVersion==this.MajorVersion&&a.MinorVersion>=this.MinorVersion))return true}return false};function b(){if(a.UserAgent.indexOf("Mac")==-1&&(a.UserAgent.indexOf("Gecko")!=-1||a.UserAgent.indexOf("MSIE")!=-1))a.BrowserCaps|=Msn.VE.BrowserCaps.RightMouseButton}function c(){if(a.UserAgent.indexOf("MSIE 7")!=-1||a.UserAgent.indexOf("Gecko")!=-1)a.BrowserCaps|=Msn.VE.BrowserCaps.WindowlessSelectElement}function j(){if(a.UserAgent.indexOf("Mac")==-1&&(a.UserAgent.indexOf("MSIE 5")!=-1||a.UserAgent.indexOf("MSIE 6")!=-1||a.UserAgent.indexOf("MSIE 7")!=-1))a.BrowserCaps|=Msn.VE.BrowserCaps.VML}function i(){if(a.UserAgent.indexOf("MSIE")==-1){var d=0,e=0,f=new RegExp("Firefox/(.*)"),c=f.exec(a.UserAgent);if(c&&c.length>=2){var b=c[1].split(".");if(b){d=b[0];e=b[1];if(parseInt(d)>0&&parseInt(e)>=5)a.BrowserCaps|=Msn.VE.BrowserCaps.SVG}}}}function h(){try{if(a.UserAgent.indexOf("MSIE")!=-1)a.BrowserCaps|=Msn.VE.BrowserCaps.AddFavourite}catch(b){}}this.GetVersionString=function(){if(this.versionString==null)if(a.UserAgent.indexOf("Win")!=-1&&a.UserAgent.indexOf("MSIE")!=-1){var b=null,c;try{b=document.createElement("<DIV STYLE='behavior:url(#default#clientCaps); display: none' ID='__clientCaps'>");document.body.appendChild(b);c=b.getComponentVersion("{89820200-ECBD-11CF-8B85-00AA005B4383}","componentid")}catch(d){c=a.MajorVersion+"."+a.MinorVersion}finally{if($ID("__clientCaps")!=null)$ID("__clientCaps").parentNode.removeChild(b)}this.versionString=c}else if(a.MajorVersion!=null&&a.MajorVersion!=null)this.versionString=a.MajorVersion+"."+a.MinorVersion;else this.versionString="";return this.versionString};function e(){if(a.UserAgent.indexOf("MSIE")!=-1){var c=new RegExp("MSIE ([0-9]).([0-9])"),b=c.exec(a.UserAgent);if(b!=null){a.MajorVersion=parseInt(b[1]);a.MinorVersion=parseInt(b[2]);return}}else if(a.UserAgent.indexOf("Firefox")!=-1){var c=new RegExp("Firefox/([0-9]).([0-9])(.*)"),b=c.exec(a.UserAgent);if(b!=null){a.MajorVersion=parseInt(b[1]);a.MinorVersion=parseInt(b[2]);return}}else if(a.UserAgent.indexOf("Opera")!=-1){var c=new RegExp("Opera/([0-9]).([0-9])"),b=c.exec(a.UserAgent);if(b!=null){a.MajorVersion=parseInt(b[1]);a.MinorVersion=parseInt(b[2]);return}}a.MajorVersion=null;a.MinorVersion=null}function g(){if(a.UserAgent.indexOf("Mac OS X")!=-1)a.OSType=Msn.VE.OSType.MacOSX;else if(a.UserAgent.indexOf("Mac")!=-1)a.OSType=Msn.VE.OSType.MacOS;else if(a.UserAgent.indexOf("Linux")!=-1)a.OSType=Msn.VE.OSType.Linux;else if(a.UserAgent.indexOf("Win95")!=-1||a.UserAgent.indexOf("Windows 95")!=-1)a.OSType=Msn.VE.OSType.Windows95;else if(a.UserAgent.indexOf("Win98")!=-1||a.UserAgent.indexOf("Windows 98")!=-1)a.OSType=Msn.VE.OSType.Windows98;else if(a.UserAgent.indexOf("Win 9x 4.90")!=-1)a.OSType=Msn.VE.OSType.WindowsMillenium;else if(a.UserAgent.indexOf("Windows NT 4.0")!=-1)a.OSType=Msn.VE.OSType.WindowsNT4;else if(a.UserAgent.indexOf("Windows NT 5.01")!=-1)a.OSType=Msn.VE.OSType.Windows2000SP1;else if(a.UserAgent.indexOf("Windows NT 5.0")!=-1)a.OSType=Msn.VE.OSType.Windows2000;else if(a.UserAgent.indexOf("Windows NT 5.1")!=-1&&a.UserAgent.indexOf("SV1")!=-1)a.OSType=Msn.VE.OSType.WindowsXPSP2;else if(a.UserAgent.indexOf("Windows NT 5.1")!=-1)a.OSType=Msn.VE.OSType.WindowsXP;else if(a.UserAgent.indexOf("Windows NT 5.2")!=-1&&a.UserAgent.indexOf("SV1")!=-1)a.OSType=Msn.VE.OSType.WindowsServer2003SP1;else if(a.UserAgent.indexOf("Windows NT 5.2")!=-1)a.OSType=Msn.VE.OSType.WindowsServer2003;else if(a.UserAgent.indexOf("Windows NT 6.0")!=-1)a.OSType=Msn.VE.OSType.WindowsVista;else if(a.UserAgent.indexOf("Windows NT")!=-1)a.OSType=Msn.VE.OSType.WindowsNT;else if(a.UserAgent.indexOf("Win")!=-1)a.OSType=Msn.VE.OSType.Windows;else a.OSType=Msn.VE.OSType.Unknown}function d(){if(a.UserAgent.indexOf(".NET CLR 1.0")!=-1)a.CLRType|=Msn.VE.CLRType.CLR10;if(a.UserAgent.indexOf(".NET CLR 1.1")!=-1)a.CLRType|=Msn.VE.CLRType.CLR11;if(a.UserAgent.indexOf(".NET CLR 2.0")!=-1)a.CLRType|=Msn.VE.CLRType.CLR20;if(a.UserAgent.indexOf(".NET CLR 3.0")!=-1)a.CLRType|=Msn.VE.CLRType.CLR30}function f(){if(a.Locale!=null)return;a.Locale="en-US";if(a.UserAgent.indexOf("MSIE")!=-1){if(navigator.browserLanguage)a.Locale=navigator.browserLanguage;if(navigator.userLanguage)a.Locale=navigator.userLanguage;if(navigator.systemLanguage)a.Locale=navigator.systemLanguage}else if(a.UserAgent.indexOf("Gecko")!=-1){var c=new RegExp("; (.*); rv:"),b=c.exec(a.UserAgent);if(b&&b.length>=2)a.Locale=b[1].substring(b[1].lastIndexOf(" "),b[1].length+1)}else if(a.UserAgent.indexOf("Opera")!=-1){var c=new RegExp(" (.*)\\)"),b=c.exec(a.UserAgent);if(b&&b.length>=2)a.Locale=b[1].substring(b[1].lastIndexOf(" "),b[1].length+1)}}function k(){if(a.UserAgent.indexOf("Gecko")!=-1)a.Type=Msn.VE.BrowserType.Firefox;else if(a.UserAgent.indexOf("MSIE")!=-1)a.Type=Msn.VE.BrowserType.MSIE;else if(a.UserAgent.indexOf("Opera")!=-1)a.Type=Msn.VE.BrowserType.Opera;else a.Type=Msn.VE.BrowserType.Unknown;e();g();d();f();h();i();j();c();b()}k()};Msn.VE.Environment=function(){};Msn.VE.Environment.Redirect=function(a){window.location.href=a};Msn.VE.Environment.BrowserInfo=new Msn.VE.BrowserInfo;Msn.VE.Environment.IsFF20=function(){var a=Msn.VE.Environment.BrowserInfo;if(a.Type==Msn.VE.BrowserType.Firefox){var b=a.MajorVersion;if(b>=2)return true}return false};Msn.VE.Environment.IsIE50=function(){var a=Msn.VE.Environment.BrowserInfo;if(a.Type==Msn.VE.BrowserType.MSIE){var b=a.MajorVersion;if(b>=5)return true}return false};_VERegisterNamespaces("Msn.VE");Msn.VE.PushPinTypes={Default:0,SearchResultPrecise:1,Annotation:2,Direction:3,DirectionTemp:4,TrafficLight:5,TrafficOthers:6,YouAreHere:7,AdStandard:8,AdWide:9,AdCategory:10,AdRoofStandard:11,AdRoofWide:12,AdSponsor:13,DirectionStep:14,Context:15,SearchResultNonprecise:16,Collection:17,Overlay:18};Msn.VE.MapActionMode={ModeUnknown:0,Mode2D:1,Mode3D:2,ModeOblique:3};Msn.VE.BirdsEyeSearchSpinDirection={ClockwiseSpin:-1,NoSpin:0,CounterclockwiseSpin:1};Msn.VE.LineJoinMode={Straight:"miter",Round:"round"};Msn.VE.Css.Cursors.defineCustomCursors([{name:"Grab",domain:".",path:"/cursors/grab.cur",fallback:"move"},{name:"Grabbing",domain:".",path:"/cursors/grabbing.cur",fallback:"move"},{name:"Target",domain:".",path:"/cursors/target.cur",fallback:"crosshair"}]);Msn.VE.MapControl=function(p_elSource,p_htParams,p_parentAPIControl){var offsetMeters=20971520,baseMetersPerPixel=163840,buffer=0,maxTilePixelBuffer=768,animatedMovementEnabled=true,zoomTotalSteps=6,keyboardPanSpeed=15,panToLatLongSpeed=15,earthRadius=6378137,earthCircumference=earthRadius*2*Math.PI,projectionOffset=earthCircumference*.5,minZoom=1,maxZoom=19,emptyTile="http://virtualearth.msn.com/i/spacer.gif",minLatitude=-85,maxLatitude=85,minLongitude=-180,maxLongitude=180,tileSize=256,generations={},zoomLevelToAdjustObliqueToOrthro=18,kbInputZIndex=0,containerZIndex=0,mapZIndex=1,swapZIndex=1,baseZIndex=2,debugZIndex=3,baseZIndex=11,topZIndex=20,p_this=this,m_clientToken=null,cssCursors=Msn.VE.Css.Cursors,cssFn=Msn.VE.Css.Functions,roadStyle=Msn.VE.MapStyle.Road,shadedStyle=Msn.VE.MapStyle.Shaded,hybridStyle=Msn.VE.MapStyle.Hybrid,aerialStyle=Msn.VE.MapStyle.Aerial,obliqueStyle=Msn.VE.MapStyle.Oblique,obliqueHybridStyle=Msn.VE.MapStyle.ObliqueHybrid;generations[roadStyle]=209;generations[aerialStyle]=209;generations[hybridStyle]=209;generations[obliqueStyle]=209;generations[obliqueHybridStyle]=209;var mapTiles="Road",trafficTiles="Traffic",marketMaxZoom=1,currentScaleBarUnit=null,currentView=new Msn.VE.MapView(p_this),preferredView=new Msn.VE.MapView(p_this),previousZoomLevel=1,previousCenter=null,lastViewChangeType=null,previousMapStyle=null,lastOrthoZoomLevel=15,lastOrthoMapStyle=roadStyle,x=0,y=0,width=0,height=0,trafficAvailable=false,tileLayerManager=new VETileLayerManager,originX=0,originY=0,offsetX=0,offsetY=0,tileViewportX1=0,tileViewportY1=0,tileViewportX2=0,tileViewportY2=0,tileViewportWidth=0,tileViewportHeight=0,dragging=false,keyboardPan=false,lastMouseX=0,lastMouseY=0,zooming=false,zoomCounter=0,panning=false,panCounter=0,panningX=0,panningY=0,panLatitude=null,panLongitude=null,pushpins=[],lines=[],map=document.createElement("div"),keyboard=document.createElement("input");keyboard.id="wl_ve_mapInput";var logo=null,scaleBar=null,mapLegend=null,copyright=null;this.UpdateCopyright=function(){if(copyright)copyright.Update()};var dashboardContainer=null,dashboard=null,minimapControl=null,minimapContainer=null,mouseZoomDisabled=false,mousewheelZoomToCenter=true,isMinimap=false,boxTool=null,panTool=null,targetTool=null,currentTool=null,orthoMode=null,obliqueMode=null,threeDMode=null,currentMode=null,previousMode=null,Initialized2D=false,currentBounds=null,defaultEventTable=[],customEventTable=[],debug=false,graphicCanvas=null,svgLayer=null,svgDiv=null,bShowSVG=true;this.GetsvgDiv=function(){return svgDiv};var mapCenterOffset=new VEPixel(0,0),resizeInProgress=false,loadBaseTiles=true,view3DCreated=false,spacecontrol=false,spacediv=null,spaceCameraIsFlying=false,init3dparam=null,resizeTimer=null,traffic3dAdded=false,initial3dView=null,cameraUpdateCount=0,photoplugin3dActive=false;this.Is3DPhotoPluginActive=function(){return photoplugin3dActive};this.Set3DPhotoPluginActive=function(a){photoplugin3dActive=a};function SetChildDiv(a){map.appendChild(a)}function EnableGeoCommunity(a){hijackMouseMove=a}function IsGeoCommunityEnabled(){return hijackMouseMove}function HijackMouseCursor(a){hijackMouseCursor=a}function IsHijackMouseCursor(){return hijackMouseCursor}function GetOffsetX(){return offsetX}function GetOffsetY(){return offsetY}function GetOriginY(){return originY}function GetOriginX(){return originX}this.Init=function(){orthoMode=new OrthoMode;orthoMode.Init();if(p_htParams.obliqueEnabled){obliqueMode=new ObliqueMode;obliqueMode.SetGUID(p_htParams.mapGUID);obliqueMode.Init(p_htParams.obliqueUrl?p_htParams.obliqueUrl:"%0dev.virtualearth.net/services/v1/ImageryMetadataService/ImageryMetadataService.asmx")}if(p_htParams.clientToken)this.SetClientToken(p_htParams.clientToken);threeDMode=new ThreeDMode;threeDMode.Init();UpdateFromParent();map.className="MSVE_Map";map.style.zIndex=mapZIndex;p_elSource.appendChild(map);cssFn.addClass(p_elSource,"MSVE_MapContainer");keyboard.className="MSVE_KeyboardInput";if(typeof Msn.VE.API!="undefined"&&Msn.VE.API!=null&&Web.Browser.isSafari()){keyboard.style.top=0;keyboard.style.left=0;keyboard.style.border=0;if(Web.Browser.isSafari2()){keyboard.style.height=0;keyboard.style.width=0}else if(Web.Browser.isSafari3()){keyboard.style.outlineWidth=0;keyboard.style.color="transparent";keyboard.style.backgroundColor="transparent"}}p_elSource.appendChild(keyboard);if(!p_htParams.fixedView){p_elSource.attachEvent("onmousedown",MouseDown);p_elSource.attachEvent("onmouseup",MouseUp);p_elSource.attachEvent("onmousemove",MouseMove);p_elSource.attachEvent("ondblclick",MouseDoubleClick);p_elSource.attachEvent("oncontextmenu",ContextMenu);p_elSource.attachEvent("onclick",MouseClick);p_elSource.attachEvent("onmouseout",MouseOut);p_elSource.attachEvent("onmouseover",MouseOver);p_elSource.attachEvent("onmouseenter",MouseEnter);p_elSource.attachEvent("onmouseleave",MouseLeave)}if(p_htParams.buffer!=undefined&&p_htParams.buffer!=null)SetTilePixelBuffer(p_htParams.buffer);var startIn3DMode=false;loadBaseTiles=typeof p_htParams.loadBaseTiles=="undefined"||p_htParams.loadBaseTiles!=false;if(p_htParams.mapMode!="undefined"&&p_htParams.mapMode!=null&&p_htParams.mapMode==Msn.VE.MapActionMode.Mode3D||p_htParams.altitude&&p_htParams.altitude>-1000||p_htParams.tilt&&p_htParams.tilt!=-90||p_htParams.direction&&p_htParams.direction!=0){SetBaseTileSource();startIn3DMode=true;currentMode=threeDMode}init3dparam=p_htParams.mapGUID;if((p_htParams.latitude!=null&&typeof p_htParams.latitude!="undefined"&&p_htParams.longitude!=null&&typeof p_htParams.longitude!="undefined"&&p_htParams.zoomlevel!=null&&typeof p_htParams.zoomlevel!="undefined"||p_htParams.boundingBox!=null&&typeof p_htParams.boundingBox!="undefined")&&p_htParams.mapstyle!=null&&typeof p_htParams.mapstyle!="undefined")try{var initialView=new Msn.VE.MapView(p_this);initialView.SetMapStyle(ValidateMapStyle(p_htParams.mapstyle),p_htParams.obliqueSceneId,p_htParams.birdseyeOrientation);if(startIn3DMode){initialView.sceneId=p_htParams.obliqueSceneId;initialView.photoX=p_htParams.photoX;initialView.photoY=p_htParams.photoY;initialView.photoScale=p_htParams.photoScale}if(p_htParams.boundingBox){var bb=p_htParams.boundingBox;if(bb.northwest){bb.northwest.latitude=ClipLatitude(bb.northwest.latitude);bb.northwest.longitude=ClipLongitude(bb.northwest.longitude)}if(bb.southeast){bb.southeast.latitude=ClipLatitude(bb.southeast.latitude);bb.southeast.longitude=ClipLongitude(bb.southeast.longitude)}initialView.SetLatLongRectangle(bb);if(startIn3DMode)initialView.Resolve(orthoMode,width,height)}else{initialView.SetZoomLevel(eval(p_htParams.zoomlevel));initialView.SetCenterLatLong(new Msn.VE.LatLong(eval(p_htParams.latitude),eval(p_htParams.longitude)))}if(p_htParams.altitude)initialView.SetAltitude(p_htParams.altitude);if(p_htParams.tilt)initialView.SetTilt(p_htParams.tilt);if(p_htParams.direction)initialView.SetDirection(p_htParams.direction);if(p_htParams.cameraPos){initialView.cameraLatlong=new Msn.VE.LatLong(eval(p_htParams.cameraPos[0]),eval(p_htParams.cameraPos[1]));initialView._needsPivotOperation=false}if(!startIn3DMode)SetBaseTileSource();currentView=initialView}catch(a){if(!startIn3DMode)SetDefaultView();else currentView=initialView}else if(!startIn3DMode)SetDefaultView();else currentView=initialView;if(startIn3DMode)this.Init3DOnly();else this.Init2DOnly();if(typeof p_htParams.hideCopyright=="undefined"||!p_htParams.hideCopyright){copyright=new Copyright(p_elSource);copyright.Init();copyright.Update();if(scaleBar)copyright.PinTo(scaleBar);if(mapLegend)mapLegend.PinTo(copyright)}if(typeof p_htParams.showMinimap!="undefined"&&p_htParams.showMinimap){var loadMinimapNow=false;if(obliqueMode!=null&&Msn.VE.MapStyle.IsViewOblique(p_htParams.mapstyle))loadMinimapNow=true;CreateMinimap(null,null,null,loadMinimapNow,null,p_htParams.minimapVersion,p_htParams.clientToken)}if(p_htParams.showDashboard){if(p_htParams.showMapModeSwitch!=false)p_htParams.showMapModeSwitch=true;CreateDashboard(p_htParams.dashboardX,p_htParams.dashboardY,p_htParams.dashboardSize,p_htParams.dashboardId,p_htParams.showMapModeSwitch,p_htParams.obliqueEnabled,p_htParams.labelsDefault,p_htParams.dashboardVersion)}if(p_htParams.showMapLegend)this.CreateLegend();if(startIn3DMode)copyright.Hide()};AttachEvent("onstartmapstyleoblique",function(){if(targetTool)targetTool.trackMovement()});AttachEvent("onendmapstyleoblique",function(){if(targetTool)targetTool.ignoreMovement()});AttachEvent("onchangeview",OnChangeView);this.Init2DOnly=function(a){mvcViewFacade.OnSwitchToFlatlandView();currentView.doRoadShading=typeof p_htParams.doRoadShading!="undefined"&&p_htParams.doRoadShading==true;if(!p_htParams.fixedView){boxTool=new BoxTool;boxTool.Init();panTool=new PanTool;panTool.Init();currentTool=panTool;keyboard.attachEvent("onkeydown",KeyDown);keyboard.attachEvent("onkeyup",KeyUp);keyboard.attachEvent("onblur",StopKeyboardPan);p_elSource.attachEvent("onmousewheel",MouseWheel)}targetTool=new TargetTool;targetTool.init();if(!p_htParams.disableLogo){logo=new Logo(p_elSource);logo.Init()}if(typeof copyright!="undefined"&&copyright!=null)copyright.Show();if(obliqueMode&&currentMode!=obliqueMode)obliqueMode.UpdateAvailability();graphicCanvas=GetGraphic(this);tileLayerManager.Active=true;if(currentView==null)SetDefaultView();else{if(a==true||!Initialized2D){SetView(currentView);Initialized2D=true}SetView(null)}if(p_htParams.showScaleBar){InitScaleBar();scaleBar.Show()}Fire("oninitmode",Msn.VE.MapActionMode.Mode2D)};function InitScaleBar(){scaleBar=new ScaleBar(p_elSource);scaleBar.Init();if(currentScaleBarUnit)SetScaleBarDistanceUnit(currentScaleBarUnit);if(copyright)copyright.PinTo(scaleBar);AttachEvent("onendzoom",scaleBar.Update);AttachEvent("onendpan",scaleBar.Update);AttachEvent("onobliquechange",scaleBar.Update);AttachEvent("onchangemapstyle",scaleBar.Update);AttachEvent("onresize",scaleBar.Reposition)}this.Init3DOnly=function(){if(typeof LoadMapDrawing=="function")LoadMapDrawing(null);if(dashboard)if(window.navigator.userAgent.indexOf("Firefox")<0){var d=dashboard.GetShimmedElements(),c;for(c=0;c<d.length;c++)UpdateIFrameShim(d[c])}var b;try{if(currentView==null)b=SetDefaultView();else{var a=currentView.MakeCopy();if(Msn.VE.MapStyle.IsViewOblique(currentView.mapStyle)){a.SetMapStyle(lastOrthoMapStyle);a.SetZoomLevel(a.GetZoomLevel()+zoomLevelToAdjustObliqueToOrthro)}a.SetCenterLatLong(new Msn.VE.LatLong(currentView.latlong.latitude,currentView.latlong.longitude));a.cameraLatlong=currentView.cameraLatlong;b=SetView(a)}}catch(e){b=false}if(!b){this._Disable3DMode(true);return}if(!view3DCreated)return;mvcViewFacade.OnSwitchToView3D(spacecontrol);if(p_htParams.showDashboard)spacecontrol.ShowNavigationControl=true;if(typeof p_htParams.hideCopyright=="undefined"||!p_htParams.hideCopyright)spacecontrol.ShowCopyright=true;if(typeof copyright!="undefined"&&copyright!=null)copyright.Hide();if(p_htParams.showScaleBar)spacecontrol.ShowScale=true;if(currentScaleBarUnit&&p_htParams.showScaleBar||Msn.VE.API)this.SetScaleBarDistanceUnit(currentScaleBarUnit);if((typeof Msn.VE.API=="undefined"||!Msn.VE.API)&&window.locale)spacecontrol.DisplayMetricUnits=MapControl.Features.ScaleBarKilometers;if(mapLegend)mapLegend.UpdateShim();spacecontrol.AttachEvent("OnHardwareCapabilitiesUpdate","OnHardwareCapabilitiesUpdate");if(spacecontrol.HardwareClassificationLevel>0)this.Setup3DManifests();tileLayerManager.AddAllTileSourcesTo3D(spacecontrol);AttachEvent("onchangetraffic",OnView3DScaleBarPositionUpdate);AttachEvent("onchangemapstyle",OnChangeMapStyle3D);spacecontrol.AttachEvent("OnCameraChanged","OnView3DUpdateViewpoint");spacecontrol.AttachEvent("OnBeginCameraChange","OnBeginFlyTo");if(!p_htParams.fixedView){spacecontrol.AttachEvent("OnHover","OnView3DPushpinHover");spacecontrol.AttachEvent("OnHoverEnd","OnView3DHoverEnd");spacecontrol.AttachEvent("OnDropGeometry","OnView3DDropGeometry");spacecontrol.AttachEvent("OnLatLonAltClicked","OnView3DLatLonAltClicked");spacecontrol.AttachEvent("OnMouseDown","OnMouseDown3D");spacecontrol.AttachEvent("OnMouseUp","OnMouseUp3D");spacecontrol.AttachEvent("OnClick","OnClick3D");spacecontrol.AttachEvent("OnMouseOver","OnMouseOver3D");spacecontrol.AttachEvent("OnMouseOut","OnMouseOut3D");spacecontrol.AttachEvent("OnDoubleClick","OnDoubleClick3D");spacecontrol.AttachEvent("OnModelViewSuccess","UniqueModelViewSuccess");spacecontrol.AttachEvent("OnModelViewFailure","UniqueModelViewFailure");spacecontrol.AttachEvent("OnModelFullyDownloaded","UniqueModelFullyDownloaded")}else spacecontrol.FixedView=true;traffic3dAdded=false;if(typeof VE_TrafficManager!="undefined"&&VE_TrafficManager!=null)VE_TrafficManager.GetTrafficInfo(false);OnView3DScaleBarPositionUpdate();if(typeof VE_BrandExplorationManager!="undefined"&&VE_BrandExplorationManager!=null)VE_BrandExplorationManager.Clear();LoadStreetLevelGeometry(spacecontrol);LoadHiResModelsPlugin(spacecontrol);LoadWeatherPlugin(spacecontrol);if(!init3dparam)Relay3DPushpins();Fire("oninitmode",Msn.VE.MapActionMode.Mode3D)};this.Setup3DManifests=function(){var c=currentView.mapStyle,a="http://go.microsoft.com/fwlink/?LinkID=98770",b="http://go.microsoft.com/fwlink/?LinkID=98775",d="http://go.microsoft.com/fwlink/?LinkID=98774";if(c=="a"){a="http://go.microsoft.com/fwlink/?LinkID=98771";spacecontrol.ShowAtmosphere=true}if(c=="h"){a="http://go.microsoft.com/fwlink/?LinkID=98772";spacecontrol.ShowAtmosphere=true}if(c=="r"){spacecontrol.TexturesVisible=false;if(spacecontrol.HardwareClassificationLevel<3)a="http://go.microsoft.com/fwlink/?LinkID=98769";spacecontrol.ShowAtmosphere=false}else spacecontrol.TexturesVisible=true;if(2==spacecontrol.HardwareClassificationLevel){d="http://go.microsoft.com/fwlink/?LinkID=98773";b="http://go.microsoft.com/fwlink/?LinkID=98776"}else if(1==spacecontrol.HardwareClassificationLevel){d="http://go.microsoft.com/fwlink/?LinkID=98773";b=""}if(loadBaseTiles)spacecontrol.AddImageSource("Terrain","Texture",GetManifestUrl(a),0,1);spacecontrol.AddElevationSource("Terrain","DEM",GetManifestUrl(d),0);if(b!="")spacecontrol.AddModelSource("Model","Model",GetManifestUrl(b));else spacecontrol.RemoveModelSource("Model","Model")};this.ShowSVG=function(a){bShowSVG=a};this.getSvgLayer=function(){if(svgLayer==null){svgDiv=document.createElement("div");svgDiv.style.position="absolute";if(bShowSVG)svgDiv.style.zIndex=60;else svgDiv.style.zIndex=-1;svgDiv.align="left";this.resizeSVG();map.appendChild(svgDiv);svgLayer=new Msn.Drawing.SvgLayer(svgDiv,this)}return svgLayer};this.resetSvgLayer=function(){this.getSvgLayer();svgDiv.style.top=-parseInt(map.style.top)+"px";svgDiv.style.left=-parseInt(map.style.left)+"px";if(currentMode!=threeDMode&&graphicCanvas){graphicCanvas.SetOffset(offsetX,offsetY);tileLayerManager.RePositionPrintTiles()}};this.resizeSVG=function(){if(svgDiv!=null){var b=GetWindowWidth(),a=GetWindowHeight();svgDiv.style.top="0px";svgDiv.style.left="0px";svgDiv.style.width=b+"px";svgDiv.style.height=a+"px";if(currentMode!=threeDMode&&graphicCanvas){graphicCanvas.SetOffset(offsetX,offsetY);graphicCanvas.RepositionLogo(g(p_elSource).getStyle("width"),g(p_elSource).getStyle("height"));tileLayerManager.RePositionPrintTiles()}}};function GetGraphic(a){if(!graphicCanvas)try{graphicCanvas=Msn.Drawing.Graphic.CreateGraphic(map,a);graphicCanvas.SetZIndex(17)}catch(b){}return graphicCanvas}this.GetDashboard=function(){return dashboard};this.GetMinimap=function(){return minimapControl};this.DisableZoomEvents=function(a){mouseZoomDisabled=a};this.GetMouseWheelZoomToCenter=function(){return mousewheelZoomToCenter};this.SetMouseWheelZoomToCenter=function(a){mousewheelZoomToCenter=a};this.SetMinimapMode=function(){mouseZoomDisabled=true;isMinimap=true};this.SetCursor=function(a){var b=p_elSource.style;if(b.cursor!=a)b.cursor=a};this.Destroy=function(){if(currentView){currentView.Destroy();currentView=null}if(preferredView){preferredView.Destroy();preferredView=null}if(copyright){copyright.Destroy();copyright=null}if(currentMode==threeDMode&&currentMode!=null)this.Destroy3DOnly();else{this.Destroy2DOnly();while(pushpins.length)pushpins.pop().Destroy();ClearLines()}if(!p_htParams.fixedView){p_elSource.detachEvent("onmousedown",MouseDown);p_elSource.detachEvent("onmouseup",MouseUp);p_elSource.detachEvent("onmousemove",MouseMove);p_elSource.detachEvent("ondblclick",MouseDoubleClick);p_elSource.detachEvent("oncontextmenu",ContextMenu);p_elSource.detachEvent("onmousewheel",MouseWheel);p_elSource.detachEvent("onclick",MouseClick);p_elSource.detachEvent("onmouseout",MouseOut);p_elSource.detachEvent("onmouseover",MouseOver);p_elSource.detachEvent("onmouseenter",MouseEnter);p_elSource.detachEvent("onmouseleave",MouseLeave)}if(dashboard){if(typeof dashboard.Destroy!="undefined")dashboard.Destroy();dashboard=null}if(mapLegend){DetachEvent("onendzoom",mapLegend.Update);DetachEvent("onendpan",mapLegend.Update);DetachEvent("onobliquechange",mapLegend.Update);if(typeof VE_TrafficManager!="undefined"&&VE_TrafficManager!=null)VE_TrafficManager.CloseTrafficLegend();mapLegend.Destroy();mapLegend=null}if(dashboardContainer){dashboardContainer.detachEvent("onmousedown",IgnoreEvent);dashboardContainer.detachEvent("onmouseup",IgnoreEvent);dashboardContainer.detachEvent("onmousemove",DashboardContainerMouseMoveEvent);dashboardContainer.detachEvent("onmousewheel",IgnoreEvent);dashboardContainer.detachEvent("ondblclick",IgnoreEvent);dashboardContainer.detachEvent("oncontextmenu",IgnoreEvent);dashboardContainer.detachEvent("onkeydown",IgnoreEvent);dashboardContainer.detachEvent("onkeyup",IgnoreEvent);dashboardContainer=null}if(minimapControl){minimapControl.Destroy();minimapControl=null}if(minimapContainer){minimapContainer.detachEvent("onmousedown",IgnoreEvent);minimapContainer.detachEvent("onmouseup",IgnoreEvent);minimapContainer.detachEvent("onmousemove",DashboardContainerMouseMoveEvent);minimapContainer.detachEvent("onmousewheel",IgnoreEvent);minimapContainer.detachEvent("ondblclick",IgnoreEvent);minimapContainer.detachEvent("oncontextmenu",IgnoreEvent);minimapContainer.detachEvent("onkeydown",IgnoreEvent);minimapContainer.detachEvent("onkeyup",IgnoreEvent);minimapContainer=null}if(orthoMode){orthoMode.Destroy();orthoMode=null}if(obliqueMode){obliqueMode.Destroy();obliqueMode=null}if(threeDMode){threeDMode.Destroy();threeDMode=null}DestroyEventTable();m_clientToken=null;p_elSource.style.backgroundColor="transparent";p_elSource.style.backgroundImage="none";p_elSource.style.filter="";keyboard=p_elSource=p_this=map=null;tileLayerManager.ClearTileLayers();cssCursors=null;cssFn=null};this.Destroy2DOnly=function(){if(!p_htParams.fixedView){keyboard.detachEvent("onkeydown",KeyDown);keyboard.detachEvent("onkeyup",KeyUp);keyboard.detachEvent("onblur",StopKeyboardPan);p_elSource.detachEvent("onmousewheel",MouseWheel)}tileLayerManager.Active=false;if(scaleBar){DetachEvent("onendzoom",scaleBar.Update);DetachEvent("onendpan",scaleBar.Update);DetachEvent("onobliquechange",scaleBar.Update);DetachEvent("onchangemapstyle",scaleBar.Update);DetachEvent("onresize",scaleBar.Reposition);scaleBar.Destroy();scaleBar=null}if(copyright)copyright.PinTo(null);if(logo){logo.Destroy();logo=null}if(boxTool){boxTool.Destroy();boxTool=null}if(panTool){panTool.Destroy();panTool=null}if(targetTool){targetTool.destroy();targetTool=null}if(graphicCanvas){graphicCanvas.Destroy();graphicCanvas=null}Fire("ondestroymode",Msn.VE.MapActionMode.Mode2D)};this.Destroy3DOnly=function(){DetachEvent("onchangetraffic",OnView3DScaleBarPositionUpdate);DetachEvent("onchangemapstyle",OnChangeMapStyle3D);view3DCreated=false;try{spacecontrol.Close()}catch(c){}spacecontrol=false;window.status="";if(spacediv!=null){spacediv.removeNode(true);spacediv=null}if(dashboard&&dashboard.GetShimmedElements){var b=dashboard.GetShimmedElements(),a;for(a=0;a<b.length;a++)destroyIFrameShim(b[a].id)}if(mapLegend)mapLegend.RemoveShim();Fire("ondestroymode",Msn.VE.MapActionMode.Mode3D)};function OnView3DScaleBarPositionUpdate(){var a=0;if(typeof Msn.VE.API!="undefined"&&Msn.VE.API!=null){if(VE_TrafficManager.turnedOn&&VE_TrafficManager.legend!=null&&VE_TrafficManager.legendPinned)a=25}else if(VE_TrafficManager.turnedOn)a=25;if(spacecontrol)spacecontrol.RaiseEvent("CB24F613-FE72-442e-857A-BB2FD6BFBAA5","OnScaleBarPositionChange",a)}function UpdateFromParent(){var a=g(p_elSource).getPagePosition();x=a.x;y=a.y;width=p_elSource.offsetWidth;height=p_elSource.offsetHeight}function CreateDashboard(c,d,b,h,e,g,f,a){if(currentMode==threeDMode&&currentMode!=null)b=Msn.VE.DashboardSize.Normal;dashboard=Msn.VE.NavControlFactory(p_elSource,p_this,b,h,e,g,f,a);dashboard.Init();dashboardContainer=dashboard.GetElement();if(a==5){if(isFinite(parseInt(c)))dashboardContainer.style.left=c+"px";if(isFinite(parseInt(d)))dashboardContainer.style.top=d+"px"}}function CreateMinimap(c,d,a,f,g,h,e){minimapContainer=document.createElement("div");if(typeof a!="undefined"&&a!=null)minimapContainer.id=a;else minimapContainer.id="MSVE_minimap";p_elSource.appendChild(minimapContainer);minimapContainer.attachEvent("onmousedown",IgnoreEvent);minimapContainer.attachEvent("onmouseup",IgnoreEvent);minimapContainer.attachEvent("onmousemove",DashboardContainerMouseMoveEvent);minimapContainer.attachEvent("onmousewheel",IgnoreEvent);minimapContainer.attachEvent("ondblclick",IgnoreEvent);minimapContainer.attachEvent("oncontextmenu",IgnoreEvent);minimapContainer.attachEvent("onkeydown",IgnoreEvent);minimapContainer.attachEvent("onkeyup",IgnoreEvent);minimapControl=new Msn.VE.Minimap(minimapContainer,p_this,g,h);if(e)minimapControl.SetClientToken(e);var b=f||IsMapViewOblique()||$MVEM.IsEnabled(MapControl.Features.Minimap.ShowByDefault);b=b&&IsModeEnabled(Msn.VE.MapActionMode.Mode2D);if(b)minimapControl.Init();if(typeof c!="undefined"&&c!=null&&typeof d!="undefined"&&d!=null)minimapControl.SetPosition(c,d);return minimapControl}function OnChangeView(){if(Msn.VE.MapStyle.IsViewOblique(currentView.mapStyle)){var b=GetObliqueScene();if(b!=null&&targetTool){var a=Msn.VE.Geometry,e=g(p_elSource).getPagePosition(),c=new a.Point(e.x+(map.offsetLeft-originX),e.y+(map.offsetTop-originY)),d=2/currentView.zoomLevel,h=new a.Point(c.x+b.GetWidth()/d,c.y+b.GetHeight()/d),f=new a.Rectangle(c,h);f.scale(-256);targetTool.setBoundingArea(f);a=null}b=null}if(obliqueMode)obliqueMode.UpdateAvailability()}function SetDefaultView(){var a=new Msn.VE.MapView(p_this);a.SetCenterLatLong(new Msn.VE.LatLong(0,0));a.SetZoomLevel(1);a.SetMapStyle(roadStyle);SetBaseTileSource(a);SetView(a);Initialized2D=true}function SetAltitude(b){Sync3dView();var a=currentView.MakeCopy();a.SetAltitude(b);SetView(a)}function SetTilt(b){Sync3dView();var a=currentView.MakeCopy();a.SetTilt(b);SetView(a)}function SetDirection(b){Sync3dView();var a=currentView.MakeCopy();a.SetDirection(b);SetView(a)}function GetCurrentMode(){return currentMode}function GetObliqueMode(){return obliqueMode}function GetOrthoMode(){return orthoMode}function GetMapWidth(){return width}function GetMapHeight(){return height}function SetMapHeight(a){height=a;p_this.h=a;p_elSource.style.height=a}function GetCurrentMapView(){return preferredView.MakeCopy()}function SetCenter(c,b){Sync3dView();var a=preferredView.MakeCopy();a.SetCenterLatLong(new Msn.VE.LatLong(c,b));SetView(a)}function SetCenterAccurate(c,b){Sync3dView();var a=preferredView.MakeCopy();a.SetCenterLatLongAccurate(new Msn.VE.LatLong(c,b));SetView(a)}function SetMapStyle(b,f,c,e,d){Sync3dView();var a=currentView.MakeCopy();a.SetMapStyle(ValidateMapStyle(b),f,c,e,d);if(Msn.VE.MapStyle.IsViewOblique(currentView.mapStyle)!=Msn.VE.MapStyle.IsViewOblique(b))if(Msn.VE.MapStyle.IsViewOblique(b)){Fire("onstartmapstyleoblique");a.SetZoomLevel(1);lastOrthoZoomLevel=currentView.zoomLevel;lastOrthoMapStyle=currentView.mapStyle}else if(Msn.VE.MapStyle.IsViewOblique(currentView.mapStyle)){Fire("onendmapstyleoblique");a.SetZoomLevel(lastOrthoZoomLevel)}a.latlong.latitude=GetCenterLatitude();a.latlong.longitude=GetCenterLongitude();if(currentMode==threeDMode)a._supressFlyToCall=true;SetView(a)}function SetScaleBarDistanceUnit(a){currentScaleBarUnit=a;if(scaleBar!=null){scaleBar.SetDistanceUnit(a);scaleBar.Update()}if(currentMode==threeDMode&&spacecontrol!=null){if(a==null)bUseKilometers=$MVEM.IsEnabled(MapControl.Features.ScaleBarKilometers);else bUseKilometers=a==Msn.VE.DistanceUnit.Kilometers;spacecontrol.DisplayMetricUnits=bUseKilometers}}function SetScaleBarVisibility(a){p_htParams.showScaleBar=a;if(currentMode!=null)if(currentMode==threeDMode){if(spacecontrol!=null)spacecontrol.ShowScale=a}else if(a){if(!scaleBar)InitScaleBar();scaleBar.Show()}else if(scaleBar)scaleBar.Hide()}function ValidateMapStyle(a){if(Msn.VE.MapStyle.IsViewOrtho(a)||Msn.VE.MapStyle.IsViewOblique(a))return a;else return roadStyle}function GetCenterLatitude(){if(currentMode==threeDMode){if(view3DCreated){var a=spacecontrol.GetCenterLatitude();return isNaN(a)?null:a}return null}else if(currentView!=null&&currentView!="undefined"&&currentView.latlong!=null&&currentView.latlong!="undefined"&&currentView.latlong.latitude!=null&&currentView.latlong.latitude!="undefined")return currentView.GetCenterLatLong().latitude;return null}function GetCenterLongitude(){if(currentMode==threeDMode){if(view3DCreated){var a=spacecontrol.GetCenterLongitude();return isNaN(a)?null:a}return null}else if(currentView!=null&&currentView!="undefined"&&currentView.latlong!=null&&currentView.latlong!="undefined"&&currentView.latlong.longitude!=null&&currentView.latlong.longitude!="undefined")return currentView.GetCenterLatLong().longitude;return null}function ComputeCenterPoint(a){currentView.latlong=currentMode.PixelToLatLong(currentView.center,currentView.zoomLevel);if(a)preferredView.Copy(currentView)}function GetLatitude(c){var b=new VEPixel(originX+offsetX+width/2,originY+offsetY+c),a=currentMode.PixelToLatLong(b,currentView.zoomLevel);if(!a)return null;return a.latitude}function GetLongitude(c){var b=new VEPixel(originX+offsetX+c,originY+offsetY+height/2),a=currentMode.PixelToLatLong(b,currentView.zoomLevel);if(!a)return null;return a.longitude}function GetY(b){var c=new Msn.VE.LatLong(b,currentView.center.longitude),a=LatLongToPixel(c);if(!a)return null;return MathRound(a.y)}function GetX(b){var c=new Msn.VE.LatLong(currentView.center.latitude,b),a=LatLongToPixel(c);if(!a)return null;return MathRound(a.x)}function LatLongToPixel(c,a){if(a==null||typeof a=="undefined")a=currentView.zoomLevel;var b=currentMode.LatLongToPixel(c,a);if(b!=null)if(currentMode!=threeDMode){b.x-=originX+offsetX;b.y-=originY+offsetY}return b}function LatLongToPixelAsync(c,a,d){if(a==null||typeof a=="undefined")a=currentView.zoomLevel;var b=function(a){if(a!=null&&typeof a!="undefined"&&currentMode!=threeDMode)for(var b=0;b<a.length;++b)if(a[b]!=null){a[b].x-=originX+offsetX;a[b].y-=originY+offsetY}d(a)};currentMode.LatLongToPixelAsync(c,a,b)}function PixelToLatLong(b,a){if(a==null||typeof a=="undefined")a=currentView.zoomLevel;var c=new VEPixel(b.x+originX+offsetX,b.y+originY+offsetY);return currentMode.PixelToLatLong(c,a)}function PixelToLatLongAsync(c,b,e){if(b==null||typeof b=="undefined")b=currentView.zoomLevel;var d=[];for(var a=0;a<c.length;++a)d[a]=new VEPixel(c[a].x+originX+offsetX,c[a].y+originY+offsetY);currentMode.PixelToLatLongAsync(d,b,e)}function GetZoomLevel(){return currentView.zoomLevel}function GetMapStyle(){return currentView.mapStyle}function GetMapMode(){var a=Msn.VE.MapActionMode.ModeUnknown;if(currentMode!=null)if(currentMode==threeDMode)a=Msn.VE.MapActionMode.Mode3D;else if(currentMode==orthoMode)a=Msn.VE.MapActionMode.Mode2D;else if(currentMode==obliqueMode)a=Msn.VE.MapActionMode.ModeOblique;return a}function GetMode(){var a=Msn.VE.MapActionMode.ModeUnknown;if(currentMode!=null)if(currentMode==threeDMode)a=Msn.VE.MapActionMode.Mode3D;else if(currentMode==orthoMode)a=Msn.VE.MapActionMode.Mode2D;else if(currentMode==obliqueMode)if(this.GetDashboard().GetMode()==1)a=Msn.VE.MapActionMode.Mode2D;else a=Msn.VE.MapActionMode.Mode3D;return a}function GetAltitude(){return currentView.GetAltitude()}function GetTilt(){return currentView.GetTilt()}function GetDirection(){return currentView.GetDirection()}function EnableMode(b,a){switch(b){case Msn.VE.MapActionMode.Mode3D:this._Enable3DMode(a);break;case Msn.VE.MapActionMode.Mode2D:default:this._Disable3DMode(a);UnHidePins()}}function _Enable3DMode(a){if(currentMode!=threeDMode&&currentMode!=null){VE_3DPhotoPluginObj=0;VE_3DGeoCommunityPluginObj=0;VE_3DStreetLevelGeometryObj=0;VE_3DWeatherPluginObj=0;VE_3DHiResModelsPluginObj=0;PluginEventRegistered=0;PhotoPluginEventRegistered=0;GeoCommunityPluginEventRegistered=0;StreetLevelGeometryEventRegistered=0;previousMode=currentMode;currentMode=threeDMode;this.Destroy2DOnly();if(typeof a!="undefined")init3dparam=a;this.Init3DOnly()}}function _Disable3DMode(a){if(currentMode==threeDMode&&currentMode!=null){previousMode=currentMode;currentMode=orthoMode;this.Destroy3DOnly();this.Init2DOnly(a)}}function ControlReady(){return IsModeEnabled(Msn.VE.MapActionMode.Mode2D)||IsModeEnabled(Msn.VE.MapActionMode.Mode3D)&&Get3DControl()!=null}function Get3DControl(){if(view3DCreated)return spacecontrol;return null}function IsModeEnabled(b){var a=currentMode!=null&&currentMode==threeDMode;switch(b){case Msn.VE.MapActionMode.Mode2D:return !a;break;case Msn.VE.MapActionMode.Mode3D:return a}return false}function Get3DVisibleArea(acceptRegionAroundCenter){if(!view3DCreated)return null;var lat1,lon1,lat2,lon2,lat3,lon3,lat4,lon4,aroundcenter,ret=spacecontrol.QueryRegion();eval(ret);if((acceptRegionAroundCenter=="undefined"||acceptRegionAroundCenter==false)&&aroundcenter==1)return null;var points=[];points.push(new Msn.VE.LatLong(lat1,lon1));points.push(new Msn.VE.LatLong(lat2,lon2));points.push(new Msn.VE.LatLong(lat3,lon3));points.push(new Msn.VE.LatLong(lat4,lon4));return points}function Show3DTraffic(a){if(view3DCreated)if(!traffic3dAdded||a){spacecontrol.AddImageSource("Terrain","Traffic",GetManifestUrl("http://go.microsoft.com/fwlink/?LinkID=98777"),1,.6);traffic3dAdded=true}}function Remove3DTraffic(){if(view3DCreated&&traffic3dAdded){spacecontrol.RemoveImageSource("Terrain","Traffic");traffic3dAdded=false}}function Show3DBirdseye(a,b){if(currentMode==threeDMode&&spacecontrol){ProcessPhotoPluginActionIn3D("PhotosEnabled","enabled="+(a?"1":"0")+";labels="+(b?"1":"0"),spacecontrol);p_this.Set3DPhotoPluginActive(a);p_this.UpdateCopyright()}}function Sync3dView(){if(spacecontrol&&spaceCameraIsFlying)spacecontrol.RaiseCameraChangedEvent()}function OnBeginCameraUpdate(){cameraUpdateCount++;spaceCameraIsFlying=true}function OnEndCameraUpdate(){spaceCameraIsFlying=false}function IsCameraFlying(){return spaceCameraIsFlying}function GetMetersPerPixel(b,a){if(!b)b=currentView.latlong.latitude;if(!a)a=currentView.zoomLevel;return Math.cos(DegToRad(b))*currentMode.MetersPerPixel(a)}function Fill(){var b=g(p_elSource).getStyle("width"),a=g(p_elSource).getStyle("height"),f=parseInt(b)-width,h=parseInt(a)-height;if(!/px$/.test(b))width=p_elSource.clientWidth||p_elSource.offsetWidth;else width=parseInt(b);if(!/px$/.test(a))height=p_elSource.clientHeight||p_elSource.offsetHeight;else height=parseInt(a);if(!panning)if(currentMode!=threeDMode){panning=true;var e=g(map).getComputedPosition(),c={x:e.x+f/2,y:e.y+h/2};offsetX=-c.x;offsetY=-c.y;var d=new VEPixel(width/2+originX+offsetX,height/2+originY+offsetY);currentView.SetCenter(d);preferredView.SetCenter(new VEPixel(d.x,d.y));window.setTimeout(tileLayerManager.PanView,1);g(map).slideToPoint(c,"quickly","MAP_SLIDE",function(){panning=false},Gimme.Animation.AccelerationLines.quickStartDecelerate)}else PanToView(currentView);if(resizeInProgress)resizeInProgress=false}function Resize(b,a){if(resizeTimer!=null&&typeof resizeTimer=="number")window.clearTimeout(resizeTimer);p_this.w=b;p_this.h=a;resizeTimer=window.setTimeout(p_this.FireResize,250)}this.FireResize=function(){if(resizeInProgress)return;else resizeInProgress=true;var b=p_this.w,a=p_this.h;if(!b||b<=0||!a||a<=0)Fill();else{p_elSource.style.width=b+"px";p_elSource.style.height=a+"px";UpdateFromParent();if(currentMode==null||currentMode!=threeDMode){if(b&&b>=0)width=b;if(a&&a>=0)height=a}PanToView(currentView)}if(copyright)copyright.Reposition();if(scaleBar)scaleBar.Reposition();if(mapLegend)mapLegend.Reposition();if(!document.all)p_this.resizeSVG();Fire("onresize")};function IsObliqueAvailable(){return obliqueMode?obliqueMode.IsAvailable():false}function GetObliqueScene(){return obliqueMode?obliqueMode.GetScene():null}function SetAnimationEnabled(a){animatedMovementEnabled=a}function IsAnimationEnabled(){return animatedMovementEnabled&&currentMode!=threeDMode}function SetObliqueScene(a){if(obliqueMode)SetMapStyle(obliqueStyle,a,null)}function SetObliqueLocation(f,c,d,e){if(obliqueMode){Sync3dView();var a=currentView.MakeCopy(),b;if(IsMapViewOblique())b=GetMapStyle();else b=p_htParams.labelsDefault?obliqueHybridStyle:obliqueStyle;a.SetMapStyle(b,null,c);a.SetZoomLevel(d);if(!Msn.VE.MapStyle.IsViewOblique(currentView.mapStyle)){Fire("onstartmapstyleoblique");lastOrthoZoomLevel=currentView.zoomLevel;lastOrthoMapStyle=currentView.mapStyle}a.SetCenterLatLong(f);a.callback=e;SetView(a)}}function SetObliqueOrientation(d,c,b){if(obliqueMode){var a;if(IsMapViewOblique())a=GetMapStyle();else a=p_htParams.labelsDefault?obliqueHybridStyle:obliqueStyle;SetMapStyle(a,null,d,c,b)}}function Debug(a){debug=a}function GetMapLegend(){return mapLegend}function SetFocus(){if(currentMode==threeDMode)spacecontrol.Focus();else keyboard.focus()}function StopKeyboardPan(){if(panning&&keyboardPan)StopContinuousPan()}function UpdatePreferredView(){preferredView.Copy(currentView)}function GetCenterOffset(){if(currentMode!=null&&currentMode==threeDMode)return new VEPixel(0,0);return mapCenterOffset}function SetCenterOffset(a){if(typeof a!="undefined"&&a!=null)mapCenterOffset=a}function GetLastViewChangeType(){var a=lastViewChangeType;lastViewChangeType=null;return a}function ShowNonIENotSupportedDialog(){Fire("onerror",CreateEvent(currentView.latlong,currentView.zoomLevel,L_BrowserNotSupported_Text.replace(/%1/g,'<a href="'+L_SupportedBrowserDownloadUrl_Text+'" target="_blank">').replace(/%3/g,L_SupportedBrowserDownloadUrl_Text).replace(/%2/g,"</a>")))}function DelayedHWDialog(){ShowMessage(L_NoHardwareAcceleration_Text)}function SetShowMapModeSwitch(a){if(dashboard&&dashboard.constructor==Msn.VE.NavAction)dashboard.SetShowMapModeSwitch(a)}function SetTilePixelBuffer(a){buffer=a<maxTilePixelBuffer?a:maxTilePixelBuffer}function SetClientToken(a){m_clientToken=a;if(tileLayerManager){tileLayerManager.SetClientToken(mapTiles,m_clientToken);tileLayerManager.SetClientToken(trafficTiles,m_clientToken)}if(minimapControl)minimapControl.SetClientToken(m_clientToken);if(obliqueMode)obliqueMode.SetClientToken(m_clientToken)}function GetTopPx(){if(typeof p_elSource!="undefined"&&p_elSource!=null)return g(p_elSource).getPagePosition().y;else return 0}function GetLeftPx(){if(typeof p_elSource!="undefined"&&p_elSource!=null)return g(p_elSource).getPagePosition().x;else return 0}function GetObliqueAvailability(b,a){if(obliqueMode)obliqueMode.GetObliqueAvailability(b,a);else if(typeof a=="function")a(false)}function GetMapSurface(){return map}this.CreateLegend=function(){if(!mapLegend){mapLegend=new MapLegend(p_elSource);mapLegend.Init();if(copyright)mapLegend.PinTo(copyright)}return mapLegend};function CalculateTileViewPort(a,b,d,c,e){return tileLayerManager.CalculateTileViewPort(a,b,d,c,e)}function GetCurrentTileViewPort(){return tileLayerManager.GetViewPort()}function SetPrintable(a){if(a){graphicCanvas.CreatePrintLayer(map,this,g(p_elSource).getStyle("width"),g(p_elSource).getStyle("height"));tileLayerManager.SetPrintable(true);graphicCanvas.AddLogo(logo.GetURL());g(p_elSource).addClass("MSVE_Printable_Map")}else{tileLayerManager.SetPrintable(false);graphicCanvas.RemovePrintLayer(this);g(p_elSource).removeClass("MSVE_Printable_Map")}}function IsMapViewOblique(){return Msn.VE.MapStyle.IsViewOblique(GetMapStyle())}function IsMapViewOrtho(){return Msn.VE.MapStyle.IsViewOrtho(GetMapStyle())}function GetTileGeneration(a){return generations[a]}function ClipView(b,c){var a=ShiftView(b,c,0,0);if(typeof a!="undefined"&&a!=null)b.SetCenter(new VEPixel(b.center.x+a.x,b.center.y+a.y))}function ShiftView(b,a,c,d){if(b!=null&&b.center!=null&&a!=null&&a!="undefined"){c=ClipDelta(c,width,b.center.x-width/2,b.zoomLevel,a.z1,a.x1,a.x2,b.mapStyle);d=ClipDelta(d,height,b.center.y-height/2,b.zoomLevel,a.z1,a.y1,a.y2,b.mapStyle);return new VEPixel(c,d)}}function ClipDelta(a,b,d,g,f,i,h){var c=tileSize*i*Math.pow(2,g-f),e=tileSize*h*Math.pow(2,g-f);if(IsMapViewOblique()){c-=Math.ceil(b/2);e+=Math.ceil(b/2)}if(b>e-c)a=(e-c-b)/2-d+c;else if(d+a<c)a=c-d;else if(d+b+a>e)a=e-d-b;return a}function VECopyrightTableEntry(b,a,e,f,c,d){this.MinZoomLevel=b;this.MaxZoomLevel=a;this.MinLatitude=e;this.MinLongitude=f;this.MaxLatitude=c;this.MaxLongitude=d}VECopyrightTableEntry.prototype.IsMatch=function(b,c,a){var d=false;if(b>=this.MinZoomLevel&&b<=this.MaxZoomLevel&&(c>=this.MinLatitude&&c<=this.MaxLatitude)&&(a>=this.MinLongitude&&a<=this.MaxLongitude))d=true;return d};function VECopyrightTable(){var L_MapControlImageCourtesyOfPictometry_Text = '&copy; 2008 Pictometry International Corp.';
var L_MapControlImageCourtesyOfBlom_Text = '&copy; 2008 Blom';
var L_MapControlImageCourtesyOfNAVTEQ_Text = '&copy; 2008 NAVTEQ';
var L_MapControlImageCourtesyOfAND_Text = '&copy; AND';
var L_MapControlImageCourtesyOfMapDataSciences_Text = '&copy; 2007 MapData Sciences Pty Ltd';
var L_MapControlImageCourtesyOfZenrin_Text = '&copy; 2007 Zenrin';
var L_MapControlImageCourtesyOfIntermap_Text = '&copy; 2007 Intermap';
var L_MapControlImageCourtesyOfNASA_Text = 'Image courtesy of NASA';
var L_MapControlImageCourtesyOfHarrisCorp_Text = '&copy; Harris Corp, Earthstar Geographics LLC';
var L_MapControlImageCourtesyOfUSGS_Text = 'Image courtesy of USGS';
var L_MapControlImageCourtesyOfGetmapping_Text = '&copy; Getmapping plc';
var L_MapControlImageCourtesyOfGeoEye_Text = '&copy; 2008 GeoEye';
var L_MapControlImageCourtesyOfPasco_Text = '&copy; 2005 Pasco';
var L_MapControlImageCourtesyOfIntergraph_Text = '&copy; GeoContent / (p) Intergraph';
var L_MapControlImageCourtesyOfTerraItaly_Text = '&copy; 2007 TerraItaly';
var L_MapControlImageCourtesyOfIntermap_Text = '&copy; 2007 Intermap';
var L_MapControlImageCourtesyOfIndianaMap_Text = 'Image courtesy of the IndianaMap';
var L_MapControlImageCourtesyOfStateOfNevada_Text = 'Image courtesy of the Nevada State Mapping Advisory Committee';
var L_MapControlImageCourtesyOfInterAtlas_Text = '&copy; 2007 InterAtlas';
var L_MapControlImageCourtesyOfEurosense_Text = '&copy; 2008 Eurosense';
var L_MapControlImageCourtesyOfIGP_Text = '&copy; 2008 IGP';
var L_MapControlImageCourtesyOfIGN_Text = '&copy; 2008 IGN';
var L_MapControlImageCourtesyOfBEV_Text = '&copy; 2008 BEV / (p) Intergraph';

var m_tableKeys = [];
m_tableKeys[Msn.VE.MapStyle.Oblique] = [ L_MapControlImageCourtesyOfPictometry_Text, L_MapControlImageCourtesyOfBlom_Text ];
m_tableKeys[Msn.VE.MapStyle.Road] = [ L_MapControlImageCourtesyOfNAVTEQ_Text, L_MapControlImageCourtesyOfAND_Text, L_MapControlImageCourtesyOfMapDataSciences_Text, L_MapControlImageCourtesyOfZenrin_Text, L_MapControlImageCourtesyOfIntermap_Text ];
m_tableKeys[Msn.VE.MapStyle.Aerial] = [ L_MapControlImageCourtesyOfNASA_Text, L_MapControlImageCourtesyOfHarrisCorp_Text, L_MapControlImageCourtesyOfUSGS_Text, L_MapControlImageCourtesyOfGetmapping_Text, L_MapControlImageCourtesyOfGeoEye_Text, L_MapControlImageCourtesyOfPasco_Text, L_MapControlImageCourtesyOfIntergraph_Text, L_MapControlImageCourtesyOfTerraItaly_Text, L_MapControlImageCourtesyOfIntermap_Text, L_MapControlImageCourtesyOfIndianaMap_Text, L_MapControlImageCourtesyOfStateOfNevada_Text, L_MapControlImageCourtesyOfInterAtlas_Text, L_MapControlImageCourtesyOfEurosense_Text, L_MapControlImageCourtesyOfIGP_Text, L_MapControlImageCourtesyOfIGN_Text, L_MapControlImageCourtesyOfBEV_Text ];

var m_table = [];
m_table[Msn.VE.MapStyle.Oblique] = [];
m_table[Msn.VE.MapStyle.Oblique][L_MapControlImageCourtesyOfPictometry_Text] = [];
m_table[Msn.VE.MapStyle.Oblique][L_MapControlImageCourtesyOfPictometry_Text].push( new VECopyrightTableEntry( 1, 20, 24, -125, 49, -66) );
m_table[Msn.VE.MapStyle.Oblique][L_MapControlImageCourtesyOfBlom_Text] = [];
m_table[Msn.VE.MapStyle.Oblique][L_MapControlImageCourtesyOfBlom_Text].push( new VECopyrightTableEntry( 1, 20, 34, -13, 72, 35) );
m_table[Msn.VE.MapStyle.Road] = [];
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfNAVTEQ_Text] = [];
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfNAVTEQ_Text].push( new VECopyrightTableEntry( 1, 9, -90, -180, 90, 180) );
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfNAVTEQ_Text].push( new VECopyrightTableEntry( 10, 19, 16, -180, 90, -50) );
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfNAVTEQ_Text].push( new VECopyrightTableEntry( 10, 19, 27, -32, 40, -13) );
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfNAVTEQ_Text].push( new VECopyrightTableEntry( 10, 19, 35, -11, 72, 20) );
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfNAVTEQ_Text].push( new VECopyrightTableEntry( 10, 19, 21, 20, 72, 32) );
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfNAVTEQ_Text].push( new VECopyrightTableEntry( 10, 19, 21.92, 113.14, 22.79, 114.52) );
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfNAVTEQ_Text].push( new VECopyrightTableEntry( 10, 19, 21.73, 119.7, 25.65, 122.39) );
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfNAVTEQ_Text].push( new VECopyrightTableEntry( 10, 19, 0, 98.7, 8, 120.17) );
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfNAVTEQ_Text].push( new VECopyrightTableEntry( 10, 19, 0.86, 103.2, 1.92, 104.45) );
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfAND_Text] = [];
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfAND_Text].push( new VECopyrightTableEntry( 10, 19, -90, -180, 90, 180) );
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfMapDataSciences_Text] = [];
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfMapDataSciences_Text].push( new VECopyrightTableEntry( 5, 19, -45, 111, -9, 156) );
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfMapDataSciences_Text].push( new VECopyrightTableEntry( 5, 19, -49.7, 164.42, -30.82, 180) );
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfZenrin_Text] = [];
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfZenrin_Text].push( new VECopyrightTableEntry( 4, 19, 23.5, 122.5, 46.65, 151.66) );
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfIntermap_Text] = [];
m_table[Msn.VE.MapStyle.Road][L_MapControlImageCourtesyOfIntermap_Text].push( new VECopyrightTableEntry( 1, 21, 49, -11, 60, 2) );
m_table[Msn.VE.MapStyle.Aerial] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfNASA_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfNASA_Text].push( new VECopyrightTableEntry( 1, 8, -90, -180, 90, 180) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfHarrisCorp_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfHarrisCorp_Text].push( new VECopyrightTableEntry( 9, 13, -90, -180, 90, 180) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfUSGS_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfUSGS_Text].push( new VECopyrightTableEntry( 14, 19, 17.99, -150.11, 61.39, -65.57) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfGetmapping_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfGetmapping_Text].push( new VECopyrightTableEntry( 14, 19, 49.94, -6.35, 58.71, 1.78) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfGeoEye_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfGeoEye_Text].push( new VECopyrightTableEntry( 14, 19, 44.53, -63.75, 45.06, -63.45) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfGeoEye_Text].push( new VECopyrightTableEntry( 14, 19, 45.39, -73.78, 45.66, -73.4) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfGeoEye_Text].push( new VECopyrightTableEntry( 14, 19, 45.2, -75.92, 45.59, -75.55) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfGeoEye_Text].push( new VECopyrightTableEntry( 14, 19, 42.95, -79.81, 44.06, -79.42) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfGeoEye_Text].push( new VECopyrightTableEntry( 14, 19, 50.35, -114.26, 51.25, -113.82) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfGeoEye_Text].push( new VECopyrightTableEntry( 14, 19, 48.96, -123.33, 49.54, -122.97) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfGeoEye_Text].push( new VECopyrightTableEntry( 14, 19, -35.42, 138.32, -34.47, 139.07) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfGeoEye_Text].push( new VECopyrightTableEntry( 14, 19, -32.64, 115.58, -32.38, 115.85) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfGeoEye_Text].push( new VECopyrightTableEntry( 14, 19, -34.44, 150.17, -33.27, 151.49) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfGeoEye_Text].push( new VECopyrightTableEntry( 14, 19, -28.3, 152.62, -26.94, 153.64) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfPasco_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfPasco_Text].push( new VECopyrightTableEntry( 14, 19, 23.5, 122.5, 46.65, 151.66) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIntergraph_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIntergraph_Text].push( new VECopyrightTableEntry( 14, 19, 47, 5, 55.5, 16) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfTerraItaly_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfTerraItaly_Text].push( new VECopyrightTableEntry( 14, 21, 43.15, 6.5, 47.15, 14) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfTerraItaly_Text].push( new VECopyrightTableEntry( 14, 21, 41.3, 9.9, 43.15, 16.4) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfTerraItaly_Text].push( new VECopyrightTableEntry( 14, 21, 36.5, 7.9, 41.3, 18.7) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIntermap_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIntermap_Text].push( new VECopyrightTableEntry( 1, 21, 49, -11, 60, 2) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIndianaMap_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIndianaMap_Text].push( new VECopyrightTableEntry( 14, 19, 37.7, -88.2, 41.9, -84.7) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfStateOfNevada_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfStateOfNevada_Text].push( new VECopyrightTableEntry( 14, 19, 34.85, -120.2, 42.12, -113.91) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfInterAtlas_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfInterAtlas_Text].push( new VECopyrightTableEntry( 14, 21, 48.37, 1.4, 49.28, 3.37) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfInterAtlas_Text].push( new VECopyrightTableEntry( 14, 19, 47.72, 1.67, 48.05, 2.18) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfInterAtlas_Text].push( new VECopyrightTableEntry( 14, 19, 45.55, 4.57, 45.95, 5.33) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfInterAtlas_Text].push( new VECopyrightTableEntry( 14, 19, 43.18, 4.92, 43.77, 5.82) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfEurosense_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfEurosense_Text].push( new VECopyrightTableEntry( 14, 19, 51, 3, 53.65, 7.67) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfEurosense_Text].push( new VECopyrightTableEntry( 14, 19, 50.58, 5.42, 51, 5.47) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIGP_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIGP_Text].push( new VECopyrightTableEntry( 14, 19, 36.88, -9.6, 42.27, -6) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIGN_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIGN_Text].push( new VECopyrightTableEntry( 14, 19, 42, -5, 51.25, 8.5) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIGN_Text].push( new VECopyrightTableEntry( 14, 19, 41.25, 8.3, 43.1, 9.65) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIGN_Text].push( new VECopyrightTableEntry( 14, 19, 17.85, -63.17, 18.15, -62.77) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIGN_Text].push( new VECopyrightTableEntry( 14, 19, 15.75, -61.9, 16.55, -60.9) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIGN_Text].push( new VECopyrightTableEntry( 14, 19, 14.35, -61.25, 14.95, -60.75) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIGN_Text].push( new VECopyrightTableEntry( 14, 19, 2.25, -54.65, 6, -51.4) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIGN_Text].push( new VECopyrightTableEntry( 14, 19, -21.5, 55, -20.75, 56) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfIGN_Text].push( new VECopyrightTableEntry( 14, 19, 46.7, -56.5, 47.2, -56.1) );
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfBEV_Text] = [];
m_table[Msn.VE.MapStyle.Aerial][L_MapControlImageCourtesyOfBEV_Text].push( new VECopyrightTableEntry( 14, 19, 46.25, 9.4, 49.2, 17.3) );

;this.CreditsFor=function(a,i,j,h){var e=[];if(a!="undefined"&&a!=null&&typeof m_tableKeys[a]!="undefined"&&m_tableKeys[a]!=null){var k=m_tableKeys[a].length;for(var c=0;c<k;++c){var f=m_tableKeys[a][c],d=m_table[a][f],g=d.length;for(var b=0;b<g;++b)if(d[b].IsMatch(i,j,h)){e.push(f);break}}}return e};this.CreditsForView=function(a){var b=[];b.push(L_MapCopyrightMicrosoft);if(a.mapStyle==Msn.VE.MapStyle.Hybrid){b=b.concat(this.CreditsFor(Msn.VE.MapStyle.Road,a.zoomLevel,a.latlong.latitude,a.latlong.longitude));b=b.concat(this.CreditsFor(Msn.VE.MapStyle.Aerial,a.zoomLevel,a.latlong.latitude,a.latlong.longitude))}else if(a.mapStyle==Msn.VE.MapStyle.ObliqueHybrid){b=b.concat(this.CreditsFor(Msn.VE.MapStyle.Road,17,a.latlong.latitude,a.latlong.longitude));b=b.concat(this.CreditsFor(Msn.VE.MapStyle.Oblique,a.zoomLevel,a.latlong.latitude,a.latlong.longitude))}else b=b.concat(this.CreditsFor(a.mapStyle,a.zoomLevel,a.latlong.latitude,a.latlong.longitude));if(view3DCreated&&a.mapStyle!=Msn.VE.MapStyle.Oblique&&photoplugin3dActive)b=b.concat(this.CreditsFor(Msn.VE.MapStyle.Oblique,a.zoomLevel,a.latlong.latitude,a.latlong.longitude));if(typeof VE_TrafficManager!=="undefined")if(VE_TrafficManager.turnedOn&&L_MapCopyrightTraffic!=""){var d=false;if(L_MapControlImageCourtesyOfNAVTEQ_Text)for(var c=0;c<b.length;c++)if(b[c]==L_MapControlImageCourtesyOfNAVTEQ_Text){d=true;b.splice(c+1,0,L_MapCopyrightTraffic);break}if(!d)b.push(L_MapCopyrightTraffic)}return b}}var g_sVECopyrightTable=new VECopyrightTable;function Copyright(f){var d=document.createElement("div"),a=document.createElement("div"),c=null,b=null;this.Show=function(){f.appendChild(d);f.appendChild(a)};this.Hide=function(){try{f.removeChild(d);f.removeChild(a)}catch(b){}};this.Init=function(){d.className="MSVE_Copyright MSVE_CopyrightBackground";a.className="MSVE_Copyright MSVE_CopyrightForeground";e();this.Show()};this.Destroy=function(){this.Hide();c=null;b=null;d=a=null};function e(){var e=0;if(c&&c.style.display!=="none"){var h=parseInt(g(c).getStyle("height")),f=parseInt(c.style.bottom);e+=(isNaN(h)?0:h)+(isNaN(f)?0:f)}d.style.bottom=e+"px";a.style.bottom=e+1+"px";if(b)window.setTimeout(b.Reposition,1)}function j(){var g=g_sVECopyrightTable.CreditsForView(currentView),c="",f="";for(var b=0;b<g.length;++b){if(b>0)if(b==2)c+="\n";else c+="  ";f+="<span>"+g[b]+"</span> ";c+=g[b]}if(view3DCreated)spacecontrol.SetCopyrightString(c);d.innerHTML=f;a.innerHTML=f;e()}function i(){e()}function k(c){b=c;if(b)b.SetPinElement(a)}function h(a){c=a;e()}this.Reposition=e;this.Update=j;this.SetOffset=i;this.PinTo=k;this.SetPinElement=h}function MapEvent(f,d,e,a,c,b,g){this.view=f;this.oblique=d;this.error=e;this.requestedView=a;this.elementID=c;this.mouseButton=b;this.e=g}function CreateEvent(b,f,c,d,e,n,g,h){var a=currentView.MakeCopy();if(b!=null&&b instanceof Msn.VE.LatLong){if(Msn.VE.API!=null){var m=new VELatLongFactory(new VELatLongFactorySpecFromMapView(a));a.LatLong=m.CreateVELatLong(b.latitude,b.longitude);a.latlong=b}else a.latlong=b;if(typeof g!="undefined"&&g!=null)a.altitude=parseFloat(g);else a.altitude=0}if(f!=null&&typeof f=="number")a.zoomLevel=f;if(c==null||typeof c=="undefined")c="";var j=null;if(obliqueMode)j=obliqueMode.GetEventInfo();var i=null;if(d!=null&&d instanceof Msn.VE.MapView)i=d.MakeCopy();var k=null;if(typeof e!="undefined"&&e!=null)k=e;var l=null;if(typeof h!="undefined"&&h!=null)l=h;return new MapEvent(a,j,c,i,k,n,l)}function CreateCustomEvent(h,b,d){var a=new MapEvent;if(d)a.error=d.error;a.eventName=h;a.zoomLevel=currentView.zoomLevel;a.mapStyle=currentView.mapStyle;if(currentMode!=threeDMode){a.birdseyeSceneID=currentView.sceneId;a.birdseyeSceneOrientation=currentView.sceneOrientation;if(b){a.leftMouseButton=IsLeftMouseButton(b);a.rightMouseButton=IsRightMouseButton(b);a.middleMouseButton=IsMiddleMouseButton(b);a.mouseWheelChange=GetMouseScrollDelta(b);a.screenX=b.screenX;a.screenY=b.screenY;var e=Gimme.Screen.getMousePosition(b);a.clientX=e.x;a.clientY=e.y;var f=g(p_elSource).getPagePosition();a.mapX=a.clientX-f.x;a.mapY=a.clientY-f.y;a.keyCode=b.keyCode;a.altKey=b.altKey;a.ctrlKey=b.ctrlKey;a.shiftKey=b.shiftKey;a.elementID=null;var c=GetTarget(b);while(typeof c!="undefined"&&c!=null)if(typeof c.id!="undefined"&&c.id!=null&&c.id.indexOf(MC_IID_NAMESPACE)==0&&c.tagName!="CANVAS"){a.elementID=c.id;break}else if(typeof c.className!="undefined"&&c.className!=null&&c.className=="MSVE_MapContainer")break;else c=c.parentElement}}else if(d){if(d.view)a.latLong=d.view.LatLong;else a.latLong=null;a.elementID=d.elementID;a.leftMouseButton=d.mouseButton=="Left";a.rightMouseButton=d.mouseButton=="Right";a.middleMouseButton=d.mouseButton=="Middle";a.mouseWheelChange=0;a.keyCode=0;a.altKey=false;a.ctrlKey=false;a.shiftKey=false}return a}function AttachEvent(d,c){var a=defaultEventTable[d];if(!a){a=[];defaultEventTable[d]=a}for(var b=0;b<a.length;b++)if(a[b]==c)return true;a.push(c)}function DetachEvent(d,c){var a=defaultEventTable[d];if(!a)return;for(var b=0;b<a.length;b++)if(a[b]==c)a.splice(b,1)}function AttachCustomEvent(d,c){var a=customEventTable[d];if(!a){a=[];customEventTable[d]=a}for(var b=0;b<a.length;b++)if(a[b]==c)return true;a.push(c)}function DetachCustomEvent(d,c){var a=customEventTable[d];if(a)for(var b=0;b<a.length;b++)if(a[b]==c)a.splice(b,1)}function IsEventAttached(a){var b=customEventTable[a],c=defaultEventTable[a];return c!=null||b!=null}function Fire(b,a){FireCustomEvent(b,a);FireDefaultEvent(b,a)}function FireDefaultEvent(d,b){var a=defaultEventTable[d];if(!b)b=CreateEvent();if(a)for(var c=0;c<a.length;c++)a[c](b)}var currentShapeID=null;function FireCustomEvent(d,a){var b=false,c=customEventTable[d];if(c){if(a&&a instanceof MapEvent){var f=window.event;a=CreateCustomEvent(d,f,a)}else a=CreateCustomEvent(d,a,null);for(var e=0;e<c.length;e++)b=b|c[e](a)}return b}function DisposeAllCustomEvent(){while(customEventTable.length){var a=customEventTable.pop();while(a.length)a.pop();a=null}}function DestroyEventTable(){while(defaultEventTable.length){var a=defaultEventTable.pop();while(a.length)a.pop();a=null}defaultEventTable=null;DisposeAllCustomEvent();customEventTable=null}function KeyDown(c){if(isMinimap)return false;c=GetEvent(c);if(FireCustomEvent("onkeydown",c))return false;var e=c.ctrlKey?5:1,d=keyboardPanSpeed*e,a=panningX,b=panningY;switch(c.keyCode){case 9:case 17:case 18:if(panning&&keyboardPan)StopContinuousPan();return true;case 37:a=-d;break;case 38:b=-d;break;case 39:a=d;break;case 40:b=d;break;case 107:case 187:case 61:case 43:a=0;b=0;ZoomIn();$VE_A.Log($VE_A.PgName.Map,"Zoom in","Keyboard");break;case 109:case 189:a=0;b=0;ZoomOut();$VE_A.Log($VE_A.PgName.Map,"Zoom out","Keyboard");break;case 65:if($MVEM.IsEnabled(MapControl.Features.MapStyle.Aerial)){a=0;b=0;SetMapStyle(aerialStyle);$VE_A.Log($VE_A.PgName.Map,"MapStyleAerial","Keyboard")}break;case 72:if($MVEM.IsEnabled(MapControl.Features.MapStyle.Hybrid)){a=0;b=0;SetMapStyle(hybridStyle);$VE_A.Log($VE_A.PgName.Map,"MapStyleHybrid","Keyboard")}break;case 82:if($MVEM.IsEnabled(MapControl.Features.MapStyle.Road)){a=0;b=0;SetMapStyle(roadStyle);$VE_A.Log($VE_A.PgName.Map,"MapStyleRoad","Keyboard")}break;case 66:if($MVEM.IsEnabled(MapControl.Features.MapStyle.BirdsEye))if(obliqueMode&&obliqueMode.IsAvailable()){a=0;b=0;SetMapStyle(obliqueHybridStyle);$VE_A.Log($VE_A.PgName.Map,"MapStyleObliqueHybrid","Keyboard")}break;case 79:if($MVEM.IsEnabled(MapControl.Features.MapStyle.BirdsEye))if(obliqueMode&&obliqueMode.IsAvailable()){a=0;b=0;SetMapStyle(obliqueStyle);$VE_A.Log($VE_A.PgName.Map,"MapStyleOblique","Keyboard")}break;case 51:case 99:if($MVEM.IsEnabled(MapControl.Features.MapStyle.View3D)){p_this.EnableMode(Msn.VE.MapActionMode.Mode3D);$VE_A.Log($VE_A.PgName.Map,"Mode3D","Keyboard")}}if(a||b)ContinuousPan(a,b,null,true);FireDefaultEvent("onkeydown");return false}function KeyUp(a){a=GetEvent(a);if(FireCustomEvent("onkeyup",a))return false;var b=panningX,c=panningY,d=true;switch(a.keyCode){case 37:b=0;break;case 38:c=0;break;case 39:b=0;break;case 40:c=0;break;default:d=false}if(d){ContinuousPan(b,c,null,true);$VE_A.Log($VE_A.PgName.Map,"Pan","Keyboard")}if(FireCustomEvent("onkeypress",a))return false}var northLatitude=0,southLatitude=0,westLongitude=0,eastLongitude=0;function AddLine(h,f,g,l,n,m,a,d,i,k,j){if(h==null||f==null||g==null||a==null||d==null)return null;var e=[];for(var b=0;b<a.length;b++)e.push(BuildRegionHeap(a[b],0,a[b].length-1));var c=new Line;c.Init(h,f,g,l,n,m,e,d,i,k,j);lines.push(c);return c}function RemoveLine(c){for(var a=0;a<lines.length;a++){var b=lines[a];if(b.id==c){lines.splice(a,1);b.Destroy();return}}}function ClearLines(){while(lines.length>0)lines.pop().Destroy()}function ShowLines(){graphicCanvas.Clear();for(var a=0;a<lines.length;a++){lines[a].StartLine();lines[a].Show()}}function HideLines(){for(var a=0;a<lines.length;a++){lines[a].Hide();lines[a].RemoveFromMap()}}function UpdateLines(){if(typeof graphicCanvas==="object"&&graphicCanvas!==null)graphicCanvas.Clear();if(!document.all)currentView.GetMap().resetSvgLayer();for(var a=0;a<lines.length;a++)lines[a].UpdateLine()}function BuildRegionHeap(f,e,g){var h=g-e+1;if(h<1)return null;else if(h==1)return f[e];var d=null,c=null;if(h==2){d=f[e];c=f[g]}else{var i=Math.round((e+g)/2);d=BuildRegionHeap(f,e,i);c=BuildRegionHeap(f,i+1,g)}if(d!=null&&c!=null){var b=d.boundingRectangle,a=c.boundingRectangle,l=b[0].latitude>a[0].latitude?b[0].latitude:a[0].latitude,k=b[0].longitude>a[0].longitude?b[0].longitude:a[0].longitude,m=b[1].latitude<a[1].latitude?b[1].latitude:a[1].latitude,n=b[1].longitude<a[1].longitude?b[1].longitude:a[1].longitude,j=[new Msn.VE.LatLong(l,k),new Msn.VE.LatLong(m,n)];return new Msn.VE.LineRegion(j,null,[d,c])}else if(d!=null)return d;else if(c!=null)return c;return null}var IsDrivingEventAttached=false;function Line(){var t=5,v=new Msn.Drawing.Color(0,169,235,.7),w="Solid",d=new Msn.Drawing.Stroke,H=4,c=null,e="",f=true,A="",i="",r=0,y=0,x=0,B=0,z=0,a=null,b=null,h=null,g=null,I=0,J=0,n=false;function F(m,u,C,c,j,k,p,s,l,f,o){if(!c)c=t;if(!j)j=v;if(!k)k=defaultZIndex;if(!f)f=w;n=o;this.id=m;e=m;if(l)d.linejoin=l;A=c+"pt";i=j;r=k;a=u;b=C;g=s;h=p;y=a[0];x=b[0];B=a[a.length-1];z=b[b.length-1];d.color=i;d.width=c;d.linecap=f;q();if(!IsDrivingEventAttached){AttachEvent("onstartzoom",HideLines);AttachEvent("onchangeview",UpdateLines);IsDrivingEventAttached=true}this._Draw3D();AttachEvent("oninitmode",this._Draw3D)}function E(){if(view3DCreated)spacecontrol.DeleteGeometry(0,e);DetachEvent("oninitmode",this._Draw3D);m();a=b=h=c=null}this._Draw3D=function(){if(view3DCreated){var c=[];for(var f=0;f<a.length;f++){c.push(b[f]);c.push(",");c.push(a[f]);if(f!=a.length-1)c.push(" ")}var g=c.join("");spacecontrol.AddPolyline("0",e,g,i.ToHexString(),.75,d.width)}};function m(){if(graphicCanvas)graphicCanvas.Clear()}function G(){if(!f){j();return}if(c)c.style.display="block"}function j(){if(c)c.style.display="none"}function u(a){f=a;if(!f)j()}function q(){l();o()}function D(){l();o()}function l(){var a=height<900?900:height,b=width<900?900:width;northLatitude=GetLatitude(-0.5*a);southLatitude=GetLatitude(1.5*a);westLongitude=GetLongitude(-0.5*b);eastLongitude=GetLongitude(1.5*b)}function o(){if(Msn.VE.MapStyle.IsViewOblique(currentView.mapStyle)){graphicCanvas.Clear();return}if(view3DCreated)return;var b=[],a=g.length-1;while(g[a]<currentView.zoomLevel&&a>=0)a--;k(h[a],b);C(b)}function k(f,c){if(s(f.boundingRectangle[0],f.boundingRectangle[1]))return;if(f.childRegions!=null)for(var j=0;j<f.childRegions.length;j++)k(f.childRegions[j],c);else{var h=f.indices,e=new Msn.VE.LatLong(a[h[0]],b[h[0]]),d,g=false;if(p(e.latitude,e.longitude)){c.push(e.longitude);c.push(e.latitude);g=true}for(var i=1;i<h.length;i++){d=new Msn.VE.LatLong(a[h[i]],b[h[i]]);if(p(d.latitude,d.longitude)){if(!g){c.push(e.longitude);c.push(e.latitude)}g=true;c.push(d.longitude);c.push(d.latitude)}else if(g){g=false;c.push(d.longitude);c.push(d.latitude)}e=d}}}function C(g){if(!graphicCanvas)return;var a=new Msn.Drawing.PolyLine(g);a.id=e;var b=VE_LatLongThreshold.UseThreshold;VE_LatLongThreshold.UseThreshold=false;graphicCanvas.SetZIndex(r);graphicCanvas.SetStroke(d);graphicCanvas.DrawPrimitive(a,n);VE_LatLongThreshold.UseThreshold=b;c=$ID(e);if(f)c.style.display="block";else c.style.display="none"}function p(a,b){return a>=southLatitude&&a<=northLatitude&&b>=westLongitude&&b<=eastLongitude}function s(a,b){return a.latitude>northLatitude&&b.latitude>northLatitude||a.latitude<southLatitude&&b.latitude<southLatitude||a.longitude>eastLongitude&&b.longitude>eastLongitude||a.longitude<westLongitude&&b.longitude<westLongitude}this.Init=F;this.Destroy=E;this.RemoveFromMap=m;this.Show=G;this.Hide=j;this.ChangeVisibility=u;this.StartLine=q;this.UpdateLine=D}function Logo(b){var a=null;this.Init=function(){if(navigator.userAgent.toLowerCase().indexOf("msie")!=-1){a=document.createElement("div");a.className="MSVE_PoweredByLogo MSVE_PoweredByLogo_ie";if(Msn.VE.API!=null)a.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+Msn.VE.API.Globals.vecurrentdomain+"/i/bin/"+Msn.VE.API.Globals.vecurrentversion+"/"+MapControl.Features.Image.PoweredLogo+"', sizingMethod='scale')"}else{a=document.createElement("img");a.src=this.GetURL();a.className="MSVE_PoweredByLogo"}b.appendChild(a)};this.GetURL=function(){var c=location.pathname.lastIndexOf("/"),d=location.pathname.substring(0,c+1),b="http://"+location.host+d,a="";if(Msn.VE.API!=null){b=Msn.VE.API.Globals.vecurrentdomain+"/";a=Msn.VE.API.Globals.vecurrentversion}else a=window.buildVersion;return b+"i/bin/"+a+"/"+MapControl.Features.Image.PoweredLogo};this.Destroy=function(){b.removeChild(a);a=null}}var hijackMouseMove=false,hijackMouseCursor=false,isLastButtonMiddle=false;function MouseDown(a){a=GetEvent(a);CancelEvent(a);if(currentMode!=threeDMode&&FireCustomEvent("onmousedown",a))return false;if(zooming)return false;if(panning)StopContinuousPan();if(obliqueMode)obliqueMode.CancelRequest();if(!mouseZoomDisabled)if(a.which&&a.which==2)currentTool=boxTool;else if(!a.which&&a.button&&a.button==4)currentTool=boxTool;else if(a.ctrlKey|a.altKey)currentTool=boxTool;if(!document.all&&!isEnablingDefaultDblClick)isEnablingDefaultDblClick=true;dragging=true;var b=typeof a.which!="undefined"?a.which:a.button;if(!hijackMouseMove&&!hijackMouseCursor&&b==1)p_this.SetCursor(cssCursors.Grabbing);if(currentTool)currentTool.OnMouseDown(a);return false}var lastmouseX=0,lastmouseY=0;function MouseMove(a){a=GetEvent(a);var b=Gimme.Screen.getMousePosition(a);lastmouseX=b.x;lastmouseY=b.y;if(currentMode!=threeDMode&&FireCustomEvent("onmousemove",a))return false;if(hijackMouseMove){a=GetEvent(a);CancelEvent(a);var c=g(p_elSource).getPagePosition();x=c.x;y=c.y;var e=originX+offsetX+lastmouseX-x,f=originY+offsetY+lastmouseY-y,d=CreateEvent(currentMode.PixelToLatLong(new VEPixel(e,f),currentView.zoomLevel));FireDefaultEvent("onmousemove",d);return}if(currentTool&&dragging)currentTool.OnMouseMove(a);return false}function MouseUp(a){a=GetEvent(a);CancelEvent(a);if(a)isLastButtonMiddle=IsMiddleMouseButton(a);if(currentMode!=threeDMode&&FireCustomEvent("onmouseup",a))return false;dragging=false;if(!hijackMouseMove&&!hijackMouseCursor)p_this.SetCursor(cssCursors.Grab);var b;if(currentTool)b=currentTool.OnMouseUp(a);if(targetTool&&targetTool.isOutOfBounds())targetTool.OnMouseUp(a);var c=true;if(typeof b!="undefined"&&b.view!=null){isEnablingDefaultDblClick=b.view.disableDbClick!=true;c=b.view.disableMapFocus!=true}else isEnablingDefaultDblClick=true;currentTool=panTool;try{if(c)keyboard.focus()}catch(d){}return false}function IsOnscreen(c,d){var b=tileSize*Math.pow(2,currentView.zoomLevel),a=originX+offsetX+c-x;if(a<0||a>b)return false;a=originY+offsetY+d-y;if(a<0||a>b)return false;return true}var isEnablingDefaultDblClick=true;function MouseDoubleClick(a){a=GetEvent(a);CancelEvent(a);var b=Gimme.Screen.getMousePosition(a);if(currentMode!=threeDMode&&FireCustomEvent("ondoubleclick",a))return false;if(hijackMouseMove)return false;if(isEnablingDefaultDblClick){UpdateFromParent();if(panning||zooming||mouseZoomDisabled)return false;if(!IsMapViewOblique()&&!IsOnscreen(b.x,b.y))return false;var c=preferredView.MakeCopy();c.SetCenter(new VEPixel(originX+offsetX+b.x-x-mapCenterOffset.x,originY+offsetY+b.y-y-mapCenterOffset.y));if(a.ctrlKey|a.altKey){c.SetZoomLevel(currentView.zoomLevel-1);$VE_A.Log($VE_A.PgName.Map,"Zoom out","Mouse")}else{c.SetZoomLevel(currentView.zoomLevel+1);$VE_A.Log($VE_A.PgName.Map,"Zoom in","Mouse")}SetView(c);return false}else isEnablingDefausltDblClick=true}function MouseWheel(a){a=GetEvent(a);CancelEvent(a);if(currentMode!=threeDMode&&FireCustomEvent("onmousewheel",a))return false;if(currentMode!=null&&currentMode==threeDMode)return false;if(panning||zooming||mouseZoomDisabled)return false;var g=GetMouseScrollDelta(a);if(g===0)return false;var c=g>0;if(mousewheelZoomToCenter||IsMapViewOblique()||!IsOnscreen(lastmouseX,lastmouseY))if(c){ZoomIn();$VE_A.Log($VE_A.PgName.Map,"Zoom in","Mouse")}else{ZoomOut();$VE_A.Log($VE_A.PgName.Map,"Zoom out","Mouse")}else{var b=c?currentView.zoomLevel+1:currentView.zoomLevel-1;if(b<=GetCurrentViewMaxZoomLevel(currentView)){UpdateFromParent();var h=lastmouseX-x,i=lastmouseY-y,e=originX+offsetX+h,f=originY+offsetY+i,d=preferredView.MakeCopy();e=currentView.ScaleCoord(e,b);f=currentView.ScaleCoord(f,b);d.SetZoomLevel(b);if(c)$VE_A.Log($VE_A.PgName.Map,"Zoom in","Mouse");else $VE_A.Log($VE_A.PgName.Map,"Zoom out","Mouse");d.SetCenter(new VEPixel(e-h+width/2,f-i+height/2));SetView(d)}}return false}function ContextMenu(a){if(mouseZoomDisabled)return false;a=GetEvent(a);CancelEvent(a);if(currentMode!=threeDMode&&FireCustomEvent("onclick",a))return false;var e=g(p_elSource).getPagePosition();x=e.x;y=e.y;var c,d,b=Gimme.Screen.getMousePosition(a);if(currentMode==t