// Returns the browser type (IE, NS, Moz, etc.) as
// a numeric code

function getBrowserType()
{
	var verNum;
	var strAppVer;
	var strAppName;
	
	// Find the values for the flags
	strAppName = window.navigator.appName;
	strAppVer = window.navigator.appVersion;
	
	// The return values will be:
	// 1 - IE
	// 2 - Netscape 4.X or older
	// 3 - Mozilla 0.6/Netscape 6.X or newer
	
	if(strAppName.indexOf("Microsoft") > -1)
	{
		return 1; // IE
	}
	
	if(strAppName.indexOf("Netscape") > -1)
	{
		verNum = strAppVer.substring(0, 1);
		
		if(verNum <= 4)
		{
			return 2; // Netscape 4.X or older
		}
		else
		{
			return 3; // Mozilla 0.6 - Netscape 6.X or newer
		}
	}
}

