var tss; var iss; var jss = 1; var pss = pic.length-1;
var preLoad = new Array();

for (iss = 1; iss < pss+1; iss++) {
	var speed = 7000;
	var duration = 5;
	preLoad[iss] = new Image();
	preLoad[iss].src = pic[iss];
}

function runpics()	{
	if (document.all) {
		document.images.pix.style.filter="blendTrans(duration=5)";
		document.images.pix.style.filter="blendTrans(duration=duration)";
		document.images.pix.filters.blendTrans.Apply();
	}
	document.images.pix.src = preLoad[jss].src;
	if (document.getElementById) {
		document.getElementById("caption").innerHTML= caption[jss];
	}
	if (document.all) {
		document.images.pix.filters.blendTrans.Play();
	}
	jss = jss + 1;
	if (jss > (pss)) {
		jss=1; 
	}
	tss = setTimeout('runpics()', speed);
}
