// Inspired by and adapted from http://news.bbc.co.uk

function getInfo(index,type)
{
	var NEWS = new Array();
	var LINK = new Array();
	
	NEWS[0] = "Haley's Blog on the Bioethics Debate";
	LINK[0] = "http://www6.miami.edu/studorgs/ethics/haleysblog.html";
	NEWS[1] = "CaneFest Photos, now available";
	LINK[1] = "http://www6.miami.edu/studorgs/ethics/ethicsgallery.html";
	
	
      // following links are NEWS[1]
      //   then               LINK[1]  
      // etc...
	
	
	if( type == "news" )
	{  return NEWS[index];  }
	else if( type == "link" )
	{  return LINK[index];  }
	else
	{  return NEWS.length;  }
}

function getNewsTimeOut()
{
	var timeOut = 5000;
	return timeOut;
}

function runNewsTicker(index)
{
	document.getElementById('news_ticker').innerHTML = '<a href="' + getInfo(index,"link") + '" class="news_link">' + getInfo(index,"news") + '</a>';
	index++;
	if( index == getInfo(index,'') )
	{  index = 0;  }
	setTimeout("runNewsTicker("+index+")", getNewsTimeOut());
}