neues_Fenster = null;

function NeuesFenster(Fenstername,Breite,Hoehe)
{
  if (Breite > screen.width) Breite = screen.width;
  if (Hoehe> screen.height ) Hoehe  = screen.height;

  links = (screen.width  - Breite)/2;
  oben  = (screen.height - Hoehe)/2;
  window.open('',Fenstername, 'width=' + Breite + ', height=' + Hoehe + ',left=' + links + ',top=' + oben + ',resizable=yes,scrollbars=yes');
}

function NBW(us,inhalt)
{
   Titel = us;
   Inhalt = inhalt;
   zu();
   sichtbar();
}

function sichtbar()
{  
   Optionen = 'height=320, width=320, resizable=yes, scrollbars=yes'; 
   neues_Fenster = window.open('','',Optionen)
   with (neues_Fenster) 
   {
      document.writeln('<HTML><HEAD><TITLE>' + Titel + '</TITLE>');
      document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
      document.writeln('<link title=Standard href="styles/sstyles.css" type=text/css rel=stylesheet>');
      document.writeln('</head>');
      document.writeln('<body bgcolor="#F7F7F7" text="#000000">');
  
      document.writeln('<table width="100%" border="0" cellspacing="0" cellpadding="0" >');
      document.writeln(Inhalt);
      document.writeln('</table>');
      document.writeln('</body>');
      document.writeln('</html>');
      setTimeout('window.close()',10000);
   }
}

function zu()
{
   if (neues_Fenster != null)
     if (!neues_Fenster.closed)
       neues_Fenster.close();
}

function InfoBoxAusblenden() {
      document.getElementById('infobox').style.visibility = "hidden";
}

function InfoBoxAnzeigen(e,txt,offsetX,offsetY)
{
        if (offsetX) {offsetx=offsetX;} else {offsetx=20;}
        if (offsetY) {offsety=offsetY;} else {offsety=0;}
        var PositionX = 0;
        var PositionY = 0;
        if (!e) var e = window.event;
        if (e.pageX || e.pageY)
        {
          PositionX = e.pageX;
          PositionY = e.pageY;
        }
        else if (e.clientX || e.clientY)
        {
          PositionX = e.clientX + document.body.scrollLeft;
           PositionY = e.clientY + document.body.scrollTop;
        }
        document.getElementById("text").innerHTML=txt;
        document.getElementById('infobox').style.left = (PositionX+offsetx);
        document.getElementById('infobox').style.top = (PositionY+offsety);
        document.getElementById('infobox').style.visibility = "visible";
}
