	/****  Gestion du champ de recherche ****/
	
	var gestRecherche = function(){
		$('#cs_search').val('') ;
	}
	
	
	/****  ACTUS DEFILANTES ****/
	
	var count_actu; // nb total d'actu
	var actu_interval; // timer pour faire defiler les actus
	var value_interval = 5000; // duree du timer
	var old_actu = 0; // numero de l'actu precedente
	var current_actu = 0; // numero de l'actu courante
	var isAnimate = false; 
	var isTest = false; 
	 
	/**
	*	initialise le defilement des actus : timer plus affichage de la premiere actu
	*/ 
	var initActu = function(){
		count_actu = $(".cs_une_actu").size();
		if(count_actu > 1){
			$(".cs_une_actu:eq("+current_actu+")").css('top','0px');
			actu_interval = setInterval(change_actu,value_interval);
			$('#cs_cadre_actu').hover(stopScrollActu, startScrollActu);
		}
	};
	
	/**
	*	affiche une actu ( masque l'actu déja presente )
	*/
	var change_actu = function() {
		isAnimate = true;
		current_actu = (old_actu + 1) % count_actu; 
		$(".cs_une_actu:eq(" + old_actu + ")").animate({top: -150},"medium", nextActu);
		updatepagination();		
	};
	
	var stopScrollActu = function(){
		clearInterval(actu_interval);
	}
	var startScrollActu = function(){
		actu_interval = setInterval(change_actu,value_interval);
	}
	var endAnimate = function(){
		isAnimate = false;
	} 
	var nextActu = function(){
		$(".cs_une_actu:eq(" + current_actu + ")").show().animate({top: 0},"medium",endAnimate);  
		$(this).css('top','120px');
	}
	var updatepagination = function(){
		$(".actu_num:eq(" + old_actu + ")").removeClass("actu_selected");  
		$(".actu_num:eq(" + current_actu + ")").addClass("actu_selected");  
		old_actu = current_actu;
	}
	
	var showActu = function( indice ){
		stopScrollActu();
		if( isAnimate || $(".actu_num:eq(" + indice + ")").hasClass("actu_selected") ) return;
		isAnimate = true;
		current_actu = indice; 
		$(".cs_une_actu:eq(" + old_actu + ")").animate({top: -150},"medium", nextActu);
		updatepagination();
	}
	
	var initCsPage = function(){
		initActu();
		$('#cs_search').focus(gestRecherche) ;
	}
	$(initCsPage);
	
	/****  MENU FLOTTANT ****/
	var d = null;
	var delais = 500;
	var timeOut = null;
	function montre(id) {
		annulerCache();
		if (d) {d.style.display='none';}
		d = document.getElementById(id);
		if (d) {d.style.display='block';}
	}
	function cacheDelais(id){
		timeOut = setTimeout('cacheMenu()', delais);
	}
	function cacheMenu(){
		if (d) {d.style.display='none';}
	}
	function annulerCache(){
		if(timeOut){
			clearTimeout(timeOut);
		}
	}
	function clear_hover(html_obj, indice){
		html_obj.className = 'niv'+indice ;
	}
	function set_hover(html_obj, indice){
		html_obj.className = 'niv'+indice+'_on' ;
	}
	function clic_hover(html_obj){
		table_html_a = html_obj.getElementsByTagName("a");
		window.location.replace(table_html_a[0].getAttribute("href"));
	}