function popImmagine(immagine,colore){ 
funzione = '<script language="javascript">function Adatta(){img=document.images[0];self.resizeTo(img.width+40,img.height+60); h=(img.width+260); w=(img.height+260); LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; window.moveTo(LeftPosition, TopPosition);}</sc'+'ript>' 
	html = '<html><head><title></title>' + funzione + '<link rel="STYLESHEET" type="text/css" href="style.css"></head>\n' 
	html+= '<body  LEFTMARGIN=10 TOPMARGIN=10 MARGINWIDTH=10 MARGINHEIGHT=10 onBlur="self.close()"><center><img src="'+immagine+'" onload="Adatta()"></center>' 
html+= '<!-- <div style="position: absolute; left: 75%; top: 80%; z-index:10"><FORM><input type="button" value="CHIUDI" class="form" onClick="window.close()"></FORM></div> -->'
	html+= '</body></html>'
pp = window.open('','popImmagine','resizable=yes,toolbar=0') 
pp.document.open() 
pp.document.write(html) 
pp.document.close() 
pp.document.focus(); 
}


function popImmagine2(immagine,colore){ 
funzione = '<script language="javascript">function Adatta(){img=document.images[0];self.resizeTo(img.width+40,img.height+60); h=(img.width+60); w=(img.height+260); LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; window.moveTo(LeftPosition, TopPosition);}</sc'+'ript>' 
	html = '<html><head><title>Vivai Montina</title>' + funzione + '<link rel="STYLESHEET" type="text/css" href="style.css"></head>\n' 
	html+= '<body   LEFTMARGIN=10 TOPMARGIN=10 MARGINWIDTH=10 MARGINHEIGHT=10 onBlur="self.close()"><center><img src="'+immagine+'" onload="Adatta()"></center>' 
html+= '<!-- <div style="position: absolute; left: 75%; top: 80%; z-index:10"><FORM><input type="button" value="CHIUDI" class="form" onClick="window.close()"></FORM></div> -->'
	html+= '</body></html>'
pp = window.open('','popImmagine','resizable=yes,toolbar=0') 
pp.document.open() 
pp.document.write(html) 
pp.document.close() 
pp.document.focus(); 
}

function popImmagine3(immagine,colore,titolo){ 
funzione = '<script language="javascript">function Adatta(){img=document.images[0];if (img.width > 800) return;if(img.height > 600) return;self.resizeTo(img.width+60,img.height+80); h=(img.width+60); w=(img.height+260); LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; window.moveTo(LeftPosition, TopPosition);}</sc'+'ript>' 
	html = '<html><head><title>' + titolo + '</title>' + funzione + '<link rel="STYLESHEET" type="text/css" href="style.css"></head>\n' 
	html+= '<body   LEFTMARGIN=10 TOPMARGIN=10 MARGINWIDTH=10 MARGINHEIGHT=10 onBlur="self.close()"><center><img src="'+immagine+'" onload="Adatta()"></center>' 
html+= '<!-- <div style="position: absolute; left: 75%; top: 80%; z-index:10"><FORM><input type="button" value="CHIUDI" class="form" onClick="window.close()"></FORM></div> -->'
	html+= '</body></html>'
pp = window.open('','popImmagine','scrollbars=yes,resizable=yes,toolbar=0') 
pp.document.open() 
pp.document.write(html) 
pp.document.close() 
pp.document.focus(); 
}
