function PopUp(ziel,f) {
  if (f == -1) ziel = "/kannichsein.html";
  else if (f == -2) ziel = "http://www.1ngo.de/oops.html";
  var w, h, b, bars="", fenster="", d=0, x=0, y=0;
  switch(f)
  {
    case 0: w=0; h=0; b=0; break;
    case 1: w=0; h=0; b=1; break;
    case 2: w=790; h=564; b=0; break;
    case 3: w=790; h=564; b=1; break;
    case 4: w=320; h=430; b=-1; break;
    default: w=0; h=0; b=0; break;
  }
  if (b != -1) bars=",resizable=yes,scrollbars=yes";
  if (b == 1) { bars=",menubar=yes,location=yes,toolbar=no,status=no"+bars; h=h-66; d=22; }
  else d = -44;
  if (w > 0 && h > 0) {
    if (w < screen.availWidth || h < screen.availHeight) {
      x = (screen.availWidth - w - 12) / 2;
      y = (screen.availHeight - h - d) / 2;
      if (window.opera) y = 0; // Opera positioniert unter den Symbolleisten
      if (x < 0 || y < 0) { x=0 ; y=0; }
      else fenster = "width="+w+",height="+h+",";
    }
  }
  fenster += "left="+x+",top="+y+bars;
  var NewPopUp = window.open(ziel,"1ngo",fenster);
  if (NewPopUp) NewPopUp.focus();
  return !NewPopUp;
}

function Statistik(Pfad,Site) {
document.write('<img src="' + Pfad + 'access-js1.gif?'+screen.width+'" alt="" title="Statistik" /'+'> [<a href="#' + Site + 'titel" title="nach oben">&nbsp;&uarr;&nbsp;<'+'/a>]');
}

if (top.frames.length != 0) top.location.href=self.location.href;

if (self.location.href.indexOf("ExterneLinks.html?") > -1) {
  var url = self.location.search.slice(1);
  var inet = "http://";
  if (url.slice(0,6) != inet) url = inet + url;
  self.location.replace(url);
}

if(window.ChromeWindow) {
  if( (self.location.href.indexOf("sitemap.html") == -1) && (self.location.href.indexOf("statistik.html") == -1) && (self.location.href.indexOf("css-layout.html") == -1) ) {
    document.writeln('<style type="text/css">');
    document.writeln('#web ::-moz-selection { color:white; background:#069; }');
    document.writeln('#tanz ::-moz-selection { color:white; background:#a20; }');
    document.writeln('#prg ::-moz-selection { color:white; background:#666; }');
    document.writeln('#tanztext { -moz-border-radius: 0 1em 1em 1em; }');
    document.writeln('#webtext { -moz-border-radius: 1em; }');
    document.writeln('#seite { -moz-border-radius: 1em; }');
    document.writeln('</style>');
  }
}

function init(Datei) {
  if(document.getElementById) {
    x = document.getElementById("webtext");
    if(x) {
      if(window.navigator.language) {
        if (x.offsetWidth<570) {
          x.style.width="auto"; x.style.marginLeft="0";
        }
      }
      else {
        if (x.offsetWidth<525) {
          x.style.width="99%"; x.style.marginLeft="0";
          x.style.clear="left"; x.style.marginBottom="1em";
        }
      }
    }
    if(Datei) {
      if(Datei == "Verweise") Verweise(); else ExterneLinks(Datei);
    }
  }
}

function Verweise() {
  if(document.getElementById) {
    var o = document.getElementById('Verweise');
    var text = o.innerHTML;
    var n = text.replace( /\*.\/([^\012\015 ]*)/g, '* <a href="$1">/$1</a>');
    if(o.outerHTML && !window.opera) {
      n = n.replace( /\n/g, '<br>\n');
      o.outerHTML = '<pre>' + n + '</pre>';
    }
    else o.innerHTML = n;
  }
}

function ExterneLinks(Datei) {
  switch (Datei) {
    case "diashow": {
      document.links[9].href += '?andrealenzing.de/dia.php?koepfe5';
      break;
    }
  }
}

function Layout() {
  if (document.layers)
    document.write('Ihr Browser unterst&uuml;tzt leider nicht den <a href="http://www.td-duesseldorf-rot-weiss.de/news/news030526.html" target="_blank">aktuellen Standard<\/a>,<br>der zur korrekten Anzeige dieser Seiten vorausgesetzt wird!');
}