//===========================//
//       UTILITY VARIE       //
// Script by Stefano Roncari //
//       www.syntax.it       //
//===========================//

window.onload=lowResAdjust;

// Questa funzione serve per ridurre l'altezza del sito su monitor con risoluzioni basse (per evitare lo scrolling verticale)
function lowResAdjust()
{
   lowRes = (screen.width <= 800) ? true:false
   if (lowRes)
   {
      //alert("bassa!");
      document.getElementById("topInner").style.display = "none";
      document.getElementById("bottom").style.display = "none";
   }
   //else {("alta!");}
}

function newsPosition()
{
   document.getElementById("v_container").style.left = document.getElementById("dimDiv").offsetWidth/2 - 332 + "px";
   document.getElementById("v_container").style.visibility = "visible";
}

function roll(langId)
{
   nome = (langId==0) ? "ita" : "eng";
   myImg = document.getElementById(nome);
   urlOff = "images/" +nome+ "_off.gif";
   urlOn = "images/" +nome+ "_on.gif";
   
   if (myImg.src.indexOf("_off") != -1)
   {
      myImg.src = urlOn;
   }
   else if (myImg.src.indexOf("_on") != -1)
   {
      myImg.src = urlOff;
   }
}

// Questa funzione serve semplicemente per mostrare il logo solo dopo le altre immagini
function showLogo(divName)
{
   document.getElementById(divName).style.display = "block";
}

function printIframe()
{
   textIframe.focus();
   textIframe.print();
}
