function Apre(imageName,imageWidth,imageHeight,imageAlt) {
var imagePar = 345;

// Dimensione delle immagini.
if( imageWidth > imageHeight ) { if( imageWidth < 450) { imagePar = imageWidth } }
if( imageWidth < imageHeight ) { if( imageHeight < 450) { imagePar = imageHeight } }

if( imageWidth > imageHeight )
   {
   imageWidth = Math.round( imageWidth / (imageWidth / imagePar) );
   imageHeight = Math.round( imageHeight / (imageWidth / imagePar) );
   }
else
   {
   imageWidth = Math.round( imageWidth / (imageHeight / imagePar) );
   imageHeight = Math.round( imageHeight / (imageHeight / imagePar) );
   }

// Coordinate per centrare la nuova finestra
var xOffset = (window.screen.width - imageWidth)/2, yOffset = (window.screen.height - imageHeight)/2;

// Aggiusto le coordinate per situazioni particolari...
version=Math.round(parseFloat(navigator.appVersion) * 1000);

// Controllo se browser = konqueror
if(navigator.appName.indexOf("Konqueror")!=-1) { xOffset += 18; yOffset += 96; }

// Controllo se browser = Netscape6+ su mac
if(navigator.appName.indexOf("Netscape")!=-1) { if(version>=5000) { if(navigator.appVersion.indexOf("Mac")!=-1) { yOffset += 5; } } }

// Controllo se browser = IE su mac
if(navigator.appName.indexOf("Microsoft")!=-1) { if(navigator.appVersion.indexOf("Mac")!=-1) { xOffset -= 11; yOffset -= 11; } }

// Codice da inserire nella nuova finestra
var strWinCode = "<html><head>"
strWinCode += "<title>Zoom</title>"
strWinCode += "<style><!--A:link {TEXT-DECORATION: none} A:visited {TEXT-DECORATION: none} A:hover {COLOR: #FF0000; TEXT-DECORATION: none} .titololink {  font-family: Arial, Helvetica, sans-serif; font-size: 8pt;  font-weight: bold; color: #000000 }--></style>"
strWinCode += "</head><body topmargin='0' leftmargin='0' marginwidth='0' marginheight='0' bgcolor=#004121><center>"
strWinCode += "<table border=0 cellpadding=0 cellspacing=0 width=100% height=100%><tr valign=center><td align=center><span style='color:white;font-family:arial'><b>AIAT di Saint-Vincent</b></span></td></tr><tr valing=center><td align=center>"
strWinCode += "<img border='0' src='dispth.asp?foto="+imageName+"&mDim="+imagePar+"' alt=''>"
strWinCode += "</td></tr><tr><td align=center>"
strWinCode += "<a href='JavaScript:close()' class='titololink' style='color:white'>Chiudi la finestra</a></td></tr></table></body></html>"

imageHeight += 40

// Apertura della nuova finestra.
var newWin = window.open('','','width='+imageWidth+',height='+imageHeight+',top='+yOffset+',left='+xOffset+',screenX='+xOffset+',screenY='+yOffset+',location=0,directories=0,status=no,menuBar=no,scrollBars=no,resizable=no');
newWin.document.open()
newWin.document.write(strWinCode)
newWin.document.close()
newWin.focus();
}

function Apro(imageName,imageWidth,imageHeight,imageAlt) {
var imagePar = 345;

// Dimensione delle immagini.
if( imageWidth > imageHeight ) { if( imageWidth < 450) { imagePar = imageWidth } }
if( imageWidth < imageHeight ) { if( imageHeight < 450) { imagePar = imageHeight } }

if( imageWidth > imageHeight )
   {
   imageWidth = Math.round( imageWidth / (imageWidth / imagePar) );
   imageHeight = Math.round( imageHeight / (imageWidth / imagePar) );
   }
else
   {
   imageWidth = Math.round( imageWidth / (imageHeight / imagePar) );
   imageHeight = Math.round( imageHeight / (imageHeight / imagePar) );
   }

// Coordinate per centrare la nuova finestra
var xOffset = (window.screen.width - imageWidth)/2, yOffset = (window.screen.height - imageHeight)/2;

// Aggiusto le coordinate per situazioni particolari...
version=Math.round(parseFloat(navigator.appVersion) * 1000);

// Controllo se browser = konqueror
if(navigator.appName.indexOf("Konqueror")!=-1) { xOffset += 18; yOffset += 96; }

// Controllo se browser = Netscape6+ su mac
if(navigator.appName.indexOf("Netscape")!=-1) { if(version>=5000) { if(navigator.appVersion.indexOf("Mac")!=-1) { yOffset += 5; } } }

// Controllo se browser = IE su mac
if(navigator.appName.indexOf("Microsoft")!=-1) { if(navigator.appVersion.indexOf("Mac")!=-1) { xOffset -= 11; yOffset -= 11; } }

// Codice da inserire nella nuova finestra
var strWinCode = "<html><head>"
strWinCode += "<title>Zoom</title>"
strWinCode += "<style><!--A:link {TEXT-DECORATION: none} A:visited {TEXT-DECORATION: none} A:hover {COLOR: #FF0000; TEXT-DECORATION: none} .titololink {  font-family: Arial, Helvetica, sans-serif; font-size: 8pt;  font-weight: bold; color: #000000 }--></style>"
strWinCode += "</head><body topmargin='0' leftmargin='0' marginwidth='0' marginheight='0' bgcolor=#004121><center>"
strWinCode += "<table border=0 cellpadding=0 cellspacing=0 width=100% height=100%><tr valign=center><td align=center><span style='color:white;font-family:arial'><b>AIAT di Saint-Vincent</b></span></td></tr><tr valing=center><td align=center>"
strWinCode += "<img border='0' src='inc/dispthnew.asp?foto="+imageName+"&mDim="+imagePar+"' alt=''>"
strWinCode += "</td></tr><tr><td align=center>"
strWinCode += "<a href='JavaScript:close()' class='titololink' style='color:white'>Chiudi la finestra</a></td></tr></table></body></html>"

imageHeight += 40

// Apertura della nuova finestra.
var newWin = window.open('','','width='+imageWidth+',height='+imageHeight+',top='+yOffset+',left='+xOffset+',screenX='+xOffset+',screenY='+yOffset+',location=0,directories=0,status=no,menuBar=no,scrollBars=no,resizable=no');
newWin.document.open()
newWin.document.write(strWinCode)
newWin.document.close()
newWin.focus();
}