﻿// JavaScript Document

var t = 0;
var time;

function fnMoveUp(div, amm) {
    var divTop = document.getElementById(div).style.top;
    if (t > -860) {
        document.getElementById(div).style.top = t + "px";
        t = t - amm;
        time = window.setTimeout("fnMoveUp('scroll-area','2')", 50);
    } else {
        window.clearTimeout(time);
    }
}

function fnMoveDown(div, amm) {
    var divTop = document.getElementById(div).style.top;
    if (t < 0) {
        document.getElementById(div).style.top = t + "px";
        k = amm;
        k = Number(k);
        t = t + k;
        time = window.setTimeout("fnMoveDown('scroll-area','2')", 50);
    } else {
        window.clearTimeout(time);
    }
}

function stopani(ex) {
    if (ex == 'exit') {
        window.clearTimeout(time);
    }
}


