// Image fading only works in IE

//INIT
var slideShowSpeed = 5000;	//milliseconds
var crossFadeDuration = 3; 	//duration of crossfade (seconds)
var t = null;			//timeout object
var j = 0;				//rotator variable

if (typeof(Pic) != "undefined") {
	var p = Pic.length;
}

function runSlideShow() {
	if (typeof(Pic) != "undefined" && document.images.SlideShow != null) {
		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 = Pic[j][0].src;
		document.getElementById("ImageName").innerHTML = Pic[j][1];
	   
		if (document.all) {
			document.images.SlideShow.filters.blendTrans.Play();
		}
	   
		j = j + 1;
	   
		if (j > (p - 1)) {
			j = 0;
		}
	   
		t = setTimeout('runSlideShow()', slideShowSpeed) ;
	}
}

function pauseSlideShow() {
	clearTimeout(t);
	t = null;	
}