/* <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
BHA Browser Check

Properties:
[.version] -- returns the version of the browser
[.userAgent] -- returns the userAgent of the browser
[.dom]       -- returns a BOOLEAN type if the browser is DOM compliant
[.opera5] -- returns a BOOLEAN type if the browser is an Opera5
[.ie6] -- returns a BOOLEAN type if the browser is Internet Explorer 6
[.ie5] -- returns a BOOLEAN type if the browser is Internet Explorer 5
[.ie4] -- returns a BOOLEAN type if the browser is Internet Explorer 4
[.ie] -- returns a BOOLEAN type if the browser is Internet Explorer
[.mac] -- returns a BOOLEAN type if the browser is a Macintosh PPC
[.ns6] -- returns a BOOLEAN type if the browser is Netscape 6
[.ns4] -- returns a BOOLEAN type if the browser is Netscape 4
[.gen4] -- returns a BOOLEAN type if the browser is a 4th Generation Browser

How to Access the BHA Browser Object:

Put this in the page to access the BHA browser object.
<script language="javascript" src="/systems/global/scripts/BHA_BrowserCheck.js"></script>

Example:
if(browser.ie6)
{
	Do something for Internet Explorer 6
}
else if((browser.ie4) || (browser.ns4))
{
	Do something for Internet Explorer 4 OR Netscape 4
}

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>*/

function BHA_BrowserCheck()
{ 
	this.version   = navigator.appVersion;
	this.userAgent = navigator.userAgent;
	this.dom       = document.getElementById? true:false;
	this.opera5    = this.userAgent.indexOf("Opera 5")>-1;
	this.ie6       = (this.version.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)? true:false;
	this.ie55      = (this.version.indexOf("MSIE 5.5") > -1)? true:false;
	this.ie5       = (this.version.indexOf("MSIE 5")>-1 && this.dom && !this.opera5 && !this.ie55)? true:false;
	this.ie4       = (document.all && !this.dom && !this.opera5)? true:false;
	this.ie        = this.ie4||this.ie5||this.ie6;
	this.mac       = this.userAgent.indexOf("Mac")>-1;
	this.ns6       = (this.dom && parseInt(this.version) >= 5)? true:false;
	this.ns4       = (document.layers && !this.dom)? true:false;
	this.gen4      = (this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5);
	return this;
}
// Instantiate the BHA Browser Object
var browser = new BHA_BrowserCheck()