

function lib_bwcheck() {
	this.codeRev = "3.2.0";
	this.ver = navigator.appVersion; this.agent = navigator.userAgent
	this.dom = document.getElementById?1:0
	this.rev = "";
	var ix = this.ver.indexOf("MSIE ");
	if (ix > -1 && this.dom) {
		var verMajor = parseInt(this.ver.substr(ix+5));
		this.ie5 = (verMajor == 5);
		this.ie55 = (this.ver.substr(ix,3) == "5.5");
		this.ie6 = (verMajor >= 6);
		this.ie7 = (verMajor >= 7);
	}
	this.ie4 = (document.all && !this.dom)?1:0;
	this.ie = this.ie4||this.ie5||this.ie6

	this.mac = this.agent.indexOf("Mac")>-1
	ix = this.ver.indexOf("Opera ");
	if (ix > -1) this.op5 = (parseInt(this.ver.substr(ix+6)) >= 5);

	this.ns6 = (this.dom && parseInt(this.ver) >= 5) ?1:0;
	if (this.ns6) {
		if (this.agent.indexOf("Netscape") > -1) {
			this.mz = false;
			var ix = this.agent.indexOf("Netscape");
			this.rev = this.agent.substr(this.agent.indexOf("/",ix) + 1);
			var ix = this.rev.indexOf(" ");
			if (ix > 0) this.rev = this.rev.substr(0,ix);
			this.ns60 = (this.rev.substr(0,3) == "6.0");
			this.ns6x = (this.rev.substr(0,2) == "6.");
			this.ns70 = (this.rev.substr(0,3) == "7.0");
			this.ns7 = (parseInt(this.rev) >= 7);
			this.ns8 = (parseInt(this.rev) >= 8);
		} else {
			this.mz = true;
			var endIx = this.agent.indexOf(") Gecko");
			var begIx = this.agent.lastIndexOf(" ", endIx) + 1;
			if (this.agent.substr(begIx,3) == "rv:") begIx += 3;
			this.rev = this.agent.substring(begIx,endIx);
			this.ns60 = (this.rev.substr(0,3) == "0.6");
			this.ns6x = (this.rev.substr(0,2) == "0.");
			this.ns70 = (this.rev.substr(0,3) == "1.0" || this.rev.substr(0,3) == "1.1");
			this.ns7 = (parseInt(this.rev) >= 1);
		}
	}
	else this.ns60 = this.ns6x = this.ns70 = this.mz = false;
	this.ns4 = (document.layers && !this.dom)?1:0;
	if (this.ns4) {
		var ix = this.agent.indexOf("Mozilla/") + 8;
		this.rev = this.agent.substr(ix);
		var ix = this.rev.indexOf(" ");
		if (ix > 0) this.rev = this.rev.substr(0,ix);
	}
	this.bw = (this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5 || this.dom)
	return this
}

