/***************************************************************************
 *                              highlights.js
 *                            -------------------
 *   codé le              : 9 Juillet 2008
 *   copyright            : Sylvain TRAN
 *   email                : webmestre@meph-development.com
 *
 *
 ***************************************************************************/





function timeout()
{
 
 show(id);

 id=id+1;
 if(id>=limit) { id=1; }
 setTimeout("timeout()",5000);
 
}

function show(id)
{	
	var x=1;
	
	while(x<limit) {
		if(x!=id) {
			document.getElementById(x).style.backgroundColor="#ffffff";
			document.getElementById(x).style.border="1px solid #bdbdbd";
		}
		x++;
	}
	var col=id-1;
	document.getElementById("high_link").href=valeur[col]["url"];
	document.getElementById("high_link").target=valeur[col]["target"];
	document.getElementById("high_image").src="/themes/default/images/highlights/"+ valeur[col]["image"];
	document.getElementById(id).style.backgroundColor="#d1d1d1";
	document.getElementById(id).style.border="1px solid #8a8a8a";

}

function onLoadHandler(){
timeout();
}
window.onLoad = onLoadHandler;
 