
KeycastPath = "http://"+document.location.host + document.location.pathname.substring(0,document.location.pathname.indexOf("/",1)+1);

Browser = new BrowserObj();

function BrowserObj () {
	this.ver = navigator.appVersion
	this.agent = navigator.userAgent.toLowerCase()
	this.DOM = (document.getElementById ? true : false); 
	this.IE = (document.all) ? true : false;
	this.IE4 = ((document.all && !this.DOM) ? true : false);
	this.IE5 =  ((document.all && this.DOM) ? true : false);
  	this.IE55 = (this.IE5 && this.agent.indexOf("msie 5.5")>-1)
	this.NS4 = (document.layers ? true : false);
	this.NS6 = (!document.all && document.getElementById) ? true : false;
	this.NS6 = (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko"));
	this.Dyn = (this.DOM || this.IE4 || this.NS4);
	this.Mac = (navigator.appVersion.indexOf("Mac")!=-1);
	this.Opera = (navigator.userAgent.indexOf("Opera")!=-1);
	this.OP5 = this.agent.indexOf("opera 5")>-1 && window.opera 
  	this.OP6 = this.agent.indexOf("opera 6")>-1 && window.opera 
	this.Konqueror = (navigator.userAgent.indexOf("Konqueror")!=-1);
	this.IE4M = this.IE4 && this.Mac;
	this.IE5M = this.IE && this.Mac;
	this.IE5W = this.IE && !this.Mac;
	this.IEpos = this.IE || (this.NS6 && parseInt(navigator.productSub)>=20010710);
	this.IECSS = (this.IE && document.compatMode) ? document.compatMode ==  "CSS1Compat" : false;
	this.IEDTD = (this.IE && document.doctype) ? document.doctype.name.indexOf(".dtd")!=-1 : this.IECSS;
	this.IEnoDTD = this.IE && !this.IEDTD;

  	this.IE6 = (this.agent.indexOf("msie 6")>-1 && !this.OP5 && !this.OP6)
}

function setDivText(obj,text) {
	if (Browser.NS4) {
		obj.document.open();
		obj.document.write(text);
		obj.document.close();
	} else {
		obj.innerHTML = text;
	}
}

function findObj(n, d) {
	var p,i,x;
	if(!d) d = document;
	if(Browser.DOM) return d.getElementById(n);
	if((p = n.indexOf("?")) > 0 && parent.frames.length){
		d = parent.frames[n.substring(p + 1)].document;
		n = n.substring(0,p);
	}
	if(!(x = d[n]) && d.all) x = d.all[n];
	for(i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
	for(i = 0; !x && d.layers && i < d.layers.length; i++) x = findObj(n, d.layers[i].document);
	return x;
}


