// BrowserCheck Object
// provides most commonly needed browser checking variables
// 19990326 

// Copyright (C) 1999 Dan Steinman
// Distributed under the terms of the GNU Library General Public License
// Available at http://www.dansteinman.com/dynduo/


function BrowserCheck() {
	var ua = new String();
	ua = navigator.userAgent;		// my variable fo opera 9
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	// my functions for opera
	if ((this.b == "ie") && (ua.substring(0,7)=="Opera/9")) this.b = "op90"
	// end of  functions for opera
	// my test
	// opera.userAgent = "Opera/9.01 (Windows NT 5.1; U; en)"
	//alert(this.b.toString())
	this.version = navigator.appVersion
	if (this.b=='ie'){ // Internet Explorer возвращает '4.0 (compatible; MSIE 5.5...'
		var ve = this.version.indexOf("MSIE")
		this.v = parseInt(this.version.substr(ve+4))
	}
	else this.v = parseInt(this.version)
		// my test
		//alert('this.version = '+this.v) + for Opera 9 == 1
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v==5)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (this.version.indexOf('MSIE 4')>0)
	this.ie5 = (this.version.indexOf('MSIE 5')>0)
	this.ie55 = (this.version.indexOf('MSIE 5.5')>0) // AT 05.11.00
	this.op9 = (this.b == "op90")
	this.min = (this.ns||this.ie||this.op9)
}
// automatically create the "is" object
is = new BrowserCheck()

