var _pause = 0;

function autoNext(t)
{
	var td = 15;
	if(t)
		td = t
	setTimeout("nextPage()", td*1000);
}

function nextPage()
{
	if (_pause == 0)
	{
		document.forms[0].submit();
	}
}

function pauseNext()
{
	_pause = 1;
	var plb = document.getElementById('playbutton');
	if(plb)
		plb.disabled = false;
	var pab = document.getElementById('pausebutton');
	if(pab)
		pab.disabled = true;
}

function startAutoNext()
{
	_pause = 0;
	var t = 0.5;
	setTimeout("nextPage()", t*1000);

	var plb = document.getElementById('playbutton');
	if(plb)
		plb.disabled = true;
	var pab = document.getElementById('pausebutton');
	if(pab)
		pab.disabled = false;

}
