stage = 0;
MAX_PULSES = 4;
curIndex = 1;
function fadeImages(div1, div2) {
	stage = stage + 5;
	if (stage <= 99) {
		leavefilterString = "alpha(opacity=" + (100 - stage) + ")";
		enterfilterString = "alpha(opacity=" + (stage) + ")";
		
		div1.style.filter = leavefilterString;
		div2.style.filter = enterfilterString;
		div1.style.opacity = (100 - stage) / 100;
		div2.style.opacity = (stage) / 100;
		
		setTimeout("fadeImages(div1, div2)", 65);
	} else {
		div1.style.zIndex = 1;
		div2.style.zIndex = 2;
		div1.style.opacity = .01;
		div2.style.opacity = .99;
		div1.style.filter = "alpha(opacity = 0)";
		div2.style.filter = "alpha(opacity = 100)";
	}
}

function scheduleTransitions() {
	stage = 0;
	ind1 = curIndex;
	ind2 = curIndex + 1;
	if (ind2 > MAX_PULSES)
		ind2 = 1;
		
	if (document.all) {
		div1 = document.all["pulse" + ind1];
		div2 = document.all["pulse" + ind2];
	} else {
		div1 = document.getElementById("pulse" + ind1);
		div2 = document.getElementById("pulse" + ind2);
	}
	fadeImages(div1, div2);
	curIndex++;
	if (curIndex > MAX_PULSES)
		curIndex = 1;
	setTimeout("scheduleTransitions()", 5000);
}