/* funzione fimm apertura finestra immagine
parametri:
imageURL = URL dell'immagine (obbligatorio), imageTitle = titolo della finestra
posX = posizione asse orizzontale (left)
posY = posizione asse vertivale (top)
AutoClose = se true la finestra immagine si chiude automaticamente quando perde il fuoco
regole:
se omesso, AutoClose = true; se omessi, posX e posY = 0
*/
function fimm(imageURL,imageTitle,posX,posY,AutoClose){
	var undefined;			// per bug di alcuni browser
	if (imageTitle == undefined) {imageTitle="Immagine"}
	if (posX == undefined) {posX = 0}
	if (posY == undefined) {posY = 0}
	if (AutoClose == undefined) {AutoClose = true}
imago = new Image();
imago.src = imageURL;
w = imago.width;
h = imago.height;
imgWin=window.open('about:blank','','resizable=1,scrollbars=no,width='+w+',height='+h+',left='+posX+',top='+posY);
with (imgWin.document){
writeln('<html><head><title>Caricamento...</title><style>body{margin:0px;}</style>');
writeln('<sc'+'ript>');
writeln('function doTitle(){document.title="'+imageTitle+'";}');
writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="immagine" src='+imageURL+' style="display:block"></body></html>');
close();		
}}
