Silverlight.isInstalled = function(d) { var c = false, a = null; try { var b = null; if (Silverlight.ua.Browser == "MSIE") b = new ActiveXObject("AgControl.AgControl"); else if (navigator.plugins["Silverlight Plug-In"]) { a = document.createElement("div"); document.body.appendChild(a); if (Silverlight.ua.Browser == "Safari") a.innerHTML = ''; else a.innerHTML = ''; b = a.childNodes[0] } document.body.innerHTML; if (b.IsVersionSupported(d)) c = true; b = null; Silverlight.available = true } catch(e) { c = false } if (a) document.body.removeChild(a); return c };