//////////////////////////////////:
/////// news /////////////////////:
//////////////////////////////////:




var theCharacterTimeout = 20;
var theStoryTimeout     = 5000;
var theWidgetOne        =  "_";
var theWidgetTwo        =  "-";
var theWidgetNone       =  "";
var theLeadString       = "<span style='color:#1E68A7'>";
var theTailString	= " <\/span>";
var theBackgroundColor  = null;
var theForegroundColor  = "#1E68A7";
var theFontFamily       = "Arial, Helvetica, sans-serif";
var theFontSize         = "11px";
var theLineHeight       = "11px";
var theFontWeight       = "";
var theTextDecoration   = "none";
var theHoverColor       = "#1E68A7";
var theSummaries = new Array();
var theSiteLinks = new Array();
var theCountry = new Array();





theSummaries[0] = texte0;
theSiteLinks[0] = lien0;
theCountry[0] = titre0;
theSummaries[1] = texte1;
theSiteLinks[1] = lien1;
theCountry[1] = titre1;
theSummaries[2] = texte2;
theSiteLinks[2] = lien2;
theCountry[2] = titre2;
theSummaries[3] = texte3;
theSiteLinks[3] = lien3;
theCountry[3] = titre3;
theSummaries[4] = texte4;
theSiteLinks[4] = lien4;
theCountry[4] = titre4;
theSummaries[5] = texte5;
theSiteLinks[5] = lien5;
theCountry[5] = titre5;




	function buildSpaceFiller(aCount) {
		var myResult = "";
		for(var ii=0; ii<aCount; ii++) {
			myResult = myResult + "  ";
		}
		return myResult;
	}
	
	function whatWidget() {
		if(theCurrentLength == theStorySummary.length) {
			return theWidgetNone;
		}
	
		if((theCurrentLength % 2) == 1) {
			return theWidgetOne;
		} else {
			return theWidgetTwo;
		}
	}
	
	function startTicker() {
		// Define run time values
		theCurrentStory = -1;
		theCurrentLength	= 0;
		theSpaceFiller	= buildSpaceFiller(200);

		// Locate base objects
		theAnchorObject	  = document.getElementById("Anchor");

		// Locate style sheet objects
		theStyleSheet = document.styleSheets[0];

		// Fix the missing cssRules property for MSIE
		if(!theStyleSheet.cssRules) {
			theStyleSheet.cssRules = theStyleSheet.rules;
		}
	
		// Locate the style objects we want to modify
		theBodyStyle	= document.body.style;
		theAnchorStyle = theStyleSheet.cssRules[0].style;
		theHoverStyle  = theStyleSheet.cssRules[1].style;

		// Apply data driven style changes			 
/*		theBodyStyle.backgroundColor = theBackgroundColor;

		theAnchorStyle.color = theForegroundColor;
		theAnchorStyle.fontFamily = theFontFamily;			 
		theAnchorStyle.fontSize = theFontSize;			 
		theAnchorStyle.lineHeight = theLineHeight;			 
		theAnchorStyle.fontWeight = theFontWeight;			 
		theAnchorStyle.textDecoration = theTextDecoration;			 

		theHoverStyle.color = theHoverColor;
*/
		// Fire up the ticker
		runTheTicker();
	}

	function runTheTicker()
	{
		var myTimeout;

		// Go for the next story data block
		if(theCurrentLength == 0)
		{
			theCurrentStory++;
			theCurrentStory = theCurrentStory % theItemCount;
			theCurrentCountry = theCountry[theCurrentStory]
			theStorySummary	 = theSummaries[theCurrentStory];
			theTargetLink = theSiteLinks[theCurrentStory];
			theAnchorObject.href = theTargetLink;
		}

		// Stuff the current ticker text into the anchor
		theAnchorObject.innerHTML = theLeadString + theCurrentCountry  + theTailString + theStorySummary.substring(0,theCurrentLength) + whatWidget() + theSpaceFiller;

		// Modify the length for the substring and define the timer
		if(theCurrentLength != theStorySummary.length) {
			theCurrentLength++;
			myTimeout = theCharacterTimeout;
		} else {
			theCurrentLength = 0;
			myTimeout = theStoryTimeout;
		}

		// Call up the next cycle of the ticker
		setTimeout("runTheTicker()", myTimeout);
	}

