// ----------------------
function addLoadEvent ( oFunction ) 
{
	// DOM2
	if ( typeof window.addEventListener != "undefined" )
		window.addEventListener( "load", oFunction, false );
	// IE 
	else if ( typeof window.attachEvent != "undefined" ) 
		window.attachEvent( "onload", oFunction );
	else 
	{
		if ( window.onload != null ) 
		{
			var oldOnload = window.onload;
			window.onload = function ( e ) 
			{
				oldOnload( e );
				oFunction();
			};
		}
		else 
			window.onload = oFunction;
	}
}

/* ------------- 
* Accueil AVIS
*/
function defileAvisClientele(id)  
{
	if(!id || ARRAY_AVIS.length-1 < id || typeof id == "object") 
		id = 0;
		
	var avis 		= document.getElementById("avis");
	var logo 		= document.getElementById("avis_logo");
	var citation 	= document.getElementById("avis_citation");
	var auteur 		= document.getElementById("avis_auteur");
	
	if( avis.filters ) avis.filters[0].apply();
	
	logo.src 			= "img/index/logo_avis/" + ARRAY_AVIS[id].logo + ".gif";
	citation.innerHTML 	= ARRAY_AVIS[id].citation;
	auteur.innerHTML 	= ARRAY_AVIS[id].auteur;
	
	if( avis.filters ) avis.filters[0].play();
	
	setTimeout("defileAvisClientele("+(id+1)+")", 8000);
}