
// Duration of crossfade (seconds)
var crossFadeDuration = 3

// Specify the image files
var Pic = new Array() 

// To add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'photos/__9_0091.jpg'
Pic[1] = 'photos/2.jpg'
Pic[2] = 'photos/CCMFA.jpg'
Pic[3] = 'photos/DSC_0003.jpg'
Pic[4] = 'photos/DSC_0004.jpg'
Pic[5] = 'photos/Gallager 1.jpg'
Pic[6] = 'photos/Crosby.jpg'
Pic[7] = 'photos/LWYC Entrance.jpg'
Pic[8] = 'photos/Mack House.jpg'
Pic[9] = 'photos/cccca.jpg'
// ***************************************
// Index image timer function start
// ***************************************


var t
var j = 0
var j1 = 3
var j2 = 6
var j3 = 9
var p = Pic.length
var time = 0
var time1 = 0
var time2 = 0
var time3 = 0

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
	var slideShowSpeed1 = 5000

   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()
   }
	
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed1)
}

function runSlideShow2(){
   if (document.all){
      document.images.SlideShow2.style.filter="blendTrans(duration=2)"
      document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow2.filters.blendTrans.Apply()      
   }
   document.images.SlideShow2.src = preLoad[j1].src
   if (document.all){
      document.images.SlideShow2.filters.blendTrans.Play()
   }
   
   	if (time1 == 0) {
		slideShowSpeed2 = 6000;
		;
	}
	else {
		slideShowSpeed2 = 5000;
	}
	
	time1 = time1 + 1;
	
   j1 = j1 + 1
   if (j1 > (p-1)) j1=0
   t = setTimeout('runSlideShow2()', slideShowSpeed2)
}

function runSlideShow3(){
   if (document.all){
      document.images.SlideShow3.style.filter="blendTrans(duration=2)"
      document.images.SlideShow3.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow3.filters.blendTrans.Apply()      
   }
   document.images.SlideShow3.src = preLoad[j2].src
   if (document.all){
      document.images.SlideShow3.filters.blendTrans.Play()
   }
   
   	if (time2 == 0) {
		slideShowSpeed3 = 7000;
	}
	else {
		slideShowSpeed3 = 5000;
	}
	
	time2 = time2 + 1;
	
   j2 = j2 + 1
   if (j2 > (p-1)) j2=0
   t = setTimeout('runSlideShow3()', slideShowSpeed3)
}

function runSlideShow4(){
   if (document.all){
      document.images.SlideShow4.style.filter="blendTrans(duration=2)"
      document.images.SlideShow4.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow4.filters.blendTrans.Apply()      
   }
   document.images.SlideShow4.src = preLoad[j3].src
   if (document.all){
      document.images.SlideShow4.filters.blendTrans.Play()
   }
   
   	if (time3 == 0) {
		slideShowSpeed4 = 8000;
	}
	else {
		slideShowSpeed4 = 5000;
	}
	
	time3 = time3 + 1;
	
   j3 = j3 + 1
   if (j3 > (p-1)) j3=0
   t = setTimeout('runSlideShow4()', slideShowSpeed4)
}


// ***************************************
// Index image timer function end
// ***************************************

