function popup(fileName,fileHeadline,fileText) { 
imageWin=window.open("", "imageWin", fileName, "width=100, height=100"); 
imageWin.document.open(); 

imageWin.document.write(
'<html>'+ 
'<head>'+ 
'<title>FDF K7 - Dias</title>'+ 
'<script language="JavaScript">'+
'self.focus();'+
'function myResize() {'+ 
'picW = document.images["pic"].width;'+ 
'picH = document.images["pic"].height;'+ 
'picW = picW+10;'+
'picH = picH+37+105;'+

'if(picW > screen.availWidth)'+
'{'+
'picW = screen.availWidth'+
'}'+
'if(picH > screen.availHeight)'+
'{'+
'picH = screen.availHeight'+
'}'+

'window.resizeTo(picW,picH);'+ 
'}'+ 
'<\/script>'+ 
'</head>'+ 
'<body bgcolor="#000000" text="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="myResize();">'+ 

'<div style="width: 100%; height: 100%; overflow: auto; font-size:12px; text-align:center" onmousedown="window.close()">'+

fileHeadline+

'<img src="' +  fileName + '"  name="pic"><br />'+ 

fileText+

'</div>'+

'</body>'+ 
'</html>' ); 
imageWin.document.close(); 
} 

