function DivRotator(cycle_divs, cycle_time){

	this._cycle_time = cycle_time;

	this._cycle_divs = cycle_divs;

	this._num_divs   = cycle_divs.length;

	this._timer = null;

	this._cycle_index = 0;



	for(var i = 0; i < this._cycle_divs.length; i++)

	{

		this._cycle_divs[i] = $(this._cycle_divs[i]);

		this._cycle_divs[i].style.display = "none";

	}



	// show first one

	this._cycle_divs[0].style.display = "block";

}



DivRotator.prototype.next = function() {

	var current_index = this._cycle_index;

	var next_index    = (current_index + 1) % this._num_divs;

	

	var current_div   = this._cycle_divs[current_index];

	var next_div      = this._cycle_divs[next_index];

	

	current_div.style.display = "none";

	next_div.style.display = "block";



	this._cycle_index = next_index;

}



