// függőségek if ("undefined" == typeof AITIA) { alert("AITIA include missing!"); } // többszörös include if ("undefined" != typeof AITIA_BROWSER) { alert("AITIA_BROWSER multiple insert!"); } AITIA_BROWSER = 1; Aitia.Browser = {}; Aitia.Browser.osWin = (navigator.appName && navigator.appName.indexOf("Microsoft")!=-1 && navigator.userAgent.indexOf("Windows")!=-1) ? true : false; Aitia.Browser.dom = (document.getElementById) ? true : false; Aitia.Browser.opera = (navigator.userAgent.indexOf('Opera') != -1) ? true : false; Aitia.Browser.safari = (navigator.userAgent.indexOf('Safari') != -1) ? true : false; Aitia.Browser.chrome = (navigator.userAgent.indexOf('Chrome') != -1) ? true : false; Aitia.Browser.konqueror = (navigator.userAgent.indexOf('Konqueror') != -1) ? true : false; // Netscape Aitia.Browser.nsVersion = 0; Aitia.Browser.ns4 = (document.layers) ? true : false; if ( Aitia.Browser.ns4 ) Aitia.Browser.nsVersion = 4; Aitia.Browser.ns6 = (document.getElementById && navigator.userAgent.indexOf('Gecko')!=-1) ? true : false; if ( Aitia.Browser.ns6 ) Aitia.Browser.nsVersion = 6; // Internet Explorer Aitia.Browser.ieVersion = 0; Aitia.Browser.ie4 = (document.all && !Aitia.Browser.opera) ? true : false; Aitia.Browser.ie5 = (navigator.userAgent.indexOf('MSIE 5') > 0) ? true : false; Aitia.Browser.ie6 = (navigator.userAgent.indexOf('MSIE 6') > 0) ? true : false; Aitia.Browser.ie7 = (navigator.userAgent.indexOf('MSIE 7') > 0) ? true : false; Aitia.Browser.ie8 = (navigator.userAgent.indexOf('MSIE 8') > 0) ? true : false; Aitia.Browser.ie9 = (navigator.userAgent.indexOf('MSIE 9') > 0) ? true : false; var version = 0; version = navigator.userAgent.match(/MSIE (\d+)./); if (version && version[1]) Aitia.Browser.ieVersion = version[1]; if ( Aitia.Browser.ieVersion==0 && Aitia.Browser.ie4 ) { Aitia.Browser.ieVersion = 4; } Aitia.Browser.ieBrowserMode = ''; if( parseInt(Aitia.Browser.ieVersion)==7 ) { // documentMode is only supported in IE 8 so we know if its here its really IE 8 if ( document.documentMode ){ Aitia.Browser.ieVersion = 8; //reset? change if you need to // IE in Compat mode will mention Trident in the useragent if( /trident\/\d/i.test(navigator.userAgent) ) { Aitia.Browser.ieBrowserMode = "Compatible"; // if it doesn't then its running in IE 7 mode }else{ Aitia.Browser.ieBrowserMode = "7"; } } } else if( parseInt(Aitia.Browser.ieVersion)==8 ){ // IE 8 will always have documentMode available if ( document.documentMode ) { Aitia.Browser.ieBrowserMode = "8"; } } // Firefox Aitia.Browser.ffVersion = 0; var version = 0; version = navigator.userAgent.match(/Firefox\/(\d+)./); if (version && version[1]) Aitia.Browser.ffVersion = version[1]; Aitia.Browser.ff2 = (navigator.userAgent.indexOf("Firefox/2.")>-1) ? true : false; Aitia.Browser.ff3 = (navigator.userAgent.indexOf("Firefox/3.")>-1) ? true : false; Aitia.Browser.ff4 = (navigator.userAgent.indexOf("Firefox/4.")>-1) ? true : false; // Chrome Aitia.Browser.chromeVersion = 0; version = navigator.userAgent.match(/Chrome\/(\d+)./); if (version && version[1]) Aitia.Browser.chromeVersion = version[1]; Aitia.Browser.chrome5 = (navigator.userAgent.indexOf("Chrome/5.")>-1) ? true : false; // WebKit Aitia.Browser.webkit = (navigator.userAgent.indexOf("WebKit")>-1) ? true : false; if ( Aitia.Browser.webkit ) { // hogy a firefoxos ágakba is belefusson a kód, a webkit hasonlóan támogatja a szabványokat mint a ff. //Aitia.Browser.ffVersion = 3; } if ( Aitia.Browser.opera ) { // hogy a firefoxos ágakba is belefusson a kód, az opera hasonlóan támogatja a szabványokat mint a ff. //Aitia.Browser.ffVersion = 3; } // Van DOM Aitia.Browser.ieDom = (document.all && Aitia.Browser.dom && !Aitia.Browser.opera) ? true : false; Aitia.Browser.nsDom = (Aitia.Browser.ns6 && !Aitia.Browser.konqueror && !Aitia.Browser.safari && Aitia.Browser.dom) ? true : false; Aitia.Browser.operaDom = (Aitia.Browser.opera && Aitia.Browser.dom) ? true : false; Aitia.Browser.safariDom = (Aitia.Browser.safari && Aitia.Browser.dom) ? true : false; Aitia.Browser.konquerorDom = (Aitia.Browser.konqueror && Aitia.Browser.dom) ? true : false;