//initialize
var mBrowser = new browser();

var jsVersion = 1.2;            // the version of javascript supported

//browser: creates a new browser object
function browser() 
{ 	//generic combination of both browserNS and browserIE
	var sAppName = navigator.appName;
	var sAppVersion = parseInt(navigator.appVersion);
	var sUA = navigator.userAgent.toLowerCase();
	
	this.isWin = false;
	this.isMac = false;
	this.isIE = false
	this.isIE4 = false;
	this.isIE5 = false;
	this.isIE55 = false;
	this.isIE5plus = false;
	this.isIE6 = false;
	this.isIE6plus = false;
	this.isNS = false;
	this.isNS4 = false;
	this.isNS6 = false;
	this.isNS6plus = false;
	this.isSafari = false;
	this.isNotSupported = false;
	this.isDOM1 = false;
	this.plugins = navigator.plugins;
	
	this.styleObj = "";
	this.col1 = "";
	
	//Identify unsupported browser versions (< 4)
	this.isNotSupported = (sAppVersion < 4);

	//Determine platform
	this.isWin = (sUA.indexOf("win")>=1); 
	this.isMac = (sUA.indexOf("mac")>=1); 

	if (sAppName == "Microsoft Internet Explorer") 
	{
		this.isIE = true;

		//create references for x-browser object references
		this.col1 = "all.";
		this.styleObj = ".style";
		this.isIE4 = (sUA.indexOf("msie 4.")>=1);
		this.isIE5 = (sUA.indexOf("msie 5.0")>=1);
		this.isIE55 = (sUA.indexOf("msie 5.5")>=1);
		this.isIE6 = (sUA.indexOf("msie 6")>=1);
		
		if (this.isIE5 || this.isIE55 || this.isIE6) 
		{
			this.isIE5plus = true;
			this.isIE4 = false;
		}
		if (this.isIE6)
		{
			this.isIE6plus = true;
		}
	} 
	else if (sAppName == "Netscape") 
	{
		this.isNS = true;
		if (sAppVersion == 4) 
		{
			this.isNS4 = true;
		}
		if (sAppVersion == 5) 
		{
			this.isNS6 = true;
			this.isNS6plus = true;
		}
		if (sAppVersion > 5) 
		{
			this.isNS6plus = true;
		}
		document.captureEvents(Event.CLICK);
	}
	this.isSafari = this.isMac && (sUA.indexOf("safari")>=1);
	
	//determine DOM1 support
	this.isDOM1 = (document.getElementById)  ? true : false;
	
	//IE5.5 is not fully DOM1 compliant
	if (this.isIE55) { this.isDOM1 = false; }
}


//redirect user if the browser is not supported (< version 4)
//alert(mBrowser.isNotSupported);
if (mBrowser.isNotSupported)
{
	//redirect if the browser is not supported
	//window.location.href = "/en_US/notSupported.jhtml";
}
else
{
	//load additional script files
	document.write("<script language='JavaScript1.2' src='http://www.humboldt.com/scripts/dhtmlMenus.js'></script>");
	document.write("<script language='JavaScript1.2' src='http://www.humboldt.com/scripts/dhtmlUtilities.js'></script>");
	document.write("<script language='JavaScript1.2' src='http://www.humboldt.com/scripts/dhtmlCoreUtilities.js'></script>");

}