' this pointer is used to try to instantiate the ActiveX Control Dim Plugin_obj ' function: ie_detect() ' purpose : This VBscript will try to detect the plug-ins for IE 4.0 and up. It attempts ' to create the ActiveX Controls passed to it, checks for successful creation, ' then destroys them. This script will be ignored by Netscape browsers. Function ie_detect(objectName) ' return value - defaults to not detectable unless otherwise set later ie_detect = 2 ' CreateObject is only supported with VBScript version 2+, so ' only do the check if it is supported. Otherwise, return false if ScriptEngineMajorVersion >= 2 then 'Indicates that the control is detectable ie_detect = 1 ' Ignore errors if possible, if the client has a script debugger installed, ' this error handling will not work, but it should not be needed On Error Resume Next 'Create ActiveX Control Instantiation Set Plugin_obj = CreateObject(objectName) 'Check whether Control was properly instantiated if IsObject(Plugin_obj) then 'Indicates that the control has been found ie_detect = 0 end if end if End Function ' END FILE