function FensterOeffnen (Adresse) {
  MeinFenster = window.open(Adresse, "Zweitfenster", "width=400,height=300,left=100,top=200");
  MeinFenster.focus();
}
    
function FensterOeffnenVariabel (Adresse, width, height) {
  MeinFenster = window.open(Adresse, "Zweitfenster", "width="+width+",height="+height+",left=100,top=200");
  MeinFenster.focus();
}

var hwndPopup_3cfd;
function openpopup_3cfd(url){
var popupWidth = 500;
var popupHeight = 360;
var popupTop = 80;
var popupLeft = 45;
var isFullScreen = false;
var isAutoCenter = false;
var popupTarget = "popupwin_3cfd";
var popupParams = "toolbar=0, scrollbars=0, menubar=0, status=0, resizable=0";

if (isFullScreen) {
  popupParams += ", fullscreen=1";
} else if (isAutoCenter) {
  popupTop  = parseInt((window.screen.height - popupHeight)/2);
  popupLeft = parseInt((window.screen.width - popupWidth)/2);
}

var ua = window.navigator.userAgent;
var isMac = (ua.indexOf("Mac") > -1);

//IE 5.1 PR on OSX 10.0.x does not support relative URLs in pop-ups the way they're handled below w/ document.writeln
if (isMac && url.indexOf("http") != 0) {
  url = location.href.substring(0,location.href.lastIndexOf('\/')) + "/" + url;
}

var isOpera = (ua.indexOf("Opera") > -1);
var operaVersion;
if (isOpera) {
  var i = ua.indexOf("Opera");
  operaVersion = parseFloat(ua.substring(i + 6, ua.indexOf(" ", i + 8)));
  if (operaVersion > 7.00) {
    var isAccessible = false;
    eval("try { isAccessible = ( (hwndPopup_3cfd != null) && !hwndPopup_3cfd.closed ); } catch(exc) { } ");
    if (!isAccessible) {
      hwndPopup_3cfd = null;
    }
  }
}

if ( (hwndPopup_3cfd == null) || hwndPopup_3cfd.closed ) {

  if (isOpera && (operaVersion < 7)) {
    if (url.indexOf("http") != 0) {
      hwndPopup_3cfd = window.open(url,popupTarget,popupParams + ((!isFullScreen) ? ", width=" + popupWidth +", height=" + popupHeight : ""));
      if (!isFullScreen) {
        hwndPopup_3cfd.moveTo(popupLeft, popupTop);
      }
      hwndPopup_3cfd.focus();
      return;
    }
  }
  if (!(window.navigator.appName == "Netscape" && !document.getElementById)) {
    //not ns4
    popupParams += ", width=" + popupWidth +", height=" + popupHeight + ", left=" + popupLeft + ", top=" + popupTop;
  } else {
    popupParams += ", left=" + popupLeft + ", top=" + popupTop;
  }
  //alert(popupParams);
  hwndPopup_3cfd = window.open("",popupTarget,popupParams);
  if (!isFullScreen) {
    hwndPopup_3cfd.resizeTo(popupWidth, popupHeight);
    hwndPopup_3cfd.moveTo(popupLeft, popupTop);
  }
  hwndPopup_3cfd.focus();
  with (hwndPopup_3cfd.document) {
    open();
    write("<ht"+"ml><he"+"ad></he"+"ad><bo"+"dy onLoad=\"window.location.href='" + url + "'\"></bo"+"dy></ht"+"ml>");
    close();
  }
} else {
  if (isOpera && (operaVersion > 7.00)) {
    eval("try { hwndPopup_3cfd.focus();  hwndPopup_3cfd.location.href = url; } catch(exc) { hwndPopup_3cfd = window.open(\""+ url +"\",\"" + popupTarget +"\",\""+ popupParams + ", width=" + popupWidth +", height=" + popupHeight +"\"); } ");
  } else {
    hwndPopup_3cfd.focus();
    hwndPopup_3cfd.location.href = url;
  }
}

}

