var OldVideo = '';

function showFlash(Filename, Name, Width, Height, Alt, FlashVars)
{	

// for fullscreen prior to oflash player 9 wmode must be window 

	if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
		alert("This page requires AC_RunActiveContent.js.");
	} else {
		var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
		if(hasRightVersion) {  // if we've detected an acceptable version
			// embed the flash movie
			AC_FL_RunContent(
				'codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,14,0',
				'width', Width,
				'height', Height,
				'src', Filename,
				'quality', 'high',
				'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
				'align', 'top',
				'play', 'true',
				'loop', 'true',
				'scale', 'scale',
				'wmode', 'transparent',
				'devicefont', 'false',
				'id', Name,
				'bgcolor', '#FFFFFF',
				'name', Name,
				'menu', 'true',
				'allowScriptAccess','sameDomain',
				'allowFullScreen','true',
				'movie', Filename,
				'FlashVars', FlashVars,
				'salign', ''
				); //end AC code
		} else {  // flash is too old or we can't detect the plugin
			if(Alt != null)
			{
				var alternateContent = Alt;
				document.write(alternateContent);  // insert non-flash content
			}
			else
			{
				var alternateContent = 'This content requires the Adobe Flash Player.'
				+ '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
				document.write(alternateContent);  // insert non-flash content
			}
		}
	}
}

function ChangeFlash(flashToShow)
{
    var headerVideo = document.getElementById('HomepageVideo');
    var headerBanner = document.getElementById('HomepageFlashHolder');
    
    switch (flashToShow)
    {
        case "Video":
            if (OldVideo != '')
            {
                headerVideo.innerHTML = OldVideo;
            }
            headerVideo.style.display = 'block';
            swfobject.embedSWF("/SiteFlash/HomePageVideo.swf", "VideoHolder", "960","300", "9.0.0", "/SiteFlash/expressInstall.swf", flashvars, params, attributes);
            headerBanner.style.display = 'none';
            break
        case "Banner":
            OldVideo = headerVideo.innerHTML;
            headerVideo.innerHTML = '';
            headerVideo.style.display = 'none';
            headerBanner.style.display = 'block';
            break;            
    }
}
