var slideShowSpeed = 6000;
var crossFadeDuration = 3;

var t;
var r1,r2,r3;
var p = arrPics.length;
var preLoad = new Array();
for (i = 0; i < p; i++)
{
	preLoad[i] = new Image();
	preLoad[i].src = arrPics[i];
}

function runSlideShow()
{
	if (document.all)	{
       document.images.SlideShow1.style.filter="blendTrans(duration=2)";
       document.images.SlideShow1.style.filter="blendTrans(duration=crossFadeDuration)";
	   document.images.SlideShow1.filters.blendTrans.Apply();
       document.images.SlideShow2.style.filter="blendTrans(duration=2)";
       document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration)";
	   document.images.SlideShow2.filters.blendTrans.Apply();
       document.images.SlideShow3.style.filter="blendTrans(duration=2)";
       document.images.SlideShow3.style.filter="blendTrans(duration=crossFadeDuration)";
	   document.images.SlideShow3.filters.blendTrans.Apply();
   }

   r1 = Math.floor(Math.random()*arrPics.length);
   do {
      r2 = Math.floor(Math.random()*arrPics.length);
   } while (r2 == r1)
   do {
      r3 = Math.floor(Math.random()*arrPics.length);
   } while (r3 == r1 || r3 == r2)   
   document.images.SlideShow1.src = preLoad[r1].src;
   document.images.SlideShow2.src = preLoad[r2].src;
   document.images.SlideShow3.src = preLoad[r3].src;

	if (document.all) {
        document.images.SlideShow1.filters.blendTrans.Play();
        document.images.SlideShow2.filters.blendTrans.Play();
        document.images.SlideShow3.filters.blendTrans.Play();
   }
   
   t = setTimeout('runSlideShow()', slideShowSpeed);
}
