<!--
var currImage = -1;
//----------------------
function imageList(tips, imageLink, text)
{
  this.Tips = tips;
  this.ImageLink = imageLink;
  this.Text = text;
}
//----------------------
var myValues = new Array(
   new imageList("tips 1", "images/Schedati/Cesto.gif", "Cestò"),
   new imageList("tips 2", "images/Schedati/Geppo.gif", "Geppo"),
   new imageList("tips 3", "images/Schedati/Geronimo.gif", "Geronimo"),
   new imageList("tips 4", "images/Schedati/GPS.gif", "GPS"),
   new imageList("tips 5", "images/Schedati/Mano.gif", "Mano"),
   new imageList("tips 6", "images/Schedati/Masso.gif", "Masso"),
   new imageList("tips 7", "images/Schedati/Nuvola.gif", "Nuvola Rossa"),
   new imageList("tips 8", "images/Schedati/Ombra.gif", "Ombra che viene"),
   new imageList("tips 9", "images/Schedati/Scheggia.gif", "Scheggia"),
   new imageList("tips 10", "images/Schedati/Sherlock.gif", "Scerlokholms"),
   new imageList("tips 11", "images/Schedati/Spiffero.gif", "Spiffero"),
   new imageList("tips 12", "images/Schedati/Pali.gif", "Palì"),
   new imageList("tips 13", "images/Schedati/Joe Bar.gif", "Joe Bar"),
   new imageList("tips 14", "images/Schedati/Prosciutta.gif", "Prosciuttà"),
   new imageList("tips 15", "images/Schedati/Smartello'.gif", "Smartellò"),
   new imageList("tips 16", "images/Schedati/Cellero'.gif", "Cellerò"),
   new imageList("tips 17", "images/Schedati/Cammello.gif", "Cammello"),
   new imageList("tips 18", "images/Schedati/Cinghiale.gif", "Cinghiale"),
   new imageList("tips 19", "images/Schedati/Rotaritta.gif", "Rotaritta"),
   new imageList("tips 20", "images/Schedati/Equilibrista.gif", "Equilibrista"),
   new imageList("tips 21", "images/Schedati/Mototopo.gif", "Panta"),
   new imageList("tips 22", "images/Schedati/Black.gif", "Black"),
   new imageList("tips 23", "images/Schedati/Bussola.gif", "Bussola"),
   new imageList("tips 24", "images/Schedati/Superpeppe.gif", "Superpeppe"),
   new imageList("tips 25", "images/Schedati/Bellicapelli.gif", "Bellicapelli"),
   new imageList("tips 26", "images/Schedati/La_gnoranza.gif", "La gnoranza"),
   new imageList("tips 27", "images/Schedati/Dentiere.gif", "Dentiere"),
   new imageList("tips 28", "images/Schedati/Fantasma.gif", "Fantasma"),
   new imageList("tips 29", "images/Schedati/Paesanello.gif", "Paesanello")
   //new imageList("", "image5.gif", "testo cinque")
   );
//----------------------
var totImage = myValues.length;
var arrayRand = new Array;
//----------------------
for(i = 0; i < totImage; ++i)
  arrayRand[i] = i;
//----------------------
function rand(n)
{
  return ( Math.floor ( Math.random ( ) * n ) );
}
//----------------------
function getNextImage()
{
  if(currImage <= 0) {
    for(i = 0; i < totImage; ++i)
      arrayRand[i] = i;
    currImage = totImage;
    }
  choosed = rand(currImage);
  result = arrayRand[choosed];
  --currImage;
  t = arrayRand[choosed];
  arrayRand[choosed] = arrayRand[currImage];
  arrayRand[currImage] = t;
  return result;
}
//----------------------
// devi creare l'immagine ed il testo con questi id
var idImage = "ImgRoller";
var idText = "TextRoller";

// questo è il valore di attesa tra il rolling
var timeout = 12000;
//----------------------
// questa l'ho usata solo per far vedere la successione
// visualizza gli indici rimasti e, tra quadre, il vettore totale
function makeTextList()
{
  res = "";
  for(i = 0; i < currImage; ++i)
    res += ""/* + (arrayRand[i] + 1)*/;
  res += "";
  for(i = 0; i < totImage; ++i)
    res += ""/* + (arrayRand[i] + 1)*/;
  res += "";
  return res;
}
//----------------------
function replaceImage()
{
  imgObj = document.getElementById(idImage);
  ix = getNextImage();
  imgObj.src = myValues[ix].ImageLink;
  imgObj.title = myValues[ix].Tips;
  imgObj.alt = myValues[ix].Tips;

  imgText = document.getElementById(idText);

  imgText.innerHTML = myValues[ix].Text + makeTextList();
  setTimeout(replaceImage, timeout);
}
// -->
