

var setTick0;
var setTick1;
var setTick2;
var setTick3;
var setTick4;
var changeItem;
var newsContent = new Array()
newsContent[0] = '<h2><a href="http://summitrtl.com/events/2010/sigad/resources.asp">2010 Signature Ad Campaign</a></h2><p>January 22 marks the tragic anniversary of Roe v. Wade, the day America made it legal to kill an unborn child.  It has become a tradition every January to remind our community that there are many Americans who have not accepted that court decision.  Through educational Signature Ads in local newspapers and radio spots, we will spread the message of the dignity and value of each God-given life.</p><p>The Signature Ad Campaign is a simple, yet effective event that promotes the Culture of Life in the local community. This year, Right to Life is bringing the powerful message of this campaign to the national level through a petition to Congress. Don&#39;t let your church or organization miss out on this opportunity!</p><p>Visit the <a href="http://summitrtl.com/events/2010/sigad/resources.asp">Signature Ad Campaign Resource page</a> for everything you need to run the event at your church.</p>';newsContent[1] = '<h2>Senate Approves Motion to Debate Health Care Bill With Massive Abortion Funding</h2><p>Washington, DC (LifeNews.com) -- With the bare minimum needed, Senate Democrats voted on Saturday night to begin the official debate and amendment process for a health care reform bill that allows for massive abortion funding. The measure sponsored by Senate leader Harry Reid could fund hundreds of thousands of abortions.</p><p>The vote split entirely on party lines with 60 Democrats voting to break the Republican filibuster supported by 39 party members in the Senate.</p><p><a href="http://summitrtl.com/government.asp#20">Click Here</a> to read more.</p>';newsContent[2] = '<h1>Become an Ambassador for Life!</h1><img src="/images/news_images/prolifebaby.jpg" alt="Pro-Life Baby" style="float: left; margin-right: 12px;"><p><br></p><p>During these trying times when legislation and the Enemy seem to be working against everything we stand for on LIFE issues, we must band together NOW more than ever in prayer and action. Please prayerfully consider a Call to Leadership by starting or joining a pro-life group at your Church.  Organizing groups and parishes who are involved with Right to Life is crucial to meeting our goal of unifying those seeking to defend life.  <a href="ambassadors.asp">Learn More</a></p>';newsContent[3] = '<div style="text-align: center;"><font style="color: #FF0000;" size="5">ALERT</font><br></div><div style="text-align: center;"><font size="4">ABORTION MILL REOPENS IN NEW LOCATION</font><br></div><br><font size="3">The abortion operation that was driven out of their new location in Green through the efforts of pro life community action has established itself within the borders of the city of Akron at 215 E. Waterloo Rd.</font><br><font size="3"><br>For more information and to learn what you can do, please visit our <a name="" target="" classname="" class="" href="/news/20081126_waterloo-facility.asp">action page</a></font><br><br><div style="text-align: center;"><img src="../images/news_images/act.jpg"><br></div>';

function initNewsbar()
{
	/* Select the First Tab */
	switchTab( 0 )
}

function switchTab( tabNum )
{
	var parent1 = document.getElementById("newsNav");
	var thisChild = parent1.firstChild;
	var count = 0;
	while( document.getElementById("news" + count ) )
	{
		document.getElementById("news" + count).style.background="url('images/newsbar/tab.jpg')";
		document.getElementById("news" + count).style.paddingTop="12px";
		document.getElementById("news" + count).style.height="49px";
		count++;
	}
	
	/* Reference Tab & Select It */
	var selTab = document.getElementById( "news" + tabNum );
	selTab.style.background="url('images/newsbar/tab_selected.jpg')";
	selTab.style.paddingTop="8px";
	selTab.style.height="54px";
	
	/* Update Content */
	var newsContentDiv = document.getElementById( "news" );
	newsContentDiv.innerHTML=newsContent[tabNum];
	
	/* Determine ID Number of next News Item */
	if( tabNum == count - 1 ) {
		next = 0;
	}
	else {
		next = tabNum + 1;
	}
	
	var timeFunction = "switchTab(" + next + ")";
	
	/* Create timeouts for ticker */
	tickAdv(0);
	setTick0 = window.setTimeout( "tickAdv(1)", 3000 );
	setTick1 = window.setTimeout( "tickAdv(2)", 6000 );
	setTick2 = window.setTimeout( "tickAdv(3)", 9000 );
	setTick3 = window.setTimeout( "tickAdv(4)", 12000 );
	setTick4 = window.setTimeout( "tickAdv(5)", 15000 );
	changeItem = window.setTimeout( timeFunction, 16000 );
}

function resetTicker()
{
	window.clearTimeout(setTick0)
	window.clearTimeout(setTick1)
	window.clearTimeout(setTick2)
	window.clearTimeout(setTick3)
	window.clearTimeout(setTick4)
	window.clearTimeout(changeItem)
}

function tickAdv( stage )
{
	/* Setup tickers DIV widths */
	var widths = new Array(5);
		widths[0] = "70px";
		widths[1] = "56px";
		widths[2] = "42px";
		widths[3] = "28px";
		widths[4] = "14px";
		widths[5] = "0px";
	
	/* Change DIV width, which will cause ticker to count down */
	var ticketDiv = document.getElementById( "ticker" );
	ticketDiv.style.width=( widths[stage] );
}

function displayTitle( title )
{
	var titleDiv = document.getElementById('newsTitle');
	titleDiv.style.visibility="visible";
	titleDiv.innerHTML=title;
}

function hideTitle()
{
	document.getElementById('newsTitle').style.visibility="hidden";
}