//Source for this code came from: http://www.builder.com/Authoring/Dhtml/ss03b.html // The ultimate client sniffer // (C) Netscape Communications 1998. Permission granted to reuse and distribute. // Everything you always wanted to know about your JavaScript client // but were afraid to ask... The "is" constructor function for the Is object // has properties indicating: // 1. browser vendor: // is.nav, is.ie, is.opera // 2. browser version number: // is.major (integer indicating major version number: 2, 3, 4 ...) // is.minor (float indicating full version number: 2.02, 3.01, 4.04 ...) // 3. browser vendor and major version number // is.nav2, is.nav3, is.nav4, is.ie3, is.ie4 // 4. JavaScript version number: // is.js (float indicating full JavaScript version number: 1, 1.1, 1.2 ...) // 5. OS platform and version: // is.win, is.win16, is.win32, is.win31, is.win95, is.winnt, is.win98 // is.os2 // is.mac, is.mac68k, is.macppc // is.unix // is.sun, is.sun4, is.sun5, is.suni86 // is.irix, is.irix5, is.irix6 // is.hpux, is.hpux9, is.hpux10 // is.aix, is.aix1, is.aix2, is.aix3, is.aix4 // is.linux, is.sco, is.unixware, is.mpras, is.reliant // is.dec, is.sinix, is.freebsd, is.bsd // is.vms // // See http://home.kiss.de/~i_thum/JS_tutorial/bstat/navobj.html // for a detailed list of userAgent strings. function Is () { // convert all characters to lowercase to simplify testing var agt=navigator.userAgent.toLowerCase() // *** BROWSER VERSION *** this.major = parseInt(navigator.appVersion) this.minor = parseFloat(navigator.appVersion) this.nav = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1))) this.nav2 = (this.nav && (this.major == 2)) this.nav3 = (this.nav && (this.major == 3)) this.nav4 = (this.nav && (this.major == 4)) this.navonly = (this.nav && (agt.indexOf(";nav") != -1)) this.ie = (agt.indexOf("msie") != -1) this.ie3 = (this.ie && (this.major == 2)) this.ie4 = (this.ie && (this.major == 4)) this.opera = (agt.indexOf("opera") != -1) // *** JAVASCRIPT VERSION CHECK *** // Useful to workaround Navigator 3.0 bug, in which the browser // loads
Make your own free website on Tripod.com
//Source for this code came from: http://www.builder.com/Authoring/Dhtml/ss03b.html // The ultimate client sniffer // (C) Netscape Communications 1998. Permission granted to reuse and distribute. // Everything you always wanted to know about your JavaScript client // but were afraid to ask... The "is" constructor function for the Is object // has properties indicating: // 1. browser vendor: // is.nav, is.ie, is.opera // 2. browser version number: // is.major (integer indicating major version number: 2, 3, 4 ...) // is.minor (float indicating full version number: 2.02, 3.01, 4.04 ...) // 3. browser vendor and major version number // is.nav2, is.nav3, is.nav4, is.ie3, is.ie4 // 4. JavaScript version number: // is.js (float indicating full JavaScript version number: 1, 1.1, 1.2 ...) // 5. OS platform and version: // is.win, is.win16, is.win32, is.win31, is.win95, is.winnt, is.win98 // is.os2 // is.mac, is.mac68k, is.macppc // is.unix // is.sun, is.sun4, is.sun5, is.suni86 // is.irix, is.irix5, is.irix6 // is.hpux, is.hpux9, is.hpux10 // is.aix, is.aix1, is.aix2, is.aix3, is.aix4 // is.linux, is.sco, is.unixware, is.mpras, is.reliant // is.dec, is.sinix, is.freebsd, is.bsd // is.vms // // See http://home.kiss.de/~i_thum/JS_tutorial/bstat/navobj.html // for a detailed list of userAgent strings. function Is () { // convert all characters to lowercase to simplify testing var agt=navigator.userAgent.toLowerCase() // *** BROWSER VERSION *** this.major = parseInt(navigator.appVersion) this.minor = parseFloat(navigator.appVersion) this.nav = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1))) this.nav2 = (this.nav && (this.major == 2)) this.nav3 = (this.nav && (this.major == 3)) this.nav4 = (this.nav && (this.major == 4)) this.navonly = (this.nav && (agt.indexOf(";nav") != -1)) this.ie = (agt.indexOf("msie") != -1) this.ie3 = (this.ie && (this.major == 2)) this.ie4 = (this.ie && (this.major == 4)) this.opera = (agt.indexOf("opera") != -1) // *** JAVASCRIPT VERSION CHECK *** // Useful to workaround Navigator 3.0 bug, in which the browser // loads