'---------------------------------------------
' Created by Owen Goss (owen.goss@NOSPAMonx.com)
' Code based on code by: Chris Nott
'---------------------------------------------

' This function tries to create various version of the Acrobat activeX object
' This is used for IE Win32 browsers only. It is called in the getAcrobatVersion()
' function
Function getAcrobatVBVersion()

    on error resume next
    dim obAcrobat
    set obAcrobat = CreateObject("PDF.PdfCtrl.5")

    if IsObject(obAcrobat) then
	acrobatVersion = 5
    else 
	set obAcrobat = CreateObject("PDF.PdfCtrl.1") 
    end if

    if acrobatVersion < 5 and IsObject(obAcrobat) then
	acrobatVersion = 4
    end if

    getAcrobatVBVersion = acrobatVersion

End Function

