
function setNumberOfPromos(n, type) {
	if(type == "lower") { document.numPromosLower = n; }
	if(type == "upper") { document.numPromosUpper = n; }
	if(type == "tl") { document.numPromosTL = n; }
}

document.currentPromoLower = 1;
document.currentPromoUpper = 1;
document.currentPromoTL = 1;

function switchPromos(type) {
	if(type == "lower") {
		if (document.currentPromoLower == document.numPromosLower)
		{
			document.currentPromoLower = 1;
		}
		else
		{
			document.currentPromoLower++;
		}
		document.getElementById('lowerPromo').innerHTML = document.getElementById('lowerPromo' + document.currentPromoLower).innerHTML;
	}
	else if(type == "upper") {
		if (document.currentPromoUpper == document.numPromosUpper)
		{
			document.currentPromoUpper = 1;
		}
		else
		{
			document.currentPromoUpper++;
		}
		document.getElementById('upperPromo').innerHTML = document.getElementById('upperPromo' + document.currentPromoUpper).innerHTML;
	}
	else if(type == "tl") {
		if (document.currentPromoTL == document.numPromosTL)
		{
			document.currentPromoTL = 1;
		}
		else
		{
			document.currentPromoTL++;
		}
		document.getElementById('tlPromo').innerHTML = document.getElementById('tlPromo' + document.currentPromoUpper).innerHTML;
	}

}



function cycleUpper() {
	switchPromos("upper");
	setTimeout("cycleUpper()", 3*1000);	
}


function cycleLower() {
	switchPromos("lower");
	setTimeout("cycleLower()", 8*1000);	
}


function cycleTL() {
	switchPromos("tl");
	setTimeout("cycleTL()", 8*1000);	
}

