var pic_popup = null

function closeWin(){
 if (pic_popup != null){
  if(!pic_popup.closed)
   pic_popup.close();
 }
}

 function gb_pop(b, h, url, windowtitle){
 closeWin();
  var tpop_bildschirmx = screen.availWidth;
  var tpop_bildschirmy = screen.availHeight;

  var tpop_breite = b;
  var tpop_hoehe = h;

  var tpop_startx = Math.round(tpop_bildschirmx / 2) - (tpop_breite / 2);
  var tpop_starty = Math.round(tpop_bildschirmy / 2) - (tpop_hoehe / 2);

  pic_popup = window.open('', '', "width="+ b + ", height=" + h
     + ", status=no, toolbar=no, menubar=no, resizable=yes, scrollbars=no, screenX=" + tpop_startx
     + ", left=" + tpop_startx + ", screenY=" + tpop_starty + ", top=" + tpop_starty + " ");

  pic_popup.focus();
  pic_popup.document.writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">');
  pic_popup.document.writeln('<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">');
  pic_popup.document.writeln('<head><title>'+ decodeURI(windowtitle) + '<\/title>');
  pic_popup.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />');
  pic_popup.document.writeln('<meta http-equiv="ImageToolbar" content="no" />');
  pic_popup.document.writeln('<meta http-equiv="Language" content="de" />');
  pic_popup.document.writeln('<style type="text/css"><!--')
  pic_popup.document.writeln('body,div{margin:0;padding:0;overflow:hidden;}img{border:0 none;margin:0;display:block;padding:0;}')
  pic_popup.document.writeln('--><\/style><\/head>')
  pic_popup.document.writeln('<body><div>')
  pic_popup.document.writeln('<a href="#" onclick="self.close()"><img src="'+ url +'" title="'+ decodeURI(windowtitle) + '" /><\/a>')
  pic_popup.document.writeln('<\/div><\/body><\/html>');
  pic_popup.document.close();

  return false;
 }