// =========================================================================================
// Funzione che apre una nuova finestra per visualizzare le IMMAGINI.
//
function AprePhoto(imageName,imageDir) {

// Dimensione delle immagini.
if( imageDir == "o_pag" ) { imageWidth = 600; imageHeight = 400; msrc = "../xxx/elementi/immagini/"; }
if( imageDir == "v_pag" ) { imageWidth = 400; imageHeight = 600; msrc = "../xxx/elementi/immagini/"; }

// 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 += "</head><body topmargin='0' leftmargin='0' marginwidth='0' marginheight='0'>"
strWinCode += "<a href='JavaScript:close()'>"
strWinCode += "<img border='0' src='"+msrc+imageName+"' width='"+imageWidth+"' height='"+imageHeight+"' alt=''></a>"
strWinCode += "</body></html>"

// 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();
//newWin.moveTo(xOffset, yOffset)
}



// =========================================================================================
// Funzione che apre una nuova finestra per visualizzare le IMMAGINI della sez. inglese.
//
function AprePhotoE(imageName,imageDir) {

// Dimensione delle immagini.
if( imageDir == "o_pag" ) { imageWidth = 600; imageHeight = 400; msrc = "../elementi/immagini/"; }
if( imageDir == "v_pag" ) { imageWidth = 400; imageHeight = 600; msrc = "../elementi/immagini/"; }

// 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 += "</head><body topmargin='0' leftmargin='0' marginwidth='0' marginheight='0'>"
strWinCode += "<a href='JavaScript:close()'>"
strWinCode += "<img border='0' src='"+msrc+imageName+"' width='"+imageWidth+"' height='"+imageHeight+"' alt=''></a>"
strWinCode += "</body></html>"

// 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();
//newWin.moveTo(xOffset, yOffset)
}



// =========================================================================================


// Funzione che apre una nuova finestra per visualizzare le TABELLE.
//
function ApreTabelle(imageName,imageDir) {

// Dimensione delle immagini.
if( imageDir == "o" ) { imageWidth = 400 ; imageHeight = 300 }
if( imageDir == "v" ) { imageWidth = 300 ; imageHeight = 400 }

// 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 += "</head><body topmargin='0' leftmargin='0' marginwidth='0' marginheight='0'>"
strWinCode += "<a href='JavaScript:close()'>"
strWinCode += "<img border='0' src='/elementi/tabelle/"+imageName+"' width='"+imageWidth+"' height='"+imageHeight+"' alt=''></a>"
strWinCode += "</body></html>"

// 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();
//newWin.moveTo(xOffset, yOffset)
}



// =========================================================================================

// =========================================================================================

// =========================================================================================
// Funzione che apre una nuova finestra per visualizzare le immagini quicktimevr.

//
function Apreqtvr(imageName,imageDir) {

// Dimensione delle immagini.
if( imageDir == "o" ) { imageWidth = 400 ; imageHeight = 256 }
if( imageDir == "v" ) { imageWidth = 600 ; imageHeight = 396 }

// 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 += "</head><body topmargin='0' leftmargin='0' marginwidth='0' marginheight='0'>"
strWinCode += "<embed src='/elementi/foto/qtvr/"+imageName+".mov' width='"+imageWidth+"' height='"+imageHeight+"' autoplay='true' loop='true' controller='true' playeveryframe='false' cache='false' bgcolor='#FFFFFF' kioskmode='false' targetcache='false' pluginspage='http://www.apple.com/quicktime/'>"
strWinCode += "</embed>"
strWinCode += "</body></html>"

// 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();
//newWin.moveTo(xOffset, yOffset)
}

// =========================================================================================
// Funzione che apre una nuova finestra per visualizzare pagine htm.
//
function Aprehtm(pagename,imageDir,scrlbar,strlang) {

// Dimensione delle immagini.
if( imageDir == "o" ) { imageWidth = 420 ; imageHeight = 370 }
if( imageDir == "v" ) { imageWidth =350 ; imageHeight = 530 }

pagename = "htm/" + pagename + ".htm" 

// 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; } }

// Apertura della nuova finestra.
var newWin = window.open(pagename,'','width='+imageWidth+',height='+imageHeight+',top='+yOffset+',left='+xOffset+',screenX='+xOffset+',screenY='+yOffset+',location=0,directories=0,status=no,menuBar=no,scrollBars='+scrlbar+',resizable=no');
newWin.focus();
//newWin.moveTo(xOffset, yOffset)
}
// =========================================================================================
// Funzione che apre una nuova finestra per visualizzare pagine htm MAPPA.
//
function ApreMappa(pagename,imageDir,scrlbar,strlang) {

// Dimensione delle immagini.
if( imageDir == "o" ) { imageWidth = 650 ; imageHeight = 579 }
if( imageDir == "v" ) { imageWidth =300 ; imageHeight = 500 }

pagename = "htm/" + pagename + ".htm" 

// 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; } }

// Apertura della nuova finestra.
var newWin = window.open(pagename,'','width='+imageWidth+',height='+imageHeight+',top='+yOffset+',left='+xOffset+',screenX='+xOffset+',screenY='+yOffset+',location=0,directories=0,status=no,menuBar=no,scrollBars='+scrlbar+',resizable=no');
newWin.focus();
//newWin.moveTo(xOffset, yOffset)
}
