var timerID = 0;
var tStart  = null;

var promo_array = new Array();
var max_promos = 0;
var timer_interval = 1000; 

function UpdateTimer() {
	if(timerID) {
		clearTimeout(timerID);
		clockID  = 0;
	}

	if(!tStart)
		tStart = 0;

	tStart = tStart + 1;

	if (tStart <= max_promos)
	{
		var promo_in_array = promo_array[tStart];

		<!-- Display promotion short description followed by long description -->
	   	global_promo.innerHTML = "<strong>" + promo_in_array.shortDesc + "</strong>" + " - " + promo_in_array.longDesc;
	}
	else   
	{
		tStart = 0;
	}

	timerID = setTimeout("UpdateTimer()", timer_interval);
}

function StartTimer() {
	tStart   = 0;

   	timerID  = setTimeout("UpdateTimer()", timer_interval);
}

function StopTimer() {
	if(timerID) {
    	clearTimeout(timerID);
      	timerID  = 0;
	}

	tStart = null;
}

function ResetTimer() {
	tStart = null;
}
