/*
	Document: Ilma Caminetti, Javascript support
	Author: Corrado Capone
*/

function zoomImage(immagine, titolo, w,h)
{
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    var args = "toolbar=no,directories=no,left="+winl+",top="+wint+",menubar=no,width="+w+",height="+h+",resizable=no"
	window.open("zoom.asp?img="+immagine+"&titolo="+titolo+"","",""+args+"");
}

/* Impostazione del background */
function setBG()
{

if ((screen.width <= 800 ) && (screen.height <= 768) )
{
 document.write("<body style=\"margin-top:0px; margin-left:0px; margin-right:0px; margin-bottom:0px; background:url(img/back800.jpg)\">");
  alert ("Per una corretta visualizzazione, impostare la risoluzione dello schermo almeno pari ad almeno 1024 x 768 px");
}

else if ((screen.width == 1024 ) && (screen.height == 768) )
{ 
document.write("<body style=\"margin-top:0px; margin-left:0px; margin-right:0px; margin-bottom:0px; background:url(img/back1024.jpg)\">");
}

else if ((screen.width == 1280) && (screen.height == 1024))
{ 
document.write("<body style=\"margin-top:100px; margin-left:0px; margin-right:0px; margin-bottom:0px; background:url(img/back1280.jpg)\">");
}	

else if ((screen.width == 1152) && (screen.height == 864))
{ 
document.write("<body style=\"margin-top:40px; margin-left:0px; margin-right:0px; margin-bottom:0px; background:url(img/back1152.jpg)\">");
}	

else if ((screen.width == 1600) && (screen.height == 1200))
{ 
document.write("<body style=\"margin-top:100px; margin-left:0px; margin-right:0px; margin-bottom:0px; background:url(img/back1600.jpg)\">");
}

else if ((screen.width == 1280) && (screen.height == 960))
{ 
document.write("<body style=\"margin-top:100px; margin-left:0px; margin-right:0px; margin-bottom:0px; background:url(img/back1280960.jpg)\">");
}

else
{
document.write("<body style=\"margin-top:0px; margin-left:0px; margin-right:0px; margin-bottom:0px; background:#FF6600\">"); 
}
}//end function setBG


//funzione per il PopUp di pagine
//in ingresso: path alla pagina, larghezza finestra, altezza finestra
function openPopUp(page,w,h)
{
 var winl = (screen.width - w) / 2;
 var wint = (screen.height - h) / 2;
 var args = "toolbar=no,directories=no,left="+winl+",top="+wint+",menubar=no,width="+w+",height="+h+",resizable=no"
 window.open(page,"",args);
}
