var mySpeed = 2;
var initScroll = 0;


function andDoNothing(){

}


function andEndScroll(){
    initScroll = 0;
}

function andTextScroll(direction){
    
    var myContainer = document.getElementById('containerText');
    var myScroller = document.getElementById('scrollerText');
    var posOrig = myScroller.style.top;
    
    if(posOrig == '' ){
        posOrig = 0;
    }
    else{
        posOrig = parseInt(posOrig);
    }
    
    posOrig -= mySpeed * direction;
    
    if(posOrig > 0){
        initScroll = 0;
    }
    else{
        //alert( (myContainer.offsetHeight - myScroller.offsetHeight) * -1);
        if(myContainer.offsetHeight < myScroller.offsetHeight && posOrig > ((myScroller.offsetHeight - myContainer.offsetHeight  ) * -1) ){
            myScroller.style.top = posOrig + "px";
            if(initScroll){
                setTimeout("andTextScroll(" + direction + ")",20);
            }
        }
    }
    
}

function andDoScroll(direction){
    initScroll = 1;   
    andTextScroll(direction);
    
}




