// code for the front page

//this function controls the main sequence of animation.
function steps(foo) {
	switch (foo) {
		case 0:
			initializeGlobalNav();
			sequenceAnimateFrames("olympiclogo","",3,300,"setTimeout('steps(1)',500)");
			break;
		case 1:
			showLayer(makeAbstract("yellowbackground"));
			showLayer(makeAbstract("biglogo"));
			showLayer(makeAbstract("gold2"));
			showLayer(makeAbstract("silver2"));
			showLayer(makeAbstract("bronze2"));
			setTimeout('sequenceAnimateHorizontal("bluering",25,(0-53),377,1,3,"steps(2)")',500);
			break;
		case 2:
			sequenceAnimateHorizontal("leftgroup",134,(0-58),109,1,3,"steps(3)")
			break;
		case 3:
			sequenceAnimateVertical("topgroup",317,(0-144),96,1,3,"steps(9)")
			break;
		case 9:
			//hideLayer(makeAbstract("leftgroup"));
			//hideLayer(makeAbstract("topgroup"));
			//hideLayer(makeAbstract("bluering"));
			showLayer(makeAbstract("staticlogo"));
			showLayer(makeAbstract("hotlogo"));
			setTimeout("steps(10)",500);
			break;
		case 10:
			showLayer(makeAbstract("staticbike"));
			showLayer(makeAbstract("hotbike"));
			setTimeout("steps(11)",500);
			break;
		case 11:
			showLayer(makeAbstract("staticrunner"));
			showLayer(makeAbstract("hotrunner"));
			setTimeout("steps(12)",500);
			break;
		case 12:
			showLayer(makeAbstract("staticplane"));
			showLayer(makeAbstract("hotplane"));
			setTimeout("steps(13)",500);
			break;
		case 13:
			showLayer(makeAbstract("staticface"));
			showLayer(makeAbstract("hotface"));
			setTimeout('animateFrames("brown","",2,300)',500);
			hideLayer(makeAbstract("leftgroup"));
			hideLayer(makeAbstract("topgroup"));
			hideLayer(makeAbstract("bluering"));
			break;
		} //end switch
	} //end function

function storyOn(storyName) {
	hideLayer(makeAbstract("static" + storyName)); //Idea of Louis Chiang
	showLayer(makeAbstract("anim" + storyName));
	showLayer(makeAbstract("text" + storyName));
	} //end function

function storyOff(storyName) {
	showLayer(makeAbstract("static" + storyName)); //Idea of Louis Chiang
	hideLayer(makeAbstract("anim" + storyName));
	hideLayer(makeAbstract("text" + storyName));
	} //end function

