
function clsTicker(Sections, SectionLinks, Summaries, Links, SectionAnchorID, AnchorID) {
	var theCharacterTimeout = 50;
	var theStoryTimeout     = 5000;
	var theWidgetOne        = "_";
	var theWidgetTwo        = "-";
	var theWidgetNone       = "";
	var theLeadString       = "";
	var theSectionNames		= new Array();
	var theSectionSiteLinks	= new Array();
	var theSummaries 		= new Array();
	var theSiteLinks 		= new Array();
	var strSectionAnchorID=SectionAnchorID
	var strID=AnchorID
	theSections=Sections
	theSectionLinks=SectionLinks
	theSummaries=Summaries
	theSiteLinks=Links
	me=this
	
	this.startTicker=function() {
			theCurrentStory     = -1;
			theCurrentLength    = 0;
			if (document.getElementById) {	
					theAnchorObject     = document.getElementById(strID);
					theSectionAnchorObject     = document.getElementById(strSectionAnchorID);
					me.runTheTicker();   	
				}
			else {
					document.write("<style>.ticki{display:none;}.ticko{border:0px; padding:0px;}<\/style>");
					return true;
			}	
	}
	
	this.runTheTicker=function () {
		var myTimeout; 
		if (!theSummaries.length) return;
		if(theCurrentLength == 0)
		{
			theCurrentStory++;
			theCurrentStory      = theCurrentStory % theSummaries.length;
			theStorySummary      = theSummaries[theCurrentStory].replace(/&quot;/g,'"');		
			theTargetLink        = theSiteLinks[theCurrentStory];
			theAnchorObject.href = theTargetLink;
			theAnchorObject.onclick=function () {RedirectTo(theTargetLink)};
			
			theSectionName      = theSections[theCurrentStory].replace(/&quot;/g,'"');		
			theSectionTargetLink        = theSectionLinks[theCurrentStory];
			theSectionAnchorObject.href = theSectionTargetLink;
			theSectionAnchorObject.onclick=function () {RedirectTo(theSectionTargetLink)};
			
			thePrefix 	     = "<span class=\"tickls\">" + theLeadString + "<\/span>";
		}
		
		theSectionAnchorObject.innerHTML = theSectionName
		
		theAnchorObject.innerHTML = thePrefix + 
		theStorySummary.substring(0,theCurrentLength) + me.whatWidget();

		if(theCurrentLength != theStorySummary.length)
		{
			theCurrentLength++;
			myTimeout = theCharacterTimeout;
		}
		else
		{
			theCurrentLength = 0;
			myTimeout = theStoryTimeout;
		}

		setTimeout(me.runTheTicker, myTimeout);		
	} 
	
	this.whatWidget=function() {
			if(theCurrentLength == theStorySummary.length) return theWidgetNone;
			if((theCurrentLength % 2) == 1) return theWidgetOne;
			return theWidgetTwo;
	}
}

function RedirectTo(strURL) {
	if (window.parent) {
		if (window.parent.navigate) {
			window.parent.navigate(strURL)
		}
		if (window.location)	 {
			window.parent.location=strURL
		}	
	}
}

