function Browser()
{
	var ua, s, i;
	this.isIE    = false;
	this.isNS    = false;
	this.isSafari = false;
	this.version = null;
	ua = navigator.userAgent;
	
	// Need to do this before the other browsers, because Safari's navigator.userAgent contains MSIE and Gecko. Also note that the version number for
	// Safari will be an Apple internal version number, and not the version number the user sees.
	// Warning! This has not yet been tested in Safari! (The information above is taken from http://www.quirksmode.org/js/detect.html)
	s = 'Safari';
	if((i = ua.indexOf(s)) >= 0)
	{
		this.isSafari = true;
		this.version = parseFloat(ua.substr(i + s.length));
		return;
	}
	
	s = "MSIE";
	if ((i = ua.indexOf(s)) >= 0) {
		this.isIE = true;
		this.version = parseFloat(ua.substr(i + s.length));
		return;
	}
	s = "Netscape6/";
	if ((i = ua.indexOf(s)) >= 0) {
		this.isNS = true;
		this.version = parseFloat(ua.substr(i + s.length));
		return;
	}
	s = "Gecko"; // Treat any other "Gecko" browser as NS 6.1.
	if ((i = ua.indexOf(s)) >= 0) {
		this.isNS = true;
		this.version = 6.1;
		return;
	}
}
