
var movedownvar = setTimeout('',1);
var moveupvar = setTimeout('',1);

function move_down(div_scroll)
{
    stop = document.getElementById(div_scroll).scrollHeight - document.getElementById(div_scroll).clientHeight;
    //alert(((document.getElementById(div_scroll).scrollHeight - document.getElementById(div_scroll).clientHeight) / 100) * 60);
    //alert(document.getElementById(div_scroll).scrollTop);
    //alert(((document.getElementById(div_scroll).scrollHeight / 100) * (document.getElementById(div_scroll).scrollTop)));
    //scroll_ral = (stop / 100) * 80;
    //if (scroll_ral > (document.getElementById(div_scroll).scrollTop)) {
        speed = 5
    //} else {
    //    speed = 3
        //alert(speed);
    //}
    
    if(stop > document.getElementById(div_scroll).scrollTop){
        document.getElementById(div_scroll).scrollTop += speed
        movedownvar = setTimeout("move_down('"+div_scroll+"')",50);
    }
}

function move_up(div_scroll)
{
speed = 5
if ((document.getElementById(div_scroll).scrollTop-speed) >= 0){
    document.getElementById(div_scroll).scrollTop -= speed
    moveupvar = setTimeout("move_up('"+div_scroll+"')",50);
}else{
    document.getElementById(div_scroll).scrollTop = 0
}
}
