
// Set slideShowSpeed (milliseconds) 
var slideShowSpeed = 4000; 

// 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] = 'image01.jpg' 
Pic[1] = 'image05.jpg' 
Pic[2] = 'image04.jpg' 



// do not edit anything below this line 
var t; 
var img = 0; 
var p = Pic.length; 
var preLoad1 = new Array(); 
var zuf = true;
z=0;
var rRandom = new Array();
var duplicate = false;
	
while (z!=p){
	y=Math.floor(Math.random()*(p));
	for(i=0;i<rRandom.length;i++){	
		if (y==rRandom[i]){	duplicate=true;	}
	}
	if (duplicate==true){ 
		duplicate=false;
		continue;
	} else if (duplicate==false) { rRandom[z] = y; z+=1; }
}
	
if(zuf) { 
	for(i = 0; i < p; i++){
		preLoad1[i] = new Image();
		preLoad1[i].src = Pic[rRandom[i]];
	}
} else {
	for (i = 0; i < p; i++) { 
		preLoad1[i] = new Image();
		preLoad1[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 = preLoad1[img].src; 
if (document.all) { 
document.images.SlideShow.filters.blendTrans.Play(); 
} 
img = img + 1; 
if (img > (p - 1)) img = 0; 
t = setTimeout('runSlideShow()', slideShowSpeed); 
}