var scrolltimer;
function initScroll(BlockId, speedScroll,scrollSens) {
 //scrollSens : sens du scrolling, par défaut c'est vertical
 scrollSens = scrollSens.toLowerCase();
 scrollSens = (((scrollSens!="v" ) && (scrollSens!="h" )) || (scrollSens=="" )) ? "v" : scrollSens;
 var MonObjet = document.getElementById(BlockId);
 var HTML = MonObjet.innerHTML;
 MonObjet.innerHTML = "";
 var MonDiv = document.createElement("DIV" );
 MonDiv.style.border = "none";
 MonDiv.style.backgroundColor = "transparent";
 //Selon le sens du scroll, on utilise les marges de droite ou de gauche
 if (scrollSens=="v" ) {
 	MonDiv.style.marginTop = MonObjet.clientHeight + "px";
 	MonDiv.style.marginBottom = MonObjet.clientHeight + "px";
 	MonDiv.style.marginLeft = "0";
 	MonDiv.style.marginRight = "0";
 	MonDiv.style.width = MonObjet.clientWidth + "px";
 }
 else {
 	MonDiv.style.marginTop = "0";
 	MonDiv.style.marginBottom= "0";
 	MonDiv.style.marginLeft = MonObjet.clientWidth + "px";
 	MonDiv.style.marginRight = MonObjet.clientWidth + "px";
 	MonDiv.style.height = MonObjet.clientHeight + "px";
 	MonDiv.style.whiteSpace = "nowrap";
 }
 MonDiv.innerHTML = HTML;
 MonObjet.appendChild(MonDiv);
 MonObjet.onmouseover = function(){
 	clearTimeout(scrolltimer);
 	scrollBlock(BlockId,speedScroll*4,scrollSens);
 }
 MonObjet.onmouseout = function(){
 	clearTimeout(scrolltimer);
 	scrollBlock(BlockId,speedScroll,scrollSens);
 }
 scrollBlock(BlockId,speedScroll,scrollSens);
}
function scrollBlock(BlockId,speedScroll,scrollSens){
 speedincrement = 1;
 var monObjet = document.getElementById(BlockId)
 if (speedScroll=='' | speedScroll==null | speedScroll <= 0) speedScroll = 40;
 //ScrollTop = ScrollTop + speed;
 if (scrollSens=="v" ) {
 	monObjet.scrollTop = monObjet.scrollTop + speedincrement;
 	if (monObjet.scrollTop >= monObjet.scrollHeight-monObjet.clientHeight) monObjet.scrollTop = 1;
 }
 else {
 	monObjet.scrollLeft = monObjet.scrollLeft + speedincrement;
 	if (monObjet.scrollLeft >= monObjet.scrollWidth-monObjet.clientWidth) monObjet.scrollLeft = 1;
 }
 scrolltimer = setTimeout("scrollBlock('"+ BlockId + "'," + speedScroll + ",'" + scrollSens + "')", speedScroll);
}
//C'est ici que tu initialise la fonction
//initScroll('identifiantdemonobjet',vitesse); Vitesse est le temps en millisecond qu'il faut attendre pour avancer d'un pixel;
window.onload = function(){
 initScroll('blocktoscroll2',10,"h" );
}
