		var scrollActive=false;
function thumbOnDrag(e, mdx, mdy) {
  var newY = xTop(e) + mdy;
  //window.status=xTop(e) + " " + mdy;
  var heightThumb = xHeight(xParent(e)) - xHeight(e) - 3;
  if (newY >= 1 && newY < heightThumb) {
	scroll(e, newY,heightThumb);
  }
	else {
		if(newY >= heightThumb)
				scroll(e, heightThumb ,heightThumb);
		else
			if(newY <= 0)
				scroll(e, 0,heightThumb);
	}
}
function scroll(e,newY,heightThumb) {

	if(newY == 0)
		xTop(e, 1);
	else
		xTop(e, newY);


	var text = xGetElementById('text'+e.id.substr(5));
    /*var lc = xGetElementById('firstLeftContent'+e.thumb);
    

    var heightText = xHeight(text)- xHeight('Conteneur'+e.thumb) +10;
	var topPix = 100 * newY / heightThumb;
	text.style.bottom=topPix/100*heightText+'px';*/
	text.style.bottom=(newY*xHeight(text)/xHeight('Conteneur'+e.id.substr(5)))+'px';
}
function activeScroll(num,thumb)
{	
	if(scrollActive)
		{thumbOnDrag(xGetElementById(thumb), 0,num);
		setTimeout('activeScroll('+num+',\''+thumb+'\')',100);
		}
}
function stopScroll()
{
	scrollActive=false;
}
//MouseWheel
function scrollWhell(thumb){   
	if(event.wheelDelta >= 120) {
		scrollActive=true;
		activeScroll(-10,thumb);
		stopScroll();
	 }
	else if(event.wheelDelta <=-120) {
		scrollActive=true;
		activeScroll(10,thumb);
		stopScroll();
		
	}
}