function uaDetect()
{
	//variables for browser type, platform, indicators, and one stop shopping
	var ie,ie6,ie5,ie4,ie3,n6,n4,mozilla,gecko;
	var win,mac;
	var dom,version,agt,os,browersName;
	var cssCompliant,cssOther;

	//used to find out
	this.dom = (document.getElementById) ? 1 : 0;
	this.version = parseInt(navigator.appVersion);
	this.agt = navigator.userAgent.toLowerCase();
	this.browserName = navigator.appName.toLowerCase();
	this.os = navigator.platform.toLowerCase();	

	//browsers
	//internet explorers
	this.ie  = (this.version >= 4 && this.agt.indexOf('msie') > -1 && this.dom) ? 1 : 0;
	this.ie3 = (this.agt.indexOf('msie 3.') > -1) ? 1 : 0;
	this.ie4 = (this.agt.indexOf('msie 4.') > -1 && !this.dom) ? 1 : 0;
	this.ie5 = (this.agt.indexOf('msie 5.') > -1 && this.dom) ? 1 : 0;
	this.ie6 = (this.agt.indexOf('msie 6.') > -1 && this.dom) ? 1 : 0;

	//navigators
	this.n4 = (this.browserName.indexOf('netscape') > -1 && !this.dom) ? 1 : 0;
	this.n6 = (this.agt.indexOf('netscape6') > -1 && this.dom) ? 1 : 0;
	this.n7 = (this.agt.indexOf('netscape/7') > -1 && this.dom) ? 1 : 0;

	//mozilla
	this.mozilla = (this.agt.indexOf('gecko') > -1 && this.dom && !this.n6) ? 1 : 0;

	//both netscape 6 and mozilla
	this.gecko = (this.n6 || this.n7 || this.mozilla);

	//platforms (just windows and mac for now)
	this.win = (this.os.indexOf('win') > -1) ? 1 : 0;
	this.mac = (this.os.indexOf('mac') > -1 || this.os.indexOf('ppc') > -1) ? 1 :0;

	//one stop shopping for all css (mostly) compliant browsers
	this.cssCompliant = ((this.ie && this.win) || (this.gecko) || (this.ie5 && this.mac)) ? 1 : 0;
	this.cssOther = ((this.n4) || (this.ie3) || (this.ie4)) ? 1 : 0;

	//alert(this.agt);
	//alert("ie: " + this.ie + "\nie6: " + this.ie6 + "\nie5: " + this.ie5 + "\nie4: " + this.ie4 + "\nie3: " + this.ie3 + "\nn7: " + this.n7 + "\nn6: " + this.n6 + "\nn4: " + this.n4 + "\nmozilla: " + this.mozilla + "\ngecko: " + this.gecko + "\ncssCompliant: " + this.cssCompliant + "\nwin: " + this.win + "\nmac: " + this.mac);

	// use global var's for browser detection
	isIe = (this.ie) ? 1 : 0;
	isGecko = (this.gecko) ? 1 : 0;
	isCss = (this.ie || this.gecko) ? 1 : 0;

	return this;
}
