// BROWSERTEST
var DHTML = 0, DOM = 0, MS = 0, NS = 0, OP = 0;

if(document.getElementById) {
  DHTML = 1;
  DOM = 1;
}
if (window.opera) {
  OP = 1;
}
if(document.all && !OP) {
  DHTML = 1;
  MS = 1;
}
if(document.layers && !OP) {
  DHTML = 1;
  NS = 1;
}

function getElement(id) {
  if(DOM) return document.getElementById(id);
  else if(MS) return document[id];
  else if(NS) return document[id];
  else return void(0);
}

// Hauptmenue
main_aktuell_over = null;
main_aktuell_on = null;

function menueOver(name) {
  if (name == top.main_aktuell_on) return;
  if (!name) name = name;
  if (main_aktuell_over) menueOut(main_aktuell_over);
  if (top.main_aktuell_on) menueOut(top.main_aktuell_on);
  this.document.images[name].src = "images/"+name+"_on.gif";
  main_aktuell_over = name;
}

function menueOut(name) {
  if (!name) name = name;
  if (name == main_aktuell_over) main_aktuell_over = null; 
  if (name != top.main_aktuell_on) {
    this.document.images[name].src = "images/"+name+".gif";
  }
}

function menueOn(name) {
  top.main_aktuell_on = name;
  this.document.images[name].src = "images/"+name+"_on.gif";
}




var lastLink = null;
var lastLinkColor = null;
function activeLink(id,col,changeVisible) {
  if (lastLink && getElement(lastLink)) getElement(lastLink).style.color = lastLinkColor;
  if (changeVisible && lastLink && getElement(lastLink+"_img")) getElement(lastLink+"_img").style.visibility = "hidden";
  //if (lastLink && getElement(lastLink+"_tbl")) getElement(lastLink+"_tbl").style.background = lastLinkColor;
	
  if (getElement(id)) {
    lastLinkColor = getElement(id).style.color;
    if (col) getElement(id).style.color = col;
    else getElement(id).style.color = "#000000";
  }
  if (changeVisible && getElement(id+"_img")) getElement(id+"_img").style.visibility = "visible";
  
  //if (getElement(id+"_tbl")) {
  //  lastLinkColor = getElement(id+"_tbl").style.background;
  //  getElement(id+"_tbl").style.background = "#12406D";
  //}
  
  lastLink = id;
}

