
// www.web-toolbox.net , W. Jansen     - verändert: Ch.H. (12/2009)
// Übergabeparameter: Bildquelle, Breite, Höhe, Fenstertitel, optional 1-2 texte


function bildfenster (bildurl, b, h, bildtitel, text1, text2)
  { var eigenschaften, fenster, x, y;
    
    x =  25;     y =  25;     
    if (text1!=null)
    {
      h *= 1;      h += 45;       
      if (text2!=null) { h +=20 }
      h +="";
    }  
    eigenschaften = "left=" + x + ",top=" + y + ",screenX=" + x + ",screenY=" + y + ",width=" + b +
                    ",height=" + h + 
                    ",menubar=no, toolbar=no, locationbar=no, statusbar=no, scrollbars=yes";

    fenster = window.open("", "", eigenschaften);
    fenster.focus();
    with (fenster.document) 
    { open();
      write('<html><head>');                           // geändert 2004 für Mozilla
      write('<scr' + 'ipt type="text/javascr' + 'ipt" language="JavaScr' + 'ipt">');
      write("function click() { window.close(); } ");  // bei click  schliessen
      write("document.onmousedown=click ");
      write('</scr' + 'ipt>');                         // geändert 2004 für Mozilla
      write('<title>'+ bildtitel +'</title></head>');
      write('<' + 'body onblur="window.close();" ');   // bei Focusverlust schliessen
      write('marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">');
      write('<img src="'+ bildurl +'"border="0">');
      if (text1!=null)
      {
        write('<p style="margin: 5px 9px">' + text1);
        if (text2!=null) { write('<br/>' + text2); }
        write('</p>');
      }
      write('</body></html>');
      close();
    }
  }

function bildfensterfix (bildurl, b, h, bildtitel, text1, text2)
  { var eigenschaften, fenster, x, y;
    
    x =  25;     y =  25;     
    if (text1!=null)
    {
      h *= 1;      h += 45;       
      if (text2!=null) { h +=20 }
      h +="";
    }  
    eigenschaften = "left=" + x + ",top=" + y + ",screenX=" + x + ",screenY=" + y + ",width=" + b +
                    ",height=" + h + 
                    ",menubar=no, toolbar=no, locationbar=no, statusbar=no, scrollbars=yes";

    fenster = window.open("", "", eigenschaften);
    fenster.focus();
    with (fenster.document) 
    { open();
      write('<html><head>');                           // geändert 2004 für Mozilla
      write('<title>'+ bildtitel +'</title></head>');
      write('<' + 'body onblur="window.close();" ');   // bei Focusverlust schliessen
      write('marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">');
      write('<img src="'+ bildurl +'"border="0">');
      if (text1!=null)
      {
        write('<p style="margin: 5px 9px">' + text1);
        if (text2!=null) { write('<br/>' + text2); }
        write('</p>');
      }
      write('</body></html>');
      close();
    }
  }

function extrafenster (extraurl)
  { var eigenschaften, fenster, x, y;
    br = 800;    ho = 600;
    x = 20;      y = 20;       
    eigenschaften = "left=" + x + ", top=" + y + ", screenX=" + x + ", screenY=" + y + 
                    ", width=" + br + 
                    ", height=" + ho + 
                    ",menubar=no, toolbar=no, locationbar=no, statusbar=no, resizable=yes, scrollbars=yes";
    fenster = window.open(extraurl, '', eigenschaften);
    fenster.focus();
  }
  
  
function fixfenster (archurl, archtitel, archbreit, archhoch)
  { var eigenschaften, fenster, x, y;
    br = archbreit;    ho = archhoch;
    x = 20;      y = 20;       
    eigenschaften = "left=" + x + ", top=" + y + ", screenX=" + x + ", screenY=" + y + 
                    ", width=" + br + 
                    ", height=" + ho + 
                    ",menubar=no, toolbar=no, locationbar=no, statusbar=no, resizable=yes, scrollbars=yes";
    fenster = window.open(archurl, archtitel, eigenschaften);
    fenster.focus();
  }
  
function fixfenster2 (archurl, archtitel, archbreit, archhoch)
  { var eigenschaften, fenster, x, y;
    br = archbreit;    ho = archhoch;
    x = 20;      y = 20;       
    eigenschaften = "left=" + x + ", top=" + y + ", screenX=" + x + ", screenY=" + y + 
                    ", width=" + br + 
                    ", height=" + ho + 
                    ",menubar=no, toolbar=no, locationbar=no, statusbar=no, resizable=yes, scrollbars=yes";
    fenster = window.open(archurl, archtitel, eigenschaften);
    fenster.focus();
  }
   
