// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 4000;

// Duration of crossfade (seconds)
var crossFadeDuration = 1;

// Specify the image files
var Pic = new Array(); // don't touch this
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = "/atf/cf/{8E933A1E-91B6-4509-932B-3CE06BF55CA6}/1_homepage_image.jpg";
Pic[1] = "/atf/cf/{8E933A1E-91B6-4509-932B-3CE06BF55CA6}/2_homepage_image.jpg";
Pic[2] = "/atf/cf/{8E933A1E-91B6-4509-932B-3CE06BF55CA6}/3_homepage_image.jpg";
Pic[3] = "/atf/cf/{8E933A1E-91B6-4509-932B-3CE06BF55CA6}/4_homepage_image.jpg";
Pic[4] = "/atf/cf/{8E933A1E-91B6-4509-932B-3CE06BF55CA6}/5_homepage_image.jpg";
Pic[5] = "/atf/cf/{8E933A1E-91B6-4509-932B-3CE06BF55CA6}/6_homepage_image.jpg";


// =======================================
// do not edit anything below this line
// =======================================

var t;
var j = 0;
var p = Pic.length;

var preLoad = new Array();
for (i = 0; i < p; i++){
   preLoad[i] = new Image();
   preLoad[i].src = Pic[i];
}

function imageswaps(){

   if (document.all){
      //document.image.SlideShow.style.filter="blendTrans(duration=2)";
      //document.image.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
      //document.image.SlideShow.filters.blendTrans.Apply();
      document.getElementById("SlideShow").style.filter="blendTrans(duration=2)";
      document.getElementById("SlideShow").style.filter="blendTrans(duration=crossFadeDuration)";
      document.getElementById("SlideShow").filters.blendTrans.Apply();
   }
   //document.image.SlideShow.src = preLoad[j].src;
   document.getElementById("SlideShow").src = preLoad[j].src;
   if (document.all){
      //document.image.SlideShow.filters.blendTrans.Play();
      document.getElementById("SlideShow").filters.blendTrans.Play();
   }
   j = j + 1;
   if (j > (p-1)) j=0;
}

function runSlideShow(){
  imageswaps();
  t = setTimeout('runSlideShow()', slideShowSpeed);
  
}