home *** CD-ROM | disk | FTP | other *** search
- //Conditional Alert
- function cAlert (message) {
- if (!this.silent) {
- alert(message);
- }
- }
-
- //Make sure Java is enabled
- if ( navigator.javaEnabled() ) {
-
- // Create a version oject and a software update object
- vi = new netscape.softupdate.VersionInfo(1, 0, 1, 3);
- su = new netscape.softupdate.SoftwareUpdate(this, "MathML Viewer 1.1");
-
- // Start the installation process
- err = su.StartInstall("java/download/WMI/", vi,
- netscape.softupdate.SoftwareUpdate.LIMITED_INSTALL);
-
- if (err == 0) {
-
- // Find the Java download directory on the user's machine
- JavaFolder = su.GetFolder("Java Download");
-
- // Install the JAR archive. Unpack it and list were it goes
- err = su.AddSubcomponent("MathML Viewer 1.1", vi, "MMLViewerApplet.jar",
- JavaFolder, "", this.force);
- }
-
- // Unless there was a problem, move the JAR archive to final location
- // and update the Client version registry
- if (err !=0) {
- su.AbortInstall();
- cAlert(err);
- }
- else {
- su.FinalizeInstall();
- cAlert("Installation complete. Restart Communicator");
- }
- }
-
-
-