
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 7000

// Duration of crossfade (seconds)
var crossFadeDuration = 5

// Specify the image array
var Pic = new Array()

// to add more images, add to the array below
Pic[0] = 'images/carousel/1.jpg'
Pic[1] = 'images/carousel/2.jpg'
Pic[2] = 'images/carousel/3.jpg'
Pic[3] = 'images/carousel/4.jpg'

// Specify the link array
var Url = new Array()

// add to the array below to include links for image array
Url[0] = '../about'
Url[1] = '../admissions'
Url[2] = '../studentlife/miami.aspx' //Miami page
Url[3] = '../academics'

// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0
var u = 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 runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   
   document.images.SlideShow.src = preLoad[j].src
   
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   
   u = j
   
   j = j + 1
   
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

function gotoPage(){
	window.location=(Url[u])
}

window.onload = runSlideShow;