/* IFRAME TICKER
Copyright Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, 
visit http://dynamicdrive.com

Modifications by Larry Israel, Fireteam Consulting:
 - Improved formatting and other minor JavaScript changes
 - Removed the iframe and other HTML changes
*/

// configure the delay between messages (3000 = 3 seconds)
var delay = 5000

var ie4 = document.all
var curindex = 0
var totalcontent = 0

function get_total() {
	if (ie4) {
		while (eval("document.all.ticker" + totalcontent))
			totalcontent++
	}
	else {
		while (document.getElementById("ticker" + totalcontent))
			totalcontent++
	}
}

function contract_all() {
	for (y=0; y<totalcontent; y++) {
		if (ie4)
			eval("document.all.ticker" + y).style.display = "none"
		else
			document.getElementById("ticker" + y).style.display = "none"
	}
}

function expand_one(which) {
	contract_all()
	if (ie4)
		eval("document.all.ticker" + which).style.display = "block"
	else
		document.getElementById("ticker" + which).style.display = "block"
}

function rotate_content() {
	get_total()
	contract_all()
	expand_one(curindex)
	curindex = (curindex < totalcontent - 1) ? curindex + 1:0
	setTimeout("rotate_content()", delay)
}

window.onload = rotate_content