' ' ' LIVINGACTOR VBSCRIPT LIBRARY ' ' copyrights La Cantoche Production ' all rights reserved ' ' ' ' VARIABLES --- Dim LAInstalled Dim InstallerInstalled Dim AgentControl Dim uptodate Dim Installer InstallerInstalled=False AgentInstalled Function AgentInstalled() On Error Resume Next uptodate=False Set AgentControl = CreateObject("ActiveX.CantocheLivingActor.1") LAInstalled = IsObject(AgentControl) if (LAInstalled = True) then if (AgentControl.Version >= CInt(LAVersion))then uptodate=True End if End if End Function Function Install_IE() Dim temp if (LAInstalled AND uptodate) then temp1=" " Document.Write temp1 Set temposerver = Document.REALSERVER if(InitWithLoad) then LoadActor() End if else if ((LAInstalled) AND (Not uptodate))then AgentControl.Quit() AgentControl=null End if temp=" " Document.Write temp WaitForInstaller End if End Function function WaitForInstaller() On Error Resume Next Dim PluginReady PluginReady = False if (document.INSTALLER.readyState=4) Then PluginReady =true End if if(PluginReady) then Set Installer=CreateObject("LivingActorInstaller.LAInstaller.1") InstallerInstalled= IsObject(Installer) if ( InstallerInstalled=false) then InstallError="InstallStage1" WaitForInstaller=true else if (CustomInstallUI=true) then Installer.UseDefaultProgressBar(false) End if Installer.LAInstall(LAVersion) Installer.Install() WaitForUpdate() End if else setTimeout "WaitForInstaller()", 500, "VBSCRIPT" End if End Function Function WaitForUpdate() if(Installer.InstallTerminated) Then plugin_progress=101 Installer.Quit() Installer = null setTimeout"LADelayed()",2500,"VBSCRIPT" else plugin_progress=Installer.DownloadProgress window.status = Installer.Infos setTimeout"WaitForUpdate()",500,"VBSCRIPT" End if End Function Function LADelayed() On Error Resume Next if(IsNull(temposerver)) then Set temposerver = CreateObject("ActiveX.CantocheLivingActor.1") End if LAInstalled = IsObject(temposerver) if ( LAInstalled = True) then if (AgentControl.Version >= CInt(LAVersion))then if (ReloadWithUrlParameters) then if (document.location.search="") then document.location.href = document.location+"?LA=1" else document.location.href = document.location+"&LA=1" end if else document.location.href = document.location end if else InstallError="InstallStage2" End if else InstallError="InstallStage2" End if End Function