function browserTypeGetNum (s,pre,post) {
	var b = s.indexOf(pre);
	if (b < 0) return 0;
	b += pre.length;
	var e = post.length ? s.indexOf(post, b) : s.length;
	if (e <= b) return 0;
	var r = parseFloat(s.substring(b,e));
	if (isNaN(r)) return 0;
	return r;
}

function browserTypeClass() {
	var appVersion = navigator.appVersion;

	this.version = 1.4;
	this.update = 'Tue Mar 12 2002'
	this.version = 0;

	this.op = (navigator.userAgent.indexOf("Opera") >= 0);
	this.op5 = (navigator.userAgent.indexOf("Opera 5") >= 0) || (navigator.userAgent.indexOf("Opera/5") >= 0);
	this.op6 = (navigator.userAgent.indexOf("Opera 6") >= 0) || (navigator.userAgent.indexOf("Opera/6") >= 0);
	this.ns = (navigator.appName == 'Netscape' && !this.op);
	this.gen3 = (parseInt(appVersion) >= 3 && parseInt(appVersion) < 4);
	this.ns4 = (this.ns && parseInt(appVersion) >= 4 && parseInt(appVersion) < 5);
	this.mz5 = (navigator.userAgent.indexOf('Mozilla/5') >= 0);
	this.ns6 = (navigator.userAgent.indexOf('Netscape6') >= 0);
	this.ie = (navigator.userAgent.indexOf('compatible; MSIE') >= 0 && !this.op);
	this.ie3 = (navigator.userAgent.indexOf('MSIE 3') >= 0 && this.ie);
	this.ie4 = (navigator.userAgent.indexOf('MSIE 4') >= 0 && this.ie);
	this.ie5 = (navigator.userAgent.indexOf('MSIE 5') >= 0 && this.ie);
	this.ie6 = (navigator.userAgent.indexOf('MSIE 6') >= 0 && this.ie);
	this.dom = (document.getElementById);
	this.win2k = (navigator.userAgent.indexOf('Windows NT 5.0') >= 0 || navigator.userAgent.indexOf('Windows 2000') >= 0);
	this.ie4mac = (this.ie && !this.dom && navigator.userAgent.indexOf('Macintosh') != -1);
	this.dhtmlBrowser = (this.ie4 || this.ns4 || this.dom);
	this.win31 = (navigator.userAgent.indexOf("Win16") != -1)

	this.ns4search = new Array('images', 'layers', 'forms');
	this.ns4searchComplete = new Array('images', 'layers', 'forms', 'links', 'embeds', 'applets');
	this.op5search = new Array('images', 'forms');
	this.op5searchComplete = new Array('images', 'forms', 'links', 'embeds', 'applets', 'anchors');
	this.mz5search = new Array('images', 'forms');
	this.mz5searchComplete = new Array('images', 'forms', 'childNodes', 'links', 'applets', 'embeds', 'anchors', 'plugins', 'styleSheets');

	if (this.ie) this.version = browserTypeGetNum(navigator.userAgent, 'MSIE ', ';');
	else if (this.ns) {
		if (this.ns6) this.version = browserTypeGetNum(navigator.userAgent, 'Netscape6/', '');
		else this.version = browserTypeGetNum(navigator.userAgent, 'Mozilla/', ' ');
	} else if (this.op) this.version = browserTypeGetNum(navigator.userAgent, (navigator.userAgent.indexOf("Opera/") >= 0) ? 'Opera/' : 'Opera ', ' ');
}
