function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function preloadImages() { //v2.0
  if (document.images) {
    var imgFiles = preloadImages.arguments;
    if (document.preloadArray==null) document.preloadArray = new Array();
    var i = document.preloadArray.length;
    with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){
      preloadArray[i] = new Image;
      preloadArray[i++].src = imgFiles[j];
  } }
}

function neuesBild() {
  curimg++;
  if (curimg >= images.length) curimg = 0;
  document.refer.src = 'images/ref/' + images[curimg];
  bildtimeout();
}

function bildtimeout() {
  window.setTimeout("neuesBild()",5000);
}

function openPopup(file,windowname,features,breite,hoehe) {
  popup = window.open(file,windowname,features);
  popup.window.resizeTo(breite,hoehe);
  popup.focus();
  return false;
}

function hoverIE() {
  if(window.navigator.systemLanguage && !window.navigator.language) {
    var LI = document.getElementById("menuglobal").firstChild;
    do {
      if (sucheUL(LI.firstChild)) {
        LI.onmouseover=einblenden;
        LI.onmouseout=ausblenden;
      }
      LI = LI.nextSibling;
    }
    while(LI);
  }
}

function hoverIE2() {
  if(window.navigator.systemLanguage && !window.navigator.language) {
    var LI = document.getElementById("menustandort").firstChild;
    do {
      if (sucheUL(LI.firstChild)) {
        LI.onmouseover=einblenden;
        LI.onmouseout=ausblenden;
      }
      LI = LI.nextSibling;
    }
    while(LI);
  }
}
function sucheUL(UL) {
  do {
    if(UL) UL = UL.nextSibling;
    if(UL && UL.nodeName == "UL") return UL;
  }
  while(UL);
  return false;
}

function einblenden() {
  var UL = sucheUL(this.firstChild);
  UL.style.display = "block";
}
function ausblenden() {
  sucheUL(this.firstChild).style.display = "none";
}