	function lib_bwcheck(){ //Browsercheck (needed)
        this.ver=navigator.appVersion;
        this.agent=navigator.userAgent
        this.dom=document.getElementById?1:0
        this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
        this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
        this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom)?1:0;
        this.ie4=(document.all && !this.dom)?1:0;
        this.ie=this.ie4||this.ie5||this.ie6 || this.ie7
        this.mac=this.agent.indexOf("Mac")>-1
        this.opera5=this.agent.indexOf("Opera 5")>-1
        this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
        this.ns7=(this.dom && parseInt(this.ver) >= 5) ?1:0;
        this.ns4=(document.layers && !this.dom)?1:0;
        this.bw=(this.ie7 || this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5 || this.dom)
        return this
	}
	var bw=new lib_bwcheck()

	activemenu = 'x'
	function imageSwapLayer(layername, img, url) {
		if (bw.ns4) {
			layer = 'document.layers'
			objStr = layer + '[\'' + layername + '\'].document.' + img + '.src="' + url + '"'
		} else if (bw.ie) {
				layer = 'document.all'
				objStr = layer + '[\'' + layername + '\'].document.' + img + '.src="' + url + '"'
			} else {
					layer = 'document.getElementById'
					objStr = 'document.' + img + '.src="' + url + '"'
				}
		eval(objStr)
	}

	function openMenu(id)
	{
		showlayer(id);
		mytime=setTimeout('hidelayer("' + id + '")',5000);
	}
	
	function closeMenu(id)
	{
		hidelayer(id);
		try
		{
			clearTimeout(mytime);
		}
		catch (err)
		{}
	}
	
	function showlayer(id) {
		if (bw.ns4) {
			document.layers[id].visibility = "show"
		} else if (bw.ie) {
				document.all[id].style.visibility = "visible"
			} else {
					document.getElementById(id).style.visibility = "visible"
				}
	}

	function hidelayer(id) {
		if (bw.ns4) {
			document.layers[id].visibility = "hide"
		} else if (bw.ie) {
				document.all[id].style.visibility = "hidden"
			} else {
					document.getElementById(id).style.visibility = "hidden"
				}
	}

	Xwin=30;
	Ywin=30;
	function openPop(url,titel,scr1,scr2,w,h,tool,menu) {
		if (parseInt(navigator.appVersion) >= 4) {
			Xwin = (screen.availWidth - w)*.4;
			Ywin = (screen.availHeight - h)*.3;
		}
		newWindow = window.open(url,titel,'toolbar=' + tool + ',location=0,directories=0,status=0,menubar=' + menu + ',scrollbars=' +scr1 +',scrolling=' +scr2 +',resizable=1,width=' +w +',height=' +h +',top=' + Ywin + ',left=' + Xwin);
	}

	function isVisible(id) {
		if (bw.ns4) {
			if (document.layers[id].visibility == "show") return true
			else return false
		} else if (bw.ie) {
				if (document.all[id].style.visibility == "visible") return true
				else return false
			} else {
					if (document.getElementById(id).style.visibility == "visible") return true
					else return false
				}
	}

	function compareLayer(id1, id2, id3) {
		if (id3 == 'x') {
			if (bw.ns4) {
				bottom = document.layers[id1].css.height;
			} else if (bw.ie) {
					bottom = document.all[id1].offsetHeight;
				} else {
						bottom = document.getElementById(id1).offsetHeight;
					}
		} else {
			if (bw.ns4) {
				bottom = document.layers[id1].css.height;
				bottom2 = document.layers[id3].css.height;
			} else if (bw.ie) {
					bottom = document.all[id1].offsetTop + document.all[id1].offsetHeight;
					bottom2 = document.all[id3].offsetTop + document.all[id3].offsetHeight;
				} else {
						bottom = document.getElementById(id1).offsetTop + document.getElementById(id1).offsetHeight;
						bottom2 = document.getElementById(id3).offsetTop + document.getElementById(id3).offsetHeight;
					}

			if (bottom2 > bottom) {
				bottom = bottom2;
			}
		}

		if (bw.ns4) {
			document.layers[id2].style.height = bottom - 1;
		} else if (bw.ie) {
				document.all[id2].style.height = bottom - 1 - document.all[id2].offsetTop;
			} else {
					document.getElementById(id2).style.height = bottom - 1 - document.getElementById(id2).offsetTop;
				}
	}

	function compareLayer2(id1, id2) {
		if (bw.ns4) {
			bottom = document.layers[id1].css.height;
		} else {
			if (bw.ie) {
				bottom = document.all[id1].offsetHeight;
			} else {
					bottom = document.getElementById(id1).offsetHeight;
			}
		}
		if (bw.ns4) {
			document.layers[id2].style.top = bottom + 153;
		} else {
			if (bw.ie) {
				document.all[id2].style.top = bottom + 153;
			} else {
					document.getElementById(id2).style.top = bottom + 153;
			}
		}
	}
