function NeuesFenster(Link,w,h,Scroll,Resize,Toolbars)
{
  if (Toolbars==1) Toolbars=",menubar=yes,toolbar=yes,status=yes,location=yes";
  else             Toolbars="";
  if (w>1024) { w=1024; Scroll="yes"; Resize="yes"; }
  if (h>768)  { h=768;  Scroll="yes"; Resize="yes"; }
  x=(1024-w)/2;
  y=(768-h)/2;
  NewWindow=open(Link,"Content"+parseInt(100.0*Math.random()),
                      "top="+y+",left="+x+",height="+h+",width="+w+",scrollbars="+Scroll+",resizable="+Resize+Toolbars);
}

function LoadFrame(Link,FrameName)
{
  Frame=eval("parent."+FrameName);
  Frame.location.href=Link;
}

function NF2(obj, Bezeichnung, w, h, resize, scroll, toolbar, evt, fullSize)
{
  if (typeof fullSize=='undefined') fullSize=false;
  if (!evt) var evt=window.event;

  if (Bezeichnung==null) Bezeichnung="Content"+parseInt(100.0*Math.random());

  if (resize)  var resizable ='yes';                                              else var resizable ='no';
  if (scroll)  var scrollbars='yes';                                              else var scrollbars='no';
  if (toolbar) var toolbars=  ',menubar=yes,toolbar=yes,status=yes,location=yes'; else var toolbars='';

  if (fullSize || evt.screenX && evt.screenY) // Ideale Position bestimmen wenn screenX, screenY bekannt
  {
    if (fullSize)
    {
      var x=0;
      var y=0;
      /*alert(screen.availWidth+", "+screen.availHeight);*/ w=screen.availWidth-12;
      h=screen.availHeight-31;
    } else
    {
      var x=evt.screenX-Math.round(w/2);
      var y=evt.screenY-Math.round(h/2);

      // Wenn halbwegs weit rechts/unten: Linksbündig/Obenbündig darstellen!
      if (x+w>1024) x=evt.screenX-w-10;
      if (y+h>768)  y=evt.screenY-h-25;

      if (x<0) x=0; // zu weit links?
      if (y<0) y=0; // zu weit oben?
    }

    ok=window.open((obj.getAttribute) ? obj.getAttribute('href') : obj.href,
                   Bezeichnung,
                   'left='+x+',top='+y+',width='+w+',height='+h+',scrollbars='+scrollbars+',resizable='+resizable+toolbars);
  } else // Fensterposition dem Browser überlassem
  {
    ok=window.open((obj.getAttribute) ? obj.getAttribute('href') : obj.href,
                   Bezeichnung,
                   'width='+w+',height='+h+',scrollbars='+scrollbars+',resizable='+resizable+toolbars);
  }

  if (ok) return false; // OK => HTML-Popup-Notlösung nicht notwendig
  else    return true;  //    => Bitte HTML-Variante darstellen da Popup via JS scheiterte!
} // function NF2(obj, Bezeichnung, w, h, resize, scroll, toolbar, evt, fullSize)
