/* Modified by Alex Muller <alexlmuller@googlemail.com>, originally created by Mr J <http://www.huntingground.net> from http://javascript.internet.com */

scrollStep=1

timerLeft=""
timerRight=""

var firstTimeRight = new Boolean(true);
var firstTimeLeft = new Boolean(true);

/* Right Arrow */
function scrollRightArrow(id) {
    if (firstTimeRight) {
        document.getElementById('scrollarrowright').src = 'http://bedouinfoundry.com/images/bedouin-arrow-right-selected.gif'
        firstTimeRight = false;
    }
    clearTimeout(timerRight)
    document.getElementById(id).scrollLeft+=scrollStep
    timerRight=setTimeout("scrollRightArrow('"+id+"')",10)
}

/* Left Arrow */
function scrollLeftArrow(id) {
    if (firstTimeLeft) {
        document.getElementById('scrollarrowleft').src = 'http://bedouinfoundry.com/images/bedouin-arrow-left-selected.gif'
        firstTimeLeft = false;
    }
    clearTimeout(timerLeft)
    document.getElementById(id).scrollLeft-=scrollStep
    timerLeft=setTimeout("scrollLeftArrow('"+id+"')",10)
}

function stopMe() {
    document.getElementById("scrollarrowleft").src = 'http://bedouinfoundry.com/images/bedouin-arrow-left.gif'
    document.getElementById("scrollarrowright").src = 'http://bedouinfoundry.com/images/bedouin-arrow-right.gif'
    firstTimeLeft = true;
    firstTimeRight = true;
    clearTimeout(timerRight) 
    clearTimeout(timerLeft)
}

