function lib_bwcheck(){ //Browsercheck (needed)
	this.ver = navigator.appVersion;
	this.agent = navigator.userAgent;
	this.dom = document.getElementById ? 1 : 0;
	this.opera5 = (navigator.userAgent.indexOf("Opera") > -1 && document.getElementById) ? 1 : 0;
	this.ie5 = (this.ver.indexOf("MSIE 5") > -1 && this.dom && !this.opera5) ? 1 : 0;
	this.ie6 = (this.ver.indexOf("MSIE 6") > -1 && this.dom && !this.opera5) ? 1 : 0;
	this.ie4 = (document.all && !this.dom && !this.opera5) ? 1 : 0;
	this.ie = this.ie4 || this.ie5 || this.ie6;
	this.mac = this.agent.indexOf("Mac") >- 1;
	this.ns6 = (this.dom && parseInt(this.ver) >= 5) ? 1 : 0;
	this.ns4 = (document.layers && !this.dom) ? 1 : 0;
	this.bw = (this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5);
	return this
}

var bw = lib_bwcheck();

function showSubMenu(ref) {
	this.obj = bw.dom ? document.getElementById('submenu' + ref) : bw.ie4 ? document.all['submenu' + ref] : bw.ns4 ? eval('document.submenu' + ref) : 0;
	this.css = bw.dom ? this.obj.style : bw.ie4 ? this.obj.style : bw.ns4 ? this.obj : 0;
	var top = bw.dom ? document.getElementById(ref).offsetTop : bw.ie4 ? document.all[ref].offsetTop : bw.ns4 ? eval('document.' + ref + '.pageY') : 0;
	this.css.top = top;
	this.css.zIndex = 2;
	css.visibility = 'visible';
}

function hideSubMenu(ref) {
	this.css = bw.dom ? document.getElementById('submenu' + ref).style : bw.ie4 ? document.all['submenu' + ref].style : bw.ns4 ? eval('document.submenu' + ref) : 0;
	this.css.zIndex = 1;
	css.visibility = 'hidden';
}

