var currentImage = 0;
var totalImages = 9;
var viewSize = 4;

function moveToPrevious()
{
    if(currentImage > 0)
    {
        new Effect.Move('slideshow', { x: 70, y: 0, transition: Effect.Transitions.sinoidal });
        currentImage--;
    }
}  

function moveToNext()
{
    if(currentImage < totalImages-viewSize)
    {
        new Effect.Move('slideshow', { x: -70, y: 0, transition: Effect.Transitions.sinoidal });
        currentImage++;
    }
}