//**************************************************
// This starts the stuff for the fade.
//**************************************************

//imagesH=new Array()
//if(slidelimit_h == 0)
//{
//  imagesH[imagesH.length]=new Array("images/music/musich1.jpg","title");
//  imagesH[imagesH.length]=new Array("images/math/mathh1.jpg","title");
//  imagesH[imagesH.length]=new Array("images/science/scienceh1.jpg","title");
//  imagesH[imagesH.length]=new Array("images/rotc/rotch2.jpg","title");
//  imagesH[imagesH.length]=new Array("images/social/socialh1.jpg","title");
//  imagesH[imagesH.length]=new Array("images/etc/etch2.jpg","title");
//}
//else
//{
//  for(idx = 1; idx < slidelimit_h; idx++)
//  {
//    var wk_img = "images/" + dept_name + "/" + dept_name + "h" + idx + ".jpg";
//    imagesH[imagesH.length]=new Array(wk_img,"",idx);
//  }
//}

moz=document.getElementById&&!document.all
var preloadpicsH=new Array() // preloads images
for (i=0;i<=imagesH.length-1;i++) {
  preloadpicsH[i]=new Image();
  preloadpicsH[i].src=imagesH[i][0];
}

//imagesV=new Array()
//if(slidelimit_v == 0)
//{
//  imagesV[imagesV.length]=new Array("images/math/mathv1.jpg","title");
//  imagesV[imagesV.length]=new Array("images/music/musicv2.jpg","title");
//  imagesV[imagesV.length]=new Array("images/science/sciencev2.jpg","title");
//  imagesV[imagesV.length]=new Array("images/social/socialv1.jpg","title");
//  imagesV[imagesV.length]=new Array("images/etc/etcv2.jpg","title");
//  imagesV[imagesV.length]=new Array("images/rotc/rotcv1.jpg","title");
//}
//else
//{
//  for(idx = 1; idx < slidelimit_v; idx++)
//  {
//    var wk_img = "images/" + dept_name + "/" + dept_name + "v" + idx + ".jpg";
//    imagesV[imagesV.length]=new Array(wk_img,"",idx);
//  }
//}

var preloadpicsV=new Array() // preloads images
for (i=0;i<=imagesV.length-1;i++) {
  preloadpicsV[i]=new Image();
  preloadpicsV[i].src=imagesV[i][0];
}

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 4000;

// Duration of crossfade (seconds)
var crossFadeDuration = 5;

// Specify the image files
var Pic = new Array(); // don't touch this

// =======================================
// do not edit anything below this line
// =======================================

var t;
var j = 0;
var k = 0;
var p = imagesH.length - 1;
var r = imagesV.length - 1;

function runSlideShow(){
   if (document.all){
      document.images.SlideShowH.style.filter="blendTrans(duration=2)";
      document.images.SlideShowH.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShowH.filters.blendTrans.Apply();
      document.images.SlideShowV.style.filter="blendTrans(duration=2)";
      document.images.SlideShowV.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShowV.filters.blendTrans.Apply();
   }
   document.images.SlideShowH.src = preloadpicsH[j].src;
   document.images.SlideShowV.src = preloadpicsV[k].src;
   if (document.all){
      document.images.SlideShowV.filters.blendTrans.Play();
      setTimeout('document.images.SlideShowH.filters.blendTrans.Play()', 2000);
   }
   j++;
   k++;
   if (j > p)
     j=0;
   if (k > r)
     k=0;
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

