<!--
if (document.getElementById){

	var vitesse=5000; //vitesse en millisecondes (5000 = 5 secondes)

	document.write('<style type="text/css">\n');
	document.write('.message{display:none;}\n');
	document.write('</style>\n');

	var actifMessage=0; // le message actif
	var totalMessages=0; // le nombre total de messages
	var tickerPlay; //référence au setTimeOut
	
	//tableau des liens moteurs
	/*moteurArray = [];
	moteurArray[0] = ["logo_google.gif","http://www.google.fr/search?hl=fr&q="];
	moteurArray[1] = ["logo_yahoo.gif","http://fr.search.yahoo.com/search?fr=fp-tab-web-t-1&ei=ISO-8859-1&p="];
	moteurArray[2] = ["logo_msn.gif","http://search.msn.fr/results.aspx?cp=1252&PI=9484&DI=81&FORM=MSNH&q="];*/

	// cache les messages
	function cacheMessages(){
		var compteur=0;
		while (document.getElementById("message"+compteur)){
			document.getElementById("message"+compteur).style.display="none";
			compteur++;
		}
	}

	//affiche le message courant
	function afficheMessage(){
		//le message courant
		var actifMessageObj=document.getElementById("message"+actifMessage);
		//cache tous les messages
		cacheMessages();
		//affiche le domaine avec son lien
		if(actifMessageObj.getAttribute("domaine") != ""){
			if(actifMessageObj.getAttribute("liendomaine") != ""){
				document.getElementById("domaine").innerHTML = "<a href='" + actifMessageObj.getAttribute("liendomaine") + "' target='_blank'>" + actifMessageObj.getAttribute("domaine") + "</a>";
			}else{
				document.getElementById("domaine").innerHTML = actifMessageObj.getAttribute("domaine");
			}
		}
		//affiche le moteur avec son lien
		if(actifMessageObj.getAttribute("moteur") != ""){
			//pour logo moteur
			//document.getElementById("moteur").innerHTML = "<a href='" + actifMessageObj.getAttribute("lienmoteur") + "' target='_blank'><img src='images/ticker/" + actifMessageObj.getAttribute("moteur") + "' name='ticker_moteur' width=80 height=30 id='ticker_moteur' border=0></a>";
			//pour le nom du moteur
			document.getElementById("moteur").innerHTML = "<a href='" + actifMessageObj.getAttribute("lienmoteur") + "' target='_blank'>" + actifMessageObj.getAttribute("moteur") + "</a>";
		}
		//affiche la position
		document.getElementById("pos").innerHTML = actifMessageObj.getAttribute("pos");
		//affiche les mots clés
		if(actifMessageObj.getAttribute("liendomaine") != ""){
			document.getElementById("motscles").innerHTML = "<a href='" + actifMessageObj.getAttribute("lienmoteur") + "' target='_blank'>" + actifMessageObj.getAttribute("motscles") + "</a>";
		}else{
			document.getElementById("motscles").innerHTML = actifMessageObj.getAttribute("motscles");
		}
		
		//active la visibilité du message
		//actifMessageObj.style.display="block";
		//le message suivant
		actifMessage=(actifMessage<totalMessages-1)? actifMessage+1 : 0;
		//fais tourner le ticker
		tickerPlay = setTimeout("afficheMessage()",vitesse);
	}

	//lance le ticker
	function startTicker(){
		if(tickerPlay == undefined || tickerPlay == 0){
			while (document.getElementById("message"+totalMessages)!=null){
				totalMessages++;
			}
			afficheMessage();
			//changement des boutons
			//document.getElementById("stopBt").src = "images/ticker/stop_off.gif";
			//document.getElementById("startBt").src = "images/ticker/start_on.gif";
		}
	}
	
	function stopTicker(){
		if(tickerPlay != 0){
			clearTimeout(tickerPlay);
			tickerPlay = 0;
			//document.getElementById("stopBt").src = "images/ticker/stop_on.gif";
			//document.getElementById("startBt").src = "images/ticker/start_off.gif";
		}
	}

	//enregistre l'event
	if (window.addEventListener){
		window.addEventListener("load", startTicker, false);
	}else if (window.attachEvent){
		window.attachEvent("onload", startTicker);
	}
	
}
//-->