if (!window.Accordent) { window.Accordent = {} } Accordent.PluginDetection = { init: function(b, a, c) { this._maxSlVersion = 2; this._browser = b.toLowerCase(); this._os = c.toLowerCase(); this._version = a; this._slSupportedOs = null; this._slSupportedBrowser = null; this.detectSilverlightInternal() }, detectSilverlightInternal: function() { if (this.isWin() || this.isLinux() || this.isMac()) { this._slSupportedOs = this._os } if (this._slSupportedOs != null) { if (this.isFirefox() && (this._version >= 2 || parseInt(navigator.userAgent.split("Firefox/")[1].split(".")[1]) >= 5) || (this.isIe() && this._version >= 6) || this.isChrome() || this.isSafari()) { this._slSupportedBrowser = this._browser } } }, isOpera: function() { return this._os == "opera" }, isIe: function() { return this._browser == "ie" }, isNetscape: function() { return this._browser == "netscape" }, isFirefox: function() { return this._browser == "firefox" }, isChrome: function() { return this._browser == "chrome" }, isSafari: function() { return this._browser == "safari" }, isMac: function() { return this._os == "mac" }, isWin: function() { return this._os == "windows" }, isLinux: function() { return this._os == "linux" }, isMacPpcOsX: function() { return this.isMac() && navigator.userAgent.indexOf("PPC Mac OS X") >= 0 }, canSupportSL: function(b) { var a = (!(this._slSupportedOs == null || this._slSupportedBrowser == null || (this.isWin() && this.isSafari()) || (this.isMac() && this.isIe()))); if (b == "2.0") { return a && (!this.isLinux()) && (!this.isMacPpcOsX()) } if (b == "1.0") { return a && (navigator.userAgent.indexOf("Windows NT 5.0") < 0) } return a }, getSLSupportedVersions: function() { var a = []; for (var c = this._maxSlVersion; c > 0; c--) { var b = c.toFixed(1); if (this.canSupportSL(b)) { a.push(b) } } return a }, getSLInstalledVersions: function() { var a = []; for (var c = this._maxSlVersion; c > 0; c--) { var b = c.toFixed(1); if (Silverlight.isInstalled(b)) { a.push(b) } } return a } }; Accordent.BrowserDetection = { init: function(c, a, e) { var b = [{ string: c, subString: "Chrome", identity: "Chrome" }, { string: c, subString: "OmniWeb", versionSearch: "OmniWeb/", identity: "Omniweb" }, { string: e, subString: "Apple", identity: "Safari", versionSearch: "Version" }, { prop: window.opera, identity: "Opera" }, { string: e, subString: "iCab", identity: "icab" }, { string: e, subString: "KDE", identity: "Konqueror" }, { string: c, subString: "Firefox", identity: "Firefox" }, { string: e, subString: "Camino", identity: "Camino" }, { string: c, subString: "Netscape", identity: "Netscape" }, { string: c, subString: "MSIE", identity: "IE", versionSearch: "MSIE" }, { string: c, subString: "Gecko", identity: "Mozilla", versionSearch: "rv" }, { string: c, subString: "Mozilla", identity: "Netscape", versionSearch: "Mozilla"}]; var d = [{ string: a, subString: "Win", identity: "Windows" }, { string: a, subString: "Mac", identity: "Mac" }, { string: a, subString: "Linux", identity: "Linux" }, { string: c, subString: "iPhone", identity: "iPhone/iPod" }, { string: a, subString: "X11", identity: "unix"}]; this.name = this.searchString(b) || "unknown"; this.version = this.searchVersion(c) || this.searchVersion(navigator.appVersion) || "unknown"; this.os = this.searchString(d) || "unknown"; b = null; d = null }, searchVersion: function(b) { var a = b.indexOf(this.versionSearchString); if (a == -1) { return } return parseFloat(b.substring(a + this.versionSearchString.length + 1)) }, searchString: function(a) { for (var b = 0; b < a.length; b++) { var c = a[b].string; this.versionSearchString = a[b].versionSearch || a[b].identity; if ((c && c.indexOf(a[b].subString) != -1) || a[b].prop) { return a[b].identity } } } }; function retrieveBrowserInfo() { Accordent.BrowserDetection.init(navigator.userAgent, navigator.platform, navigator.vendor); Accordent.PluginDetection.init(Accordent.BrowserDetection.name, Accordent.BrowserDetection.version, Accordent.BrowserDetection.os) } retrieveBrowserInfo(); function isFirefox15Plus() { return Accordent.PluginDetection.isFirefox() && (Accordent.PluginDetection._version >= 2 || parseInt(navigator.userAgent.split("Firefox/")[1].split(".")[1]) >= 5) }; 

function isSilverlightSupported() {
    return (Accordent.PluginDetection.isMac() === true || Accordent.PluginDetection.isIe() === false);
}
function isRealMedia() {
    var subStrings = 'http://rm1.ctl1.com:8080/ramgen/courses/pbsynapsis/hd4140-20090401-eng-cb-rm.rm'.split('.');
    if (subStrings.length > 0) {
        var extension = subStrings[subStrings.length - 1];
        if (extension) {
            var first2Letters = extension.substring(0, 2).toLowerCase();
            if (first2Letters == 'wm')
                return false;
        }
    }

    return true;
}