// this array consists of the id attributes of the divs we wish to alternate between //var divs_to_fade = new Array('picture-0'); var divs_to_fade = new Array(); divs_to_fade[0] = "picture-0"; divs_to_fade[1] = "picture-1"; divs_to_fade[2] = "picture-2"; divs_to_fade[3] = "picture-3"; divs_to_fade[4] = "picture-4"; divs_to_fade[5] = "picture-5"; // the starting index in the above array. // It should be set to the value of the div which doesn't have the CSS Display property set to "none" var i = 0; // the number of milliseconds between swaps. Default is five seconds. // colours.crossfader.wait var wait = 10000; wait = 12000 // the function that performs the fade function swapFade() { var length = divs_to_fade.length; //Effect.Fade(divs_to_fade[i], { duration:0.3, from:1.0, to:0.0 }); //Effect.Fade(divs_to_fade[i],{}); var element = $(divs_to_fade[i]); element.hide(); i++; if (i == length) i = 0; //Effect.Appear(divs_to_fade[i], { duration:0.3, from:0.0, to:1.0 }); //Effect.Appear(divs_to_fade[i],{}); element = $(divs_to_fade[i]); element.show(); } // the onload event handler that starts the fading. function startPage() { setInterval('swapFade()',wait); }