function browser_ie()
{
	return (document.all) ? true : false;
}

function browser_ns4()
{
	return ((navigator.appName == "Netscape")
		&& (parseFloat(navigator.appVersion) >= 4)
		&& (navigator.userAgent.indexOf("Netscape6") == -1)) ? true : false;
}

function browser_ns6()
{
	return (document.getElementById && !document.all) ? true : false;
}

function browser_ns71()
{
	return (document.queryCommandSupported ? true : false);
}

function browser_ns() { return browser_ns4() || browser_ns6(); }

function browser_old()
{
	return (!document.layers
		&& !document.getElementById && !document.all) ? true : false;
}

function browser_mac() { return (navigator.appVersion.indexOf("Macintosh") != -1); }

function browser_webtv() { return (navigator.userAgent.indexOf("WebTV") != -1); }

function browser_aol() { return (navigator.userAgent.indexOf("AOL") != -1); }

function browser_getVersion(inUserAgent)
{
	if (!inUserAgent) inUserAgent = navigator.userAgent;

	if (inUserAgent.indexOf("MSIE ") != -1)
		return parseFloat(inUserAgent.substring(inUserAgent.indexOf("MSIE ") + 5));
	if (inUserAgent.indexOf("Netscape6/") != -1)
		return parseFloat(inUserAgent.substring(inUserAgent.indexOf("Netscape6/") + 10));
	if (inUserAgent.indexOf("Mozilla/") != -1)
		return parseFloat(inUserAgent.substring(inUserAgent.indexOf("Mozilla/") + 8));

	return 0;
}

function browser_getPlatform(agent)
{
   if (!agent) { agent = navigator.userAgent; }
   var platform = 'unknown'
   if      (agent.indexOf('Win') != -1)   { platform = 'win'; }
   else if (agent.indexOf('Mac') != -1)   { platform = 'mac'; }
   else if (agent.indexOf('IRIX') != -1)  { platform = 'irix'; }
   else if (agent.indexOf('Linux') != -1) { platform = 'linux'; }
   else if (agent.indexOf('BSD') != -1)   { platform = 'bsd'; }
   return platform;
}

