home *** CD-ROM | disk | FTP | other *** search
- !!Script
-
- var gRight = false; // Show help window on right side of the screen
-
- // Note: Since this code is shared by many other scripts
- // we must use setGlobal and getGlobal for most global
- // variables.
-
- function DoCommand()
- {
- if (!Application.IEInstalled())
- {
- alert("This script requires IE be installed before it can run.");
- return;
- }
-
- try
- {
- if (gTitle == undefined)
- {
- return;
- }
- if (gPath == undefined)
- {
- return;
- }
- }
- catch(e)
- {
- alert("This script must be included in another script that defines gTitle and gPath");
- return;
- }
-
- var size = Application.getScreenSize();
- var windowRect = Application.getWindowRect();
- var count = getGlobal("gHTMLPopupCount", 0);
- if (count == 0)
- {
- var windowRectRestored = Application.getWindowRect();
- Host.setGlobal("gHTMLPopupOldRect",windowRectRestored);
- }
- setGlobal("gHTMLPopupCount", count + 1);
-
- var rect = newRect();
-
- if (gRight) // Show help window on right
- {
- rect.top = 0;
- rect.bottom = size.y;
- rect.left = size.x - size.x/3;
- rect.right = size.x;
-
- windowRect.left = 0;
- windowRect.right = rect.left;
- windowRect.top = 0;
- windowRect.bottom = size.y;
- }
- else // Show help window on left
- {
- rect.top = 0;
- rect.bottom = size.y;
- rect.left = 0;
- rect.right = size.x/3;
-
- windowRect.left = rect.right;
- windowRect.right = size.x;
- windowRect.top = 0;
- windowRect.bottom = size.y;
- }
-
- Application.setWindowRect(windowRect);
-
- showHtmlPopup(gPath, gTitle, rect, getScriptPath());
- }
-
- function OnNotify(documentDOM)
- {
- var count = getGlobal("gHTMLPopupCount", 0);
- if (count == 1)
- {
- var oldRect = getGlobal("gHTMLPopupOldRect");
- Application.setWindowRect(oldRect);
- count = 0
- }
- else if (count > 1)
- {
- count -= 1;
- }
-
- setGlobal("gHTMLPopupCount", count);
- }
-
- !!/Script
-
-