
window.onerror = null;
browserNome = navigator.appName;
browserVersione = parseInt(navigator.appVersion);
if (browserNome == "Netscape" && browserVersione >= 3) {
   ctrlVersione = "ok";
} else if (browserNome == "Microsoft Internet Explorer" && browserVersione >= 3) {
   ctrlVersione = "ok";
} else {
   ctrlVersione = "ko";
}
if (ctrlVersione == "ok") {
   // Elenco immagini
   // Per i nomi utilizzare quello dell'immagine
   loghi_on           = new Image(); loghi_on.src             ="./style/images/home/loghi_on.gif";
   loghi_off          = new Image(); loghi_off.src            ="./style/images/home/loghi_off.gif";
   novita_on          = new Image(); novita_on.src            ="./style/images/home/novita_on.gif";
   novita_off         = new Image(); novita_off.src           ="./style/images/home/novita_off.gif";
   struttura_on       = new Image(); struttura_on.src         ="./style/images/home/struttura_on.gif";
   struttura_off      = new Image(); struttura_off.src        ="./style/images/home/struttura_off.gif";
   documentazione_on  = new Image(); documentazione_on.src    ="./style/images/home/documentazione_on.gif";
   documentazione_off = new Image(); documentazione_off.src   ="./style/images/home/documentazione_off.gif";
   sedi_on            = new Image(); sedi_on.src              ="./style/images/home/sedi_on.gif";
   sedi_off           = new Image(); sedi_off.src             ="./style/images/home/sedi_off.gif";
   comunicati_on      = new Image(); comunicati_on.src        ="./style/images/home/comunicati_on.gif";
   comunicati_off     = new Image(); comunicati_off.src       ="./style/images/home/comunicati_off.gif";
   eventi_on          = new Image(); eventi_on.src            ="./style/images/home/eventi_on.gif";
   eventi_off         = new Image(); eventi_off.src           ="./style/images/home/eventi_off.gif";
   servizi_on         = new Image(); servizi_on.src           ="./style/images/home/servizi_on.gif";
   servizi_off        = new Image(); servizi_off.src          ="./style/images/home/servizi_off.gif";
   
   giochi00_on        = new Image(); giochi00_on.src          ="./style/images/home/giochi-00_on.gif";
   giochi00_off       = new Image(); giochi00_off.src         ="./style/images/home/giochi-00_off.gif";
   giochi01_on        = new Image(); giochi01_on.src          ="./style/images/home/giochi-01_on.gif";
   giochi01_off       = new Image(); giochi01_off.src         ="./style/images/home/giochi-01_off.gif";
   giochi02_on        = new Image(); giochi02_on.src          ="./style/images/home/giochi-02_on.gif";
   giochi02_off       = new Image(); giochi02_off.src         ="./style/images/home/giochi-02_off.gif";
   giochi03_on        = new Image(); giochi03_on.src          ="./style/images/home/giochi-03_on.gif";
   giochi03_off       = new Image(); giochi03_off.src         ="./style/images/home/giochi-03_off.gif";
   giochi04_on        = new Image(); giochi04_on.src          ="./style/images/home/giochi-04_on.gif";
   giochi04_off       = new Image(); giochi04_off.src         ="./style/images/home/giochi-04_off.gif";
   giochi05_on        = new Image(); giochi05_on.src          ="./style/images/home/giochi-05_on.gif";
   giochi05_off       = new Image(); giochi05_off.src         ="./style/images/home/giochi-05_off.gif";
   giochi06_on        = new Image(); giochi06_on.src          ="./style/images/home/giochi-06_on.gif";
   giochi06_off       = new Image(); giochi06_off.src         ="./style/images/home/giochi-06_off.gif";
   giochi07_on        = new Image(); giochi07_on.src          ="./style/images/home/giochi-07_on.gif";
   giochi07_off       = new Image(); giochi07_off.src         ="./style/images/home/giochi-07_off.gif";
   giochi08_on        = new Image(); giochi08_on.src          ="./style/images/home/giochi-08_on.gif";
   giochi08_off       = new Image(); giochi08_off.src         ="./style/images/home/giochi-08_off.gif";
}

function imgOn(immagineNome)
{
   if (ctrlVersione == "ok") {
      immagineOn = eval(immagineNome + "_on.src");
      document [immagineNome].src = immagineOn;
   }
}

function imgOff(immagineNome)
{
   if (ctrlVersione == "ok") {
      immagineOff = eval(immagineNome + "_off.src");
      document [immagineNome].src = immagineOff;
   }
}
