function startTicker()
{
	theCurrentStory     = -1;
	theCurrentLength    = 0;
	theItemCount = theNewsTitles.length;
	theTickerSpan = document.getElementById("tickerSpan");
	
	runTheTicker();
}

function runTheTicker()
{
	var myTimeout;  
	
	if(theCurrentLength == 0)
	{
		theCurrentStory++;
		theCurrentStory = theCurrentStory % theItemCount;
		theNewsTitle = theNewsTitles[theCurrentStory].replace(/&quot;/g,'"');
          theTickerObjectToUse = theTickerSpan;
	}

    if (theNewsTitle.charAt(theCurrentLength) == '<') 
    {
        while (theNewsTitle.charAt(theCurrentLength) != '>' && theCurrentLength < theNewsTitle.length) 
            theCurrentLength++;
    }

    theTickerObjectToUse.innerHTML = theNewsTitle.substring(0,theCurrentLength);
	
	if(theCurrentLength != theNewsTitle.length)
	{
		theCurrentLength++;
		myTimeout = theCharacterTimeout;
	}
	else
	{
		theCurrentLength = 0;
		myTimeout = theStoryTimeout;
	}

	setTimeout("runTheTicker()", myTimeout);
}

var theCharacterTimeout = 40;
var theStoryTimeout     = 12000;

var theNewsTitles = new Array();

