//
var periodical;
var currstill=0;
function nextStill() {
				var next=currstill+1;
				if ( next >= moviestills.length ) {
								next=0;
				}
				// fade out the image|
				var myFade = $('displayarea').effect('opacity', {
					duration:500, 
					onComplete:function() { 
						updateStill( moviestills[next]);
						$('displayarea').effect('opacity', {duration:500}).start(0,1);
						} 
				});
				myFade.start(1,0);
				// swap out the image and the alt tag
				currstill=next;
}

function updateStill( input ) {
		$('stillshot').setProperties( {
			src: input.src,
			alt: input.alt
		});
		$('stilltxt').setText( input.txt );
};

var fx = function() {
				nextStill();
}
function start() {
				periodical=fx.periodical(7000);
}

window.addEvent('domready', start());

