<!--
// Initialize body page
var m_intIntervalResult; // used to track ad image rotations
var m_intAdCntr = 0;

function InitializeBodyForm(SectionName, BackgroundColor, ForegroundColor, LinkColor, ActiveLinkColor, VisitedLinkColor, LastImageNumber)
{
	InitializeForm(BackgroundColor, ForegroundColor, LinkColor, ActiveLinkColor, VisitedLinkColor);
	ActiveAdTimer(5000, SectionName, LastImageNumber, "jpg");
}

function ActiveAdTimer(DelayTimeInMS, SectionName, LastImageNumber, ImageType)
{
	var strRotationProcedure = "RotatePic('" + SectionName + "', " + LastImageNumber + ", '" + ImageType + "')";

	m_intIntervalResult = setInterval(strRotationProcedure, DelayTimeInMS);
}

function RotatePic(SectionName, LastImageNumber, ImageType)
{
	if (SectionName == undefined || SectionName == "undefined" || SectionName == "")
	{
		SectionName = "default_";
	}
	if (LastImageNumber == undefined || LastImageNumber == "undefined" || LastImageNumber == "")
	{
		LastImageNumber = 3;
	}
	if (m_intAdCntr == undefined || m_intAdCntr == "undefined")
	{
		m_intAdCntr = 0;
	}

	if (ImageType == undefined || ImageType == "undefined")
	{
		ImageType = "jpg";
	}

	if (m_intAdCntr < 0)
	{
		SectionName = "default_";
	}

	m_intAdCntr++;
	var strAdCntr = new String("0000" + m_intAdCntr);
	var intLength = strAdCntr.length;
	document.images['slideshow'].src = "dog/images/gamebreeds/" + SectionName + strAdCntr.substring(intLength - 2, intLength) + "." + ImageType;

	if (SectionName == "default_")
	{
		var strNewURL = "";

		switch (m_intAdCntr)
		{// later get this from the DB
			case 0:
			{
				document.images['slideshow'].alt = "San Diego 2 U";
				strNewURL = "www.sandiego2u.com";
				break;
			}
			case 1:
			{
				document.images['slideshow'].alt = "DOGOPOLY - The Game of High Steaks & Bones!";
				strNewURL = "www.dogopoly.com";
				break;
			}
			case 2:
			{
				document.images['slideshow'].alt = "Century 21 Doug Faber";
				strNewURL = "www.dougfaber.com";
				break;
			}
			case 3:
			{
				document.images['slideshow'].alt = "MJS Creations Design Services";
				strNewURL = "www.mjscreations.com";
				break;
			}
			default:
			{
				document.images['slideshow'].alt = "DOGOPOLY - The Game of High Steaks & Bones!";
				strNewURL = "www.dogopoly.com";
				break;
			}
		}
		document.links[0].href = "http://" + strNewURL;
	}

	if (m_intAdCntr > LastImageNumber)
	{
		m_intAdCntr = 0;
	}
}
//-->
