/*
*	Copyright(c) 1999-2002 Pardesi Services, LLC
*	Author: Softomatix a division of Pardesi Services, LLC
*	Please submit any suggestions or bugs to softomatix@pardesiservices.com
*/

var bIsIE = false;
var bIsIE4 = false;
var bIsIE5 = false;
var bIsIE55 = false;
var bIsIE6 = false;
var bIsMozilla = false;
var bIsNS = false;
var bIsNS6 = false;
var bIsWebTV = false;
var bIsOpera = false;

var strBrowser = window.navigator.userAgent.toUpperCase();
	var strAppVersion = window.navigator.appVersion.toUpperCase();
	var strBrowserName = window.navigator.appName.toUpperCase();
	var minorVer = parseFloat(strAppVersion);
	var majorVer = parseInt(minorVer);
	
	var browPos;
	if (strBrowser.indexOf("MOZILLA") != -1)
	{
		bIsMozilla = true;
	}
	if ((browPos = strBrowser.indexOf("MSIE")) != -1)
	{
		bIsIE = true;
		// The version of IE returned by appVersion is not the actual verison.
		// It returns the Mozilla version string.
		// We need some more processing. The real version number is right after
		// "MSIE" string. So we will calculate the version based on position
		// of this string.
		var strTemp = strBrowser.substring(browPos+5, strBrowser.indexOf(';',browPos));
		majorVer = parseInt (strTemp);
		
		var dotPos = strTemp.indexOf('.');
		minorVer = parseInt(strTemp.substring(dotPos+1));
		
		if (majorVer == 5)
		{
			bIsIE5 = true;
			if (minorVer >= 5)
			{
				bIsIE55 = true;
			}
		}
		else if (majorVer == 6)
		{
			bIsIE6 = true;
		}
		else if (majorVer == 4)
		{
			bIsIE4 = true;
		}
	}
	if ((browPos = strBrowser.indexOf("NETSCAPE")) != -1)
	{
		bIsNS = true;
		// Check for Netscpae 6.
		var ns6Pos = strBrowser.indexOf("NETSCAPE6");
		if (ns6Pos != -1)
		{
			bIsNS6 = true;
			majorVer = 6;
			
		}
	}
	
	// Test for WebTV browser.
	if ((browPos = strBrowser.indexOf("WEBTV")) != -1)
	{
		bIsWebTV = true;
	}
	
	// Test for Opera browser.
	if ((browPos = strBrowser.indexOf("OPERA")) != -1)
	{
		bIsOpera = true;
	}




