/* Macromedia Flash Dispatcher - a scriptable detector for Flash Player copyright (c) 2000 Macromedia, Inc. */ 
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	// Flash ActiveX control installed?
var MM_FlashControlVersion	// ActiveX control version if installed

var MM_FlashVersion
var MM_FlashVersion_Requered = 8
var MM_FlashVersion_Required_8 = 8

function canPlayFlash(){
	return canPlayFlash8()
}


function canPlayFlash8(){
	var bCanPlay = false
	MM_FlashInfo()
	
	var bReturn = false;

	if(m_isIE && m_isWin){
		if (MM_FlashControlInstalled){
			bReturn = (MM_FlashVersion_Required_8 <= parseInt(MM_FlashControlVersion))
		}
	} else{		
		bReturn =  (MM_FlashVersion_Required_8 <= parseInt(MM_FlashVersion) )
	}
	return bReturn
}

function MM_FlashInfo(){
	var bReturn = false
		
	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
				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())
		bReturn =  true
		
	return bReturn
}

function MM_FlashRememberIfDetectedSelf(){
	document.cookie = 'MM_FlashDetectedSelf=true '
}

function MM_FlashDetectedSelf(){
	return (document.cookie.indexOf("MM_FlashDetectedSelf") != -1)
}
