var timeDelay = 10; // delay in secondi
//array contenente le immagini
var Pix = new Array("./banner/BANNER1.JPG","./banner/BANNER2.JPG","./banner/BANNER3.JPG","./banner/BANNER4.JPG");
var howMany = Pix.length;
timeDelay *= 1000;
var PicCurrentNum = 0;

//img nell'html
var myImg;

//chiamta iniziale
function startPix(objImg) {
 myImg=objImg;
 setInterval("slideshow()", timeDelay);
}

//funzione di slide
function slideshow() {
 PicCurrentNum++;
 if (PicCurrentNum == howMany) PicCurrentNum = 0;
 myImg.style.backgroundImage = "url("+Pix[PicCurrentNum]+")";
}