
  /**********************************************************************************************
   *                                                                                            *
   *  Function-Library von www.enovativ.com                                                     *
   *                                                                                            *
   **********************************************************************************************
   *                                                                                            *
   *  Erstellt am 18. September 2002 von Robert Baminger                                        *
   *                                                                                            *
   *  © by enovativ ®                                                                           *
   *                                                                                            *
   **********************************************************************************************/

  // Öffnet ein Pop-Up Fenster
  // @param url Die URL die geöffnet werden soll.
  // @param bgColor Hintergrundfarbe der HTML-Seite die geöffnet werden soll.
  // @param width Breite des Pop-Up Fensters.
  // @param height Höhe des Pop-Up Fensters.
  function OpenPopUp(url, bgColor, width, height) {
    var popUpHeight = "300";
    var popUpWidth  = "600";
    var popUpColor  = "#446291";
    
    if (bgColor) {
      popUpColor = bgColor
    }
    
    if (url.indexOf('?') == - 1) {
      url += "?color=" + popUpColor;
    }
    else {
      url += "&color=" + popUpColor;
    }
    
    if (width) {
      popUpWidth = width;
    }
    
    if (height) {
      popUpHeight = height;
    }
    
    var popUpTop  = screen.height / 2 - parseInt(popUpHeight) / 2;
    var popUpLeft = screen.width / 2 - parseInt(popUpWidth) / 2;
    
    if (window.popup && !window.popup.closed) {
      window.popup.open(url, "_self", "resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1");
      window.popup.focus();
    }
    else {
      window.popup = window.open(url, "_blank", "resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,height=" + popUpHeight + ",width=" + popUpWidth + ",top=" + popUpTop + ",left=" + popUpLeft);
    }
  }
  
  // Schliesst ein Pop-Up Fenster
  function ClosePopUp()
  {
    if (window.popup && !window.popup.closed) {
      window.popup.close();
    }
  }
  
  window.onunload = ClosePopUp;
  
      
