function windowresize(hWnd, hPic) { 
  //if ((hPic.width) <= 100) { 
  //  window.setTimeout("windowresize(hWnd, hPic);",2500); 
  //} { 
  //  hWnd.resizeTo(hPic.width,hPic.height); 
  //} 
} 

function popup(pUrl) {
Fens=window.open(pUrl,"Fenster","width=1000,height=750,resizable=yes")
}
function picup(pUrl) { 
  picUrl = '/bilder/'+pUrl+'.jpg'; 
  pic = new Image(); 
  pic.src = picUrl; 
  bOpened = false; 
  try { bOpened = Fens.closed ? false : true; } catch(e) {} 
  if (bOpened == false) 
  Fens=window.open("about:blank","BildFenster","width=1,height=1,resizable=yes"); 
  Fens.document.open(); 
  Fens.document.writeln('<html>'); 
  Fens.document.writeln('<head><title>Detailansicht</title></head>'); 
  Fens.document.writeln('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">'); 
  Fens.document.writeln('<center><img src="'+pic.src+'"border="0"></center>'); 
  Fens.document.writeln('</body>'); 
  Fens.document.writeln('</html>'); 
  
  window.setTimeout("Fens.resizeTo(pic.width,pic.height);",2500);
  Fens.document.close(); 
  //windowresize(Fens, pic); 
  Fens.focus(); 
} 
