var i = 0;
var slide;

function SlideShow() {
	$( slide[i] ).fade({ duration:5 });
       i++;            
       if (i == slide.length) i = 0; 
       $( slide[i] ).appear({ duration:10, afterFinish: function () { SlideShow(); } });
} 

document.observe('dom:loaded', function () {
		var images = $$('#myslideshow img');
		if(images.length>1){
			images.each(function(image){
					$(image).hide();
			});
			slide =  $('myslideshow').childElements();
			$( slide[0] ).appear({ duration:1, afterFinish: function () { SlideShow(); } });
		}
});
