var mainos = new Array();
mainos[0] = 'yksi';
mainos[1] = 'kaksi';
//mainos[2] = 'kolme';

var tmp=Math.random()*mainos.length;
var c=Math.floor(tmp); 

var t;

function timedCount()
{
	hideAll();
	document.getElementById(mainos[c]).style.display = "block";

	if (c >= mainos.length-1) {
		c = 0; 
	} else {
		c=c+1;
	}

	t=setTimeout("timedCount()",15000);
}

function hideAll() {
	for (i = 0; i < mainos.length; i++) {
		document.getElementById(mainos[i]).style.display = "none";
	}
}

