// BrowserVersion.js
//	Find the browser version and set some information
function BrowserVersionInfo()
{
	var userAgent = navigator.userAgent;
	
	// Is this an IE browser
	if(userAgent.indexOf("MSIE") != -1)
	{
		this.ie = true;

		// Get the version
		var v = userAgent.charAt(userAgent.indexOf("MSIE") + 5);
		this.ieMajorVersion = parseInt(v);

		if(v == 2 ) this.ie2 = true;
		else if(v == 3 ) this.ie3 = true;
		else if(v == 4 ) this.ie4 = true;
		else if(v == 5 ) this.ie5 = true;
		else if(v == 6 ) this.ie6 = true;
		else if (v == 7) this.ie7 = true;
		else if (v == 8) this.ie8 = true;
		else if (v == 9) this.ie9 = true;
		if (this.ie4 || this.ie5) this.UL = true;
		
		var vFull = window.navigator.appVersion.substring(window.navigator.appVersion.indexOf("MSIE")+5, window.navigator.appVersion.indexOf("MSIE")+8);
		if(vFull>=5.5)
			this.SupportsPopups = true;
		else
			this.SupportsPopups = false;
	}
	else  // Is it a Mozilla browser?
		if(userAgent.indexOf("Mozilla") != -1 && userAgent.indexOf("compatible") == -1)
		{
			this.nav = true;

			// Get the version
			var v = userAgent.charAt(userAgent.indexOf("Mozilla") + 8);
			this.navMajorVersion = parseInt(v);
			this.mozillaMajorVersion = parseInt(v);

			if(v == 2 ) this.nav2 = true;
			else if(v == 3 ) this.nav3 = true;
			else if(v == 4 ) this.nav4 = true;
		}

	// What is the OS?
	if(userAgent.indexOf("Windows 95") > 0 || userAgent.indexOf("Win95") != -1 || userAgent.indexOf("Win98") != -1 || userAgent.indexOf("Windows 98") != -1 || userAgent.indexOf("Windows NT") != -1) this.win32 = true;
	else if(userAgent.indexOf("Windows 3.1") != -1 || userAgent.indexOf("Win16") != -1) this.win16 = true;
	else if(userAgent.indexOf("Mac") != -1) this.anymac = true;
	else if(userAgent.indexOf("SunOS") != -1 || userAgent.indexOf("HP-UX") != -1 || userAgent.indexOf("X11") != -1) this.unix = true;
	else if(userAgent.indexOf("Windows CE") != -1) this.wince = true;
	
	return this;
}

var vBrowserVersion = new Object();
var vBrowserVersion = BrowserVersionInfo();

