  function kontakt(projekt,titel) {
    var posx=(screen.width - 550)/2
    var posy=(screen.height - 500)/2
    var cProjekt = projekt;
    var cTitel = titel;
    var cUrl = "http://www.modellskipper.de/scripts/kontakt.php?location=" + window.location.href + "&projekt=" + cProjekt + "&thema=" + cTitel;
    var cWindow = window.open(cUrl,"Kontakt","left=" + posx + ", top="+ posy +", height=500, width=550, dependent=yes, resizable=no, scrollbars=yes");
    if (!cWindow.opener) cWindow.opener = self;
    if (cWindow.focus != null) cWindow.focus();
  }

  function placemark(location) {
    var posx=(screen.width - 1010)/2
    var posy=(screen.height - 710)/2
    if (location==0) {
      var cUrl = "http://www.modellskipper.de/GoogleMaps/placemarks_frame.htm";
    } else {
      var cUrl = "http://www.modellskipper.de/GoogleMaps/placemarks.htm?location=" + location;
    }
    var cWindow = window.open(cUrl,"Placemarks","left=" + posx + ", top="+ posy +", height=710, width=1010, dependent=yes, resizable=yes, scrollbars=yes");
    if (!cWindow.opener) cWindow.opener = self;
    if (cWindow.focus != null) cWindow.focus();
  }

  function agbs(dokument) {
    var posx=(screen.width - 790)/2
    var posy=(screen.height - 650)/2
    
    if (dokument=="datenschutz") {
      var cUrl = "http://www.modellskipper.de/impressum/datenschutz.htm";
    }
    if (dokument=="widerruf") {
      var cUrl = "http://www.modellskipper.de/impressum/widerruf.htm";
    }
    if (dokument=="agb") {
      var cUrl = "http://www.modellskipper.de/impressum/agb.htm";
    }

    var cWindow = window.open(cUrl,"AGBs","left=" + posx + ", top="+ posy +", height=650, width=790, dependent=yes, resizable=no, scrollbars=yes");
    if (!cWindow.opener) cWindow.opener = self;
    if (cWindow.focus != null) cWindow.focus();
  }
  
  function linkchecker(url) {
    var curl = replaceChars(url,"&","kaufmund");
    curl = replaceChars(url,"+","EinPlus");
    var _location = replaceChars(window.location.href,"#","");
    var cUrl = "http://www.modellskipper.de/scripts/linkcheck.php?location=" + _location + "&link=" + curl;
    var cWindow = window.open(cUrl);
    if (!cWindow.opener) cWindow.opener = self;
    if (cWindow.focus != null) cWindow.focus();
  }

  function ShowAdress(u) {
    var cUrl = u;
    var cWindow = window.open(cUrl,"Bild","left=350, top=250, height=500, width=500, resizable=no, scrollbars=yes, dependent=yes");
    if (!cWindow.opener) cWindow.opener = self;
    if (cWindow.focus != null) cWindow.focus();
  }
  
  function show_glossar(url) {
    var cUrl = url;
    var cWindow = window.open(cUrl,"Hilfe","left=" + (screen.width-300)/2 + ", top=" + (screen.height-250)/2 + ", height=250, width=300, resizable=no, scrollbars=yes");
    if (!cWindow.opener) cWindow.opener = self;
    if (cWindow.focus != null) cWindow.focus();
  }

  function show_hyperlinks(url) {
    var cUrl = url;
    var cWindow = window.open(cUrl,"Links","left=50, top=50, height=100, width=400, windowtitle=yes, resizable=no, scrollbars=yes");
    if (!cWindow.opener) cWindow.opener = self;
    if (cWindow.focus != null) cWindow.focus();
  }
  
  function suchen(projekt) {
   var mylocation = " " + self.location;
   if (mylocation.toLowerCase().search(/file/) != -1) {
     mylocation="http://www.modellskipper.de";
   }
    var cUrl = "http://www.modellskipper.de/suchen/suche.htm?projekt=" + projekt +"&mylocation=" + mylocation;
    top.location=cUrl ;
  }

  function news() {
    var mylocation = " " + self.location;
    if (mylocation.toLowerCase().search(/file/) != -1) {
       mylocation="http://www.modellskipper.de";
    }
    var cUrl = "http://www.modellskipper.de/news/news.htm?mylocation=" + mylocation;
    top.location=cUrl ;
  }


  function ausblenden() {
    parent.document.getElementById("Fenster").cols = "0,*";
  }

  function replaceChars(text,suche,ersetze) {

    out = suche;
    add = ersetze;
    temp = text;

    while (temp.indexOf(out)>-1) {
      pos= temp.indexOf(out);
      temp = "" + (temp.substring(0, pos) + add + temp.substring((pos + out.length), temp.length));
    }

    return temp;

  }