	
	/* ===== Déclaration des Variables ===== */
	/* On créé un tableau qui va contenir les id des objets scrolling afin de pouvoir en implémenter plusieurs par page */
	var tabInterv = new Array();
	
	/* ===== Methode d'Initialisation des Variables ===== */
	/* id : l'Id de la DIV de scrolling */
	/* valInterval : la valeur en mms de déclenchement de l'intervalle */
	/* valSpeed : la valeur en pixel de déplacement réalisé à chaque intervalle */
	/* pasScroll : la valeur en pixel de déplacement effectué par scroll */
	/* posScroll : la position en pixel dans le scroll */
	function Scrolling_init(id, valInterval, valSpeed, pasScroll, posScroll) {
		tabInterv[id] = new Array();
				
		tabInterv[id]['valInterval'] = valInterval;
		tabInterv[id]['speed'] = valSpeed;
		tabInterv[id]['pasScroll'] = pasScroll;
		tabInterv[id]['posScroll'] = posScroll;
		
		tabInterv[id]['idInterval'] = null;
	}
	
	/* ===== Methode de Set pour un Scrolling vers la Gauche ===== */
	/* id : l'Id de la DIV de scrolling */
	function Scrolling_setScrollLeft(id) {
		if (tabInterv[id] == undefined)	// Objet Scrolling non initialisé
			return false;
			
		if (tabInterv[id]['idInterval'] != null )	// Scrolling en cours
			return false;
		
		tabInterv[id]['valScroll'] = 0;
		tabInterv[id]['idInterval'] = setInterval(function(){Scrolling_scrollLeft(id);}, tabInterv[id]['valInterval']);
	}
	
	/* ===== Methode de Set pour un Scrolling vers la Droite ===== */
	/* id : l'Id de la DIV de scrolling */
	function Scrolling_setScrollRight(id) {
		if (tabInterv[id] == undefined)	// Objet Scrolling non initialisé
			return false;
			
		if (tabInterv[id]['idInterval'] != null )	// Scrolling en cours
			return false;
		
		tabInterv[id]['valScroll'] = 0;
		tabInterv[id]['idInterval'] = setInterval(function(){Scrolling_scrollRight(id);}, tabInterv[id]['valInterval']);
	}
	
	/* ===== Methode de Scroll vers la Gauche ===== */
	/* id : l'Id de la DIV de scrolling */
	function Scrolling_scrollLeft(id) {	
		var speed = tabInterv[id]['speed'];
		tabInterv[id]['valScroll'] += speed;
		
		if (tabInterv[id]['valScroll'] > tabInterv[id]['pasScroll']) { // Si on dépasse du pasScroll
			speed += tabInterv[id]['pasScroll'] - tabInterv[id]['valScroll'];
			tabInterv[id]['valScroll'] = tabInterv[id]['pasScroll'];
		}
		
		if (tabInterv[id]['posScroll'] - speed < 0) { // Si on dépasse de la div
			speed = tabInterv[id]['posScroll'];
			tabInterv[id]['valScroll'] = tabInterv[id]['pasScroll'];
		}
		
		/* On déplace le scroll */
		tabInterv[id]['posScroll'] -= speed;
		$(id).scrollLeft = tabInterv[id]['posScroll'];
		
		if (tabInterv[id]['valScroll'] == tabInterv[id]['pasScroll']) {	// On est au bout du scroll
			clearInterval(tabInterv[id]['idInterval']);
			tabInterv[id]['idInterval'] = null;
			return false;
		}
	}

	/* ===== Methode de Scroll vers la Droite ===== */
	/* id : l'Id de la DIV de scrolling */
	function Scrolling_scrollRight(id) {
		var speed = tabInterv[id]['speed'];
		tabInterv[id]['valScroll'] += speed;
		
		if (tabInterv[id]['valScroll'] > tabInterv[id]['pasScroll']) { // Si on dépasse du pasScroll
			speed += tabInterv[id]['pasScroll'] - tabInterv[id]['valScroll'];
			tabInterv[id]['valScroll'] = tabInterv[id]['pasScroll'];
		}
		
		if ((tabInterv[id]['posScroll'] + speed + $(id).getWidth()) > $(id).scrollWidth) { // Si on dépasse de la div
			speed = $(id).scrollWidth - $(id).getWidth() - tabInterv[id]['posScroll'];
			tabInterv[id]['valScroll'] = tabInterv[id]['pasScroll'];
		}
		
		/* On déplace le scroll */
		tabInterv[id]['posScroll'] += speed;
		$(id).scrollLeft = tabInterv[id]['posScroll'];
		
		if (tabInterv[id]['valScroll'] == tabInterv[id]['pasScroll']) {	// On est au bout du scroll
			clearInterval(tabInterv[id]['idInterval']);
			tabInterv[id]['idInterval'] = null;
			return false;
		}
	}