// (C) 2002 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header.
// misc modifications - 2/25/04 bf@cdivia

var Carousel = new Array();
var SlideDir = 'images/slides/';
var ShowSpeed = 8000; // ms
var NowShowing = 0;
function AddSlide(image,caption,color) {
  Carousel[Carousel.length] = new Slide(image,caption,color);
}
function Slide(image,caption,color) {
 this.picture = new Image();
 this.picture.src = SlideDir+image;
 this.caption = caption;
 this.color = (color.length > 0) ? color : '#000000';
}
function Slideshow() {
 var n = NowShowing++;
 NowShowing %= Carousel.length;
 if (document.all) {
  document.images.PictureBox.style.filter="blendTrans(duration=4)";
  document.images.PictureBox.filters.blendTrans.Apply();
 }
 document.images.PictureBox.src = Carousel[n].picture.src;
 if (document.all) 
  document.images.PictureBox.filters.blendTrans.Play();
 if (document.getElementById) {
  var obj = document.getElementById("CaptionBox");
  if (obj) {
   obj.innerHTML= Carousel[n].caption;
   obj.style.color= Carousel[n].color;
  }
 }
 setTimeout('Slideshow()',ShowSpeed);
}
