var currentRC = 1;
var maxCountRC = 8;
var shouldDisplay = true;
var tempId;
function showNextRC(){
  if(currentRC<maxCountRC){
    showRC(currentRC+1);
  }else{
    showRC(1);
  }
}
function showPrevRC(){
  if(currentRC>1){
    showRC(currentRC-1);
  }else{
    showRC(maxCountRC);
  }
}
function displayNext(){
  $("#rcimg"+tempId).animate({opacity:1},100);
}
function showRC(id){
    if(currentRC != id){
      tempId = id;
       $("#rcimg"+currentRC).animate({opacity:0},100,function(){
        setTimeout("displayNext()",1000);
      });
      currentRC = id;
            
    }
}
function continueSlideShowRC(){
  if(shouldDisplay){
    showNextRC();
    setTimeout("continueSlideShowRC()",4000);
  }  
}
setTimeout("continueSlideShowRC()",4000);
