	nbNews 		 = 	0;
	visibleNews	 =	1;
	delayScroll  =	50;
	delayShow	 =	5000;
	height		 =	160;
	scrollAmount =	5;
	isScrolling	 = false;
	isPause	     = false;
	var timer;
	var pere;
	var newsA = new Array();
	
	function initScrolling(divId) {
		pere 	=  document.getElementById("news_content");
		
		// parcourir les enfant et ne prendre que ceux qui on comme id newsItem
		for (i=0; i < pere.childNodes.length; i++) {
			if ((pere.childNodes[i].id) && (pere.childNodes[i].id == "newsItem")) {
				newsA.push(i);
				nbNews++;
			}
		}

		// Lancer le scrolling apres avoir afficher la première news assez longtemp
		timer = setTimeout(function(){scrollTop(pere,height,delayShow,height)}, delayShow);
	}
	
	function scrollTop(elt,height,ms,originalHeight) {
		delay	=	delayScroll;
		isScrolling = true;
		
		elt.style.top = parseInt(elt.style.top)-scrollAmount +"px";
		
		height = height -scrollAmount;
		if (height <= 0) {
			isScrolling = false;
			delay=delayShow;
			height = originalHeight;
			visibleNews++;
			if (visibleNews >= nbNews) {
				newDiv = document.createElement("div");
				newDiv.id ="newsItem";
				newDiv.innerHTML = elt.childNodes[newsA[visibleNews % nbNews]].innerHTML;
				elt.appendChild(newDiv);
			}
		}
			
		timer = setTimeout(function(){scrollTop(elt,height,ms,originalHeight)}, delay);
	}
	
	function scrollBottom(elt,height,ms,originalHeight) {
		delay	=	delayScroll;
		isScrolling = true;
		elt.style.top = parseInt(elt.style.top)+scrollAmount +"px";
		height = height +scrollAmount;
		if (height >= originalHeight) {
			isScrolling = false;
			delay=delayShow;
			height = originalHeight;
			visibleNews--;
			timer = setTimeout(function(){scrollTop(elt,height,ms,originalHeight)}, delay);
		} else
			timer = setTimeout(function(){scrollBottom(elt,height,ms,originalHeight)}, delay);
	}
	
	function nextNews() {
		// Si en train de scroller, ne rien faire
		if (isScrolling)
			return;
		clearTimeout(timer);
		timer = setTimeout(function(){scrollTop(pere,height,delayScroll,height)}, delayScroll); 
	}

	function previousNews() {
		// Si en train de scroller, ne rien faire
		// Ne rien faire si on est sur la premiere news
		if ((isScrolling) || (visibleNews == 1))
			return;
		clearTimeout(timer);
		timer = setTimeout(function(){scrollBottom(pere,0,delayScroll,height)}, delayScroll); 
	}
	
	// Mettre en pause ou reprendre lecture
	function pause() {
		if (!isPause)
			clearTimeout(timer);
		else
			timer = setTimeout(function(){scrollTop(pere,height,delayScroll,height)}, delayScroll);
		isPause = !isPause;
	}
	
	if (window.addEventListener) //run onload in DOM2 browsers
		window.addEventListener("load", function(){initScrolling("news_content")}, false)
	else if (window.attachEvent) //run onload in IE5.5+
		window.attachEvent("onload", function(){initScrolling("news_content")})
	else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
		setTimeout(function(){initScrolling("news_content")}, 500)