var box = new Array ();
var i = 0;

function boxAnimate () {
	if (box && box.length > 0) {
		if (i != box.length) {
			for (var j=0; j<box.length; j++)
				box[j].style.display = 'none';

			box[i].style.display = 'block';
			new Effect.Fade (box[i], {duration: 3, delay: 5});
			i+= 1;
		}
		else {
			i = 0;
			for (var j=0; j<box.length; j++)
				box[j].style.display = 'none';

			box[i].style.display = 'block';
		}
	}
	setTimeout ('boxAnimate ()', 7000);
}
function mainInit () {
	if ($('box')) {
		div = $('box').getElementsByTagName ('div');
		for (var i=0; i<div.length; i++) {
			box[i] = div[i];
			if (div[i].className == 'euro_2012_box') {
				div[i].onmouseover = function () {
					this.style.cursor = 'pointer';
				};
				div[i].onclick = function () {
					if (this.getElementsByTagName ('a').length > 0) {
						a = this.getElementsByTagName ('a');
						document.location.href = a[0].href;
					}
				};
			}
		}
		boxAnimate ();
	}
return false;
}
Onload (mainInit);