var UA = function() { var sUA = navigator.userAgent.toLowerCase(); var oReturn = { bIsWebKit : sUA.indexOf("applewebkit") > -1, bIsSafari : sUA.indexOf("safari") > -1, bIsKonq: navigator.product != null && navigator.product.toLowerCase().indexOf("konqueror") > -1, bIsOpera : sUA.indexOf("opera") > -1, bIsXML : document.contentType != null && document.contentType.indexOf("xml") > -1, bHasTransparencySupport : true, bUseDOM : true, nFlashVersion : null, nOperaVersion : null, nGeckoBuildDate : null, nWebKitVersion : null }; oReturn.bIsKHTML = oReturn.bIsWebKit || oReturn.bIsKonq; oReturn.bIsGecko = !oReturn.bIsWebKit && navigator.product != null && navigator.product.toLowerCase() == "gecko"; if(oReturn.bIsGecko){ oReturn.nGeckoBuildDate = new Number(sUA.match(/.*gecko\/(\d{8}).*/)[1]) }; oReturn.bIsIE = sUA.indexOf("msie") > -1 && !oReturn.bIsOpera && !oReturn.bIsKHTML && !oReturn.bIsGecko; oReturn.bIsIEMac = oReturn.bIsIE && sUA.match(/.*mac.*/) != null; if(oReturn.bIsOpera){ oReturn.nOperaVersion = new Number(sUA.match(/.*opera(\s|\/)(\d+\.\d+)/)[2]) }; if(oReturn.bIsIE || (oReturn.bIsOpera && oReturn.nOperaVersion < 7.6)){ oReturn.bUseDOM = false }; if(oReturn.bIsWebKit){ oReturn.nWebKitVersion = new Number(sUA.match(/.*applewebkit\/(\d+).*/)[1]) }; if(window.hasFlash && (!oReturn.bIsIE || oReturn.bIsIEMac)){ var flashDescription = (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description; oReturn.nFlashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1)); }; if(sUA.match(/.*(windows|mac).*/) == null || oReturn.bIsIEMac || oReturn.bIsKonq || (oReturn.bIsOpera && oReturn.nOperaVersion < 7.6) || (oReturn.bIsSafari && oReturn.nFlashVersion < 7) || (!oReturn.bIsSafari && oReturn.bIsWebKit && oReturn.nWebKitVersion < 124) || (oReturn.bIsGecko && oReturn.nGeckoBuildDate < 20020523)){ oReturn.bHasTransparencySupport = false; }; if(!oReturn.bIsIEMac && !oReturn.bIsGecko && document.createElementNS){ try { document.createElementNS("http://www.w3.org/1999/xhtml", "i").innerHTML = ""; } catch(e){ oReturn.bIsXML = true; }; }; oReturn.bUseInnerHTMLHack = oReturn.bIsKonq || (oReturn.bIsWebKit && oReturn.nWebKitVersion < 312) || oReturn.bIsIE; return oReturn; }(); /* If executed, the VBScript above checks for Flash and sets the hasFlash variable. If VBScript is not supported it's value will still be undefined, so we'll run it though another test This will make sure even Opera identified as IE will be tested */ var hasFlash = function() { var nRequiredVersion = 7; if (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("Windows") > -1) { document.write('