/* background rotator */

var bgPic = new Array();
bgPic[0] = '/resources/est/images/sfondo_att.jpg';
bgPic[1] = '/resources/est/images/sfondo_chiaro.jpg';
bgPic[2] = '/resources/est/images/sfondo_gal.jpg';
bgPic[3] = '/resources/est/images/sfondo_part.jpg';
bgPic[4] = '/resources/est/images/sfondo_str.jpg';

var bgp = bgPic.length;

/*if ((""+location).indexOf("page168b.do")==-1) {
*/
if (window.addEventListener){
  window.addEventListener("load",randomBackgroundLoader,false);
}
else if (window.attachEvent){
  window.attachEvent("onload",randomBackgroundLoader);
}
else
{
    window.previousLoadFunction = window.onload;
    window.onload = function()
    {
        window.previousLoadFunction();
        randomBackgroundLoader();
    }
}

/*}*/

function randomBackgroundLoader(){

  var bgj =  Math.round(bgp*Math.random());
  if(bgj<0 || bgj>bgp-1)
    bgj = 0;  
	document.body.style.backgroundImage="url("+bgPic[bgj]+")";
}

/* END: background rotator */



function noRightClick() { 
	if ((event.srcElement.tagName == 'IMG') && event.button==2) { 
		alert('Il tasto destro è disabilitato') //qui ci scrivi il tuo messaggio
	} 
}
//document.onmousedown=noRightClick 

function viewInfo() {
      var info = document.getElementById('txtbox').style.visibility;
      if(info == "hidden") {
         document.getElementById('txtbox').style.visibility='visible';
         document.getElementById('txtbox').style.display='block';
         document.getElementById('displayInfo').style.visibility  = 'hidden';
         document.getElementById('displayInfo').style.display  = 'none';
         document.getElementById('txtClose').style.display='block';
         document.getElementById('txtClose').style.visibility  = 'visible';

      } else {
         document.getElementById('txtbox').style.visibility = 'hidden';
         document.getElementById('txtbox').style.display='none';
         document.getElementById('displayInfo').style.visibility = 'visible';
         document.getElementById('displayInfo').style.display='block';
         document.getElementById('txtClose').style.visibility  = 'hidden';
         document.getElementById('txtClose').style.display  = 'none';
      }
   }
