		var ns4 = (document.layers) ? true : false;
		var ie4 = (document.all) ? true : false;

		function getIDedStyle (elementID) 
		{
			var re = new RegExp("^." + elementID + "$", "gi");
			if (document.all) 
			{
				for (var s = 0; s < document.styleSheets.length; s++)
					for (var r = 0; r < document.styleSheets[s].rules.length; r++)
						if (document.styleSheets[s].rules[r].selectorText.search(re) != -1) 
						{
							return document.styleSheets[s].rules[r].style;
						}
			}
			else if (document.getElementById) 
			{
				for (var s = 0; s < document.styleSheets.length; s++)
					for (var r = 0; r < document.styleSheets[s].cssRules.length; r++)
						if (document.styleSheets[s].cssRules[r].selectorText.search(re) != -1)
						{
							document.styleSheets[s].cssRules[r].sheetIndex = s;
							document.styleSheets[s].cssRules[r].ruleIndex = s;
							return document.styleSheets[s].cssRules[r].style;
						}
			}
			else if (document.layers)
				return document.ids[elementID];
			return null;
		}

		var selected = false;
		var menu_color = getIDedStyle('menu').color;
		var menu_bckcolor = getIDedStyle('menu').backgroundColor;
		var menusel_color = getIDedStyle('menusel').color;
		var menusel_bckcolor = getIDedStyle('menusel').backgroundColor;
		var choice = -1;

		function menuover(pos)
		{
			if (ns4) return;
			if (menutab.length)
			{			
				menutab[pos-1].style.backgroundColor=menusel_bckcolor;
				menutab[pos-1].style.color=menusel_color;
				menuref[pos-1].style.backgroundColor=menusel_bckcolor;
				menuref[pos-1].style.color=menusel_color;
			}
			else
			{			
				menutab.style.backgroundColor=menusel_bckcolor;
				menutab.style.color=menusel_color;
				menuref.style.backgroundColor=menusel_bckcolor;
				menuref.style.color=menusel_color;
			}
		}

		function menuout(pos, newpos)
		{
			if (ns4) return;

			if (choice != pos || (newpos && newpos != pos))
			{
				if (menutab.length)
				{			
					menutab[pos-1].style.backgroundColor=menu_bckcolor;
					menutab[pos-1].style.color=menu_color
					menuref[pos-1].style.backgroundColor=menu_bckcolor;
					menuref[pos-1].style.color=menu_color
				}
				else
				{
					menutab.style.backgroundColor=menu_bckcolor;
					menutab.style.color=menu_color
					menuref.style.backgroundColor=menu_bckcolor;
					menuref.style.color=menu_color
				}
			}
		}

		function highlightmenu(pos) {
			if (choice>0) 
				menuout(choice, pos);
			choice = pos;
			return false;
		}

		function tick() 
		{
			if (ns4) return;

			var today = new Date()
			Clock.innerHTML = "&nbsp;" + today.getDate() + "." + today.getMonth() + "." +
				today.getYear() + "&nbsp;" + today.getHours() + ":" + 
				(today.getMinutes() < 10 ? "0" : "") + today.getMinutes() + ":" +
				(today.getSeconds() < 10 ? "0" : "") + today.getSeconds();
			window.setTimeout("tick();", 100);
		}
