// JavaScript Document
function next()
{
	clearTimeout(timerID);
	imgno = 1 - imgno;
	if(imgno )
	{
		
		$('#foliodiv2').fadeOut(2000, function() { timerID = self.setTimeout("next()", 3000 ); changepic(2); });
	}
	else
	{
		$('#foliodiv2').fadeIn(2000, function() { timerID = self.setTimeout("next()", 3000 ); changepic(1); } );
		//div2 visible so change div1 pic
	}
}

function changepic(i)
{
	cnt ++;
	cnt = cnt % total;
	var imgnum = cnt + offset;
	document.getElementById('folioimg' + i).src = "images/slides/" + imgnum + ".jpg";
	//document.getElementById('envdiv').innerHTML = "images/live1/" + imgnum + ".jpg";
}
