window.onloadFunctions.push(reset_timeout);

function reset_timeout()
{

	if(window.timeoutid && (window.timeoutid != undefined))
		window.clearTimeout(window.timeoutid);

	if(document.getElementById('autorefresh').checked)
	{
		window.timeoutid = window.setTimeout(
			function()
			{
				var loc = window.location;
				window.location = loc["protocol"] + "//" + loc["host"] + loc["pathname"];
			},
			300000
		);
	}
}
