/*** BROWSER DETECT SCRIPT by Nikolai Botev ***/

function UAClass(){
	this.DOM = typeof(document.all || document.getElementById) != 'undefined';
	// Determine user agent
	if (navigator.appName == "Microsoft Internet Explorer") {
		this.name = 'IE';
		this.version = navigator.appVersion.substr(navigator.appVersion.indexOf('MSIE ') + 5, 1);
	} else if (navigator.appName == "Netscape") {
		this.name = 'NN';
		this.version = navigator.appVersion.substring(0, 1);
	} else if (navigator.userAgent.indexOf(' Gecko/') != -1) {
		this.name = 'Gecko';
		this.version = navigator.appVersion.substring(0, 1);
	} else {
		this.name = 'unknown';
	}
	this.ie = (this.name == 'IE');
	this.ie4 = (this.ie && this.version >= 4);
	this.ie5 = (this.ie && this.version >= 5);
	this.ie6 = (this.ie && this.version >= 6);
	this.ns = (this.name == 'NN' || this.name == 'Gecko');
	this.ns3 = (this.ns && this.version == 3);
	this.ns4 = (this.ns && this.version == 4);
	this.ns6 = (this.ns && this.version >= 5);
}

var UA;
var getElemById;
if (typeof(UA) == 'undefined') {
	UA = new UAClass();
	if (UA.DOM) {
		getElemById = eval("UA.name == 'IE' ? (function(id) { return document.all[id]; }) : (function(id) { return document.getElementById(id); })");
	} else {
		getElemById = new Function("return false;");
	}
}

