var i=0,slidecss="slide",NumOfImages=3,wait=3000,dur=1.5;
function SwapImage(b,a){Effect.Appear(slidecss[b],{duration:dur});Effect.Fade(slidecss[a],{duration:dur})}function StartSlideShow(){play=setInterval("Play()",wait)}function Play(){var b,a;b=i+1;a=i;b==NumOfImages?(SwapImage(0,a),i=0):(SwapImage(b,a),i++)}function Stop(){clearInterval(play)}function GoNext(){clearInterval(play);var b,a;b=i+1;a=i;b==NumOfImages?(SwapImage(0,a),i=0):(SwapImage(b,a),i++)} function GoPrevious(){clearInterval(play);var b,a;b=i-1;a=i;i==0?(SwapImage(NumOfImages-1,a),i=NumOfImages-1):(SwapImage(b,a),i--)}Event.observe(window,"load",function(){slidecss=document.getElementsByClassName(slidecss);NumOfImages=slidecss.length;StartSlideShow()});
