// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

var playShow = true;
var onNext = false;
var onPrev = false;
var firstTime = 1;
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(playShow){
		if(firstTime==1){
			speedMSFade = (speedMS/3);
			firstTime=0;
		} else {
			speedMSFade = speedMS;
		}
		if (document.all){
			document.images.SlideShow.style.filter="blendTrans(duration=2)"
			document.images.SlideShow.style.filter="blendTrans(duration=fadeDur)"
			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()', speedMSFade)
	}
}
function skipToNext(){
	playShow = false;
	onNext = true;
	if (onPrev){
		j = j + 1;
		onPrev = false;
	}
	clearTimeout(t);
	//alert("about to show "+j);
	document.images.SlideShow.src = preLoad[j].src
	if (document.all){
	  document.images.SlideShow.filters.blendTrans.Stop()
	}
	j = j + 1;
	if (j > (p-1)) j=0
	t = setTimeout('playShow = true;runSlideShow();', 10000)
}
function skipToPrev(){
	onPrev = true;
	if (playShow) j = j - 1;
	if (onNext){
		j = j - 1;
		onNext = false;
	}
	playShow = false;
	clearTimeout(t);
	j = j - 1;
	if (j < 0) j=p-1
	//alert("about to show "+j);
	document.images.SlideShow.src = preLoad[j].src
	if (document.all){
	  document.images.SlideShow.filters.blendTrans.Stop()
	}
	t = setTimeout('playShow = true;runSlideShow();', 10000)
}