/* Use as follows
if (!isIE3Mac && is.nav5up)
{
   // JavaScript here for Navigator 5 and later using the W3C DOM 
}
else if  (!isIE3Mac && is.nav4)
{
   // JavaScript here for Navigator 4
}
else if (!isIE3Mac && is.ie4up)
{
   // JavaScript here for IE 4 and later
}
else if (!isIE3Mac && (is.nav3 || is.opera))
{
   // JavaScript here for Nav3 and Opera 
}
else 
{
   // JavaScript here for Nav2 and IE 3 
}
*/

// Ultimate client-side JavaScript client sniff. 
// (C) Netscape Communications 1999.  Permission granted to reuse and distribute. 
// Revised 17 May 99 to add is.nav5up and is.ie5up (see below). 

// Everything you always wanted to know about your JavaScript client 
// but were afraid to ask ... "Is" is the constructor function for "is" object, 
// which 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.nav4up, is.ie3, is.ie4, is.ie4up, is.ie5, is.ie5up 
// 
// See http://www.it97.de/JavaScript/JS_tutorial/bstat/navobj.html and 
// http://www.it97.de/JavaScript/JS_tutorial/bstat/Browseraol.html 
// for detailed lists of userAgent strings. 
// 
// Note: you don't want your Nav4 or IE4 code to "turn off" or 
// stop working when Nav5 and IE5 (or later) are released, so 
// in conditional code forks, use is.nav4up ("Nav4 or greater") 
// and is.ie4up ("IE4 or greater") instead of is.nav4 or is.ie4 
// to check version in code which you want to work on future 
// versions. 
  

function Is () 
{   // convert all characters to lowercase to simplify testing 
    var agt=navigator.userAgent.toLowerCase(); 

    // *** BROWSER VERSION *** 
    // Note: On IE5, these return 4, so use is.ie5up to detect IE5. 
    this.major = parseInt(navigator.appVersion); 
    this.minor = parseFloat(navigator.appVersion); 

    this.nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) 
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) 
                && (agt.indexOf('webtv')==-1)); 
    this.nav2 = (this.nav && (this.major == 2)); 
    this.nav3 = (this.nav && (this.major == 3)); 
    this.nav4 = (this.nav && (this.major == 4)); 
    this.nav4up = (this.nav && (this.major >= 4)); 
    this.navonly      = (this.nav && ((agt.indexOf(";nav") != -1) || 
                          (agt.indexOf("; nav") != -1)) ); 
    this.nav5 = (this.nav && (this.major == 5)); 
    this.nav5up = (this.nav && (this.major >= 5)); 

    this.ie   = (agt.indexOf("msie") != -1); 
    this.ie3  = (this.ie && (this.major < 4)); 
    this.ie4  = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")==-1) ); 
    this.ie4up  = (this.ie  && (this.major >= 4)); 
    this.ie5  = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")!=-1) ); 
    this.ie5up  = (this.ie  && !this.ie3 && !this.ie4); 

    // KNOWN BUG: On AOL4, returns false if IE3 is embedded browser 
    // or if this is the first browser window opened.  Thus the 
    // properties is.aol, is.aol3, and is.aol4 aren't 100% reliable. 
    this.aol   = (agt.indexOf("aol") != -1); 
    this.aol3  = (this.aol && this.ie3); 
    this.aol4  = (this.aol && this.ie4); 

    this.opera = (agt.indexOf("opera") != -1); 
    this.webtv = (agt.indexOf("webtv") != -1); 
} 

var is; 
var isIE3Mac = false; 
// this section is designed specifically for IE3 for the Mac 

if ((navigator.appVersion.indexOf("Mac")!=-1) && (navigator.userAgent.indexOf("MSIE")!=-1) &&
(parseInt(navigator.appVersion)==3)) 
       isIE3Mac = true; 
else   is = new Is();

