/********************window_pop_up_v13.js******************************
Diese Klasse implementiert die Windowverwaltung

Version:v1.1
Scriptmaster: Dipl.-Ing. Michael Binninger
Stand:        17.07.2000
Status:       OK; qualifiziert fuer  NS4.7, NS3.01Gold, IE5.00.2014.0216

Diese Klasse ist geistiges Eigentum von heimat.de und
darf nur mit Erlaubniss von heimat.de weiterverbreitet und benuetzt
werden.

Cangelog:
17.07.2000 v1.3
winopen und winopenformat können jetzt auch Content von anderen Websites anzeigen.

09.03.2000 v1.2
winopenformat eingefuegt. Erlaubt zusaetzlich die Uebergabe eines Strings zur Fensterformatierung.

06.03.2000 v1.1:
Function zum öffnen von Fenstern zur Bilderanzeige von winopen() nach picwinopen umbennnt
neue winopen() geschrieben. In neuer winopen kann jetzt normale url der anzuzeigenden Seite
angegeben werden. Funktion recover() umgeschrieben zur korrekten Behandlung beider Fensterarten.

02.03.2000 v1.0:


*******************************************************************************/

   function recover()
   {
      if (!fbye)
      {

          if (httpwindow)
          {
                NewWindow=window.open(url2,"bild",format);
          }else{
          //alert("opening in streaming mode");
                NewWindow=window.open("","bild",format);
                NewWindow.document.open();
                NewWindow.document.writeln(codeline[0]+codeline[1]+codeline[2]+codeline[3]);
                NewWindow.document.write(codeline[4]);
                NewWindow.document.write(picurl2);
                NewWindow.document.writeln(codeline[5]+codeline[6]);
                NewWindow.document.close();
          }
          NewWindow.focus();
      }
   }

   //window.onerror=recover;

   function writetext(titel)
   {
         parent.titel.location.href = titel;
   }

   function bye(){
      fbye=true;
      winclose();
   }

   function Is ()
   {
        var agt=navigator.userAgent.toLowerCase();
        this.major = parseInt(navigator.appVersion);
        this.minor = parseFloat(navigator.appVersion);
        this.ie   = (agt.indexOf("msie") != -1);
        this.nav  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1)));
        this.nav3 = (this.nav && (this.major == 3));
   }

   function picwinopen(picurl,breite,hoehe)
   {
        httpwindow=false;
        picurl2=picurl;
        if (is.ie || is.nav3)
        {
           breite=parseInt(breite)+3;
           hoehe=parseInt(hoehe)+8;
        }
        format="width="+breite+",height="+hoehe;

        if (is.ie)
           format+=",left=80,top=5,";
        else
           format+=",screenX=80,screenY=5,";

        format+="resizable=no,status=no,toolbar=no,scrollbars=no,menubar=no,directory=no";

        winclose();

        NewWindow=window.open("","bild",format);
        NewWindow.document.open();
        NewWindow.document.writeln(codeline[0]+codeline[1]+codeline[2]+codeline[3]);
        NewWindow.document.write(codeline[4]);
        NewWindow.document.write(picurl);
        NewWindow.document.writeln(codeline[5]+codeline[6]);
        NewWindow.document.close();
        NewWindow.focus();

   }

   function winopen(url,breite,hoehe)
   {
        httpwindow=true;
        url2=url;
        if (is.ie || is.nav3)
        {
           breite=parseInt(breite)+3;
           hoehe=parseInt(hoehe)+8;
        }
        format="width="+breite+",height="+hoehe;

        if (is.ie)
           format+=",left=80,top=5,";
        else
           format+=",screenX=80,screenY=5,";

        format+="resizable=no,status=no,toolbar=no,scrollbars=no,menubar=no,directory=no";

        winclose();

        NewWindow=window.open("","bild",format);
        setTimeout('NewWindow.focus()',500);
        NewWindow.location=url;

   }
/* mit resizable=yes */
   function winopen2(url,breite,hoehe)
   {
        httpwindow=true;
        url2=url;
        if (is.ie || is.nav3)
        {
           breite=parseInt(breite)+3;
           hoehe=parseInt(hoehe)+8;
        }
        format="width="+breite+",height="+hoehe;

        if (is.ie)
           format+=",left=80,top=5,";
        else
           format+=",screenX=80,screenY=5,";

        format+="resizable=yes,status=no,toolbar=no,scrollbars=no,menubar=no,directory=no";

        winclose();

        NewWindow=window.open("","bild2",format);
        setTimeout('NewWindow.focus()',500);
        NewWindow.location=url;

   }

   function winopenformat(url,breite,hoehe,sformat)
   {
        httpwindow=true;
        url2=url;
        if (is.ie || is.nav3)
        {
           breite=parseInt(breite)+3;
           hoehe=parseInt(hoehe)+8;
        }
        format="width="+breite+",height="+hoehe;

        if (is.ie)
           format+=",left=80,top=5,";
        else
           format+=",screenX=80,screenY=5,";
        format+=sformat;

        winclose();

        NewWindow=window.open("","bild",format);
        NewWindow.focus();
        NewWindow.location=url;

   }
   function winopenformat2(url,breite,hoehe,sformat)
   {
        httpwindow=true;
        url2=url;
        if (is.ie || is.nav3)
        {
           breite=parseInt(breite)+3;
           hoehe=parseInt(hoehe)+8;
        }
        format="width="+breite+",height="+hoehe;

        if (is.ie)
           format+=",left=80,top=5,";
        else
           format+=",screenX=80,screenY=5,";
        format+=sformat;

        winclose();

        New2Window=window.open("","bild2",format);
        New2Window.focus();
        New2Window.location=url;

   }


   function winclose()
   {
        if (NewWindow!=null)
        {
            if(!NewWindow.closed)
                NewWindow.close();
        }

   }

   var is = new Is();
   var NewWindow=null;
   var format="";
   var url2="";
   var picurl2="";
   var tx="";
   var fbye=false;
   var httpwindow=false;

   var codeline=new Array(9)
   codeline[0]="<html><head>\n<script language=\"JavaScript1.1\">";
   codeline[1]="\n<"+"!--\n"+"function cl(){\nself.close();\n}"+"\n/"+"/"+"--"+">\n";
   codeline[2]="</script></head>";
   codeline[3]="<body bgcolor='#D8D8D8'>";
   codeline[4]="<img src='";
   codeline[5]="' border='0'>";;
   codeline[6]="</body></html>";