// JavaScript Document

// Options you can change
var div_ids = ['rotating_article1','rotating_article2','rotating_article3']; // id's of the divs to rotate
var intvl = 8000; // time between rotations in milliseconds
 
// The function that does the rotation, the timer will pass the array
function rotate_headlines(ids) {
	var divs = new Array();
	for(var i=0; i<ids.length; i++) {

		divs[divs.length] = document.getElementById(ids[i]);

	}

	for(var i=0; i<divs.length; i++) {

		if(divs[i].style.display == 'block') {

			divs[i].style.display = 'none';

			divs[(i != (divs.length-1)) ? ++i : 0].style.display = 'block';

		}

	}

}



// the timer, you can kill the timer with 'clearInterval(timer)'

timer = setInterval('rotate_headlines(div_ids)',intvl);
