/* browser einfach */
var ie = document.all;
var w3c = document.getElementById;
var nc = document.layers;
var d = document;
/* Statustext in Statuszeile */
var StatusText = d.title;
window.defaultStatus = StatusText;

/* N4 Resizefix */
if (nc)
   {
   var startbreite = window.innerWidth;
   var starthoehe = window.innerHeight;
   }
    function reloadNC()
    {
    if (document.layers && window.innerWidth != startbreite || window.innerHeight != starthoehe)
      {
      location.reload();
      }
   }

/* Show Hide Layer  */
function setVis(IDName,vis) {
  if (nc) {
  d.layers[IDName].visibility =  vis ? 'hidden' : 'visible';
  return;
  }
  if (ie) {
   d.all[IDName].style.visibility = vis ? 'hidden' : 'visible';
   return;
  }
  if (w3c) {
  document.getElementById(IDName).style.visibility = vis ? 'hidden' : 'visible';
  return;
  }
}

/* Bildwechsel */
function setPic(Bildnr,Bildobjekt)
  {
  if(ie || w3c) window.d.images[Bildnr].src = Bildobjekt.src;
  if (nc) window.d.images[Bildnr].src = Bildobjekt.src;
  }

/* Neuen Inhalt in div schreiben */
function setCont(IDName,Output) {
  if (nc)
  with (document.layers[IDName].document){
  open();
  write(Output);
  close()
  }
  if (ie) d.all[IDName].innerHTML = Output;
  /* if (w3c) d.getElementById(IDName).firstChild.nodeValue = Output; */
}

/* CSS ändern */
function setCSS(IDName,CSS,Wert) {
  if (nc){
      if(Wert.indexOf("px" || "pt")>0) Wert=parseInt(Wert);
      d.layers[IDName][CSS] = Wert;
      }
  if (ie) d.all[IDName].style[CSS] = Wert;
  if (w3c) d.getElementById(IDName).style[CSS] = Wert;
}

/* Class ändern */
function setClass(IDName,CName) {
  if (nc) d.layers[IDName].className = CName;
  if (ie) d.all[IDName].className = CName;
  if (w3c) d.getElementById(IDName).className = CName;
}
