
  //Fonction qui permet de jouer le diaporama
  function diaporama(divid, imageid, millisec) 
  { 
      var speed = Math.round(millisec / 100); 
      var timer = 0; 
      document.getElementById(divid).style.backgroundImage = "url(" + tab_img[num] + ")"; 
      changeOpac(0, imageid); 
      if (num>(tab_img.length-2))
      {num = -1;}
      document.getElementById(imageid).style.backgroundImage = "url(" + tab_img[num+1] + ")"; 
      for(i = 0; i <= 100; i++)
      { 
        setTimeout("changeOpac(" + i + ",'" + imageid+ "')",(timer * speed)); 
        timer++; 
      } 
    num++;
  }
  
  //Fonction qui attribue l'opacité ŕ l'objet "image_diapo"
  function changeOpac(opacity, id) 
  {
      var object = document.getElementById(id).style;
      object.opacity = (opacity / 100);
      object.MozOpacity = (opacity / 100);
      object.KhtmlOpacity = (opacity / 100);
      object.filter = "alpha(opacity=" + opacity + ")";
  }
