//<!--
if ( document.referrer.length == 0 || document.referrer.indexOf(base_url) === -1 )
{
	document.write('<div id="flash_fullscreen_container" style="position:absolute; z-index:9999; left: 0px; top: 0px; width: 100%; height: 100%; visibility: visible; background-color: #AFC7E7;">'+
		'<div id="paintroller" style="text-align: center;">Loading</div>'+
		'</div>');
		//<h1>Alternative content</h1><p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	var $window = $(window);
	var $container = $('#flash_fullscreen_container');
	var $alt_content = $('#paintroller');
	var width = '100%';//$window.width();
	var height = '100%';//$window.height();
	//$('#flash_fullscreen_container').css('visibility', 'visible').width( width ).height( height );
	$alt_content.css('padding-top', ($window.height()/2) - ($alt_content.height()/2));
	
	//jQuery(document).ready(function()
	$window.load(function()
	{
		var flashvars = {};
		var params = {
			'menu': 'false',
			'wmode': 'transparent'
		};
		var attributes = {
		  'id': 'flash_splash',
		  'name': 'flash_splash'
		};
		
		swfobject.embedSWF(base_url +'flash/splash.swf', 'paintroller', width, height, '9.0.0', base_url +'scripts/swfobject/expressInstall.swf', flashvars, params, attributes, swfobject_callback);

		function swfobject_callback( event )
		{
			// If the swf doesn't embed, remove the container
			if ( event.success == false )
			{
				$container.remove();
			}
		}
		
	});
}

function splash_begin()
{
	$('#flash_fullscreen_container').css('background-color', 'transparent');
}

function splash_end()
{
	$('#flash_fullscreen_container').remove();
}
//-->
