/* load image array */
randImages = new Array( "animation_1.jpg", "animation_2.jpg", "animation_3.jpg", "animation_4.jpg",
	"animation_5.jpg", "animation_6.jpg", "animation_7.jpg", "animation_8.jpg", "animation_9.jpg",
	"animation_10.jpg", "animation_11.jpg", "animation_12.jpg", "animation_13.jpg", "animation_14.jpg", "animation_15.jpg", "animation_16.jpg");

/* generates a random number for the animation */
function animationRand()
{
	var result = 15;
	result = Math.random() * result;
	result = Math.round(result);
	return result;
}

/* animation function */
function animationRun(images)
{
	var choosen  = animationRand();
	var img_node = document.getElementById("animation");
	img_node.setAttribute("src", WEB_ROOT+IMAGES_URL+"animation/" + images[choosen]);
	window.setTimeout('animationRun(randImages)',5000);
}

Event.observe(window, 'load', function() { 
	animationRun(randImages); 
});