if(!console) {
	var console = {
		log: function() {}
	};
}

var AmeosRoller = {
	Objects: {
	}
};

AmeosRollerClass = Base.extend({
	k: 0,
	constructor: function(oConfig) {
		this.config = oConfig;
		console.log(this.config.html);
		this.k = 1;

		if(this.config.html[this.k+1]) {
			this.offScreenBuffer().innerHTML = this.config.html[this.k+1];
		} else {
			this.offScreenBuffer().innerHTML = this.config.html[this.k];
		}

		this.executer = new PeriodicalExecuter(
			this.spin.bind(this),
			this.config.interval || 5
		);
	},
	domNode: function() {
		return $(this.config.id);
	},
	offScreenBuffer: function() {
		return $(this.config.id + "OffScreenBuffer");
	},
	spin: function() {
		
		if(!this.config.html[this.k]) { this.k = 0;}
		console.log("ICI:", this.config.id, this.domNode(), this.offScreenBuffer(), this.offScreenBuffer().innerHTML);
		this.domNode().innerHTML = this.offScreenBuffer().innerHTML;
		this.offScreenBuffer().innerHTML = this.config.html[this.k++];
	}
});