var Pic = new Array() // don't touch this

//////////////////////////
// instellingen:
var slideShowSpeed = 3000
var crossFadeDuration = 3
Pic[0] ='./index_bestanden/5a.jpg'
Pic[1] ='./index_bestanden/5b.jpg'
Pic[2] ='./index_bestanden/5c.jpg'
Pic[3] ='./index_bestanden/5d.jpg'
Pic[4] ='./index_bestanden/5e.jpg'
Pic[5] ='./index_bestanden/5f.jpg'
Pic[6] ='./index_bestanden/5g.jpg'
Pic[7] ='./index_bestanden/5h.jpg'


// functionaliteit
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 (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration="+crossFadeDuration+")"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[get_random ( ) % p].src
   document.images
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
	 setTimeout('runSlideShow()', slideShowSpeed)
}

function get_random ( ) {
    var ranNum = Math.round(Math.random()*p);
    return ranNum;
}

function init() {
	document.images.SlideShow.src = preLoad[get_random ( )].src;
	runSlideShow();
}

