'VBScript File
'Author: Ross McKinlay 15/05/2007
'Detects given flash version in Internet Explorer,
' which doesn't support the "plugins" array (how silly)
'Changelog:
' RM: 15/05/2007,
'   * Initial creation
'------------------------------------------------

Function DetectFlash( minimumVersion ) 
  Dim bFlashInstalled
  bFlashInstalled = false
  'Check something valid has been passed
  if minimumVersion <= 0 then return bFlashInstalled  
  'Ignore errors
  On Error Resume Next
  'Attempt to create a flash object of the required version
  bFlashInstalled = IsObject( CreateObject( "ShockwaveFlash.ShockwaveFlash." & minimumVersion ) )
  'Return success bool
  DetectFlash = bFlashInstalled  
End Function