// Anzahl der Men-Eintr�e

function display(layer,bgcolor, color) {
	hideAll();
	var test = getElem("id",layer,null);
	if(test!=null) test.style.visibility = "visible";
	getElem("id",layer+'-td',null).style.backgroundColor = bgcolor;
	getElem("id",layer+'-td',null).style.color = color;
	getElem("id",layer+'-a',null).style.color = color;
}

function hide(layer) {
	var test = getElem("id",layer,null);
	if(test!=null) test.style.visibility = "hidden";
	getElem("id",layer+'-td',null).style.backgroundColor = std_bgcolor;
	getElem("id",layer+'-td',null).style.color = std_color;
	getElem("id",layer+'-a',null).style.color = std_color;
}	

function hideAll() {
	var i=0;
	for(i=0; i<MenuEntries.length; i++) hide(MenuEntries[i]);
}

function placeMenu() {
	var y=getElem("id",'menu_td',null).offsetTop+getElem("id",'menu-table',null).offsetTop+getElem("id",MenuEntries[0]+'-td',null).offsetHeight;
	var x=getElem("id",'menu-table',null).offsetLeft;
	var i=0;
	for(i=0; i<MenuEntries.length; i++) {
		
		var xnew=x+getElem("id",MenuEntries[i]+'-td',null).offsetLeft;
		var test = getElem("id",MenuEntries[i],null);
		if(test!=null) {
			test.style.top=y+'px';
			test.style.left=xnew+'px';
		}
	}
}

function colorizeMenu(who, color) {
	who.style.backgroundColor=color;
}

function openWindow(url) {
	win = window.open(url, 'printwin', 'toolbar=no,menubar=yes,scrollbars=yes,width=525,height=600'); 
	win.focus();
}