// (C) 2002 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header.

// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 2000;

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;

// =====================================
// Do not edit anything below this line!
// =====================================

var tss;
var iss;

//var preLoad = new Array();
function LoadPicsToArray(preLoad, Picture) {
	var pss = Picture.length;
	for (iss = 0; iss < pss; iss++){
		t = new Image();
		preLoad[iss] = Picture[iss][1]
	}
}

var strImgArr=new Array()
var imgIDArr = new Array()
var cntsArr = new Array()
function AddStrImg(strPreLoad,imgID) {
	strImgArr[strImgArr.length] = strPreLoad
	imgIDArr[imgIDArr.length] = imgID
	cntsArr[cntsArr.length] = 0
}

function runSlideShow(){
	if (! StopSlideShow) {
		crntImg = Math.floor(Math.random()*3)
		//alert(crntImg)
		var preLoad = strImgArr[crntImg].split("**")
		pss = preLoad.length - 1;
		Pictures = document.getElementById(imgIDArr[crntImg]);
		if (document.all){
			Pictures.style.filter="blendTrans(duration=2)";
			Pictures.style.filter="blendTrans(duration=CrossFadeDuration)";
			Pictures.filters.blendTrans.Apply();
		}
		jss = cntsArr[crntImg]
		Pictures.src = preLoad[jss];
		if (document.all) Pictures.filters.blendTrans.Play();
		jss = jss + 1;
		if (jss > (pss)) jss=0;
		cntsArr[crntImg]=jss
	
		tss = setTimeout("runSlideShow()", SlideShowSpeed);
	}
}

