
var slideShowSpeed=18000;
var Pic= new Array()
	Pic[0]='pictures/mt_montage.jpg';
	Pic[1]='pictures/Tshirtspam1.jpg';
	Pic[2]='pictures/Team_Photo.jpg';
	Pic[3]='pictures/Tshirtspam2.jpg';
	Pic[4]='pictures/Natsteam2.jpg';


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.SlideShow.style.filter="blendTrans(duration=2)";
      		document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
      		document.images.SlideShow.filters.blendTrans.Apply();
}
		document.images.SlideShow.src = preLoad[j].src;
		if (document.all){
		document.images.SlideShow.filters.blendTrans.Play();
}
		j = j + 1;
		if (j > (p-1)) j=0;
		t = setTimeout('runSlideShow()', slideShowSpeed);
}

/* The following function was taken from the code within lightbox.js, which was written by Lokesh Dhakar. His information may be found in the topmost comments of lightbox.js.*/
function addLoadEvent(func)
{	
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
		oldonload();
		func();
		}
	}

}

addLoadEvent(runSlideShow);	// run runSlideShow onLoad
