var picwin=0;

function close_picture()
{
  if (picwin)
    if (!picwin.closed)
      picwin.close();
}

function open_picture(picname,bgcolor)
{
  close_picture();
  if (!bgcolor)
    bgcolor="#FFFFFF";
  picwin=open("","picwin","width=100,height=100,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no");
  picwin.document.open("text/html","replace");
  picwin.document.write("<html>\n<head>\n");
  picwin.document.write("<title>Staff Stiftung</title>\n");
  picwin.document.write("</head>\n");
  picwin.document.write("<body onLoad=\"opener.picture_size(window,document.images[0])\" bgcolor=\""+bgcolor+"\" topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>\n");
  picwin.document.write("<p align=center><a href=\"javascript:self.close()\"><img src=\""+picname+"\" hspace=\"0\" vspace=\"0\" border=0></a></p>");
   
  picwin.document.write("</body>\n</html>");
  picwin.document.close();
}

function picture_size(picwin,image)
{
  //var output;
  picwin.resizeTo(image.width+12,image.height+20);
  picwin.moveTo((screen.width-image.width-50)/2,(screen.height-image.height-50)/2);
}