			var iMainLayers = 7;	//number of upper section frames
			var iMainDelay = 5000;	//delay between upper section frames
			var sFunction;
			var currentMainLayer = -1;
  
			function startMain()
			{
			
                                //Added if statement to check for the element with id of main
                                //Purpose is to keep JS from running if flash does not exist
                                if(document.getElementById("player"))
                                {
                                var iNewDelay = 0;
				for(i=1; i<=iMainLayers; i++)
				{
					sFunction = "flipMain("+i+")";
					setTimeout(sFunction,iNewDelay);
					iNewDelay = iNewDelay + iMainDelay;
				}
				//keep it going
				setTimeout('startMain()',iNewDelay);	
			        }
                       }

			function flipMain(iID)
			{
				//hide all of them
				if(currentMainLayer < 0) {
					for(i=2; i<=iMainLayers; i++)
					{
						$("#main"+i).hide();
					}
					currentMainLayer = 1;
				} else {
					$("#main"+currentMainLayer).fadeOut("slow",showNextMain());
				}
			}

			function showNextMain() 
			{
				currentMainLayer++;
				if(currentMainLayer > iMainLayers) {
					currentMainLayer = 1;
				}
				$("#main"+currentMainLayer).fadeIn("slow");
			}
