    var diaHeight = 280;
    // time to wait to move the next dif pixels
    var waitMov = 40;
    var dif = -1;

    // ms Text is waiting bevor scrolling
    var waitShow = 500;

    var textList = new Array();

    var walking = 1;
    
    var started = 0;

    var _newValue = 1;
    var _oldValue = 0;
    
    function newText() {
        _oldValue = _newValue;
        _newValue++;
        if (_newValue >= textList.length) {
            _newValue = 0;
        }
        document.getElementById("dia1").innerHTML = textList[_oldValue];
//      document.getElementById("dia1").style.backgroundColor = "red";
        window.setTimeout("fillNext()", 500);
    }
    function fillNext() {
        document.getElementById("dia1").style.marginTop = "0px";
        window.setTimeout("fillLast()", 500);
    }
    
    function fillLast() {
        document.getElementById("dia2").innerHTML = textList[_newValue];
        window.setTimeout("moveDia(0)", waitShow);
    }

    function startNewsticker() {
        document.getElementById("dia1").innerHTML = textList[0];
        document.getElementById("dia2").innerHTML = textList[1];
        window.setTimeout("moveDia(" + String(0) + ")", waitShow);
    }

    function moveDia(start) {
    
        if (walking == 1) {

            document.getElementById("dia1").style.marginTop = String(start) + "px";

            var newstart = start + dif;
            if (Math.abs(newstart) > diaHeight) {
    
                newText();

            } else {
                    window.setTimeout("moveDia(" + String(newstart) + ")", waitMov);
            }
        } else {
            window.setTimeout("moveDia(" + String(start) + ")", waitMov);
        }
    }
    
    function start() {
        walking = 1;
    }
    function stop() {
        walking = 0;
    }
    

