/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */



var counter = 0;
var counterFavorites = 0;

function slideUp(numberOfEvents){
    counter--;
    if(counter == 0){
          $("#btnSlideLeftTop").hide(0);
          $("#btnSlideLeftBtm").hide(0);
        }
        if(counter <= numberOfEvents/7){
            $("#btnSlideRightTop").show(0);
            $("#btnSlideRightBtm").show(0);
        }

      $("#scrollable").animate({
        top:"+=670px"


      }, 1000 );


}

function slideDown(numberOfEvents){
        counter++;
        if(counter == 1){
            $("#btnSlideLeftTop").show(0);
            $("#btnSlideLeftBtm").show(0);
        }
        if(counter >= Math.round(numberOfEvents/7)-1){
            $("#btnSlideRightTop").hide(0);
            $("#btnSlideRightBtm").hide(0);
        }
      $("#scrollable").animate({
        top:"-=670px"


      }, 1000 );


}

function functionLoad(){
    document.getElementById('login3').focus();
    setTimeout('switchFavorites()', 5000);
}

function switchFavorites(){
    counterFavorites++;
    if(counterFavorites==5){
        counterFavorites=0;
       $("#scrollableFavorites").animate({
        left:"0px"
      }, 0 );
    }
    $("#scrollableFavorites").animate({
        left:"-=337px"
      }, 1000 );
    setTimeout('switchFavorites()', 7000);
}

function slideFavoritesUp(){
        counterFavorites++;
    if(counterFavorites==5){
        counterFavorites=0;
       $("#scrollableFavorites").animate({
        left:"0px"
      }, 0 );
    }
    $("#scrollableFavorites").animate({
        left:"-=337px"
      }, 1000 );
}

function slideFavoritesDown(){
            counterFavorites--;
    if(counterFavorites==-1){
        counterFavorites=4;
       $("#scrollableFavorites").animate({
        left:"-2022px"
      }, 0 );
    }
    $("#scrollableFavorites").animate({
        left:"+=337px"
      }, 1000 );
}
