// From http://mikeomatic.net/techtips/css-crossfader/

		// this array consists of the id attributes of the divs we wish to alternate between
		//var divs_to_fade = new Array('phoenix_rollover_wrapper', 'europa_header_wrapper', 'machinery_header_wrapper');
		var divs_to_fade = ['phoenix_rollover_wrapper', 'europa_header_wrapper', 'machinery_header_wrapper'];
		var logos_to_fade = ['logo', 'logo2', 'logo3'];
		var ads_to_fade = ['buy_3_larger_i', 'buy_3_larger_ii', 'buy_3_larger_iii'];

	
		// the starting index in the above array.  It should be set to the value of the div which doesn't have the CSS Display property set to "none"
		var i = 2;
		
		// the number of milliseconds between swaps.  Default is five seconds.
		var wait = 10000;

		// the function that performs the fade
		function swapFade() {
			Effect.Fade(divs_to_fade[i], { duration:1, from:1.0, to:0.0 });
			Effect.Fade(logos_to_fade[i], { duration:0, from:1.0, to:0.0 });
			Effect.Fade(ads_to_fade[i], { duration:1, from:1.0, to:0.0 });
			i++;
			if (i == 3) { i = 0; }
			Effect.Appear(divs_to_fade[i], { duration:1, from:0.0, to:1.0 });
			Effect.Appear(logos_to_fade[i], { duration:0, from:0.0, to:1.0 });
			Effect.Appear(ads_to_fade[i], { duration:1, from:0.0, to:1.0 });
		}
		
		// the onload event handler that starts the fading.
		function startPage() {
			startPageIntervalVariable = setInterval('swapFade()',wait);		
		}
		
// Trying to auto-toggle

	/*function swapToggle() {
			setInterval('toggle01()',3000);
			setInterval('toggle02()',3000);
			setInterval('toggle03()',3000);
	}*/


// Original toggle script, was originally inline in default.tpl

	function toggle01() {
		$('machinery_header_wrapper').style.display='none';
		$('europa_header_wrapper').style.display='none';
		$('phoenix_rollover_wrapper').style.display='block';		
		$('logo3').style.display='none';
		$('logo2').style.display='none';
		$('logo').style.display='block';
		$('buy_3_larger_i').style.display='block';
		$('buy_3_larger_ii').style.display='none';
		$('buy_3_larger_iii').style.display='none';
		//$('content_book_ad_burning_small').src='images/content_book_ad_burning_small_dark.png';
		//$('content_book_ad_small').src='images/content_book_ad_small.png';
		clearInterval ( startPageIntervalVariable );
		
	}
	function toggle02() {
		$('machinery_header_wrapper').style.display='none';
		$('phoenix_rollover_wrapper').style.display='none';
		$('europa_header_wrapper').style.display='block';
		$('logo').style.display='none';
		$('logo3').style.display='none';	
		$('logo2').style.display='block';
		$('buy_3_larger_i').style.display='none';
		$('buy_3_larger_ii').style.display='block';
		$('buy_3_larger_iii').style.display='none';
		//$('content_book_ad_small').src='images/content_book_ad_small_dark.png';
		//$('content_book_ad_burning_small').src='images/content_book_ad_burning_small.png';
		clearInterval ( startPageIntervalVariable );

	}
	function toggle03() {
		$('phoenix_rollover_wrapper').style.display='none';
		$('europa_header_wrapper').style.display='none';
		$('machinery_header_wrapper').style.display='block';
		$('logo').style.display='none';
		$('logo2').style.display='none';	
		$('logo3').style.display='block';
		$('buy_3_larger_i').style.display='none';
		$('buy_3_larger_ii').style.display='none';
		$('buy_3_larger_iii').style.display='block';	
		//$('content_book_ad_small').src='images/content_book_ad_small_dark.png';
		//$('content_book_ad_burning_small').src='images/content_book_ad_burning_small.png';
		clearInterval ( startPageIntervalVariable );
		
	}

