document.observe("dom:loaded", function() {
  setTimeout("startRotation()",5000)
});
var x = 1;
var max = 16;

function startRotation()
{
	x = x + 1;
	
	if(x == (max + 1))
		x = 1;
	
	y = x - 1;
	
	if( y == 0)
		y = max;
		
	n = x + 1;
	if( n > max)
		n = 1;
		
	$('home' + y).style.zIndex = 6;
	$('home' + x).style.zIndex = 5;
	$('home' + y).fade();
	
	$('home' + n).style.display = "block";
	$('home' + n).style.zIndex = 4;
	
	setTimeout("startRotation()",5000)
}
