// JavaScript Document
//SCRIPT funzionali per la realizzazione del Menù alto
<!--
var time = 3000;
var numofitems = 7;

//menu constructor
function menu(allitems,thisitem,startstate){ 
  callname= "gl"+thisitem;
  divname="subglobal"+thisitem;  
  this.numberofmenuitems = 7;
  this.caller = document.getElementById(callname);
  this.thediv = document.getElementById(divname);
  this.thediv.style.visibility = startstate;
}

//menu methods
function ehandler(event,theobj){
  for (var i=1; i<= theobj.numberofmenuitems; i++){
    var shutdiv =eval( "menuitem"+i+".thediv");
    shutdiv.style.visibility="hidden";
  }
  theobj.thediv.style.visibility="visible";
}
				
function closesubnav(event){
  if ((event.clientY <48)||(event.clientY > 107)){
    for (var i=1; i<= numofitems; i++){
      var shutdiv =eval('menuitem'+i+'.thediv');
      shutdiv.style.visibility='hidden';
    }
  }
}
// -->
//-----------------------------------------------------------------
// Funzione che mostra la data
    function displayDate(){
    var this_day = new Array(7);
      this_day[0]  = "Domenica";
      this_day[1]  = "Lunedi";
      this_day[2]  = "Martedi";
      this_day[3]  = "Mercoledi";
      this_day[4]  = "Giovedi";
      this_day[5]  = "Venerdi";
      this_day[6]  = "Sabato";
		
	var this_month = new Array(12);
      this_month[0]  = "Gennaio";
      this_month[1]  = "Febbraio";
      this_month[2]  = "Marzo";
      this_month[3]  = "Aprile";
      this_month[4]  = "Maggio";
      this_month[5]  = "Giugno";
      this_month[6]  = "Luglio";
      this_month[7]  = "Agosto";
      this_month[8]  = "Settembre";
      this_month[9]  = "Ottobre";
      this_month[10] = "Novembre";
      this_month[11] = "Dicembre";
      var today = new Date();
      var day   = today.getDate();
	  var dayString = today.getDay();
      var month = today.getMonth();
      var year  = today.getYear();
      if (year < 1900){
         year += 1900;
      }
      return(this_day[dayString] + ", " + day+" "+this_month[month]+" " +year);
    }

// funzione di popup 
function OpenGallery(pathFile) {
        RemoteWin=window.open(pathFile+'','informativa','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=200,height=200');
        RemoteWin.focus();
}
