function BrowserInfo()
{
	var agt = navigator.userAgent.toLowerCase();

	this.majorVersion = parseInt(navigator.appVersion);
	this.minorVersion = parseFloat(navigator.appVersion);

	// Netscape detection
	this.isNav =		((agt.indexOf("mozilla") != -1) && (agt.indexOf("spoofer") == -1) && (agt.indexOf("compatible") == -1) && (agt.indexOf("opera") == -1) && (agt.indexOf("webtv") == -1) && (agt.indexOf("hotjava") == -1));
	this.isNav2 =		(this.isNav && (this.majorVersion == 2));
	this.isNav3 =		(this.isNav && (this.majorVersion == 3));
	this.isNav4 =		(this.isNav && (this.majorVersion == 4));
	this.isNav4Up =		(this.isNav && (this.majorVersion >= 4));
	this.isNavOnly =	(this.isNav && ((agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1)));
	this.isNav6 =		(this.isNav && (this.majorVersion == 5));
	this.isNav6Up =		(this.isNav && (this.majorVersion >= 5));
	this.isGecko =		(agt.indexOf("gecko") != -1);
	
	// IE detection
	this.isIE =			((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
	this.isIE3 =		(this.isIE && (this.majorVersion < 4));
    this.isIE4 =		(this.isIE && (this.majorVersion == 4) && (agt.indexOf("msie 4") != -1));
    this.isIE4up =		(this.isIE && (this.majorVersion >= 4));
    this.isIE5 =		(this.isIE && (this.majorVersion == 4) && (agt.indexOf("msie 5.0") != -1));
    this.isIE55 =		(this.isIE && (this.majorVersion == 4) && (agt.indexOf("msie 5.5") != -1));
    this.isIE5Up =		(this.isIE && !this.isIE3 && !this.isIE4);
    this.isIE55Up =		(this.isIE && !this.isIE3 && !this.isIE4 && !this.isIE5);
    this.isIE6 = 		(this.isIE && (this.majorVersion == 4) && (agt.indexOf("msie 6.") != -1));
    this.isIE6Up = 		(this.isIE && !this.isIE3 && !this.isIE4 && !this.isIE5 && !this.isIE55);
	
	// AOL detection
	// KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
	// or if this is the first browser window opened.  Thus the
	// variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.
	this.isAOL =		(agt.indexOf("aol") != -1);
	this.isAOL3 =		(this.isAOL && this.isIE3);
    this.isAOL4 =		(this.isAOL && this.isIE4);
    this.isAOL5 =		(agt.indexOf("aol 5") != -1);
    this.isAOL6 =		(agt.indexOf("aol 6") != -1);

	// Opera checks
	this.isOpera =		(agt.indexOf("opera") != -1);
	this.isOpera2 =		(agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
	this.isOpera3 =		(agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
	this.isOpera4 =		(agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
	this.isOpera5 =		(agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
	this.isOpera5Up =	(this.isOpera && !this.isOpera2 && !isOpera3 && !this.isOpera4);
	
	// Web TV
	this.isWebTV =		(agt.indexOf("webtv") != -1);
	this.isTVNav =		((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1));
	this.isAOLTV =		this.isTVNav;
	
	// HotJava
	this.isHotJava =	(agt.indexOf("hotjava") != -1);
	this.isHotJava3 =	(this.isHotJava && (this.majorVersion == 3));
	this.isHotJava3Up =	(this.isHotJava && (this.majorVersion >= 3));
	
	// JavaScript version check
	if (this.isNav2 || this.isIE3) this.jsVersion = 1.0;
	else if (this.isNav3) this.jsVersion = 1.1;
	else if (this.isOpera5Up) this.jsVersion = 1.3;
	else if (this.isOpera) this.jsVersion = 1.1;
	else if ((this.isNav4 && (this.minorVersion <= 4.05)) || this.isIE4) this.jsVersion = 1.2;
	else if ((this.isNav4 && (this.minorVersion > 4.05)) || this.isIE5) this.jsVersion = 1.3;
	else if (this.isHotJava3Up) this.jsVersion = 1.4;
	else if (this.isNav6 || this.isGecko) this.jsVersion = 1.5;
	else if (this.isNav6Up) this.jsVersion = 1.5;
	else if (this.isIE5Up) this.jsVersion = 1.5;
	else this.jsVersion = 0.0;
	
	// Platform detection
	this.isWin =			((agt.indexOf("win") != -1) || (agt.indexOf("16bit") != -1));
	this.isWin95 =			((agt.indexOf("win95") != -1) || (agt.indexOf("windows 95") != -1));
	this.isWin16 =			((agt.indexOf("win16") != -1) || (agt.indexOf("16bit") != -1) || (agt.indexOf("windows 3.1") != -1) || (agt.indexOf("windows 16-bit") != -1));
	this.isWin31 =			((agt.indexOf("windows 3.1") != -1) || (agt.indexOf("win16") != -1) || (agt.indexOf("windows 16-bit") != -1));
	this.isWinME =			((agt.indexOf("win 9x 4.90") != -1));
	this.isWin2K =			((agt.indexOf("windows nt 5.0") != -1));
	this.isWin98 =			((agt.indexOf("win98") != -1) || (agt.indexOf("windows 98") != -1));
	this.isWinNT =			((agt.indexOf("winnt") != -1) || (agt.indexOf("windows nt") != -1));
	this.isWin32 =			(this.isWin95 || this.isWinNT || this.isWin98 || ((this.majorVersion >= 4) && (navigator.platform == "Win32")) || (agt.indexOf("win32") != -1) || (agt.indexOf("32bit") != -1));
	
	this.isOS2 =			((agt.indexOf("os/2") != -1) || (navigator.appVersion.indexOf("OS/2") != -1) || (agt.indexOf("ibm-webexplorer") != -1));
	
	this.isMac =			(agt.indexOf("mac") != -1);
	this.isMac68K =			(this.isMac && ((agt.indexOf("68k") != -1) || (agt.indexOf("68000") != -1)));
	this.isMacPPC =			(this.isMac && ((agt.indexOf("ppc") != -1) || (agt.indexOf("powerpc") != -1)));
	
	this.isSun =			(agt.indexOf("sunos") != -1);
	this.isSun4 =			(agt.indexOf("sunos 4") != -1);
	this.isSun5 =			(agt.indexOf("sunos 5") != -1);
	this.isSunI86 =			(this.isSun && (agt.indexOf("i86") != -1));
	
	this.isIrix =			(agt.indexOf("irix") != -1);
	this.isIrix5 =			(agt.indexOf("irix 5") != -1);
	this.isIrix6 =			(agt.indexOf("irix 6") != -1);
	
	this.isHPUX =			(agt.indexOf("hp-ux") != -1);
	this.isHPUX9 =			(this.isHpux && (agt.indexOf("09.") != -1));
	this.isHPUX10 =			(this.isHpux && (agt.indexOf("10.") != -1));
	
	this.isAIX =			(agt.indexOf("aix") != -1);
	this.isAIX1 =			(agt.indexOf("aix 1") != -1);
	this.isAIX2 =			(agt.indexOf("aix 2") != -1);
	this.isAIX3 =			(agt.indexOf("aix 3") != -1);
	this.isAIX4 =			(agt.indexOf("aix 4") != -1);
	
	this.isLinux =			(agt.indexOf("linux") != -1);
	
	this.isSCO =			((agt.indexOf("sco") != -1) || (agt.indexOf("unix_sv") != -1));
	this.isUnixWare =		(agt.indexOf("unix_system_v") != -1);
	this.isMPRAS =			(agt.indexOf("ncr") != -1);
	this.isReliant =		(agt.indexOf("reliantunix") != -1);
	this.isDEC =			((agt.indexOf("dec") != -1) || (agt.indexOf("osf1") != -1) || (agt.indexOf("dec_alpha") != -1) || (agt.indexOf("alphaserver") != -1) || (agt.indexOf("ultrix") != -1) || (agt.indexOf("alphastation") != -1));
	this.isSinix =			(agt.indexOf("sinix") != -1);
	this.isFreeBSD =		(agt.indexOf("freebsd") != -1);
	this.isBSD =			(agt.indexOf("bsd") != -1);
	this.isVMS =			((agt.indexOf("vax") != -1) || (agt.indexOf("openvms") != -1));
	this.isUnix =			((agt.indexOf("x11") != -1) || this.isSun || this.isIrix || this.isHPUX || this.isSCO || this.isUnixWare || this.isMPRAS || this.isReliant || this.isDEC || this.isSinix || this.isAIX || this.isLinux || this.isBSD || this.isFreeBSD);
	
	// set JS version for IE5 on a Mac
	if (this.isMac && this.isIE5Up) this.jsVersion = 1.4;
}


var client = new BrowserInfo();
if (client.isMac)
{
	document.write("<link href=\"/style.css\" rel=\"stylesheet\" type=\"text/css\" />");
	document.write("<style type=\"text/css\"> @import url(/ie_style_mac.css); </style>");
}
else
{
	document.write("<link href=\"/style.css\" rel=\"stylesheet\" type=\"text/css\" />");
	document.write("<style type=\"text/css\"> @import url(/ie_style.css); </style>");
}
