/* - - - - - - - - - - - - Initialisation Procedure - - - - - - - - - - - - - */

var browserVersion = 0;
var browserType = "";


// Detect which browser the page is being loaded with and include appropriate 
// javascript code.
GetVersion();







/* - - - - - - - - - - - Browser Detection Functions  - - - - - - - - - - - - */

function GetVersion()
	{
	// This function will determine which Mozilla version the client 
	// is using, and whether the browser is Internet Explorer, 
	// Netscape or another 'brand' of browser.

	UserAgent = navigator.userAgent

	// Get the Mozilla Version
	CurrentIndex = UserAgent.indexOf("Mozilla/")
	if (CurrentIndex != -1)
		{
		if (!isNaN(UserAgent.charAt(CurrentIndex + 8)))
			{
			browserVersion = UserAgent.charAt(CurrentIndex + 8)
			}
		}
	else
		{
		browserVersion = 0
		}

	// Determine whether the browser is IE, Netscape or another type.
	if (navigator.appName != "Netscape")
		{
		if (UserAgent.indexOf("MSIE") != -1)
			{
			browserType = "MSIE"
			}
		else
			{
			browserType = "Unknown"
			}
		}
	else
		{
		browserType = "Netscape"
		}
	}



function getBrowserVersion()
	{
	return browserVersion;
	}


function getBrowserType()
	{
	return browserType;
	}