function ctRotator(list){
  this.cursor = 0;
  this.list = list;
}

ctRotator.prototype = {
  
  gotoNext:function(){
    if(this.cursor >= this.getCount() - 1){ 
      this.cursor = 0;
    }else{
      this.cursor++;
    }
    return this.list[this.cursor];
  },

  getCount:function(){
    return this.list.length;
  }
}; 