/* ----------------------------------------------------------------------------
 *  File: 		clsBrowser.js
 *  Projekt: 	CLASS
 *  Author: 	Dirk Schröer / Creativware / Karlsruhe / Germany 
 *       		http://www.creativware.de
 *  Date: 		2002-06-27
 * ----------------------------------------------------------------------------
 *  Description: 		Check the Browser. With bw.X all attributes can be used 
 *						Example: VAR = bw.ie?10:bw.ns?20:bw.opera5?30:40;
 *						set an VAR for IE on 10, NS on 20, Opera5 on 30 
 *						and as default value on 40 		
 *  Last Mofification 	
 *  
 * ----------------------------------------------------------------------------
*/

function lib_bwcheck(){ 
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
    this.ns7=(this.dom && parseInt(this.ver) >= 7) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.ns=this.ns4||this.ns6||this.ns7
	this.bw=(this.ie || this.ie6 || this.ie5 || this.ie4 || this.ns || this.ns4 || this.ns6 || this.opera5 || this.ns7)
	return this
}
var bw=new lib_bwcheck()

