if (document.images) {

hp_off = new Image();hp_off.src = 'images/menu/hp_off.gif';
hp_on = new Image();hp_on.src = 'images/menu/hp_on.gif';
dove_off = new Image();dove_off.src = 'images/menu/dove_off.gif';
dove_on = new Image();dove_on.src = 'images/menu/dove_on.gif';
struttura_off = new Image();struttura_off.src = 'images/menu/struttura_off.gif';
struttura_on = new Image();struttura_on.src = 'images/menu/struttura_on.gif';
servizi_off = new Image();servizi_off.src = 'images/menu/servizi_off.gif';
servizi_on = new Image();servizi_on.src = 'images/menu/servizi_on.gif';
progetti_off = new Image();progetti_off.src = 'images/menu/progetti_off.gif';
progetti_on = new Image();progetti_on.src = 'images/menu/progetti_on.gif';
pubblicazioni_off = new Image();pubblicazioni_off.src = 'images/menu/pubblicazioni_off.gif';
pubblicazioni_on = new Image();pubblicazioni_on.src = 'images/menu/pubblicazioni_on.gif';
gallery_off = new Image();gallery_off.src = 'images/menu/gallery_off.gif';
gallery_on = new Image();gallery_on.src = 'images/menu/gallery_on.gif';
news_off = new Image();news_off.src = 'images/menu/news_off.gif';
news_on = new Image();news_on.src = 'images/menu/news_on.gif';
arearis_off = new Image();arearis_off.src = 'images/menu/arearis_off.gif';
arearis_on = new Image();arearis_on.src = 'images/menu/arearis_on.gif';
}

function cambio(id,name){
  if (document.images) {document.images[id].src=eval(name+".src"); }
}




// Sets cookie values. Expiration date is optional
//
function setCookie(name, value, expire) {
   document.cookie = name + "=" + escape(value)
   + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))
}


function getCookie(Name) {
   var search = Name + "="
   if (document.cookie.length > 0) { // if there are any cookies
      offset = document.cookie.indexOf(search) 
      if (offset != -1) { // if cookie exists 
         offset += search.length 
         // set index of beginning of value
         end = document.cookie.indexOf(";", offset) 
         // set index of end of cookie value
         if (end == -1) 
            end = document.cookie.length
         return unescape(document.cookie.substring(offset, end))
      } 
   }
}

function register(lingua) {
   var today = new Date()
   var expires = new Date()
   expires.setTime(today.getTime() + 1000*60*60*24*365)
   setCookie("Lingua", lingua, expires)
}

function ApriPag(URL) {
      if (URL != "vuoto")
      {
      location.href=URL;
      }
}
var cliccato
function menu(cella,stato,pos){

 if (stato=="clk"){
  cliccato=pos
  menu0.style.background='FFFFFF'
  menu1.style.background='FFFFFF'
  menu2.style.background='FFFFFF'
  menu3.style.background='FFFFFF'
  menu4.style.background='FFFFFF'
  menu5.style.background='FFFFFF'
  menu6.style.background='FFFFFF'
  cella.style.background='#DBFF00'
 }
 if (stato=="in"){
  cella.style.background='#DBFF00'
 }
 if (stato=="out"){
   if (pos!=cliccato){
     cella.style.background='FFFFFF'
   }
 }
}


function MM_showHideLayers() 
{ //v2.0
  var i, visStr, args, theObj;
  args = MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  { //with arg triples (objNS,objIE,visStr)
    visStr   = args[i+2];
    if (navigator.appName == 'Netscape' && document.layers != null) 
    {
      theObj = eval(args[i]);
      if (theObj) theObj.visibility = visStr;
    } else if (document.all != null) 
    { //IE
      if (visStr == 'show') visStr = 'visible'; //convert vals
      if (visStr == 'hide') visStr = 'hidden';
      theObj = eval(args[i+1]);
      if (theObj) theObj.style.visibility = visStr;
    }
  }
}

function lkmenu(URL){
parent.principale.location.href=URL;
}


function zoom(url,larg,alt){
window.open(url,"zoom","scrollbars=no,resizable=no,width="+larg+",height="+alt+",status=no,location=no,toolbar=no,top=20,left=20");
}