home *** CD-ROM | disk | FTP | other *** search
- var g_CurrentMenuItem;
- var g_strLastHelpURL;
- var g_AppsTable;
-
- function Body_OnLoad()
- {
- WaitForControls();
- }
-
- function WaitForControls()
- {
- g_AppsTable = GetControl("RightPane", "AppsTable");
-
- if (g_AppsTable != null && SSWorld.readyState == 4)
- if (GetControl("RightPane", "InstallButton") != null)
- if (GetControl("RightPane", "UninstallButton") != null)
- if (GetControl("RightPane", "DiskettesButton") != null)
- if (GetControl("RightPane", "DriversButton") != null)
- {
- if (!SSWorld.ReadLicenseAgreementSupport)
- Menu.deleteRow(License.rowIndex);
-
- if (!SSWorld.ChangeSettingsSupport)
- AdvancedMenu.deleteRow(Settings.rowIndex);
-
- if (!SSWorld.AddDriversSupport)
- AdvancedMenu.deleteRow(Drivers.rowIndex);
-
- if (!SSWorld.DisketteImageSupport)
- AdvancedMenu.deleteRow(Diskettes.rowIndex);
-
- if (!SSWorld.CDImageSupport)
- AdvancedMenu.deleteRow(CDImage.rowIndex);
-
- if (AdvancedMenu.rows.length == 0)
- Menu.deleteRow(Advanced.rowIndex);
-
- Menu.style.display = "";
-
- Install.click();
-
- return;
- }
-
- setTimeout("WaitForControls()", 1000);
- }
-
- function Body_OnMouseUp()
- {
- document.selection.empty();
- }
-
- function Body_OnUnload()
- {
- if (SSWorld.readyState == 4)
- SSWorld.ArchiveData();
- }
-
- function Menu_OnClick()
- {
- if (" TABLE TBODY TD ".indexOf(" " + window.event.srcElement.tagName + " ") == -1)
- {
- var NewMenuItem = window.event.srcElement;
-
- while (NewMenuItem.tagName != "TR")
- NewMenuItem = NewMenuItem.parentElement;
-
- if (NewMenuItem != null)
- {
- if (NewMenuItem.cells[1].children.tags("TABLE").length > 0)
- {
- if (NewMenuItem.cells[1].children.tags("TABLE")[0].style.display == "")
- {
- NewMenuItem.cells[0].children.tags("IMG")[0].src = "../images/closmenu.gif";
- NewMenuItem.cells[1].children.tags("TABLE")[0].style.display = "none";
- }
- else
- {
- NewMenuItem.cells[0].children.tags("IMG")[0].src = "../images/openmenu.gif";
- NewMenuItem.cells[1].children.tags("TABLE")[0].style.display = "";
- }
- }
- else if (NewMenuItem != g_CurrentMenuItem)
- {
- for (i = 0; i < document.all.tags("TR").length; ++i)
- {
- if (document.all.tags("TR")[i].contains(NewMenuItem))
- document.all.tags("TR")[i].style.color = "#FF9645";
- else
- document.all.tags("TR")[i].style.color = "white";
- }
-
- DisplayTopic(NewMenuItem.id);
-
- g_CurrentMenuItem = NewMenuItem;
- }
- }
- }
- }
-
- function DisplayTopic(strTopic)
- {
- var strURL;
-
- if (parent.frames.RightPane != null)
- {
- if (g_CurrentMenuItem == Help)
- g_strLastHelpURL = parent.frames.RightPane.document.SecondaryFrame.location.href;
-
- switch (strTopic)
- {
- case "Install":
- case "Uninstall":
- case "Drivers":
- case "Diskettes":
-
- // Synchronize AppsTable control settings with those of the SSWorld
- // control; but turn the redraw flag off until we're done, else the
- // AppsTable control will rebuild/repaint itself each time a setting
- // is changed. NOTE: We won't change the DataURL property until the
- // end of this function, because we want the table to be displayed
- // (albeit empty) while any wait indicator (e.g., wait cursor or
- // window with some animation) appears.
-
- g_AppsTable.SetRedraw(false);
-
- if (strTopic == "Install")
- g_AppsTable.Mode = 0;
- else if (strTopic == "Uninstall")
- g_AppsTable.Mode = 1;
- else if (strTopic == "Drivers")
- g_AppsTable.Mode = 2;
- else if (strTopic == "Diskettes")
- g_AppsTable.Mode = 3;
-
- g_AppsTable.OS = SSWorld.OS;
- g_AppsTable.LocalCC = SSWorld.LocalCC;
- g_AppsTable.ParentCC = SSWorld.ParentCC;
- g_AppsTable.FlyoverEnabled = SSWorld.FlyoverEnabled;
- g_AppsTable.CustomInstallEnabled = SSWorld.CustomInstallEnabled;
-
- g_AppsTable.SetRedraw(true);
-
- if (strTopic == "Install")
- Animation.style.backgroundImage = "url(../images/inst.gif)";
- else if (strTopic == "Uninstall")
- Animation.style.backgroundImage = "url(../images/unin.gif)";
- else
- Animation.style.backgroundImage = "url(../images/advc.gif)";
- break;
-
- case "Settings":
-
- strURL = "settings.htm";
- Animation.style.backgroundImage = "url(../images/advc.gif)";
- break;
-
- case "CDImage":
-
- strURL = "cdimage.htm";
- Animation.style.backgroundImage = "url(../images/advc.gif)";
- break;
-
- case "License":
-
- strURL = "..\\license\\index.htm";
-
- Animation.style.backgroundImage = "url(../images/read.gif)";
-
- break;
-
- case "Help":
-
- if (g_strLastHelpURL == null)
- g_strLastHelpURL = "help\\ssindx.htm";
-
- strURL = g_strLastHelpURL;
-
- Animation.style.backgroundImage = "url(../images/help.gif)";
-
- break;
-
- default:
-
- return;
- }
-
- var PrimaryFrame = parent.frames.RightPane.document.all.item("PrimaryFrame");
- var SecondaryFrame = parent.frames.RightPane.document.all.item("SecondaryFrame");
-
- if (strURL == null)
- {
- SecondaryFrame.style.visibility = "hidden";
- SecondaryFrame.src = "";
- PrimaryFrame.style.visibility = "visible";
-
- // We waited until now to set the DataURL property, because we want the table
- // to be visible at this point while the apps file is being read and any wait
- // indicator is being displayed.
-
- if (strTopic == "Install" || strTopic == "Uninstall" || strTopic == "Drivers" || strTopic == "Diskettes")
- g_AppsTable.DataURL = SSWorld.GetValidDataPath(strTopic == "Uninstall");
- }
- else
- {
- PrimaryFrame.style.visibility = "hidden";
- SecondaryFrame.src = strURL;
- SecondaryFrame.style.visibility = "visible";
- }
- }
- }