if (!window.Silverlight) { window.Silverlight = {} } Silverlight._silverlightCount = 0; Silverlight.__onSilverlightInstalledCalled = false; Silverlight.fwlinkRoot = "http://go2.microsoft.com/fwlink/?LinkID="; Silverlight.__installationEventFired = false; Silverlight.onGetSilverlight = null; Silverlight.onSilverlightInstalled = function() { window.location.reload(false) }; Silverlight.isInstalled = function(k) { if (k == undefined) { k = null } var n = false; var a = null; try { var g = null; var m = false; if (window.ActiveXObject) { try { g = new ActiveXObject("AgControl.AgControl"); if (k === null) { n = true } else { if (g.IsVersionSupported(k)) { n = true } } g = null } catch (j) { m = true } } else { m = true } if (m) { var h = navigator.plugins["Silverlight Plug-In"]; if (h) { if (k === null) { n = true } else { var b = h.description; if (b === "1.0.30226.2") { b = "2.0.30226.2" } var c = b.split("."); while (c.length > 3) { c.pop() } while (c.length < 4) { c.push(0) } var d = k.split("."); while (d.length > 4) { d.pop() } var l; var f; var i = 0; do { l = parseInt(d[i]); f = parseInt(c[i]); i++ } while (i < d.length && l === f); if (l <= f && !isNaN(l)) { n = true } } } } } catch (j) { n = false } return n }; Silverlight.WaitForInstallCompletion = function() { if (!Silverlight.isBrowserRestartRequired && Silverlight.onSilverlightInstalled) { try { navigator.plugins.refresh() } catch (a) { } if (Silverlight.isInstalled(null) && !Silverlight.__onSilverlightInstalledCalled) { Silverlight.onSilverlightInstalled(); Silverlight.__onSilverlightInstalledCalled = true } else { setTimeout(Silverlight.WaitForInstallCompletion, 3000) } } }; Silverlight.__startup = function() { navigator.plugins.refresh(); Silverlight.isBrowserRestartRequired = Silverlight.isInstalled(null); if (!Silverlight.isBrowserRestartRequired) { Silverlight.WaitForInstallCompletion(); if (!Silverlight.__installationEventFired) { Silverlight.onInstallRequired(); Silverlight.__installationEventFired = true } } else { if (window.navigator.mimeTypes) { var d = navigator.mimeTypes["application/x-silverlight-2"]; var a = navigator.mimeTypes["application/x-silverlight-2-b2"]; var b = navigator.mimeTypes["application/x-silverlight-2-b1"]; var c = b; if (a) { c = a } if (!d && (b || a)) { if (!Silverlight.__installationEventFired) { Silverlight.onUpgradeRequired(); Silverlight.__installationEventFired = true } } else { if (d && c) { if (d.enabledPlugin && c.enabledPlugin) { if (d.enabledPlugin.description != c.enabledPlugin.description) { if (!Silverlight.__installationEventFired) { Silverlight.onRestartRequired(); Silverlight.__installationEventFired = true } } } } } } } if (!Silverlight.disableAutoStartup) { if (window.removeEventListener) { window.removeEventListener("load", Silverlight.__startup, false) } else { window.detachEvent("onload", Silverlight.__startup) } } }; if (!Silverlight.disableAutoStartup) { if (window.addEventListener) { window.addEventListener("load", Silverlight.__startup, false) } else { window.attachEvent("onload", Silverlight.__startup) } } Silverlight.createObject = function(a, j, c, h, l, f, g) { var m = new Object(); var d = h; var k = l; m.version = d.version; d.source = a; m.alt = d.alt; if (f) { d.initParams = f } if (d.isWindowless && !d.windowless) { d.windowless = d.isWindowless } if (d.framerate && !d.maxFramerate) { d.maxFramerate = d.framerate } if (c && !d.id) { d.id = c } delete d.ignoreBrowserVer; delete d.inplaceInstallPrompt; delete d.version; delete d.isWindowless; delete d.framerate; delete d.data; delete d.src; delete d.alt; if (Silverlight.isInstalled(m.version)) { for (var b in k) { if (k[b]) { if (b == "onLoad" && typeof k[b] == "function" && k[b].length != 1) { var i = k[b]; k[b] = function(n) { return i(document.getElementById(c), g, n) } } var e = Silverlight.__getHandlerName(k[b]); if (e != null) { d[b] = e; k[b] = null } else { throw "typeof events." + b + " must be 'function' or 'string'" } } } slPluginHTML = Silverlight.buildHTML(d) } else { slPluginHTML = Silverlight.buildPromptHTML(m) } if (j) { j.innerHTML = slPluginHTML } else { return slPluginHTML } }; Silverlight.buildHTML = function(c) { var b = []; b.push('<object type="application/x-silverlight" data="data:application/x-silverlight,"'); if (c.id != null) { b.push(' id="' + Silverlight.HtmlAttributeEncode(c.id) + '"') } if (c.width != null) { b.push(' width="' + c.width + '"') } if (c.height != null) { b.push(' height="' + c.height + '"') } b.push(" >"); delete c.id; delete c.width; delete c.height; for (var a in c) { if (c[a]) { b.push('<param name="' + Silverlight.HtmlAttributeEncode(a) + '" value="' + Silverlight.HtmlAttributeEncode(c[a]) + '" />') } } b.push("</object>"); return b.join("") }; Silverlight.createObjectEx = function(c) { var b = c; var a = Silverlight.createObject(b.source, b.parentElement, b.id, b.properties, b.events, b.initParams, b.context); if (b.parentElement == null) { return a } }; Silverlight.buildPromptHTML = function(a) { var d = ""; var c = Silverlight.fwlinkRoot; var b = a.version; if (a.alt) { d = a.alt } else { if (!b) { b = "" } d = "<a href='javascript:Silverlight.getSilverlight(\"{1}\");' style='text-decoration: none;'><img src='{2}' alt='Get Microsoft Silverlight' style='border-style: none'/></a>"; d = d.replace("{1}", b); d = d.replace("{2}", c + "108181") } return d }; Silverlight.getSilverlight = function(c) { if (Silverlight.onGetSilverlight) { Silverlight.onGetSilverlight() } var a = ""; var e = String(c).split("."); if (e.length > 1) { var d = parseInt(e[0]); if (isNaN(d) || d < 2) { a = "1.0" } else { a = e[0] + "." + e[1] } } var b = ""; if (a.match(/^\d+\056\d+$/)) { b = "&v=" + a } Silverlight.followFWLink("114576" + b) }; Silverlight.followFWLink = function(a) { top.location = Silverlight.fwlinkRoot + String(a) }; Silverlight.HtmlAttributeEncode = function(b) { var e; var d = ""; if (b == null) { return null } for (var a = 0; a < b.length; a++) { e = b.charCodeAt(a); if (((e > 96) && (e < 123)) || ((e > 64) && (e < 91)) || ((e > 43) && (e < 58) && (e != 47)) || (e == 95)) { d = d + String.fromCharCode(e) } else { d = d + "&#" + e + ";" } } return d }; Silverlight.default_error_handler = function(b, a) { var c; var e = a.ErrorType; c = a.ErrorCode; var d = "\nSilverlight error message     \n"; d += "ErrorCode: " + c + "\n"; d += "ErrorType: " + e + "       \n"; d += "Message: " + a.ErrorMessage + "     \n"; if (e == "ParserError") { d += "XamlFile: " + a.xamlFile + "     \n"; d += "Line: " + a.lineNumber + "     \n"; d += "Position: " + a.charPosition + "     \n" } else { if (e == "RuntimeError") { if (a.lineNumber != 0) { d += "Line: " + a.lineNumber + "     \n"; d += "Position: " + a.charPosition + "     \n" } d += "MethodName: " + a.methodName + "     \n" } } alert(d) }; Silverlight.__cleanup = function() { for (var a = Silverlight._silverlightCount - 1; a >= 0; a--) { window["__slEvent" + a] = null } Silverlight._silverlightCount = 0; if (window.removeEventListener) { window.removeEventListener("unload", Silverlight.__cleanup, false) } else { window.detachEvent("onunload", Silverlight.__cleanup) } }; Silverlight.__getHandlerName = function(b) { var a = ""; if (typeof b == "string") { a = b } else { if (typeof b == "function") { if (Silverlight._silverlightCount == 0) { if (window.addEventListener) { window.addEventListener("onunload", Silverlight.__cleanup, false) } else { window.attachEvent("onunload", Silverlight.__cleanup) } } var c = Silverlight._silverlightCount++; a = "__slEvent" + c; window[a] = b } else { a = null } } return a }; Silverlight.onRequiredVersionAvailable = function() { }; Silverlight.onRestartRequired = function() { }; Silverlight.onUpgradeRequired = function() { }; Silverlight.onInstallRequired = function() { }; Silverlight.IsVersionAvailableOnError = function(b, a) { var d = false; try { if (a.ErrorCode == 8001 && !Silverlight.__installationEventFired) { Silverlight.onUpgradeRequired(); Silverlight.__installationEventFired = true } else { if (a.ErrorCode == 8002 && !Silverlight.__installationEventFired) { Silverlight.onRestartRequired(); Silverlight.__installationEventFired = true } else { if (a.ErrorCode == 5014 || a.ErrorCode == 2106) { if (Silverlight.__verifySilverlight2UpgradeSuccess(a.getHost())) { d = true } } else { d = true } } } } catch (c) { } return d }; Silverlight.IsVersionAvailableOnLoad = function(a) { var c = false; try { if (Silverlight.__verifySilverlight2UpgradeSuccess(a.getHost())) { c = true } } catch (b) { } return c }; Silverlight.__verifySilverlight2UpgradeSuccess = function(b) { var f = false; var a = "2.0.31005"; var d = null; try { if (b.IsVersionSupported(a + ".99")) { d = Silverlight.onRequiredVersionAvailable; f = true } else { if (b.IsVersionSupported(a + ".0")) { d = Silverlight.onRestartRequired } else { d = Silverlight.onUpgradeRequired } } if (d && !Silverlight.__installationEventFired) { d(); Silverlight.__installationEventFired = true } } catch (c) { } return f };