function Browser() { // Browser-Detection-Objekt (bullet-proof gegen spoofs)
	
	// shorthands
	var b=navigator.appName.toLowerCase();
	var p=navigator.platform.toLowerCase();
	var ua=navigator.userAgent.toLowerCase();
	
	// Browser-Applikation (MSIE, Netscape, Mozilla, Opera, Safari, Konqueror)
	this.app=b;
	
	// Betriebsystem (win, mac, linux, unknown)
	this.os='unknown';
	if (p.indexOf('win')>-1) this.os='win';
	if (p.indexOf('mac')>-1) this.os='mac'; // BTW: McSafari kann auch sein OS spoofen
	if (p.indexOf('x11')>-1) this.os='linux';
	
	// Funktionale Flags ohne UA-String - der kann z.B. mit Mozilla, Opera oder Safari komplett gespooft sein
	this.ns4		=(document.layers)?1:0; // Bye bye, old guy, deine Zeit is vorbei...
	this.ie4		=(document.all&&!document.getElementById)?1:0;	// This thing is not supported
	this.ie6		=(typeof(document.onmousewheel)=='object')?1:0; // Nur fuer nice-to-have Features!
	this.opera	=(ua.indexOf('opera 7')>-1||ua.indexOf('opera 8')>-1)?1:0; // Ok, good will zeigen: Opera ab 7 sollte gehen (Scripting wie IE5, Styles eher wie Mozi)
	this.safari	=(!document.all&&document.clientWidth)?1:0; // Kombination ist nur in Konqueror/Safari implementiert - Safari koennte was werden
	this.dom		=(document.getElementById&&document.documentElement&&document.createElement&&document.getElementsByTagName)?1:0; // Das Mass aller Dinge
	this.domie	=((document.all&&this.dom)||this.safari)?1:0; // Nur IE ab 5 (Opera 7 + Safari ist auch einer... mal sehen obs geht)
	this.mozi		=0; if (this.dom) this.mozi=(typeof(document.documentElement.style.MozBinding)=='string')?1:0; // Nur NS6/Mozilla 

	this.ok=(this.dom)?1:0;
	this.notok=(this.ns4||this.ie4||!this.dom)?1:0;
	
	// Version (float, z.B. 5.1) - im Moment nur interessant fuer IE und NS6/MOZI
	this.ver=-1;
	if (this.domie) { v=ua.split(';')[1]; this.ver=parseFloat(v.substr(v.lastIndexOf(' '))); } // MSIE-Style
	if (this.mozi) { v=ua.substr(ua.indexOf('rv:')+3,3); this.ver=parseFloat(v); } // NS6/MOZI-Style
	
	// Flags fuer Bug-Behaviors
	this.boxmodelerror=(this.domie&&!this.ie6&&this.os=='win'&&!this.opera&&!this.safari); // Browser, die der Box Model Error betrifft (IE 5.0 und IE 5.5 Win)
	this.setstyleafteronload=(this.safari||(this.domie&&this.os=='mac'&&this.ver<=5.2)); // Browser, bei denen Styles erst nach dem Rendern des kompletten Dokuments gesetzt werden sollten (Safari, IE5.0mac)
	this.iemac=(this.domie&&!this.safari&&!this.opera&&this.os=='mac'); // Mac IE5.0 setzt Hoehe von Box nicht richtig, wenn drinnen welche mit "display" ein/ausgeblendet werden

}

var UA=new Browser();
