
function BrowserDetectLite() {
	var ua = navigator.userAgent.toLowerCase();

	// browser name
	this.isGecko	= (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
	this.isMozilla	= (this.isGecko && ua.indexOf('gecko/') + 14 == ua.length);
	this.isNS		= ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );
	this.isIE		= ( (ua.indexOf('msie') != -1) && (ua.indexOf('opera') == -1) && (ua.indexOf('webtv') == -1) );
	this.isOpera	= (ua.indexOf('opera') != -1);



	// browser version
	this.versionMinor = parseFloat(navigator.appVersion);




	this.versionMajor = parseInt(this.versionMinor);
	this.geckoVersion = ( (this.isGecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );

	// dom support
	this.isDOM1 = (document.getElementById);
	this.isDOM2Event = (document.addEventListener && document.removeEventListener);

	// css compatibility mode
	this.mode = document.compatMode ? document.compatMode : 'BackCompat';



}
var browser = new BrowserDetectLite();
