// JavaScript Document
//var speed = 5000;  = 5 seconds

var speed = 3500;
var crossFadeDuration = 2;

var loopcount = 0  
var loopmax = 1 

var Pic = new Array();
Pic[0] = 'images/slideshow/slideShow_blondWoman.jpg'; 
Pic[1] = 'images/slideshow/slideShow_couple.jpg'; 
Pic[2] = 'images/slideshow/slideShow_teen-smiling.jpg'; 
Pic[3] = 'images/slideshow/slideShow_black_woman.jpg'; 
Pic[4] = 'images/slideshow/slideShow_study_group.jpg'; 
Pic[5] = 'images/slideshow/slideShow_young-lady-smiling.jpg'; 
 
 //Do not edit anything between this line and the next comment.

var i;
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 (document.all){
    document.images.pix.style.filter="blendTrans(duration=crossFadeDuration)";
	document.images.pix.filters.blendTrans.Apply();
    document.images.pix.filters.blendTrans.Play();
 }  

document.images.pix.src = Pic[j];  

if (1){
    j = j + 1
    if (j > (p-1)) j=0
	
	
	if (j == 0) { // are we at the end of a full set of slides? 
		loopcount = loopcount + 1 // this line increments the loopcount 
		if (loopcount == loopmax) { // have we reached the loopmaximum yet? 
		return false // this line just quits the function, so the slideshow stops. 
		} 
	} 	
 	
 		t = setTimeout('runSlideShow()', speed)
	}    
				return false;
}
 	

