/*
Auto Refresh Page with Time script
By JavaScript Kit (javascriptkit.com)
Over 200+ free scripts here!
*/

//enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59
var limit="0:10"
var aCount=0
var bCount=0
var advertCount = 1
var callOutCount = 1
var endorsementCount = 1
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
var countDown = parselimit;

function beginrefresh()
{
	advertCount = getAdvertCount()
	callOutCount = getCalloutCount()
	endorsementCount = getEndorsementCount()
	if (countDown ==1)
	{
		// hide the current message
		toggleVisiblity("Advertise", (aCount%advertCount ) + 1)

		// show the new message
		aCount = aCount + 1
		toggleVisiblity("Advertise", (aCount%advertCount ) + 1)

		countDown = parselimit;
	}
	else if (countDown ==5)
	{
		toggleVisiblity("ClientEndorsement", (bCount%endorsementCount ) + 1)
		bCount = bCount + 1
		toggleVisiblity("ClientEndorsement", (bCount%endorsementCount ) + 1)
	}

	countDown -= 1

	setTimeout("beginrefresh()",1000)
}




