function SlideShow(_pictureName,_imageFiles,_displaySecs,_objectName) {
  this.slideCache = new Array();
  this.pictureName = _pictureName;
  this.imageFiles = _imageFiles;
  this.displaySecs = _displaySecs;
  this.objectName = _objectName;
}

SlideShow.prototype.run = function()
{
//  alert("test");
  // Get next image (and add it to the end of the array)
  var nextImage = this.imageFiles.shift();
  imageFiles.push(nextImage);

  var picture = document.getElementById(this.pictureName);
  if (picture.filters)
  {
    picture.style.filter="blendTrans(duration=2)";
    picture.filters.blendTrans.Apply();
  }
  picture.src = nextImage;
  if (picture.filters)
  {
    picture.filters.blendTrans.Play();
  }

  // Set timeout for next slide
  setTimeout(this.objectName+".run()",this.displaySecs*1000);

  // Cache the next image to improve performance.
  nextImage = this.imageFiles[0];
  if (this.slideCache[nextImage] == null) {
    this.slideCache[nextImage] = new Image();
    this.slideCache[nextImage].src = nextImage;
  }
}