var lineCounter 			= new Array();
var linePosition 			= new Array();
var visibleLines			= 2;
var scrollY					= 113;

function themeScroll(themeId, direction) {
    upButton				= document.getElementById('scrollup' + themeId).style;
    downButton				= document.getElementById('scrolldown' + themeId).style;
    upButton.display		= 'none';
    downButton.display		= 'none';

    direction				= (direction == 'up') ? 'up' : 'down';
    animation				= eval('myAnim' + themeId);
    if (direction == 'up') {
        animation.attributes.scroll = { by: [0, -scrollY] };
        positionAdjuster	= -1;
    } else {
        animation.attributes.scroll = { by: [0, scrollY] };
        positionAdjuster	= 1;
    }

    animation.animate();
    linePosition[themeId]	= (linePosition[themeId]) ? linePosition[themeId] + positionAdjuster : 1;

    if (linePosition[themeId] > 0) {
        upButton.display	= 'block';
    } else {
        upButton.display	= 'none';
    }

    if (linePosition[themeId] < (lineCounter[themeId] - visibleLines)) {
        downButton.display	= 'block';
    } else {
        downButton.display	= 'none';
    }


}
