function isSilverlightVersionInstalled(version) { if (version == undefined) version = null; var isVersionSupported = false; var container = null; try { var control = null; var tryNS = false; if (window.ActiveXObject) { try { control = new ActiveXObject('AgControl.AgControl'); if (version === null) { isVersionSupported = true; } else if (control.IsVersionSupported(version)) { isVersionSupported = true; } control = null; } catch (e) { tryNS = true; } } else { tryNS = true; } if (tryNS) { var plugin = navigator.plugins["Silverlight Plug-In"]; if (plugin) { if (version === null) { isVersionSupported = true; } else { var actualVer = plugin.description; if (actualVer === "1.0.30226.2") actualVer = "2.0.30226.2"; var actualVerArray = actualVer.split("."); while (actualVerArray.length > 3) { actualVerArray.pop(); } while (actualVerArray.length < 4) { actualVerArray.push(0); } var reqVerArray = version.split("."); while (reqVerArray.length > 4) { reqVerArray.pop(); } var requiredVersionPart; var actualVersionPart; var index = 0; do { requiredVersionPart = parseInt(reqVerArray[index]); actualVersionPart = parseInt(actualVerArray[index]); index++; } while (index < reqVerArray.length && requiredVersionPart === actualVersionPart); if (requiredVersionPart <= actualVersionPart && !isNaN(requiredVersionPart)) { isVersionSupported = true; } } } } } catch (e) { isVersionSupported = false; } return isVersionSupported; }; function isSilverlightInstalled(){ var found; for (var major = 4; major >= 1; major--){ for(var minor = 9; minor >= 0; minor--){ var version = major + "." + minor; if (isSilverlightVersionInstalled(version)){return true;} } } return false; }; function isSecure(){try {return window.location.protocol == 'https:';} catch (err){return false;}} function icSecureURL(url){try {if (url !=null && url != undefined && typeof(url) == "string" && url.substring(0,5) == "http:" && isSecure()){return "https:" + url.substring(5);}return url;}catch (err){return url;}}document.write('');