var featuredProductsPosition = 0;
var featuredProductsLock = false;
var featuredSellersPosition = 0;
var featuredSellersLock = false;
function flashButtonClick(category, action){
    pageTracker._trackEvent(category, action, 'ShopWatchbuy.com Video');
}
function featuredProductsRight(){
    if(featuredProductsPosition == 0){
        $('featuredProductLeftArrow').src = 'public/images/design/right_arrow.jpg'
    }
    if (featuredProductsPosition < 16) {
        if (!featuredProductsLock) {
            featuredProductsLock = true;
            var obj = $('featuredProductsList');
            var move = new Effect.Move(obj, {
                x: -460,
                y: 0,
                mode: 'relative',
                afterFinish : function(){
                    featuredProductsLock = false;
                }
            });
            featuredProductsPosition = featuredProductsPosition + 4;
        }
    }
    else{
        $('featuredProductRightArrow').src = 'public/images/design/left_arrow_gray.png'
    }
}
function featuredProductsLeft(){
    if(featuredProductsPosition == 16){
        $('featuredProductRightArrow').src = 'public/images/design/left_arrow.jpg'
    }
    if (featuredProductsPosition > 0) {
        if (!featuredProductsLock) {
            featuredProductsLock = true;
            var obj = $('featuredProductsList');
            var move = new Effect.Move(obj, {
                x: +460,
                y: 0,
                mode: 'relative',
                afterFinish : function(){
                    featuredProductsLock = false;
                }
            });
            featuredProductsPosition = featuredProductsPosition - 4;
        }
    }
    else{
        $('featuredProductLeftArrow').src = 'public/images/design/right_arrow_gray.png'
    }
}
function featuredSellersRight(){
    if(featuredSellersPosition == 0){
        $('featuredSellersLeftArrow').src = 'public/images/design/right_arrow.jpg'
    }
    if (featuredSellersPosition < 10) {
        if (!featuredSellersLock) {
            featuredSellersLock = true;
            var obj = $('featuredSellersList');
            var move = new Effect.Move(obj, {
                x: -440,
                y: 0,
                mode: 'relative',
                afterFinish : function(){
                    featuredSellersLock = false;
                }
            });
            featuredSellersPosition = featuredSellersPosition + 2;
        }
    }
    else{
        $('featuredSellersRightArrow').src = 'public/images/design/left_arrow_gray.png'
    }
}
function featuredSellersLeft(){
    if(featuredSellersPosition == 10){
        $('featuredSellersRightArrow').src = 'public/images/design/left_arrow.jpg'
    }
    if (featuredSellersPosition > 0) {
        if (!featuredSellersLock) {
            featuredSellersLock = true;
            var obj = $('featuredSellersList');
            var move = new Effect.Move(obj, {
                x: +440,
                y: 0,
                mode: 'relative',
                afterFinish : function(){
                    featuredSellersLock = false;
                }
            });
            featuredSellersPosition = featuredSellersPosition - 2;
        }
    }
    else{
        $('featuredSellersLeftArrow').src = 'public/images/design/right_arrow_gray.png'
    }
}
