// // VirtualEarth version 6.3, downloaded from http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.3&mkt=en-us // Use http://jsbeautifier.org/ to make the javascript readable // 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_UnsupportMethod_Text = "%1 method is not supported.", L_UnsupportClass_Text = "%1 class is not supported.", L_UnsupportProperty_Text = "'%1' class does not support property '%2' equals to '%3'.", 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 = "Unable to 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_routelessthanoneminute_Text = "Less Than One Minute", L_hoursandminutes_Text = "%1 Hours, %2 Minutes", L_minutes_Text = "%1 Minutes", 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_CredentialsInvalid_Text = "Invalid Credentials.", 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_invalidsearchresult_Text = "No results were found.", 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 Bing Maps 3D", L_Dashboard3DInstalled_Text = "Bing Maps 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 Bing Maps 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 = "Bing Maps 3D is currently not supported for your browser. For a list of supported browsers, see Help.", L_NoHardwareAcceleration_Text = "Bing Maps 3D has detected that hardware acceleration is turned off.", L_3DLoading_Text = "Initializing Bing Maps 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_MapLegendAndPopupLink_Text = "Zoom in for traffic details", L_GeoRssInvalidFormatError_Text = "The GeoRSS file you have tried to import is improperly formatted.", L_BingSearchWatermark_Text = "Search on Bing", L_BingSearchGoTooltip_Text = "Search on Bing", L_BingLogoTooltip_Text = "Bing Maps", L_MapCopyrightMicrosoft = "© 2012 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_map.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" }, Enabled: true, ShowOnNavbar: false, ShowIncidents: true }, RouteOptions: { RouteMode: { Driving: true, Walking: true }, UseMWS: true, UseTraffic: true }, 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 (b, a) { if (Msn.VE.Environment.BrowserInfo.BrowserCaps & Msn.VE.BrowserCaps.VML) return new Msn.Drawing.VMLGraphic(b, a); else { if (Gimme.Browser.isOpera || Msn.VE.Environment.BrowserInfo.BrowserCaps & Msn.VE.BrowserCaps.SVG) return new Msn.Drawing.SVGGraphic(b, a); 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 (e, 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"); b.className = "vml"; var f = LatLongtoRoundedPixel(e, 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 + e.GetOffsetX() + "px"; b.style.top = -5 + f.y + e.GetOffsetY() + "px"; b.style.position = a.symbol.style_position } else { b = document.createElement("v:shape"); b.className = "MSVE_Shape vml"; var g = null; g = GetVmlPath(e, a); var h = e.GetMapWidth(), i = e.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.className = "vml"; 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 d = document.createElement("v:fill"); d.className = "vml"; d.color = a.symbol.fill_color; d.colors = a.symbol.fill_colors; d.color2 = a.symbol.fill_color2; d.type = a.symbol.fill_type; d.opacity = a.symbol.fill_opacity; b.appendChild(d) } else if (a.type == VEShapeType.Polyline) 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 = ""; a.appendChild(this._printTilesLayer); this._printTopLayer = document.createElement("div"); this._printTopLayer.className = "MSVE_Print_TopLayer"; this._printTopLayer.innerHTML = ""; 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 = ""; 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 vml"; 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 c() { if (a.UserAgent.indexOf("Mac") == -1 && (a.UserAgent.indexOf("Gecko") != -1 || a.UserAgent.indexOf("MSIE") != -1)) a.BrowserCaps |= Msn.VE.BrowserCaps.RightMouseButton } function d() { if (a.UserAgent.indexOf("MSIE 7") != -1 || a.UserAgent.indexOf("MSIE 8") != -1 || a.UserAgent.indexOf("MSIE 9") != -1 || a.UserAgent.indexOf("Gecko") != -1) a.BrowserCaps |= Msn.VE.BrowserCaps.WindowlessSelectElement } function k() { if (!b()) a.BrowserCaps |= Msn.VE.BrowserCaps.VML } function j() { if (b()) a.BrowserCaps |= Msn.VE.BrowserCaps.SVG } function b() { var a; if (document.implementation && document.implementation.hasFeature) a = document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"); else { var c = document.createElement("v:shape"); c.style.behavior = "url(#default#VML)"; a = typeof c.strokecolor === "undefined" } b = function () { return a }; return a } function i() { 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("