home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 November / Chip_2003-11_cd2.bin / ruzne / painter / PAINTE~2.cab / _65C1905CE47746889A81A69E74723565 < prev    next >
Text File  |  2003-01-06  |  24KB  |  753 lines

  1. // Copyright (c) 2000-2001 Quadralay Corporation.  All rights reserved.
  2. // 
  3.  
  4. function  OutlineEntry_Object(ParamOutline,
  5.                               ParamHREF,
  6.                               ParamText)
  7. {
  8.   if ((ParamHREF != null) &&
  9.       (ParamHREF.length > 0))
  10.   {
  11.     this.mHREF = ParamHREF;
  12.   }
  13.   else
  14.   {
  15.     this.mHREF = "";
  16.   }
  17.  
  18.   if ((ParamText != null) &&
  19.       (ParamText.length > 0))
  20.   {
  21.     this.mText = ParamText;
  22.   }
  23.   else
  24.   {
  25.     this.mText = "";
  26.   }
  27.  
  28.   this.mOutline = ParamOutline;
  29.   this.mID = 0;
  30.   this.mParent = null;
  31.   this.mChildren = null;
  32.   this.mbExpanded = false;
  33.   this.mLevel = 0;
  34.  
  35.   this.fPopupActionString = OutlineEntry_PopupActionString;
  36.   this.fNewChild          = OutlineEntry_NewChild;
  37.   this.fLinkEntry         = OutlineEntry_LinkEntry;
  38. }
  39.  
  40. function  OutlineEntry_PopupActionString()
  41. {
  42.   var  EventString;
  43.   var  ActionString;
  44.  
  45.  
  46.   if ((WWHelpTopFrame.WWHelp.mBrowser == 1) ||  // Shorthand for Netscape
  47.       (WWHelpTopFrame.WWHelp.mBrowser == 2) ||  // Shorthand for IE
  48.       (WWHelpTopFrame.WWHelp.mBrowser == 4))    // Shorthand for Netscape 6.0
  49.   {
  50.     EventString = "event";
  51.   }
  52.   else
  53.   {
  54.     EventString = "null";
  55.   }
  56.  
  57.   ActionString = "onMouseOver=\"WWHelpTopFrame.WWHelp.mContents.mPopup.fShow(" + this.mID + ", " + EventString + ");\" onMouseOut=\"WWHelpTopFrame.WWHelp.mContents.mPopup.fHide();\"";
  58.  
  59.   return ActionString;
  60. }
  61.  
  62. function  OutlineEntry_NewChild(ParamText,
  63.                                 ParamHREF)
  64. {
  65.   var  NewEntry;
  66.  
  67.  
  68.   NewEntry = WWHelpTopFrame.WWHelp.mContents.fNewEntry(ParamText, ParamHREF);
  69.   WWHelpTopFrame.WWHelp.mContents.fAddChild(this, NewEntry);
  70.  
  71.   return NewEntry;
  72. }
  73.  
  74. function  OutlineEntry_LinkEntry(ParamPrefixText)
  75. {
  76.   var  Prefix;
  77.   var  Link;
  78.  
  79.  
  80.   if (ParamPrefixText != null)
  81.   {
  82.     Prefix = ParamPrefixText;
  83.   }
  84.   else
  85.   {
  86.     Prefix = "";
  87.   }
  88.  
  89.   if (this.mHREF.length > 0)
  90.   {
  91.     Link = "<a href=\"javascript:WWHelpTopFrame.WWHelp.mContents.fDisplayDoc(" + this.mID + ");\" " + this.fPopupActionString() + ">" + Prefix + this.mText + "</a>";
  92.   }
  93.   else
  94.   {
  95.     Link = Prefix + this.mText;
  96.   }
  97.  
  98.   return Link;
  99. }
  100.  
  101. function  Outline_Object(ParamBrowser,
  102.                          ParamPlatform,
  103.                          ParamBaseURL)
  104. {
  105.   var  bBeFast = false;
  106.  
  107.  
  108.   this.mEntries    = new Array();
  109.   this.mTop        = null;
  110.   this.mMaxLevel   = 0;
  111.   this.mbStoreHTML = false;
  112.   this.mStoredHTML = "";
  113.   this.mImgSrcDir  = "../";
  114.   this.mPopup      = new Popup_Object("WWHelpTopFrame.WWHelp.mContents.mPopup",
  115.                                       "WWHelpTopFrame.WWHNavigation.WWHSync",
  116.                                       Outline_PopupTranslate, Outline_PopupFormat,
  117.                                       "WWHOutlinePopupDIV", "WWHOutlinePopupText", 1000, 12, 20, 150);
  118.  
  119.   this.fHead              = Outline_Head;
  120.   this.fBody              = Outline_Body;
  121.   this.fNewBook           = Outline_NewBook;
  122.   this.fNewEntry          = Outline_NewEntry;
  123.   this.fAddChild          = Outline_AddChild;
  124.   this.fDisplayDoc        = Outline_DisplayDoc;
  125.   this.fExpand            = Outline_Expand;
  126.   this.fCollapse          = Outline_Collapse;
  127.   this.fDumpHTML          = Outline_DumpHTML;
  128.   this.fFindClosedParents = Outline_FindClosedParents;
  129.   this.fSync              = Outline_Sync;
  130.   this.fDisplayEntry      = Outline_DisplayEntrySafe;
  131.   this.fDisplayOutline    = Outline_DisplayOutlineSafe;
  132.   this.fGenerateStyles    = Outline_GenerateStylesSafe;
  133.   this.fUpdateOutline     = Outline_UpdateOutlineSafe;
  134.   this.fRevealEntry       = Outline_RevealEntrySafe;
  135.  
  136.   // Create top level entry to hold everything else
  137.   //
  138.   this.mTop = this.fNewEntry("Top Level", "");
  139.   this.mTop.mbExpanded = true;
  140.  
  141.   // Determine display method based on browser type
  142.   //
  143.   if ((ParamBrowser == 2) ||  // Shorthand for IE
  144.       (ParamBrowser == 3) ||  // Shorthand for iCab
  145.       (ParamBrowser == 4))    // Shorthand for Netscape 6.0 (Mozilla)
  146.   {
  147.     bBeFast = true;
  148.   }
  149.  
  150.   // Determine img src reference based on browser type and platform
  151.   //
  152.   if ((ParamBrowser == 2) &&  // Shorthand for IE
  153.       (ParamPlatform == 2))   // Shorthand for Macintosh
  154.   {
  155.     this.mImgSrcDir = ParamBaseURL + "wwhelp/js/";
  156.   }
  157.  
  158.   // Set display methods
  159.   //
  160.   if (bBeFast)
  161.   {
  162.     this.fDisplayEntry   = Outline_DisplayEntryFast;
  163.     this.fDisplayOutline = Outline_DisplayOutlineFast;
  164.     this.fGenerateStyles = Outline_GenerateStylesFast;
  165.     this.fUpdateOutline  = Outline_UpdateOutlineFast;
  166.     this.fRevealEntry    = Outline_RevealEntryFast;
  167.   }
  168. }
  169.  
  170. function  Outline_Head()
  171. {
  172.   // Write formatting styles
  173.   //
  174.   this.fGenerateStyles();
  175. }
  176.  
  177. function  Outline_Body()
  178. {
  179.   // Write the outline data
  180.   //
  181.   this.fDisplayOutline();
  182.  
  183.   // Write div tag for popup
  184.   //
  185.   this.mPopup.fWriteDivTag();
  186. }
  187.  
  188. function  Outline_PopupTranslate(ParamEntryID)
  189. {
  190.   var  Translation = "";
  191.  
  192.  
  193.   if (ParamEntryID != null)
  194.   {
  195.     Translation = WWHelpTopFrame.WWHelp.mContents.mEntries[ParamEntryID].mText;
  196.   }
  197.  
  198.   return Translation;
  199. }
  200.  
  201. function  Outline_PopupFormat(ParamText)
  202. {
  203.   var  FormattedText = "";
  204.   var  BorderColor   = "#CCCCCC";
  205.   var  ImageDir      = WWHelpTopFrame.WWHelp.mBaseURL + "wwhelp/common/images";
  206.  
  207.  
  208.   FormattedText += "<table width=\"" + this.mWidth + "\" border=0 cellspacing=0 cellpadding=0 width=\"100%\" bgcolor=\"#FFFFCC\">";
  209.   FormattedText += " <tr>";
  210.   FormattedText += "  <td colspan=5 bgcolor=\"" + BorderColor + "\"><img src=\"" + ImageDir + "/spc1w2h.gif\" width=1 height=2></td>";
  211.   FormattedText += " </tr>";
  212.  
  213.   FormattedText += " <tr>";
  214.   FormattedText += "  <td bgcolor=\"" + BorderColor + "\"><img src=\"" + ImageDir + "/spc2w1h.gif\" width=2 height=1></td>";
  215.   FormattedText += "  <td colspan=3><img src=\"" + ImageDir + "/spc1w7h.gif\" width=1 height=7></td>";
  216.   FormattedText += "  <td bgcolor=\"" + BorderColor + "\"><img src=\"" + ImageDir + "/spc2w1h.gif\" width=2 height=1></td>";
  217.   FormattedText += " </tr>";
  218.  
  219.   FormattedText += " <tr>";
  220.   FormattedText += "  <td bgcolor=\"" + BorderColor + "\"><img src=\"" + ImageDir + "/spc2w1h.gif\" width=2 height=1></td>";
  221.   FormattedText += "  <td><img src=\"" + ImageDir + "/spc5w1h.gif\" width=5 height=1></td>";
  222.   FormattedText += "  <td width=\"100%\" id=\"" + this.mTextID + "\">" + ParamText + "</td>";
  223.   FormattedText += "  <td><img src=\"" + ImageDir + "/spc5w1h.gif\" width=5 height=1></td>";
  224.   FormattedText += "  <td bgcolor=\"" + BorderColor + "\"><img src=\"" + ImageDir + "/spc2w1h.gif\" width=2 height=1></td>";
  225.   FormattedText += " </tr>";
  226.  
  227.   FormattedText += " <tr>";
  228.   FormattedText += "  <td bgcolor=\"" + BorderColor + "\"><img src=\"" + ImageDir + "/spc2w1h.gif\" width=2 height=1></td>";
  229.   FormattedText += "  <td colspan=3><img src=\"" + ImageDir + "/spc1w7h.gif\" width=1 height=7></td>";
  230.   FormattedText += "  <td bgcolor=\"" + BorderColor + "\"><img src=\"" + ImageDir + "/spc2w1h.gif\" width=2 height=1></td>";
  231.   FormattedText += " </tr>";
  232.  
  233.   FormattedText += " <tr>";
  234.   FormattedText += "  <td colspan=5 bgcolor=\"" + BorderColor + "\"><img src=\"" + ImageDir + "/spc1w2h.gif\" width=1 height=2></td>";
  235.   FormattedText += " </tr>";
  236.   FormattedText += "</table>";
  237.  
  238.   return FormattedText;
  239. }
  240.  
  241. function  Outline_NewBook(ParamBookID,
  242.                           ParamBookTitle)
  243. {
  244.   var  NewEntry;
  245.  
  246.  
  247.   NewEntry = this.fNewEntry(ParamBookTitle, "");
  248.  
  249.   NewEntry.mBookID = ParamBookID;
  250.  
  251.   if (this.mMaxLevel < NewEntry.mLevel)
  252.   {
  253.     this.mMaxLevel = NewEntry.mLevel;
  254.   }
  255.  
  256.   // Expand first book
  257.   //
  258.   if (this.mTop.mChildren == null)
  259.   {
  260.     NewEntry.mbExpanded = true;
  261.   }
  262.  
  263.   // Add to tree at top level
  264.   //
  265.   this.fAddChild(this.mTop, NewEntry);
  266.  
  267.   return NewEntry;
  268. }
  269.  
  270. function  Outline_NewEntry(ParamText,
  271.                            ParamHREF)
  272. {
  273.   var  NewEntry;
  274.  
  275.  
  276.   // Create new object
  277.   //
  278.   NewEntry = new OutlineEntry_Object(this, ParamHREF, ParamText);
  279.  
  280.   // Set unique ID
  281.   //
  282.   NewEntry.mID = this.mEntries.length;
  283.   this.mEntries.length++;
  284.   this.mEntries[NewEntry.mID] = NewEntry;
  285.  
  286.   return NewEntry;
  287. }
  288.  
  289. function  Outline_AddChild(ParamParent,
  290.                            ParamChild)
  291. {
  292.   if (ParamParent.mChildren == null)
  293.   {
  294.     ParamParent.mChildren = new Array(ParamChild);
  295.   }
  296.   else
  297.   {
  298.     ParamParent.mChildren.length++;
  299.     ParamParent.mChildren[ParamParent.mChildren.length - 1] = ParamChild;
  300.   }
  301.  
  302.   ParamChild.mParent = ParamParent;
  303.   ParamChild.mLevel  = ParamParent.mLevel + 1;
  304.  
  305.   if (ParamChild.mLevel > this.mMaxLevel)
  306.   {
  307.     this.mMaxLevel = ParamChild.mLevel;
  308.   }
  309. }
  310.  
  311. function  Outline_DisplayDoc(ParamID)
  312. {
  313.   var  Entry;
  314.   var  Parent;
  315.   var  NewHREF;
  316.  
  317.  
  318.   Entry = this.mEntries[ParamID];
  319.  
  320.   // Expand if folder
  321.   //
  322.   if (( ! Entry.mbExpanded) &&
  323.       (Entry.mChildren != null))
  324.   {
  325.     this.fExpand(ParamID);
  326.   }
  327.  
  328.   // Determine which book this document belongs to
  329.   //
  330.   Parent = Entry;
  331.   while ((Parent.mParent != null) &&
  332.          (Parent.mBookID == null))
  333.   {
  334.     Parent = Parent.mParent;
  335.   }
  336.  
  337.   NewHREF = WWHelpTopFrame.WWHelp.mBaseURL + WWHelpTopFrame.WWHelp.mBookList[Parent.mBookID].mBookDir + this.mEntries[ParamID].mHREF;
  338.  
  339.   WWHelpTopFrame.WWHDocument.location.href = NewHREF;
  340. }
  341.  
  342. function  Outline_Expand(ParamID)
  343. {
  344.   this.mEntries[ParamID].mbExpanded = true;
  345.  
  346.   this.fUpdateOutline(ParamID);
  347. }
  348.  
  349. function  Outline_Collapse(ParamID)
  350. {
  351.   this.mEntries[ParamID].mbExpanded = false;
  352.  
  353.   this.fUpdateOutline(ParamID);
  354. }
  355.  
  356. function  Outline_DumpHTML(ParamHTML)
  357. {
  358.   if (this.mbStoreHTML)
  359.   {
  360.     this.mStoredHTML += ParamHTML;
  361.   }
  362.   else
  363.   {
  364.     WWHelpTopFrame.WWHNavigation.WWHSync.document.write(ParamHTML);
  365.   }
  366. }
  367.  
  368. function  Outline_FindClosedParents(ParamEntryID)
  369. {
  370.   var  SomeEntry;
  371.   var  ClosedParents = new Array();
  372.  
  373.  
  374.   SomeEntry = this.mEntries[ParamEntryID];
  375.   if (SomeEntry != null)
  376.   {
  377.     var  SomeParent;
  378.  
  379.  
  380.     SomeParent = SomeEntry.mParent;
  381.     while (SomeParent != null)
  382.     {
  383.       if ( ! SomeParent.mbExpanded)
  384.       {
  385.         ClosedParents.length += 1;
  386.         ClosedParents[ClosedParents.length - 1] = SomeParent;
  387.       }
  388.  
  389.       SomeParent = SomeParent.mParent;
  390.     }
  391.   }
  392.  
  393.   return ClosedParents;
  394. }
  395.  
  396. function  Outline_Sync(ParamBookID,
  397.                        ParamFileHREF,
  398.                        bParamVisible)
  399. {
  400.   var  EntryID = -1;
  401.   var  BookStartIndex;
  402.   var  MaxIndex;
  403.   var  Index;
  404.   var  BookEndIndex;
  405.   var  TrimmedEntryHREF;
  406.  
  407.  
  408.   // Find start of book entries
  409.   //
  410.   BookStartIndex = -1;
  411.   MaxIndex = this.mEntries.length;
  412.   Index = 0;
  413.   while ((BookStartIndex == -1) &&
  414.          (Index < MaxIndex))
  415.   {
  416.     if ((this.mEntries[Index].mBookID != null) &&
  417.         (this.mEntries[Index].mBookID == ParamBookID))
  418.     {
  419.       BookStartIndex = Index;
  420.     }
  421.  
  422.     Index++;
  423.   }
  424.  
  425.   // Search book entries for match
  426.   //
  427.   BookEndIndex = this.mEntries.length;
  428.   Index = BookStartIndex;
  429.   while ((EntryID == -1) &&
  430.          (Index < BookEndIndex))
  431.   {
  432.     // Check for FileHREF match
  433.     //
  434.     if (this.mEntries[Index].mHREF == ParamFileHREF)
  435.     {
  436.       EntryID = this.mEntries[Index].mID;
  437.     }
  438.  
  439.     // Check to see if we can improve our guess
  440.     // for the BookEndIndex
  441.     //
  442.     if ((this.mEntries[Index].mBookID != null) &&
  443.         (this.mEntries[Index].mBookID != ParamBookID))
  444.     {
  445.       BookEndIndex = Index;
  446.     }
  447.  
  448.     Index++;
  449.   }
  450.  
  451.   // If we haven't matched yet, try trimming off "#" entries
  452.   // and check for a match again
  453.   //
  454.   TrimmedFileHREF = WWHelpTopFrame.WWHelp.fTrimHREF(ParamFileHREF)
  455.   Index = BookStartIndex;
  456.   while ((EntryID == -1) &&
  457.          (Index < BookEndIndex))
  458.   {
  459.     // Trim the entry's HREF and check for match
  460.     //
  461.     TrimmedEntryHREF = WWHelpTopFrame.WWHelp.fTrimHREF(this.mEntries[Index].mHREF);
  462.     if (TrimmedEntryHREF == TrimmedFileHREF)
  463.     {
  464.       EntryID = this.mEntries[Index].mID;
  465.     }
  466.  
  467.     Index++;
  468.   }
  469.  
  470.   // If valid, reveal the entry
  471.   //
  472.   if (EntryID != -1)
  473.   {
  474.     this.fRevealEntry(EntryID, bParamVisible);
  475.   }
  476. }
  477.  
  478. function  Outline_DisplayEntrySafe(ParamEntry)
  479. {
  480.   if (ParamEntry.mChildren == null)
  481.   {
  482.     WWHelpTopFrame.WWHNavigation.WWHSync.document.write("<p class=l" + ParamEntry.mLevel + ">");
  483.     WWHelpTopFrame.WWHNavigation.WWHSync.document.write("<nobr>");
  484.     WWHelpTopFrame.WWHNavigation.WWHSync.document.write(ParamEntry.fLinkEntry("<img width=17 height=17 border=0 src=\"" + this.mImgSrcDir + "images/doc.gif\"> "));
  485.     WWHelpTopFrame.WWHNavigation.WWHSync.document.write("</nobr>");
  486.     WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("</p>");
  487.   }
  488.   else
  489.   {
  490.     if (ParamEntry.mbExpanded)
  491.     {
  492.       var  MaxChildIndex;
  493.       var  ChildIndex;
  494.  
  495.  
  496.       WWHelpTopFrame.WWHNavigation.WWHSync.document.write("<p class=l" + ParamEntry.mLevel + ">");
  497.       WWHelpTopFrame.WWHNavigation.WWHSync.document.write("<nobr>");
  498.       WWHelpTopFrame.WWHNavigation.WWHSync.document.write("<a name=\"toc" + ParamEntry.mID + "\" href=\"javascript:WWHelpTopFrame.WWHelp.mContents.fCollapse(" + ParamEntry.mID + ");\" " + ParamEntry.fPopupActionString() + "><img width=17 height=17 border=0 src=\"" + this.mImgSrcDir + "images/fo.gif\"></a>");
  499.       WWHelpTopFrame.WWHNavigation.WWHSync.document.write(" " + ParamEntry.fLinkEntry());
  500.       WWHelpTopFrame.WWHNavigation.WWHSync.document.write("</nobr>");
  501.       WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("</p>");
  502.  
  503.       MaxChildIndex = ParamEntry.mChildren.length;
  504.       for (ChildIndex = 0 ; ChildIndex < MaxChildIndex ; ChildIndex++)
  505.       {
  506.         this.fDisplayEntry(ParamEntry.mChildren[ChildIndex]);
  507.       }
  508.     }
  509.     else
  510.     {
  511.       WWHelpTopFrame.WWHNavigation.WWHSync.document.write("<p class=l" + ParamEntry.mLevel + ">");
  512.       WWHelpTopFrame.WWHNavigation.WWHSync.document.write("<nobr>");
  513.       WWHelpTopFrame.WWHNavigation.WWHSync.document.write("<a name=\"toc" + ParamEntry.mID + "\" href=\"javascript:WWHelpTopFrame.WWHelp.mContents.fExpand(" + ParamEntry.mID + ");\" " + ParamEntry.fPopupActionString() + "><img width=17 height=17 border=0 src=\"" + this.mImgSrcDir + "images/fc.gif\"></a>");
  514.       WWHelpTopFrame.WWHNavigation.WWHSync.document.write(" " + ParamEntry.fLinkEntry());
  515.       WWHelpTopFrame.WWHNavigation.WWHSync.document.write("</nobr>");
  516.       WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("</p>");
  517.     }
  518.   }
  519. }
  520.  
  521. function  Outline_DisplayOutlineSafe()
  522. {
  523.   var  MaxChildIndex;
  524.   var  ChildIndex;
  525.  
  526.  
  527.   MaxChildIndex = this.mTop.mChildren.length;
  528.   for (ChildIndex = 0 ; ChildIndex < MaxChildIndex ; ChildIndex++)
  529.   {
  530.     this.fDisplayEntry(this.mTop.mChildren[ChildIndex]);
  531.   }
  532. }
  533.  
  534. function  Outline_GenerateStylesSafe()
  535. {
  536.   var  ChildLevel;
  537.  
  538.  
  539.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("<style type=\"text/css\">");
  540.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln(" <!--");
  541.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("  a { text-decoration: none ;");
  542.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("      color: " + WWHelpTopFrame.WWHelp.mMessages["Anchor Color"] + " }");
  543.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("  p { margin-top: 1pt ;");
  544.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("      margin-bottom: 1pt ;");
  545.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("      font-family: " + WWHelpTopFrame.WWHelp.mMessages["Font Family"] + " ;");
  546.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("      font-size: " + WWHelpTopFrame.WWHelp.mMessages["Font Size"] + " }");
  547.   for (ChildLevel = 0 ; ChildLevel < this.mMaxLevel ; ChildLevel++)
  548.   {
  549.     WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("  p.l" + (ChildLevel + 1) + " { margin-left: " + (WWHelpTopFrame.WWHelp.mMessages["TOC Indent"] * ChildLevel) + "pt }");
  550.   }
  551.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln(" -->");
  552.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("</style>");
  553. }
  554.  
  555. function  Outline_UpdateOutlineSafe(ParamJumpToID)
  556. {
  557.   // Can't find the position of the target element in Netscape,
  558.   // so we'll use a named anchor to jump there.
  559.   //
  560. // HACK BEN
  561. //  WWHelpTopFrame.WWHNavigation.WWHSync.location.href = WWHelpTopFrame.WWHelp.mBaseURL + "wwhelp/js/html/sync.htm";
  562. //  WWHelpTopFrame.WWHNavigation.WWHSync.location.href = "#toc" + ParamJumpToID;
  563.   WWHelpTopFrame.WWHelp.mTabs.fUpdateXYPosition();
  564.  
  565.   // Close down any popups we had going to prevent JavaScript errors
  566.   //
  567.   this.mPopup.fHide();
  568.  
  569.   WWHelpTopFrame.WWHNavigation.WWHSync.location.href = WWHelpTopFrame.WWHelp.mBaseURL + "wwhelp/js/html/sync.htm";
  570. }
  571.  
  572. function  Outline_RevealEntrySafe(ParamEntryID,
  573.                                   bParamVisible)
  574. {
  575.   var  ExpandList;
  576.   var  SomeParent;
  577.  
  578.  
  579.   // Expand out enclosing entries
  580.   //
  581.   ExpandList = this.fFindClosedParents(ParamEntryID);
  582.   while (ExpandList.length > 0)
  583.   {
  584.     SomeParent = ExpandList[ExpandList.length - 1];
  585.  
  586.     SomeParent.mbExpanded = true;
  587.  
  588.     ExpandList.length -= 1;
  589.   }
  590.  
  591.   // Scroll to the entry not possible in Netscape, so just preserve current layout
  592.   //
  593.   if (bParamVisible)
  594.   {
  595.     this.fUpdateOutline(ParamEntryID);
  596.   }
  597. }
  598.  
  599. function  Outline_DisplayEntryFast(ParamEntry)
  600. {
  601.   if (ParamEntry.mChildren == null)
  602.   {
  603.     this.fDumpHTML("<nobr>");
  604.     this.fDumpHTML(ParamEntry.fLinkEntry("<img width=17 height=17 border=0 src=\"" + this.mImgSrcDir + "images/doc.gif\"> ") + "\n");
  605.     this.fDumpHTML("</nobr>");
  606.   }
  607.   else
  608.   {
  609.     if (ParamEntry.mbExpanded)
  610.     {
  611.       var  MaxChildIndex;
  612.       var  ChildIndex;
  613.  
  614.  
  615.       this.fDumpHTML("<nobr>");
  616.       this.fDumpHTML("<a href=\"javascript:WWHelpTopFrame.WWHelp.mContents.fCollapse(" + ParamEntry.mID + ");\" " + ParamEntry.fPopupActionString() + "><img width=17 height=17 border=0 src=\"" + this.mImgSrcDir + "images/fo.gif\"></a>");
  617.       this.fDumpHTML(" " + ParamEntry.fLinkEntry() + "\n");
  618.       this.fDumpHTML("</nobr>");
  619.  
  620.       this.fDumpHTML("<ul>\n");
  621.       MaxChildIndex = ParamEntry.mChildren.length;
  622.       for (ChildIndex = 0 ; ChildIndex < MaxChildIndex ; ChildIndex++)
  623.       {
  624.         this.fDumpHTML("<li id=toc" + ParamEntry.mChildren[ChildIndex].mID + ">");
  625.         this.fDisplayEntry(ParamEntry.mChildren[ChildIndex]);
  626.         this.fDumpHTML("</li>\n");
  627.       }
  628.       this.fDumpHTML("</ul>\n");
  629.     }
  630.     else
  631.     {
  632.       this.fDumpHTML("<nobr>");
  633.       this.fDumpHTML("<a href=\"javascript:WWHelpTopFrame.WWHelp.mContents.fExpand(" + ParamEntry.mID + ");\" " + ParamEntry.fPopupActionString() + "><img width=17 height=17 border=0 src=\"" + this.mImgSrcDir + "images/fc.gif\"></a>");
  634.       this.fDumpHTML(" " + ParamEntry.fLinkEntry() + "\n");
  635.       this.fDumpHTML("</nobr>");
  636.     }
  637.   }
  638. }
  639.  
  640. function  Outline_DisplayOutlineFast()
  641. {
  642.   var  MaxChildIndex;
  643.   var  ChildIndex;
  644.  
  645.  
  646.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("<ul>");
  647.  
  648.   this.mbStoreHTML = false;
  649.  
  650.   MaxChildIndex = this.mTop.mChildren.length;
  651.   for (ChildIndex = 0 ; ChildIndex < MaxChildIndex ; ChildIndex++)
  652.   {
  653.     this.fDumpHTML("<li class=book id=toc" + this.mTop.mChildren[ChildIndex].mID + ">");
  654.     this.fDisplayEntry(this.mTop.mChildren[ChildIndex]);
  655.     this.fDumpHTML("</li>\n");
  656.   }
  657.  
  658.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("</ul>");
  659. }
  660.  
  661. function  Outline_GenerateStylesFast()
  662. {
  663.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("<style type=\"text/css\">");
  664.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln(" <!--");
  665.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("  a  { text-decoration: none ;");
  666.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("       color: " + WWHelpTopFrame.WWHelp.mMessages["Anchor Color"] + " }");
  667.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("  ul { list-style-type: none ;");
  668.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("       padding-left: 0pt ;");
  669.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("       margin-top: 1pt ;");
  670.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("       margin-bottom: 1pt ;");
  671.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("       margin-left: 0pt }");
  672.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("  li { margin-top: 1pt ;");
  673.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("       margin-bottom: 1pt ;");
  674.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("       font-family: " + WWHelpTopFrame.WWHelp.mMessages["Font Family"] + " ;");
  675.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("       font-size: " + WWHelpTopFrame.WWHelp.mMessages["Font Size"] + " ;");
  676.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("       margin-left: " + WWHelpTopFrame.WWHelp.mMessages["TOC Indent"] + "pt }");
  677.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("  li.book { margin-left: 0pt }");
  678.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln(" -->");
  679.   WWHelpTopFrame.WWHNavigation.WWHSync.document.writeln("</style>");
  680. }
  681.  
  682. function  Outline_UpdateOutlineFast(ParamJumpToID)
  683. {
  684.   var  ElementID;
  685.  
  686.  
  687.   this.mStoredHTML = "";
  688.   this.mbStoreHTML = true;
  689.  
  690.   this.fDisplayEntry(this.mEntries[ParamJumpToID]);
  691.   ElementID = "toc" + ParamJumpToID;
  692.   if ((WWHelpTopFrame.WWHelp.mBrowser == 1) ||  // Shorthand for Netscape
  693.       (WWHelpTopFrame.WWHelp.mBrowser == 2))    // Shorthand for IE
  694.   {
  695.     WWHelpTopFrame.WWHNavigation.WWHSync.document.all[ElementID].innerHTML = this.mStoredHTML;
  696.   }
  697.   else if (WWHelpTopFrame.WWHelp.mBrowser == 4)  // Shorthand for Netscape 6.0
  698.   {
  699.     WWHelpTopFrame.WWHNavigation.WWHSync.document.getElementById(ElementID).innerHTML = this.mStoredHTML;
  700.   }
  701.  
  702.   this.mStoredHTML = "";
  703.   this.mbStoreHTML = false;
  704. }
  705.  
  706. function  Outline_RevealEntryFast(ParamEntryID,
  707.                                   bParamVisible)
  708. {
  709.   var  ExpandList;
  710.   var  SomeParent;
  711.  
  712.  
  713.   // Expand out enclosing entries
  714.   //
  715.   ExpandList = this.fFindClosedParents(ParamEntryID);
  716.   while (ExpandList.length > 0)
  717.   {
  718.     SomeParent = ExpandList[ExpandList.length - 1];
  719.  
  720.     SomeParent.mbExpanded = true;
  721.     if (bParamVisible)
  722.     {
  723.       this.fUpdateOutline(SomeParent.mID);
  724.     }
  725.  
  726.     ExpandList.length -= 1;
  727.   }
  728.  
  729.   // Scroll to the entry
  730.   //
  731.   if (bParamVisible)
  732.   {
  733.     if (WWHelpTopFrame.WWHelp.mBrowser == 2)  // Shorthand for IE
  734.     {
  735.       WWHelpTopFrame.WWHelp.mTabs.mXYPosition[0][1] = WWHelpTopFrame.WWHNavigation.WWHSync.document.all["toc" + ParamEntryID].offsetTop;
  736.  
  737.       setTimeout("WWHelpTopFrame.WWHNavigation.WWHSync.window.scroll(" + WWHelpTopFrame.WWHelp.mTabs.mXYPosition[0][0]
  738.                                                                        + ", "
  739.                                                                        + WWHelpTopFrame.WWHelp.mTabs.mXYPosition[0][1]
  740.                                                                        + ");", 100);
  741.     }
  742.     else if (WWHelpTopFrame.WWHelp.mBrowser == 4)  // Shorthand for Netscape 6.0
  743.     {
  744.       WWHelpTopFrame.WWHelp.mTabs.mXYPosition[0][1] = WWHelpTopFrame.WWHNavigation.WWHSync.document.getElementById("toc" + ParamEntryID).offsetTop;
  745.  
  746.       setTimeout("WWHelpTopFrame.WWHNavigation.WWHSync.window.scroll(" + WWHelpTopFrame.WWHelp.mTabs.mXYPosition[0][0]
  747.                                                                        + ", "
  748.                                                                        + WWHelpTopFrame.WWHelp.mTabs.mXYPosition[0][1]
  749.                                                                        + ");", 100);
  750.     }
  751.   }
  752. }
  753.