var agt = navigator.appVersion.toLowerCase(); 

var sBrowser = "IE";
var sVersion = "3";
var bMac = false;
bBrowserMO = false;

if (agt.indexOf("mac")!=-1) bMac = true;

if (navigator.appName == "Netscape")
{
	sBrowser = "NS";
	if (parseInt(navigator.appVersion) >= 3 ) sVersion = 3;
	if (parseInt(navigator.appVersion) >= 4 ) sVersion = 4;
	if (parseInt(navigator.appVersion) >= 5) sVersion = 5;
}	 
else if (navigator.appName == "Microsoft Internet Explorer")
{
	sBrowser = "IE";
	if (parseInt(navigator.appVersion) >= 4 ) sVersion = 4;
	if (agt.indexOf("msie 5.0") !=-1 )  sVersion = 5;
	if (agt.indexOf("msie 5.5") !=-1 )  sVersion = 5.5;
	if (agt.indexOf("msie 6.0") !=-1 )  sVersion = 6;		
}
else if (navigator.appName == "Opera")
{
	sBrowser = "OP";
	sVersion = 2;
}

if ( (sBrowser == "IE" && sVersion >= 5) || (sBrowser == "NS" && sVersion >= 5) )
{
	sBrowserType = "DOM";
}
else if (sBrowser == "NS" && sVersion == 4)
{
	sBrowserType = "NSLAYER";
}
else if (sBrowser == "IE" && sVersion == 4)
{
	sBrowserType = "IELAYER";
}
else
{
	sBrowserType = "OLD";
}

if ((sBrowser == "NS" && sVersion >= 3) || (sBrowser == "IE" && sVersion >= 4))
{
        bBrowserMO = true;
}