//Popdown-Menue Layer und Mitarbeiter Layer - Anfang
d = document;
w = window;
ie = ((d.all) && (w.offscreenBuffering)) ? true : false;
ns = ((d.captureEvents) && (!d.getElementById)) ? true : false;
mz = document.getElementById&&!document.all;
op = ((d.getElementById) && (navigator.userAgent.indexOf('Opera')!= -1)) ? true : false;

function show(layerId)
{
  if (ie)
  {
    document.all[layerId].style.visibility = "visible";
    document.all["menueaus"].style.visibility = "visible";
    return;
  }
  if (ns)
  {
    document.layers[layerId].visibility = "show";
    document.layers["menueaus"].visibility = "show";
    return;
  }
  if ((mz) || (op))
  {
   document.getElementById(layerId).style.visibility = "visible";
   document.getElementById("menueaus").style.visibility = "visible";
  }
}

function hide(layerId)
{
  if (ie)
  {
    document.all[layerId].style.visibility = "hidden";
    return;
  }
  if (ns)
  {
    document.layers[layerId].visibility = "hide";
    return;
  }
  if ((mz) || (op))
  {
   document.getElementById(layerId).style.visibility = "hidden";
  }
}

function hideall(x)
{
  if (x == "einrichtungen2")
  {
        hide("profil2");
        hide("service2");
  }
  if (x == "profil2")
  {
        hide("einrichtungen2");
        hide("service2");
  }
  if (x == "service2")
  {
        hide("einrichtungen2");
        hide("profil2");
  }
  if (x == "menueaus")
  {
        hide("menueaus");
        hide("einrichtungen2");
        hide("profil2");
        hide("service2");
  }
}
//Popdown-Menue Layer und Mitarbeiter Layer - Ende

//Neues Fenster gößenoptimiert öffnen - Anfang
function winopen(x)
{
  if (screen.width == 640)
  {
    w = 340;
    h = 180;
  }
  if (screen.width == 800)
  {
    w = 500;
    h = 300;
  }
  if (screen.width == 1024)
  {
    w = 724;
    h = 368;
  }
  if (screen.width > 1024)
  {
    w = 824;
    h = 468;
  }
  window.open("http://"+x+"","neu","width="+w+",height="+h+",left=150,top=100,resizable=1,menubar=1,location=1,scrollbars=1,status=1,toolbar=1");
}
//Neues Fenster gößenoptimiert öffnen - Ende

//Neues Fenster Baustelle gößenoptimiert öffnen - Anfang
function winopenbaustelle(x)
{
  if (screen.width == 640)
  {
    w = 340;
    h = 180;
  }
  if (screen.width == 800)
  {
    w = 500;
    h = 300;
  }
  if (screen.width == 1024)
  {
    w = 724;
    h = 368;
  }
  if (screen.width > 1024)
  {
    w = 824;
    h = 468;
  }
  window.open(""+x+"","neu","width="+w+",height="+h+",left=150,top=100,resizable=1,menubar=1,location=1,scrollbars=1,status=1,toolbar=1");
}
//Neues Fenster Baustellenseite gößenoptimiert öffnen - Ende

//Neues Fenster für Medien gößenoptimiert öffnen - Anfang
function openmedium (x)
{
  if (screen.width == 640)
  {
    w = 340;
    h = 180;
  }
  if (screen.width == 800)
  {
    w = 500;
    h = 300;
  }
  if (screen.width == 1024)
  {
    w = 724;
    h = 368;
  }
  if (screen.width > 1024)
  {
    w = 824;
    h = 468;
  }
  window.open(""+x+"","neu","width="+w+",height="+h+",left=150,top=100,resizable=1,menubar=1,location=1,scrollbars=1,status=1,toolbar=1");
}
//Neues Fenster für Medien gößenoptimiert öffnen - Ende

//Neues Fenster gößenoptimiert öffnen ohne Location, Toolbar etc. - Anfang
function winopensmart(x)
{
  if (screen.width == 640)
  {
    w = 340;
    h = 180;
  }
  if (screen.width == 800)
  {
    w = 500;
    h = 300;
  }
  if (screen.width == 1024)
  {
    w = 724;
    h = 368;
  }
  if (screen.width > 1024)
  {
    w = 824;
    h = 468;
  }
  window.open(""+x+"","neu","width="+w+",height="+h+",left=150,top=100,resizable=1,menubar=0,location=0,scrollbars=1,status=0,toolbar=0");
}
//Neues Fenster MitarbeiterDetailseite
function ma(x)
{
  window.open(""+x+"","neu","width=610,height=350,left=150,top=100,resizable=1,menubar=0,location=0,scrollbars=1,status=0,toolbar=0");
}
//Neues Fenster E-Mailformular
function mf(x)
{
  window.open(""+x+"","EmailFormular","width=571,height=412,left=100,top=100,resizable=1,menubar=0,location=0,scrollbars=0,status=0,toolbar=0");
}