<!--
var slides = new Array('slide1', 'slide2', 'slide3', 'slide4');
var i = 0;
var wait = 3000;
var alreadyTimeout = null;
var interval = null;

function SlideShow() {
	Effect.Fade(slides[i], { duration:1, from:1.0, to:0.0 });
	i++;
	if (i == slides.length) i = 0;
	Effect.Appear(slides[i], { duration:1, from:0.0, to:1.0 });
}

function setSlide(j) {
	if (alreadyTimeout == null) {
		stopSlideshow();
		alreadyTimeout = setTimeout(function () {
			//Effect.Fade(slides[i], { duration:1, from:1.0, to:0.0 });
			slides.each(function (s, index) { $(s).setStyle({ display: 'none' }) });
			Effect.Appear(slides[j], { duration:1, from:0.0, to:1.0, afterUpdate: function() { alreadyTimeout = null } });
			i = j;
		}, 100);
	}
}

// the onload event handler that starts the fading.
function startSlideshow() { interval = setInterval('SlideShow()', wait); }
function stopSlideshow() { clearInterval(interval); }
-->