var counttime=30;

function starttimer() {
	timeleft();
}

function timeleft() {
	var counter = document.getElementById("counter");

	if(counttime==0) {
		counter.innerHTML="<font color=#00FF00>Aktualisiere...</font>";
		day=new Date();
		id=day.getTime();
		self.frames["spielstand"].location.reload();
		self.frames["news"].location.reload();
		self.frames["torfolge"].location.reload();
		self.frames["infos"].location.reload();

		self.frames["spielstand"].location.href="http://www.eisloewen.de/liveticker/subframes/spielstand.html";
		self.frames["news"].location.href="http://www.eisloewen.de/liveticker/subframes/news_0.html";
		self.frames["torfolge"].location.href="http://www.eisloewen.de/liveticker/subframes/torfolge.html";
		self.frames["infos"].location.href="http://www.eisloewen.de/liveticker/subframes/tore.html";
		counttime=30;
		reloadtimer=setTimeout("timeleft()",1000);
	}
	else if(counttime==1) {
		counter.innerHTML="Noch 1 Sekunde bis zur nächsten Aktualisierung";
		reloadtimer=setTimeout("timeleft()",1000);
	}
	else {
		counter.innerHTML="Noch "+counttime+" Sekunden bis zur nächsten Aktualisierung";
		reloadtimer=setTimeout("timeleft()",1000);
	}

	counttime=counttime-1;
}
