/* Anzeigen und verstecken von normalen Layern
erstellt von Thomas Kittel*/
d = document;
w = window;

// Füllen der Variablen für die einzelnen Browser
ie = ((d.all) && (w.offscreenBuffering)) ? true : false;
ns = ((d.captureEvents) && (!d.getElementById)) ? true : false;
mz = document.getElementById&&!document.all;

// Anzeigen der Layer (browserspezifisch)
function show(layerId)
{
  if (ie)
  {
    document.all[layerId].style.visibility = "visible";
    if (layerId == 'sekos_h' || layerId == 'bgz_h' || layerId == 'hausgruppen_h' || layerId == 'selbsthilfe_h')
      document.all["spacer_o"].style.visibility = "visible";
    if (layerId == 'home_h' || layerId == 'aktuell_h' || layerId == 'kontakt_h' || layerId == 'spon_h' || layerId == 'gruppe_h')
      document.all["spacer_u"].style.visibility = "visible";
    return;
  }
  if (ns)
  {
    document.layers[layerId].visibility = "show";
    if (layerId == 'sekos_h' || layerId == 'bgz_h' || layerId == 'hausgruppen_h' || layerId == 'selbsthilfe_h')
      document.layers["spacer_o"].visibility = "show";
    if (layerId == 'home_h' || layerId == 'aktuell_h' || layerId == 'kontakt_h' || layerId == 'spon_h' || layerId == 'gruppe_h')
      document.layers["spacer_u"].visibility = "show";
    return;
  }
  if (mz)
  {
    document.getElementById(layerId).style.visibility = "visible";
    if (layerId == 'sekos_h' || layerId == 'bgz_h' || layerId == 'hausgruppen_h' || layerId == 'selbsthilfe_h')
      document.getElementById("spacer_o").style.visibility = "visible";
    if (layerId == 'home_h' || layerId == 'aktuell_h' || layerId == 'kontakt_h' || layerId == 'spon_h' || layerId == 'gruppe_h')
      document.getElementById("spacer_u").style.visibility = "visible";
  }

}
function show_e(layerId)
{
  if (ie)
  {
    document.all[layerId].style.visibility = "visible";
    return;
  }
  if (ns)
  {
    document.layers[layerId].visibility = "show";
    return;
  }
  if (mz)
  {
   document.getElementById(layerId).style.visibility = "visible";
  }

}

// Verstecken der Layer (browserspezifisch)
function hide(layerId)
{
  if (ie)
  {
    document.all[layerId].style.visibility = "hidden";
    return;
  }
  if (ns)
  {
    document.layers[layerId].visibility = "hide";
    return;
  }
  if (mz)
  {
    document.getElementById(layerId).style.visibility = "hidden";
  }
}

// Alle Layer schließen
function hide_all(LayNr)
{
//alert (LayNr);
//  if (LayNr == 4711) false;
  hide('spacer_o');
  hide('spacer_u');

  hide('bgz_h');
  hide('sekos_h');
  hide('hausgruppen_h');
  hide('hausgruppen2_h');
  hide('selbsthilfe_h');
  hide('bgz');
  hide('sekos');
//  hide('hausgruppen');
//  hide('selbsthilfe');

  hide('home_h');
  hide('aktuell_h');
  hide('kontakt_h');
  hide('spon_h');
  hide('gruppe_h');
//  hide('kontakt');
//  hide('spon');

  if (LayNr == 0)  show_e('bgz_h');
  if (LayNr == 1)  show_e('sekos_h');
  if (LayNr == 2)  show_e('hausgruppen_h');
  if (LayNr == 4)  show_e('hausgruppen2_h');
  if (LayNr == 3)  show_e('selbsthilfe_h');

//  if (LayNr == 4)  show_e('home_h');
  if (LayNr == 5)  show_e('aktuell_h');
  if (LayNr == 6)  show_e('kontakt_h');
  if (LayNr == 7)  show_e('spon_h');
  if (LayNr == 8)  show_e('gruppe_h');
}

function submenue(LayNr)
{
  if (LayNr == 0)
  {show_e('bgz_h');show_e('bgz');}
  if (LayNr == 1)
  {show_e('sekos_h');show_e('sekos');}
//  if (LayNr == 2)
//  {show_e('hausgruppen_h');}
//  if (LayNr == 3)
//  {show_e('selbsthilfe_h');}
//  if (LayNr == 4)
//  {show_e('home_h');}
//  if (LayNr == 5)
//  {show_e('aktuell_h')}
//  if (LayNr == 6)
//  {show_e('kontakt_h');}
//  if (LayNr == 7)
//  {show_e('spon_h');show_e('spon');}
}