var slideShowSpeed = 3000;
var crossFadeDuration = 5;

var Pic = new Array(); // Array di immagini
var pos = 0; // Posizione corrente

var t;
var j = 0;
var p = 0;

function addSlide(slidePath) {
	Pic[ pos ] = slidePath;
	pos += 1;
	
	// Precarico le immagini
	var preLoad = new Image();
	preLoad.src = slidePath;
}

function runSlideShow() {
   if (document.all){
      document.images.SlideShow.style.filter = "blendTrans(duration=5)";
      document.images.SlideShow.style.filter = "blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow.filters.blendTrans.Apply();
   }
   document.images.SlideShow.src = Pic[ j ];
   if (document.all) {
      document.images.SlideShow.filters.blendTrans.Play();
   }
   j = j + 1;
   if (j > (Pic.length-1)) j=0;
   t = setTimeout('runSlideShow()', slideShowSpeed);
}