'do a one-time test for a version of VBScript that can handle this code
LL_knows_VB = False
If ScriptEngineMajorVersion >= 2 then
  LL_knows_VB = True
End If

'this next function will detect most plugins
Function detect_VB(activeXControlName)
  on error resume next
  detect_VB = False
  If LL_knows_VB Then
     detect_VB = IsObject(CreateObject(activeXControlName))
  End If
End Function

'and the following function handles QuickTime
Function detectQuickTimeActiveXControl()
  on error resume next
  detectQuickTimeActiveXControl = False
  If LL_knows_VB Then
    detectQuickTimeActiveXControl = False
    hasQuickTimeChecker = false
    Set hasQuickTimeChecker = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1")
    If IsObject(hasQuickTimeChecker) Then
      If hasQuickTimeChecker.IsQuickTimeAvailable(0) Then
        detectQuickTimeActiveXControl = True
      End If
    End If
  End If
End Function

Function detectNewQuickTime()
  on error resume next
  detectQuickTimeActiveXControl = False
  If LL_knows_VB Then
    detectNewQuickTime = False
    hasQuickTimeChecker = false
    Set hasQuickTimeChecker = CreateObject("QuickTime.QuickTime")
    If IsObject(hasQuickTimeChecker) Then
      If hasQuickTimeChecker.IsQuickTimeAvailable(0) Then
        detectNewQuickTime = True
      End If
    End If
  End If
End Function

on error resume next
LL_flashinstalled = 1
LL_flashversion = 0
For myk = 2 to 10
  If Not(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & myk))) Then
  Else
    LL_flashinstalled = 2
    LL_flashversion = myk + 0
  End If
Next

on error resume next
LL_pdfinstalled = 0
LL_pdfversion = 0
For myk = 2 to 8
  If Not(IsObject(CreateObject("Pdf.PdfCtrl." & myk))) Then
  Else
    LL_pdfinstalled = 2
    LL_pdfversion = myk + 0
  End If
Next
