function setAnimationsClientQuote()
{
	oClientQuotePanel = new Animator({duration: 1500, transition: Animator.tx.linear})
	.addSubject(new NumericalStyleSubject(document.getElementById('clientquotescroll'), 'top', "0px", (-150 * 6) + "px"));
}

function setAnimationsPrimary()
{
	oHomeGraphic = new Animator({duration: 750, transition: Animator.tx.linear})
	.addSubject(new NumericalStyleSubject(document.getElementById('homegraphicscroll'), 'left', "0px", "-1920px"));

	oHomeHeading1 = new Animator({duration: 1000, transition: Animator.tx.elastic})
	.addSubject(new CSSStyleSubject(document.getElementById('homeheading1'), "h5off", "h5on"));

	oHomeHeading2 = new Animator({duration: 1000, transition: Animator.tx.elastic})
	.addSubject(new CSSStyleSubject(document.getElementById('homeheading2'), "h5off", "h5on"));

	oHomeHeading3 = new Animator({duration: 1000, transition: Animator.tx.elastic})
	.addSubject(new CSSStyleSubject(document.getElementById('homeheading3'), "h5off", "h5on"));

	oHomeGraphic1 = new Animator({duration: 1500, transition: Animator.tx.easeInOut})
	.addSubject(new CSSStyleSubject(document.getElementById('homegraphic1'), "homegraphicoff", "homegraphicon"));

	oHomeGraphic2 = new Animator({duration: 1500, transition: Animator.tx.easeInOut})
	.addSubject(new CSSStyleSubject(document.getElementById('homegraphic2'), "homegraphicoff", "homegraphicon"));

	oHomeGraphic3 = new Animator({duration: 1500, transition: Animator.tx.easeInOut})
	.addSubject(new CSSStyleSubject(document.getElementById('homegraphic3'), "homegraphicoff", "homegraphicon"));

	oHomeGraphicText1 = new Animator({duration: 1000, transition: Animator.tx.elastic})
	.addSubject(new CSSStyleSubject(document.getElementById('homegraphictext1'), "homegraphictextoff", "homegraphictexton"));

	oHomeGraphicText2 = new Animator({duration: 1000, transition: Animator.tx.elastic})
	.addSubject(new CSSStyleSubject(document.getElementById('homegraphictext2'), "homegraphictextoff", "homegraphictexton"));

	oHomeGraphicText3 = new Animator({duration: 1000, transition: Animator.tx.elastic})
	.addSubject(new CSSStyleSubject(document.getElementById('homegraphictext3'), "homegraphictextoff", "homegraphictexton"));
}

function HomeGraphicChange(iNumber)
{
	if(iNumber!=iPreviousHomeGraphic)
	{
		if(iPreviousHomeGraphic > 0)
		{
			document.getElementById('selector' + iPreviousHomeGraphic).className = 'circleoff';
			document.getElementById('selector' + iNumber).className = 'circleon';
			HomeGraphicLeave(iPreviousHomeGraphic);
			setTimeout('HomeGraphicSeekTo(' + iNumber + ')', 750);
		}
		else
		{
			HomeGraphicGoTo(iNumber);
		}
		iPreviousHomeGraphic = iNumber;
	}
}

function HomeGraphicSeekTo(iNumber)
{
	oHomeGraphic.seekTo((iNumber-1)/2);
	setTimeout('HomeGraphicGoTo(' + iNumber + ')', 750);
}

function HomeGraphicGoTo(iNumber)
{
	clearTimeout(iActiveTimer);

	iNextNumber = iNumber + 1;
	if(iNextNumber>3)
	{
		iNextNumber = 1;
	}
	if(iNumber==1)
	{
		oHomeHeading1.seekTo(1);
		oHomeGraphic1.seekTo(1);
		oHomeGraphicText1.seekTo(1);
		sFindOutLinkURL = 'whatwedo/';
	}
	if(iNumber==2)
	{
		oHomeHeading2.seekTo(1);
		oHomeGraphic2.seekTo(1);
		oHomeGraphicText2.seekTo(1);
		sFindOutLinkURL = 'whatwedo/implement/';
	}
	if(iNumber==3)
	{
		oHomeHeading3.seekTo(1);
		oHomeGraphic3.seekTo(1);
		oHomeGraphicText3.seekTo(1);
		sFindOutLinkURL = 'corporate/blog/article/?id=38';
	}

	iActiveTimer = setTimeout('HomeGraphicChange(iNextNumber)', 10000);
}

function HomeGraphicLeave(iNumber)
{
	if(iNumber==1)
	{
		oHomeHeading1.seekTo(0);
		oHomeGraphic1.seekTo(0);
		oHomeGraphicText1.seekTo(0);
	}
	if(iNumber==2)
	{
		oHomeHeading2.seekTo(0);
		oHomeGraphic2.seekTo(0);
		oHomeGraphicText2.seekTo(0);
	}
	if(iNumber==3)
	{
		oHomeHeading3.seekTo(0);
		oHomeGraphic3.seekTo(0);
		oHomeGraphicText3.seekTo(0);
	}
}

function GetRandomNumber()
{
	iNewResult = Math.floor(Math.random()*7);
	if(iNewResult==iPreviousResult)
	{
		iNewResult = iPreviousResult + 1;
		if(iNewResult>7)
		{
			iNewResult = 0;
		}
	}
	iPreviousResult = iNewResult;
	return iNewResult;
}

function SetClientQuote()
{
	document.getElementById('clientquotescroll').style.top = (-150 * GetRandomNumber()) + "px";
	setTimeout('RotateClientQuote()', 6000);
}

function RotateClientQuote()
{
	oClientQuotePanel.seekTo((1/6) * GetRandomNumber());
	setTimeout('RotateClientQuote()', 6000);
}
