function swapDivVisibility(menuEntryID) {
  var showSubMenuTochterunt = 0;
  var showSubMenuPress = 0;

  if (menuEntryID == "tochterunternehmen") {
    showSubMenuTochterunt = 1;
  }
  else if (menuEntryID == "presse") {
    showSubMenuPress = 1;
  }
      
      
  if (showSubMenuPress == 1) {
    document.getElementById("sub_menu_press").style.display = "block";
    document.getElementById("sub_menu_tochteruntern").style.display = "none";        
  }
  else {
    document.getElementById("sub_menu_press").style.display = "none";
  }
      
  if (showSubMenuTochterunt == 1){
    document.getElementById("sub_menu_tochteruntern").style.display = "block";
        document.getElementById("sub_menu_press").style.display = "none";
  }
  else {
    document.getElementById("sub_menu_tochteruntern").style.display = "none";
  }
}

function showHide(id_no, has_sublinks) {

    var counter = 1;
    var menuElement = document.getElementById("main-link--" + id_no);

    for (var i = 1; 20; i++) {
        var menuElement = document.getElementById("main-link--" + i);

        if (menuElement) {
            menuElement.className = 'hide';
        }
        else {
            break;
        }
    }

    if (has_sublinks == 1) {
        menuElement = document.getElementById("main-link--" + id_no);
        menuElement.className = 'show';
    }
}
    
function popup(mylink, windowname, win_width, win_height)
{
  if (! window.focus)return true;
  
  var href;
  var ok;
  var left = (screen.width/2)-(win_width/2);
  var top = (screen.height/2)-(win_height/2);
  
  if (typeof(mylink) == 'string')
     href=mylink;                 
  else
     href=mylink.href;
     
     ok = window.open(href, null, 'width=' + win_width + ',height=' + win_height + ',left=' + left + ', top=' + top + ',channelmode=0,scrollbars=0,resizable=0');
        
     if (ok) return false;
     else return true;
}