var newscount = 0;
var tickerID = 0;

function show( id ) {
var mynews = document.getElementById(id);
mynews.style.display = "block";
clearInterval( tickerID );
}

function release( id ) {
var mynews = document.getElementById(id);
mynews.style.display = "none";
tickerID = setInterval('ticker()', 4000 );
}

function startTicker() {
tickerID = setInterval('ticker()', 3000 );  // 5000 is in milliseconds
}

function ticker() {
var tickerDiv = document.getElementById('headlines');
var headlinecount = headlineList.length;

var start = "(";

tickerDiv.innerHTML = start.concat( (newscount+1).toString(10), " of ", headlinecount.toString(10), ") ", headlineList[newscount]);

if( newscount+1 != headlinecount ) {
newscount++;
} else {
newscount = 0;
}

}
