/* actions � faire au chargement des pages */
var menuSousThemeAffiche;
var couleurTitre;
var debutNewsTicker;
function onloadFunctions (){
	//setTimeout("stopDemain()",9000);
	
	/* Variable initialisation affichage du menu*/
	menuSousThemeAffiche = 0;
	
	/* Variables News Ticker */
	couleurTitre = 0;
	debutNewsTicker = 0;
}
window.onload=onloadFunctions;
window.onunload=function() {
jstoflash('unload');	
}

	


function fadeInText(paragraphId, couleur){ 
	//document.getElementById(paragraphId).style.display="block";
	if(couleur<255) { //If color is not white yet
		couleur+=11; // increase color darkness
		document.getElementById(paragraphId).style.color="rgb("+couleur+","+couleur+","+couleur+")";
		setTimeout("fadeInText('"+paragraphId+"', "+couleur+")",10); 
	}
	else couleur=0; //reset couleurTitre value
}
function printParagraph(i, nb) {
	document.getElementById("sampleTheme").innerHTML=theme[i];
	document.getElementById("sample").innerHTML=titre[i];

	fadeInText("sample"+i, 0);
	//document.getElementById("close").innerHTML="sample"+i;
	if(i<nb-1) i++;
	else i=0;
	//alert(i);
	setTimeout("printParagraph("+i+","+nb+")",7000); 
	
}

function initNewsTickers (nbNews){
	document.getElementById("sample0").style.color="rgb(0,0,0)";
	
	printParagraph(0, nbNews);
}









