
// The Fade Function
function SwapImage(x,y) {		

  $(image_slide[x]).appear({ duration: 1.5 });
  $(image_slide[y]).fade({duration: 1.5});
}

// the onload event handler that starts the fading.
function StartSlideShow() {
  play = setInterval('Play()',wait);
}

function Play() {
  var imageShow, imageHide;

  imageShow = slideindex+1;
  imageHide = slideindex;
  if (imageShow == NumOfImages) {
    SwapImage(0,imageHide);	
    slideindex = 0;					
  } else {
    SwapImage(imageShow,imageHide);			
    slideindex++;
  }
}             

