/**
 * A global object that holds static 
 * values about the client environment of the web 
 * browser application.
 * Use like the JavaScript <code>Math</code> object
 * that does not require instantiation nor does it
 * have methods that operate on the object.
 *
 * @author mmathews@oxygen.com
 * @version 1.0, 11 June 2001
 */
Client = new Object()

/**
 * Holds the operating system the client has.
 * Can be either "Mac", "Win" or "unknown"
 */
Client.PLATFORM = 'unknown'

/**
 * Holds the brand of web browser the client has.
 * Can be either either "IE", "NS" or "unknown"
 */
Client.BROWSER = 'unknown'

/**
 * Holds the version of web browser the client has.
 * Will be a float number like 4.5 (or -1 if unknown)
 */
Client.VERSION = -1

// set Client properties, detect in a cross-browser way	
if (window.navigator) {
	if (navigator.platform) {
		if (navigator.platform.indexOf('Win') != -1)
			Client.PLATFORM = 'Win'
		else if (navigator.platform.indexOf('Mac') != -1)
			Client.PLATFORM = 'Mac'
	}
		
	if (navigator.appName) {
		if (navigator.appName.indexOf('Microsoft Internet Explorer') != -1)
			Client.BROWSER = 'IE'
		else if (navigator.appName.indexOf('Netscape') != -1)
			Client.BROWSER = 'NS'
	}
		
	if (navigator.appVersion) {
		if (Client.BROWSER == "IE")
			Client.VERSION = parseFloat(navigator.appVersion.substr((navigator.appVersion.indexOf("MSIE")+5),4))
		else if (Client.BROWSER == "NS")
			Client.VERSION = parseFloat(navigator.appVersion)
	}
}

Client.toString = function() {
	return Client.PLATFORM+" "+Client.BROWSER+" "+Client.VERSION
}