
// © by Tobias Kunze - PLEASE, do not delete!

browserVer = parseInt(navigator.appVersion);

w = 0;
h = 0;

var browser

if(navigator.appName == 'Netscape' && document.layers != null){browser="N";}
else if(navigator.appName == 'Microsoft Internet Explorer' && document.all != null){browser="IE";}
else if(navigator.appName == 'Opera'){browser="O";}
else{browser=null}

var writeWin = null;


function OpenPop(a)
{
 if (browser == "IE")
  {
    if (browserVer > 2)
      {
      wnd=window.open(a,"pic","scrollbars=yes,resizeable=no,width=760,height=650,location=center");
      }
  }

  if (browser == "N")
  {
    if (browserVer > 2)
      {
      wnd=window.open(a,"pic","toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizeable=no,title=yes,width=760,height=650,location=center");
      }
  }

}


function OpenWnd(imageName, w, h)
{
  if (browser == "IE")
  {
    w += 20;
    h += 70;
    
    if (browserVer > 2)
      {
        writeWin = window.open('',"aWin","width="+w+",height="+h+",location=center,resizable=no");
        var ePenHtml = '<html><head><title>Image-Window -- Click to close --&nbsp;&nbsp;</title></head>';
        ePenHtml += '<body text="#000000" bgcolor="#ffffff"><font face="Arial">';
        ePenHtml += '<a href="javascript: self.close()"><img border="0" src="'+imageName+'"></a>';
        ePenHtml += '<form method="post">';
        ePenHtml += '<center><input type="button" value="&nbsp;&nbsp;&nbsp;Fenster schließen&nbsp;&nbsp;&nbsp;"onclick="window.close()"></center>';
        ePenHtml += '</form></font></body></html>';
        var wdHtml = writeWin.document;
        wdHtml.open();
        wdHtml.write(ePenHtml);
        wdHtml.close();
      }
    }

  if (browser == "N")
  {
    w += 16;
    h += 63;

    if (browserVer > 2)
      {
      	writeWin = window.open('',"aWin","width="+w+",height="+h+",location=center,resizable=no");
        var ePenHtml = '<html><head><title>Image-Window -- Click to close --&nbsp;&nbsp;</title></head>';
        ePenHtml += '<body text="#000000" bgcolor="#ffffff"><font face="Arial">';
        ePenHtml += '<a href="javascript: self.close()"><img border="0" src="'+imageName+'"></a>';
        ePenHtml += '<form method="post">';
        ePenHtml += '<center><input type="button" value="&nbsp;&nbsp;&nbsp;Fenster schließen&nbsp;&nbsp;&nbsp;"onclick="window.close()"></center>';
        ePenHtml += '</form></font></body></html>';
        var wdHtml = writeWin.document;
        wdHtml.open();
        wdHtml.write(ePenHtml);
        wdHtml.close();
      }
    }

  if(browser == "O")
    {
        wnd=window.open(imageName,"aWin","width="+w+",height="+h+",location=center,resizable=no");    
    }

  if(browser == null)
    {
      wnd=window.open(imageName,"pic","title=yes,width="+w+",height="+h+",location=center");
    }
}
function blowOut() {
  if (writeWin != null && writeWin.open) writeWin.close();

}
window.onfocus=blowOut;
