// JavaScript Document

// Options you can change
var img_ids = ['rotating_picture1','rotating_picture2','rotating_picture3','rotating_picture4']; // 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_images(ids) {
	var imgs = new Array();
	for(var i=0; i<ids.length; i++) {

		imgs[imgs.length] = document.getElementById(ids[i]);

	}

	for(var i=0; i<imgs.length; i++) {

		if(imgs[i].style.display == 'block') {

			imgs[i].style.display = 'none';

			imgs[(i != (imgs.length-1)) ? ++i : 0].style.display = 'block';

		}

	}

}


// the timer, you can kill the timer with 'clearInterval(timer)'
timer = setInterval('rotate_images(img_ids)',intvl);
