function Aleatoire(mini,maxi) {
var x = -1;
while (x < mini) {
x = Math.round(Math.random() * maxi);
}
return x;
}

function first_image()
{
 choix = Aleatoire(0,len-1);
 document.test.src=tab[choix];
}
function debut()
{
  choix=0;
  document.test.src=tab[choix];
  return false;
}

function fin()
{
 choix=len-1;
 document.test.src=tab[choix];
 return false;
}

function suivant()
{

 if(choix==(len-1))
 {
  document.test.src=tab[choix];
 }
 else {
 choix++;
 document.test.src=tab[choix];
 }
 return false;
 }

function precedent()
{
 if(choix==0)
 {
   document.test.src=tab[choix];
 }
 else
 {
   choix--;
   document.test.src=tab[choix];
 }
 return false;
}

function affichage()
{
 if (document.all)
   ouen.innerHTML='&nbsp;Photo ' + (choix+1) + '/' + len + '&nbsp;';
   commentaire.innerHTML=text[choix];
}