var timeDelay = 20; // delay time in seconds
var Pix = new Array();

// ***** Insert images to be cycled here *****

Pix[0] = new Image(); 
Pix[0].src = "/img/Chemistry/Mary, CDS & NMR 1.jpg";
Pix[1] = new Image();
Pix[1].src =  "/img/Chemistry/GH and JD.jpg";
Pix[2] = new Image();
Pix[2].src = "/img/Chemistry/Jason and TEH.jpg";
Pix[3] = new Image();
Pix[3].src = "/img/Chemistry/DSCN0211.jpg";

// ***** End of images for cycling *****

var howMany = Pix.length;
timeDelay *= 1000;
var currPix = 0;

function startPix() {
    setInterval("cyclePix()", timeDelay);
}

function cyclePix() {
    currPix = (++currPix == howMany) ? 0 : currPix;
    document["ChangingPix"].src = Pix[currPix].src;
}