// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000

// Duration of crossfade (seconds)
var crossFadeDuration = 3

// 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] = 'http://www.visionlongisland.org/images/slides/image000.jpg'
Pic[1] = 'http://www.visionlongisland.org/images/slides/image001.jpg'
Pic[2] = 'http://www.visionlongisland.org/images/slides/image002.jpg'
Pic[3] = 'http://www.visionlongisland.org/images/slides/image003.jpg'
Pic[4] = 'http://www.visionlongisland.org/images/slides/image004.jpg'
Pic[5] = 'http://www.visionlongisland.org/images/slides/image005.jpg'
Pic[6] = 'http://www.visionlongisland.org/images/slides/image006.jpg'
Pic[7] = 'http://www.visionlongisland.org/images/slides/image007.jpg'
Pic[8] = 'http://www.visionlongisland.org/images/slides/image008.jpg'
Pic[9] = 'http://www.visionlongisland.org/images/slides/image009.jpg'
Pic[10] = 'http://www.visionlongisland.org/images/slides/image010.jpg'
Pic[11] = 'http://www.visionlongisland.org/images/slides/image011.jpg'
Pic[12] = 'http://www.visionlongisland.org/images/slides/image012.jpg'
Pic[13] = 'http://www.visionlongisland.org/images/slides/image013.jpg'
Pic[14] = 'http://www.visionlongisland.org/images/slides/image014.jpg'
Pic[15] = 'http://www.visionlongisland.org/images/slides/image015.jpg'
Pic[16] = 'http://www.visionlongisland.org/images/slides/image016.jpg'
Pic[17] = 'http://www.visionlongisland.org/images/slides/image017.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 runSlideShow(){
   if (isEven(j)) {
	   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[j].src
	   if (document.all){
	      document.images.SlideShow2.filters.blendTrans.Play()
	   }
   } 
   else { 
	   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.SlideShow1.src = preLoad[j].src
	   if (document.all){
	      document.images.SlideShow1.filters.blendTrans.Play()
	   }
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

function isEven(x) { return (x%2)?false:true; }
function isOdd(x) { return !isEven(x); }

