
var i=1;
var int;
var old=-1;

function rotate (spec) {
	if (spec!=null) {
		i=spec;
		control (0);
	};

	if (old!=-1) document.getElementById (old).style.display = 'none';
	else document.getElementById (1).style.display = 'none';
	
	document.getElementById (i).style.display = 'block';
	old=i;
	i++;
	
	if (i>ile) i=1;
};

function control (op) {
	if (!op) {
		document.getElementById ('stop').style.display = 'none';
		document.getElementById ('play').style.display = 'inline';
		clearInterval (int);
	}
	else {
		document.getElementById ('stop').style.display = 'inline';
		document.getElementById ('play').style.display = 'none';
		int = setInterval ('rotate()', milliseconds);
	};
};

window.onload=function () {
	int = setInterval ('rotate()', milliseconds);
};

