var headlines_delay = 10000;
var headlines = new Array();
var current_headline = 0;
headlines[0] = "Spring Revival, April 11-13, 7:00 PM Nightly...Revivalists - Pastor S. Todd Yeary, Douglas Memorial Community Church - Mon.; Pastor Walter Forrest, Mt. Tabor Baptist Church - Tues.; Pastor Michael Palmer, New Friendship Baptist Church - Wed.";
headlines[1] = "Bible Study, Wednesdays at 7:00 PM. \"Evangelism\" Bring your families and friends!";
headlines[2] = "Prayer and Praise Service, Wednesdays at 6:15 PM. Light refreshments provided before Bible Study. All Are Invited!";

function headlines_next(){
	if (headlines.length==0)return;
	current_headline++;
	if (current_headline==headlines.length)current_headline = 0;
	
	var hl_text = "";
	var i = current_headline;
	do {
		hl_text = hl_text + headlines[i]+"<br>";
		i++;
		if (i==headlines.length)i=0;
	} while (i!=current_headline);
	
	var n = null;
	if (document.getElementById)
		n = document.getElementById("__headline");
	else if (document.all)
		n = document.all['__headline'];
	if (n)n.innerHTML = hl_text;
	window.setTimeout("headlines_next()",headlines_delay);
}

function headlines_init(){
	if (headlines.length==0)return;
	var hl_text = "";
	for (var i=0;i<headlines.length;i++){
		hl_text = hl_text + headlines[i] + "<br>";
	}

	document.write('<div style="height: 25px; overflow: hidden;" id="__headline">'+hl_text+'</div>');
	window.setTimeout("headlines_next()",headlines_delay);
}
headlines_init();
