// Variables
var timeout;
var scrolling = 0;

// FONCTION POUR SCROLLER VERS LE HAUT
function scrollToTop(longScroll) {

	if (longScroll == true) {
		document.getElementById('fildep').stop();
		document.getElementById('fildep').direction='up';
		document.getElementById('fildep').start();
	} else {
                document.getElementById('fildep').stop();
                document.getElementById('fildep').direction='up';
                document.getElementById('fildep').start();
	}

}

// FONCTION POUR SCROLLER VERS LE BAS
function scrollBottom(longScroll) {

        if (longScroll == true) {
                document.getElementById('fildep').stop();
                document.getElementById('fildep').direction='down';
                document.getElementById('fildep').start();
        } else {
                document.getElementById('fildep').stop();
                document.getElementById('fildep').direction='up';
                document.getElementById('fildep').start();
        }

}

// GESTION DES EVENEMENTS SOURIE
function scroll() {
	if (document.getElementById("up")) {
		document.getElementById("up").onmouseover = function() {scrollToTop(true);};
		document.getElementById("up").onmouseout = function() {scrollToTop(false); clearTimeout(timeout);};
	}

	if (document.getElementById("down")) {
		document.getElementById("down").onmouseover = function() {scrollBottom(true);};
		document.getElementById("down").onmouseout = function() {scrollBottom(false); clearTimeout(timeout);};
	}
}
