var dom = document.getElementById?1:0;
var ns4 = document.layers?1:0;
var ww, hh;
var onResizeLayout = 'undefined';

function meldeDich(meldung){
	alert(meldung);
}

function showMenu(ebene,layer,item) {
(window.innerWidth) ? ww=window.innerWidth:ww=document.all.mixframe.offsetWidth;
(window.innerHeight) ? hh=window.innerHeight:hh=document.all.mixframe.offsetHeight;

var anzahl2 = 8;
var anzahl3 = 8;

 var anzahl = 0;
 if(ebene == 2){
  anzahl = 8;
 }
 else if(ebene == 3){
  anzahl = 8
 }

 for (count = 1; count <= anzahl; count++) {
 var content = "Menu" + ebene + count;
 var active = "Menu" + ebene + layer;
  
  if(dom) {
   if(content == active) {
    document.getElementById(active).style.visibility = 'visible';
   }
   else {
    document.getElementById(content).style.visibility = 'hidden';
   }
   
   
  }
  else if(ns4) {
   if(content == active) {
    document[active].visibility = 'show';
   }
   else {
    document[content].visibility = 'hide';
   }
  }
 }
 
// Menues der Ebene 3 verbergen
if(ebene == 2){
	for(i = 1; i <= anzahl3; i++) {
		var menue = "Menu3" + i;
		hide(menue);
	}
// Fett-Darstellung im Untermenue zuruecksetzen
for(i=1;i<=anzahl;i++){
	//z.B. "Item211"; 
	var menuitem = "Item" + (ebene) + "1" + i; 
	makenormal(menuitem);
	}
  }
  
// Aktives Menue-Item fett darstellen
var maxC = 10+anzahl;
var startC = 10;

//alert(item);
if(item>20){
  //alert(item);
  maxC = anzahl + 20;
  startC = 20;
}

for(i=startC;i<=maxC;i++){
  var menuitem = "Item" + (ebene-1) + i;
  makenormal(menuitem);
  //alert(menuitem);
}

menuitem = "Item" + (ebene-1) + item;
//alert(menuitem);
makebold(menuitem);
}


// Set the font-weight of an object to bold
function makebold(obj) {
    var theObj = getObject(obj);
    if (theObj) {
        theObj.fontWeight = "bold";
    }
}

// Set the font-weight of an object to normal
function makenormal(obj) {
    var theObj = getObject(obj);
    if (theObj) {
        theObj.fontWeight = "normal";
    }
}

/*
function setShut() { 
timer = setTimeout("shut(first,sec)", 120000);
}


function clearShut() {
if(window.timer)
clearTimeout(timer);
}


function shut(first,sec) {

 var active = first + sec;

 if(dom)
 document.getElementById(active).style.visibility = 'hidden';
 else if(ns4)
 document[active].visibility = 'hide';
}
*/




