function CreateSlideShowObject(obj, speed, fadeduration)
{
	var show = new Object();
	show.slideShowSpeed = speed;
	show.crossFadeDuration = fadeduration;
	show.CurrentImage = 0;
	show.Images = new Array();
	show.NoOfImages = function() { return show.Images.length; };	
	show.AddImage = function(src) { show.Images[show.NoOfImages()] = new Image; show.Images[show.NoOfImages()-1].src = src; }
	if (document.getElementById)
		show.Placeholder = document.getElementById(obj);
	else if(document.all)
		show.Placeholder = document.all[obj];
	show.Start = function() { runSlideShow(show); }
	return show;
}

function runSlideShow(obj)
{
   if (document.all)
	{
      obj.Placeholder.style.filter="blendTrans(duration=crossFadeDuration)";
      obj.Placeholder.filters.blendTrans.Apply();
   }
   obj.Placeholder.src = obj.Images[obj.CurrentImage].src;
   if (document.all)
	{
      obj.Placeholder.filters.blendTrans.Play();
   }
   obj.CurrentImage++;
   var nNoOfImages = obj.NoOfImages()-1;
   if (obj.CurrentImage > (obj.NoOfImages()-1)) {
	obj.CurrentImage=0;}
   var delegate = function() { runSlideShow(obj);  }
   var t = setTimeout(delegate, obj.slideShowSpeed);
}
