duration = Math.round (duration * 1000)
var nav4 = window.Event ? true : false;
var divLyr = 1;
var topLyr = imgCnt;
var tmpLyr = 1;
        
function showHideLayer(divLyr, showState) {
	if (nav4) {
		if (showState) {
			eval("document.layers['"+divLyr+"'].visibility = 'show'");
		}
		else {
			eval("document.layers['"+divLyr+"'].visibility = 'hide'");
		}
	}
	else {
		if (document.all) {
			if (showState) {
				eval("document.all."+divLyr+".style.visibility = 'visible'");
			}
			else {
				eval("document.all."+divLyr+".style.visibility = 'hidden'");
			}
		}
	}
}

function getPriorInSequence(lyr) {
	if (lyr-1 < 1) {
		lyr = topLyr;
	}
	else {
		lyr = lyr-1;
	}
	return lyr;
}
        
function showNextImg() {
	if (tmpLyr > topLyr) {tmpLyr = 1;}
		showHideLayer('L'+tmpLyr, true);
		showHideLayer('L'+getPriorInSequence(tmpLyr), false);
		setTimeout('tmpLyr++; showNextImg();', duration);
	}
       
function animateImgs() {
	setTimeout('showNextImg(divLyr);', 0);
}