// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 7000;
// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 2;
var Picture = new Array();
Picture[1]  = 'images/slideshow0.jpg';
Picture[2]  = 'images/slideshow1.jpg';
Picture[3]  = 'images/slideshow2.jpg';

var tss;
var iss;
var jss = 1;
var pss = Picture.length - 1;
function runSlideShow(  ){
    jss = jss + 1;
    if ( jss > ( pss ) )
        jss=1;
    tss = setTimeout( 'nextSlide()', SlideShowSpeed );
}

function nextSlide(  ){
    crossfade( document.getElementById('slide-img'), Picture[jss],
               CrossFadeDuration, '' );
    clearTimeout( tss );
    runSlideShow();
}
