// JavaScript Document
// (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 Pica = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pica[0] = 'images/test_1.jpg'
Pica[1] = 'images/test_2.jpg'

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

var ta
var ja = 0
var pa = Pica.length

var preLoada = new Array()
for (i = 0; i < pa; i++){
   preLoada[i] = new Image()
   preLoada[i].src = Pica[i]
}

function runSlideShowa(){
   if (document.all){
      document.images.SlideShowa.style.filter="blendTrans(duration=2)"
      document.images.SlideShowa.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShowa.filters.blendTrans.Apply()      
   }
   document.images.SlideShowa.src = preLoada[ja].src
   if (document.all){
      document.images.SlideShowa.filters.blendTrans.Play()
   }
   ja = ja + 1
   if (ja > (pa-1)) ja=0
   ta = setTimeout('runSlideShowa()', slideShowSpeed)
}

var Picb = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Picb[0] = 'images/test_3.jpg'
Picb[1] = 'images/test_4.jpg'

var tb
var jb = 0
var pb = Picb.length

var preLoadb = new Array()
for (i = 0; i < pb; i++){
   preLoadb[i] = new Image()
   preLoadb[i].src = Picb[i]
}

function runSlideShowb(){
   if (document.all){
      document.images.SlideShowb.style.filter="blendTrans(duration=2)"
      document.images.SlideShowb.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShowb.filters.blendTrans.Apply()      
   }
   document.images.SlideShowb.src = preLoadb[jb].src
   if (document.all){
      document.images.SlideShowb.filters.blendTrans.Play()
   }
   jb = jb + 1
   if (jb > (pb-1)) jb=0
   tb = setTimeout('runSlideShowb()', slideShowSpeed)
}

var Picc = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Picc[0] = 'images/test_5.jpg'
Picc[1] = 'images/test_5_.jpg'

var tc
var jc = 0
var pc = Picc.length

var preLoadc = new Array()
for (i = 0; i < pc; i++){
   preLoadc[i] = new Image()
   preLoadc[i].src = Picc[i]
}

function runSlideShowc(){
   if (document.all){
      document.images.SlideShowc.style.filter="blendTrans(duration=2)"
      document.images.SlideShowc.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShowc.filters.blendTrans.Apply()      
   }
   document.images.SlideShowc.src = preLoadc[jc].src
   if (document.all){
      document.images.SlideShowc.filters.blendTrans.Play()
   }
   jc = jc + 1
   if (jc > (pc-1)) jc=0
   tc = setTimeout('runSlideShowc()', slideShowSpeed)
}

/*
* edit: owenrs
* @see: /ext/js/ready.js for instance triggers of the slideshows. 
* gist: functions are called when instances of name="SlideShowx" or id="SlideShowx" are detected within an image tag
*
* function runSlideShows(){
* runSlideShowa()
* runSlideShowb()
* runSlideShowc()
* }
*/


