/* Macromedia Flash Dispatcher -- a scriptable detector for Flash Player
   copyright (c) 2000 Macromedia, Inc. 
   This version has been scrubbed of comments to reduce download size,
   to get a fully documented version, download the Flash Deployment Kit
   at http://www.macromedia.com/software/flashplayer/
*/
var MM_FlashPluginsPage = "http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash";

var m_isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;   
var m_isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;
var m_isMac = (navigator.appVersion.indexOf("Macintosh") != -1) ? true : false;
var MM_FlashControlInstalled;	// is the Flash ActiveX control installed?
var MM_FlashControlVersion;	// ActiveX control version if installed
var MM_FlashVersion;
var MM_FlashVersion_Requered = 7;

function canPlayFlash() 
{
	var bCanPlay = false;

	
	
	MM_FlashInfo();

				
	if(m_isIE && m_isWin)
	{
		if (MM_FlashControlInstalled)
			 return (MM_FlashVersion_Requered <= parseInt(MM_FlashControlVersion) );
	}
	else
	{
		return (MM_FlashVersion_Requered <= parseInt(MM_FlashVersion) );
	}
	
}

function MM_FlashInfo()
{
    
	if (navigator.plugins && navigator.plugins.length > 0)
    {
		this.implementation = "Plug-in";
		this.autoInstallable = false;	// until Netscape SmartUpdate supported
	
		// Check whether the plug-in is installed:
				
		if (navigator.plugins["Shockwave Flash"])
		{
		    this.installed = true;
	
		    // Get the plug-in version and revision:
	
		    var words =
			navigator.plugins["Shockwave Flash"].description.split(" ");
			
		    for (var i = 0; i < words.length; ++i)
		    {
			if (isNaN(parseInt(words[i])))
			continue;
	
			//this.version = words[i];
			MM_FlashVersion = words[i];
			
			
			MM_FlashRememberIfDetectedSelf();
		    }
		}
		else
		{
		    this.installed = false;
		}
    }
    else if (MM_FlashControlInstalled != null)
    {
		this.implementation = "ActiveX control";
		this.installed = MM_FlashControlInstalled;
		this.version = MM_FlashControlVersion;
		this.autoInstallable = true;
		
		MM_FlashRememberIfDetectedSelf();
    }
	else if (MM_FlashDetectedSelf())
		return true;
}


function MM_FlashRememberIfDetectedSelf()
{
    document.cookie = 'MM_FlashDetectedSelf=true ;';
}


function MM_FlashDetectedSelf()
{
    return (document.cookie.indexOf("MM_FlashDetectedSelf") != -1);
}
