/************************************************************************************
browser_sniffer.js

Ultimate client-side JavaScript client sniff. Version 3.02
(C) Netscape Communications 1999-2001.  Permission granted to reuse and distribute.
Revised 17 May 99 to add is_nav5up and is_ie5up (see below).
Revised 20 Dec 00 to add is_gecko and change is_nav5up to is_nav6up
                     also added support for IE5.5 Opera4&5 HotJava3 AOLTV
Revised 22 Feb 01 to correct Javascript Detection for IE 5.x, Opera 4, 
                     correct Opera 5 detection
                     add support for winME and win2k
                     synch with browser-type-oo.js
Revised 26 Mar 01 to correct Opera detection

************************************************************************************/

// 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.
var is_major = parseInt(navigator.appVersion);

// Note: Opera and WebTV spoof Navigator.  We do strict client detection.
// If you want to allow spoofing, take out the tests for opera and webtv.
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
            && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
            && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_nav4 = (is_nav && (is_major == 4));
var is_nav4up = (is_nav && (is_major >= 4));
var is_nav6 = (is_nav && (is_major == 5));
var is_nav6up = (is_nav && (is_major >= 5));

var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3 = (is_ie && (is_major < 4));
var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5") != -1) );
var is_ie4up = (is_ie && (is_major >= 4));
var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie5up = (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up = (is_ie && !is_ie3 && !is_ie4 && !is_ie5);

// correction for checking for browser greater than 5
var BrowserVersionArray = navigator.appVersion.split(";");
var AppVersionArray = BrowserVersionArray[1].split(" ");
var browserVer = AppVersionArray[AppVersionArray.length - 1];
is_ie5up = (is_ie && (browserVer >= 5));
