var timerID = null;
var timerOn = false;
var timecount = 1000;              // MILLISECONDS OF DELAY

function show(name,num,total) {
	for (var i=1;i<=total;i++) {
		if (num==i) {
			show_hide(name+i,1)
		} else {
			show_hide(name+i,0)
		}
	}
}

function show_hide(the_div,div_state) {            /*  HIDE FUNCTION  */
	if (div_state==1) {
		document.getElementById(the_div).style.visibility = "visible";
	} else {
		document.getElementById(the_div).style.visibility = "hidden";
	}
}

function time_stop(name,num,total) {
	if (timerOn) {
		clearTimeout(timerID);
		timerID = null;
		timerOn = false;
	}
}

function time_start(name,num,total) {
	if (timerOn == false) {
		timerID=setTimeout( "show('"+name+"',"+num+","+total+")" , timecount);
		timerOn = true;
	}
}

function stopTimer() {
	time_stop('prognav',0,2);           // HOW MANY DIVS
}

function startTimer() {
	time_start('prognav',0,2);          // HOW MANY DIVS
}

