function initThisPage()
{
	//initChartGrowth();
	initBoxes();
	initSplash();
	rotateSplash();
}

function initChartGrowth()
{
	var myChart = new FusionCharts("/FusionCharts/FCF_Line.swf", "chart-growth", "240", "150");
    myChart.setDataURL("/FusionCharts/xml/massage-career-outlook-growth.xml");
    myChart.render("flash-chart-growth");
}

var boxDelay = 750;

function initBoxes()
{
	for (var index = 1; index < 4; index++) { $('box-' + index).setOpacity(0); }
	setTimeout('initBox(1)', boxDelay);
	setTimeout('initBox(2)', boxDelay * 2);
	setTimeout('initBox(3)', boxDelay * 3);
}

function initBox(index)
{
	$('box-' + index).setOpacity(0);
	$('box-' + index).fade({ duration: 1, from: 0, to: 1 });
}

var splashCount = 8;
var splashCurrent = 0;

function initSplash()
{
	for (var i = 0; i < splashCount; i++) 
	{
		$('img-splash-' + i).setOpacity(0);
	}
	
}

function rotateSplash()
{
	var splashPrevious = ((splashCurrent - 1) + splashCount) % splashCount;
//	$('img-splash-' + splashPrevious).set('tween', {duration: 1000});
//	$('img-splash-' + splashCurrent).set('tween', {duration: 1000});
//	$('img-splash-' + splashPrevious).fade('out');
//	$('img-splash-' + splashCurrent).fade('in');
	$('img-splash-' + splashPrevious).fade({ duration: 1, from: 1, to: 0 });
	$('img-splash-' + splashCurrent).fade({ duration: 1, from: 0, to: 1 });
	splashCurrent = (++splashCurrent) % splashCount;
	setTimeout('rotateSplash()', 5000);
}