// _BrowserDetector() {{{

function _BrowserDetector()
{
	var _is_major = parseInt(navigator.appVersion);
//	this.nver = _is_major;
	this.ver = navigator.appVersion;
	this.agent = navigator.userAgent;
	this.dom = document.getElementById ? 1 : 0;
	this.opera = window.opera ? 1 : 0;
	this.ie5 = this.ver.match(/MSIE 5/) && this.dom && !this.opera;
	this.ie6 = this.ver.match(/MSIE 6/) && this.dom && !this.opera;
	this.ie4 = document.all && !this.dom && !this.opera;
	this.ie = this.ver.match(/MSIE/) && this.dom && !this.opera;
	this.mac = this.agent.match(/Mac/);
//	this.ns6 = this.dom && parseInt(this.ver) >= 5;
	this.ie3 = this.ver.match(/MSIE/) && _is_major < 4;
	this.hotjava = this.agent.match(/hotjava/i);
	this.ns4 = document.layers && !this.dom && !this.hotjava;
//	this.bw = this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera;
	this._ver3 = this.hotjava || this.ie3;
	this.operaNew = this.agent.match(/opera.[789]/i);
	this.gecko = this.agent.match(/gecko/i);
	this.oldGecko = this.agent.match(/gecko\/2002/i);
	this._operaOld = this.opera && !this.operaNew;
}

// }}}

var _bw = new _BrowserDetector;

function AssertBrowser(value)
{
    if (!value)
        document.write('<div class="browserAssertionFailed"><strong>Warning!</strong> This sample was not designed to run in your browser. Please, do not report bugs unless you really sure you\'re right.</div>');
}
