function DetectBrowser() {
	var detect = navigator.userAgent.toLowerCase();
	var pos = 0;
	
	this.isFF = this.isOpera = this.isIE = this.isNS = this.isUnknown = false;
	
	if( (pos = detect.indexOf('firefox')) != -1 ) { this.isFF = true; this.agent = 'firefox'; }
	else if( (pos = detect.indexOf('opera')) != -1 ) { this.isOpera = true; this.agent = 'opera'; }	
	else if( (pos = detect.indexOf('msie')) != -1 ) { this.isIE = true; this.agent = "msie"; } 
	else if( (pos = detect.indexOf('netscape')) != -1 ) { this.isNS = true; this.agent = 'netscape'; }
	else { this.isUnknown = true; this.agent = 'Unknown'; }
	
	if( !this.isUnknown ) {
		versionStart 	= pos + this.agent.length + 1;	
		versionEnd 		= detect.substring(versionStart,detect.length);		
		if( versionEnd.indexOf(";") != -1 ) {
			version = versionEnd.substring(0, versionEnd.indexOf(";"));
		} else {
			version = versionEnd;
		}
		this.version;
	}
	return this;
}
var _browser = DetectBrowser();