home *** CD-ROM | disk | FTP | other *** search
/ Thomson (Residential) / TGSTPv7203.iso / mac / Documentation / HTML / TG780-BUS_pt / wwhelp / wwhimpl / common / scripts / help.js < prev    next >
Text File  |  2007-06-22  |  18KB  |  653 lines

  1. // Copyright (c) 2000-2001 Quadralay Corporation.  All rights reserved.
  2. //
  3.  
  4. function  WWHHelp_GetLocale()
  5. {
  6.   var  Locale = "en";
  7.  
  8.  
  9.   // Reset locale to correct language value
  10.   //
  11.   if ((typeof navigator.language != "undefined") &&
  12.       (navigator.language != null))
  13.   {
  14.     Locale = navigator.language;
  15.   }
  16.   else if ((typeof navigator.userLanguage != "undefined") &&
  17.            (navigator.userLanguage != null))
  18.   {
  19.     Locale = navigator.userLanguage;
  20.   }
  21.  
  22.   // Convert everything to lowercase
  23.   //
  24.   Locale = Locale.toLowerCase();
  25.  
  26.   // Replace '-'s with '_'s
  27.   //
  28.   Locale = WWHStringUtilities_SearchReplace(Locale, "-", "_");
  29.  
  30.   return Locale;
  31. }
  32.  
  33. function  WWHHelp_GetBaseURL(ParamURL)
  34. {
  35.   var  BaseURL;
  36.   var  Parts;
  37.  
  38.  
  39.   BaseURL = ParamURL.substring(0, ParamURL.lastIndexOf("/"));
  40.  
  41.   Parts = BaseURL.split("/wwhelp/wwhimpl/common/html");
  42.   if (Parts[0] == BaseURL)
  43.   {
  44.     Parts = BaseURL.split("/wwhelp/wwhimpl/java/html");
  45.   }
  46.   if (Parts[0] == BaseURL)
  47.   {
  48.     Parts = BaseURL.split("/wwhelp/wwhimpl/js/html");
  49.   }
  50.  
  51.   BaseURL = Parts[0] + "/";
  52.  
  53.   return BaseURL;
  54. }
  55.  
  56. function  WWHHelp_GetURLParams(ParamURL)
  57. {
  58.   var  URLParams = new Array(null, null, null, null);
  59.  
  60.  
  61.   // Check for possible context specification
  62.   //
  63.   if (ParamURL.indexOf("?") != -1)
  64.   {
  65.     var  Parts;
  66.     var  ContextMarker = "context=";
  67.     var  TopicMarker   = "topic=";
  68.     var  FileMarker    = "file=";
  69.     var  HREFMarker    = "href=";
  70.     var  MaxIndex;
  71.     var  Index;
  72.  
  73.  
  74.     Parts = ParamURL.split("?");
  75.  
  76.     // Check for our context tags
  77.     //
  78.     if ((Parts[1].indexOf("&") != -1) &&
  79.         (Parts[1].indexOf(ContextMarker) != -1) &&
  80.         ((Parts[1].indexOf(TopicMarker) != -1) ||
  81.          (Parts[1].indexOf(FileMarker) != -1)))
  82.     {
  83.       Parts = Parts[1].split("&");
  84.  
  85.       // Set context and topic, if specified
  86.       //
  87.       for (MaxIndex = Parts.length, Index = 0 ; Index < MaxIndex ; Index++)
  88.       {
  89.         if (Parts[Index].indexOf(ContextMarker) == 0)
  90.         {
  91.           URLParams[0] = Parts[Index].substring(ContextMarker.length, Parts[Index].length);
  92.         }
  93.         if (Parts[Index].indexOf(TopicMarker) == 0)
  94.         {
  95.           URLParams[1] = Parts[Index].substring(TopicMarker.length, Parts[Index].length);
  96.         }
  97.         if (Parts[Index].indexOf(FileMarker) == 0)
  98.         {
  99.           URLParams[2] = Parts[Index].substring(FileMarker.length, Parts[Index].length);
  100.         }
  101.       }
  102.  
  103.       // Make certain we have both a ContextTag and either a TopicTag or FileTag
  104.       // Otherwise, reset them
  105.       //
  106.       if ((URLParams[0] == null) ||
  107.           ((URLParams[1] == null) &&
  108.            (URLParams[2] == null)))
  109.       {
  110.         URLParams[0] = null;
  111.         URLParams[1] = null;
  112.         URLParams[2] = null;
  113.       }
  114.     }
  115.     else if (Parts[1].indexOf(HREFMarker) == 0) // Check for file tag
  116.     {
  117.       Parts = Parts[1].split("&");
  118.  
  119.       // Set href, if specified
  120.       //
  121.       for (MaxIndex = Parts.length, Index = 0 ; Index < MaxIndex ; Index++)
  122.       {
  123.         if (Parts[Index].indexOf(HREFMarker) == 0)
  124.         {
  125.           URLParams[3] = Parts[Index].substring(HREFMarker.length, Parts[Index].length);
  126.         }
  127.       }
  128.     }
  129.   }
  130.  
  131.   return URLParams;
  132. }
  133.  
  134. function  WWHHelp_Object(ParamURL)
  135. {
  136.   this.mbInitialized   = false;
  137.   this.mInitStage      = 0;
  138.   this.mInitControls   = 0;
  139.   this.mSettings       = new WWHCommonSettings_Object();
  140.   this.mMessages       = new WWHCommonMessages_Object();
  141.   this.mDocumentLoaded = null;
  142.   this.mLocale         = WWHHelp_GetLocale();
  143.   this.mLocationURL    = WWHStringUtilities_NormalizeURL(ParamURL);
  144.   this.mBaseURL        = WWHHelp_GetBaseURL(this.mLocationURL);
  145.   this.mHelpURLPrefix  = WWHStringUtilities_RestoreEscapedSpaces(this.mBaseURL);
  146.   this.mContextDir     = null;
  147.   this.mTopicTag       = null;
  148.   this.mDocumentURL    = "";
  149.   this.mPopup          = new WWHPopup_Object("WWHFrame.WWHHelp.mPopup",
  150.                                              "WWHFrame.WWHContentFrame.WWHDocumentFrame",
  151.                                              WWHPopupFormat_Translate,
  152.                                              WWHPopupFormat_Format,
  153.                                              "WWHPopupDIV", "WWHPopupText", 500, 12, 20,
  154.                                              this.mSettings.mPopup.mWidth);
  155.   this.mBookGroups     = new WWHBookGroups_Object();
  156.   this.mBooks          = new WWHBookList_Object();
  157.  
  158.   this.fInitStage                = WWHHelp_InitStage;
  159.   this.fHandlerInitialized       = WWHHelp_HandlerInitialized;
  160.   this.fControlsLoaded           = WWHHelp_ControlsLoaded;
  161.   this.fSetDocumentFrame         = WWHHelp_SetDocumentFrame;
  162.   this.fSetDocumentHREF          = WWHHelp_SetDocumentHREF;
  163.   this.fDetermineContextDocument = WWHHelp_DetermineContextDocument;
  164.   this.fLoadTopicData            = WWHHelp_LoadTopicData;
  165.   this.fProcessTopicResult       = WWHHelp_ProcessTopicResult;
  166.   this.fDisplayContextDocument   = WWHHelp_DisplayContextDocument;
  167.   this.fSetContextDocument       = WWHHelp_SetContextDocument;
  168.   this.fGetBookFileHREF          = WWHHelp_GetBookFileHREF;
  169.   this.fGetSyncPrevNext          = WWHHelp_GetSyncPrevNext;
  170.   this.fHREFToTitle              = WWHHelp_HREFToTitle;
  171.   this.fShowPopup                = WWHHelp_ShowPopup;
  172.   this.fHidePopup                = WWHHelp_HidePopup;
  173.   this.fClickedPopup             = WWHHelp_ClickedPopup;
  174.   this.fUpdate                   = WWHHelp_Update;
  175.   this.fDocumentBookkeeping      = WWHHelp_DocumentBookkeeping;
  176.  
  177.   // Load up messages
  178.   //
  179.   this.mMessages.fSetByLocale(this.mLocale);
  180. }
  181.  
  182. function  WWHHelp_InitStage(ParamStage)
  183. {
  184.   if (( ! this.mbInitialized) &&
  185.       (ParamStage == this.mInitStage))
  186.   {
  187.     // Perform actions for current init stage
  188.     //
  189.     switch (this.mInitStage)
  190.     {
  191.       case 0:  // Start initialization process
  192.         // Alert the user if this browser is unsupported
  193.         //
  194.         if (WWHFrame.WWHBrowserInfo.mbUnsupported)
  195.         {
  196.           alert(WWHFrame.WWHHelp.mMessages.mBrowserNotSupported);
  197.         }
  198.  
  199.         this.mInitControls = 0;
  200.         WWHFrame.WWHContentFrame.WWHPageNavFrame.WWHControlsLeftFrame.location.replace(this.mHelpURLPrefix + "wwhelp/wwhimpl/common/html/init0.htm");
  201.         break;
  202.  
  203.       case 1:  // Prep book data
  204.         WWHFrame.WWHContentFrame.WWHPageNavFrame.WWHControlsLeftFrame.location.replace(this.mHelpURLPrefix + "wwhelp/wwhimpl/common/html/init1.htm");
  205.         break;
  206.  
  207.       case 2:  // Load book data
  208.         WWHFrame.WWHContentFrame.WWHPageNavFrame.WWHControlsLeftFrame.location.replace(this.mHelpURLPrefix + "wwhelp/wwhimpl/common/html/init2.htm");
  209.         break;
  210.  
  211.       case 3:  // Handler setup
  212.         // Initialize handler
  213.         //
  214.         WWHFrame.WWHHandler.fInit();
  215.         break;
  216.  
  217.       case 4:  // Display controls
  218.         WWHFrame.WWHContentFrame.WWHPageNavFrame.WWHControlsLeftFrame.location.replace(this.mHelpURLPrefix + "wwhelp/wwhimpl/common/html/controll.htm");
  219.         WWHFrame.WWHContentFrame.WWHPageNavFrame.WWHControlsRightFrame.location.replace(this.mHelpURLPrefix + "wwhelp/wwhimpl/common/html/controlr.htm");
  220. //        WWHFrame.WWHContentFrame.WWHPageNavFrame.WWHTitleFrame.location.replace(this.mHelpURLPrefix + "wwhelp/wwhimpl/common/html/title.htm");
  221.         break;
  222.  
  223.       case 5:  // Display document
  224.         this.fSetDocumentFrame();
  225.         this.mbInitialized = true;
  226.         break;
  227.     }
  228.  
  229.     // Increment stage
  230.     //
  231.     this.mInitStage++;
  232.   }
  233. }
  234.  
  235. function  WWHHelp_HandlerInitialized()
  236. {
  237.   if (WWHFrame.WWHHelp.mInitStage > 0)
  238.   {
  239.     if (WWHFrame.WWHHandler.mbInitialized)
  240.     {
  241.       WWHFrame.WWHContentFrame.WWHPageNavFrame.WWHControlsRightFrame.location.replace(this.mHelpURLPrefix + "wwhelp/wwhimpl/common/html/init3.htm");
  242.     }
  243.   }
  244. }
  245.  
  246. function  WWHHelp_ControlsLoaded()
  247. {
  248.   if ( ! WWHFrame.WWHHelp.mbInitialized)
  249.   {
  250.     // Only go to final init stage once all control frames have loaded
  251.     //
  252.     this.mInitControls++;
  253.     if (this.mInitControls > 1)
  254.     {
  255.       WWHFrame.WWHHelp.fInitStage(5);
  256.     }
  257.   }
  258. }
  259.  
  260. function  WWHHelp_SetDocumentFrame()
  261. {
  262.   // Preserve current document if user clicked forward or back to see it
  263.   //
  264.   if (this.mDocumentLoaded != null)
  265.   {
  266.     this.fUpdate(this.mDocumentLoaded);
  267.  
  268.     this.mDocumentLoaded = null;
  269.   }
  270.   else
  271.   {
  272.     var  ContextDocumentURL;
  273.  
  274.  
  275.     ContextDocumentURL = this.fDetermineContextDocument();
  276.     if (ContextDocumentURL != null)
  277.     {
  278.       this.fSetDocumentHREF(ContextDocumentURL, true);
  279.     }
  280.     else  // Load topic data to determine document to display
  281.     {
  282.       this.fSetDocumentHREF(this.mBaseURL + "wwhelp/wwhimpl/common/html/document.htm", true);
  283.     }
  284.   }
  285. }
  286.  
  287. function  WWHHelp_SetDocumentHREF(ParamURL,
  288.                                   bParamReplace)
  289. {
  290.   if (ParamURL.length > 0)
  291.   {
  292.     var  EscapedURL = ParamURL;
  293.  
  294.  
  295.     EscapedURL = WWHStringUtilities_RestoreEscapedSpaces(EscapedURL);
  296.     EscapedURL = WWHStringUtilities_EscapeURLForJavaScriptAnchor(EscapedURL);
  297.  
  298.     if (bParamReplace)
  299.     {
  300.       setTimeout("WWHFrame.WWHContentFrame.WWHDocumentFrame.location.replace(\"" + EscapedURL + "\");", 1);
  301.     }
  302.     else
  303.     {
  304.       setTimeout("WWHFrame.WWHContentFrame.WWHDocumentFrame.location = \"" + EscapedURL + "\";", 1);
  305.     }
  306.   }
  307. }
  308.  
  309. function  WWHHelp_DetermineContextDocument()
  310. {
  311.   var  ContextDocumentURL = null;
  312.   var  URLParams          = WWHHelp_GetURLParams(this.mLocationURL);
  313.  
  314.  
  315.   // Check for context specification
  316.   //
  317.   if (URLParams[3] != null)  // href specified
  318.   {
  319.     ContextDocumentURL = this.mBaseURL + URLParams[3];
  320.   }
  321.   else if (URLParams[0] != null)  // context specified
  322.   {
  323.     var  ContextBook;
  324.  
  325.  
  326.     // Determine book directory
  327.     //
  328.     ContextBook = this.mBooks.fGetContextBook(URLParams[0]);
  329.     if (ContextBook != null)
  330.     {
  331.       if (URLParams[2] != null)  // file specified
  332.       {
  333.         ContextDocumentURL = this.mBaseURL + ContextBook.mDirectory + URLParams[2];
  334.       }
  335.       else if (URLParams[1] != null)  // topic specified
  336.       {
  337.         // Setup for a topic search
  338.         //
  339.         this.mContextDir = ContextBook.mDirectory;
  340.         this.mTopicTag   = URLParams[1];
  341.  
  342.         this.mDocumentURL = "";
  343.       }
  344.     }
  345.     else  // Display splash page if nothing else found
  346.     {
  347.       ContextDocumentURL = this.mBaseURL + "wwhelp/wwhimpl/common/html/default.htm";
  348.     }
  349.   }
  350.   else  // Display splash page if nothing else found
  351.   {
  352.     ContextDocumentURL = this.mBaseURL + "wwhelp/wwhimpl/common/html/default.htm";
  353.   }
  354.  
  355.   return ContextDocumentURL;
  356. }
  357.  
  358. function  WWHHelp_LoadTopicData()
  359. {
  360.   var  LoadTopicDataHTML = "";
  361.  
  362.  
  363.   LoadTopicDataHTML += "<script type=\"text/javascript\" language=\"JavaScript1.2\" src=\"" + this.mHelpURLPrefix + WWHStringUtilities_RestoreEscapedSpaces(this.mContextDir) + "wwhdata/common/topics.js\"></script>";
  364.   LoadTopicDataHTML += "<script type=\"text/javascript\" language=\"JavaScript1.2\" src=\"" + this.mHelpURLPrefix + "wwhelp/wwhimpl/common/scripts/documt1s.js\"></script>";
  365.  
  366.   return LoadTopicDataHTML;
  367. }
  368.  
  369. function  WWHHelp_ProcessTopicResult(ParamTopicURL)
  370. {
  371.   if (ParamTopicURL != null)
  372.   {
  373.     this.mDocumentURL = this.mBaseURL + this.mContextDir + ParamTopicURL;
  374.   }
  375. }
  376.  
  377. function  WWHHelp_DisplayContextDocument()
  378. {
  379.   WWHFrame.WWHHelp.fSetDocumentHREF(this.mDocumentURL, true);
  380. }
  381.  
  382. function  WWHHelp_GetURLPrefix(ParamURL)
  383. {
  384.   var  URLPrefix  = null;
  385.   var  WorkingURL = "";
  386.   var  Parts;
  387.   var  Index;
  388.  
  389.  
  390.   // Standardize URL for processing
  391.   //
  392.   WorkingURL = ParamURL;
  393.  
  394.   // Strip any URL parameters
  395.   //
  396.   if (WorkingURL.indexOf("?") != -1)
  397.   {
  398.     Parts = WorkingURL.split("?");
  399.     WorkingURL = Parts[0];
  400.   }
  401.  
  402.   // Confirm URL in wwhelp hierarchy
  403.   //
  404.   if (((Index = WorkingURL.indexOf("/wwhelp/wwhimpl/common/html/switch.htm")) != -1) ||
  405.       ((Index = WorkingURL.indexOf("/wwhelp/wwhimpl/common/html/wwhelp.htm")) != -1) ||
  406.       ((Index = WorkingURL.indexOf("/wwhelp/wwhimpl/java/html/wwhelp.htm"))   != -1) ||
  407.       ((Index = WorkingURL.indexOf("/wwhelp/wwhimpl/js/html/wwhelp.htm"))     != -1))
  408.   {
  409.     URLPrefix = WorkingURL.substring(0, Index);
  410.   }
  411.   else
  412.   {
  413.     // Look for match on top level "wwhelp.htm" file
  414.     //
  415.     Index = WorkingURL.lastIndexOf("/");
  416.     if ((Index != -1) &&
  417.        (Index == WorkingURL.indexOf("/wwhelp.htm")))
  418.     {
  419.       URLPrefix = WorkingURL.substring(0, Index);
  420.     }
  421.   }
  422.  
  423.   return URLPrefix;
  424. }
  425.  
  426. function  WWHHelp_SetContextDocument(ParamURL)
  427. {
  428.   var  URL = WWHStringUtilities_NormalizeURL(ParamURL);
  429.   var  CurrentURLPrefix;
  430.   var  NewURLPrefix;
  431.  
  432.  
  433.   // Confirm URL under same hierarchy
  434.   //
  435.   CurrentURLPrefix = WWHHelp_GetURLPrefix(this.mLocationURL);
  436.   NewURLPrefix     = WWHHelp_GetURLPrefix(URL);
  437.   if ((CurrentURLPrefix != null) &&
  438.       (NewURLPrefix     != null) &&
  439.       (CurrentURLPrefix == NewURLPrefix))
  440.   {
  441.     this.mLocationURL = URL;
  442.     this.fSetDocumentFrame();
  443.   }
  444.   else
  445.   {
  446.     // Some other help system requested, redirect to it
  447.     //
  448.     setTimeout("WWHFrame.location = \"" + WWHStringUtilities_EscapeURLForJavaScriptAnchor(ParamURL) + "\";", 1);
  449.   }
  450. }
  451.  
  452. function  WWHHelp_GetBookFileHREF(ParamHREF)
  453. {
  454.   var  BookFileHREF = null;
  455.  
  456.  
  457.   // Confirm HREF can be in same hierarchy as BaseURL
  458.   //
  459.   if ((this.mBaseURL.length > 0) &&
  460.       (ParamHREF.length > this.mBaseURL.length))
  461.   {
  462.     var  Prefix;
  463.     var  Suffix;
  464.  
  465.  
  466.     Prefix = ParamHREF.substring(0, this.mBaseURL.length);
  467.     Suffix = ParamHREF.substring(this.mBaseURL.length, ParamHREF.length);
  468.  
  469.     // Confirm HREF definitely is in same hierarchy as BaseURL
  470.     //
  471.     if (Prefix == this.mBaseURL)
  472.     {
  473.       BookFileHREF = Suffix;
  474.     }
  475.   }
  476.  
  477.   return BookFileHREF;
  478. }
  479.  
  480. function  WWHHelp_GetSyncPrevNext(ParamHREF)
  481. {
  482.   var  ResultArray = new Array(null, null, null);
  483.   var  Parts;
  484.   var  AbsoluteHREF;
  485.   var  BookFileHREF;
  486.  
  487.  
  488.   // Trim named anchor entries
  489.   //
  490.   Parts = ParamHREF.split("#");
  491.   AbsoluteHREF = Parts[0];
  492.  
  493.   BookFileHREF = this.fGetBookFileHREF(AbsoluteHREF);
  494.   if (BookFileHREF != null)
  495.   {
  496.     if (BookFileHREF == "wwhelp/wwhimpl/common/html/default.htm")
  497.     {
  498.       ResultArray[2] = this.mBooks.fBookFileIndiciesToHREF(0, 0);
  499.     }
  500.     else
  501.     {
  502.       ResultArray = this.mBooks.fGetSyncPrevNext(BookFileHREF);
  503.     }
  504.  
  505.     // Prefix with BaseURL if defined
  506.     //
  507.  
  508.     // Current
  509.     //
  510.     if (ResultArray[0] != null)
  511.     {
  512.       ResultArray[0] = this.mBaseURL + ResultArray[0];
  513.     }
  514.  
  515.     // Previous
  516.     //
  517.     if (ResultArray[1] != null)
  518.     {
  519.       ResultArray[1] = this.mBaseURL + ResultArray[1];
  520.     }
  521.  
  522.     // Next
  523.     //
  524.     if (ResultArray[2] != null)
  525.     {
  526.       ResultArray[2] = this.mBaseURL + ResultArray[2];
  527.     }
  528.   }
  529.   else
  530.   {
  531.     // Unknown document, enable next button to go to first known page
  532.     //
  533.     ResultArray[2] = this.mBaseURL + this.mBooks.fBookFileIndiciesToHREF(0, 0);
  534.   }
  535.  
  536.   return ResultArray;
  537. }
  538.  
  539. function  WWHHelp_HREFToTitle(ParamHREF)
  540. {
  541.   var  HREFTitle;
  542.   var  Parts;
  543.   var  AbsoluteHREF;
  544.   var  BookFileHREF;
  545.  
  546.  
  547.   // Trim named anchor entries
  548.   //
  549.   Parts = ParamHREF.split("#");
  550.   AbsoluteHREF = Parts[0];
  551.  
  552.   BookFileHREF = this.fGetBookFileHREF(AbsoluteHREF);
  553.   Parts = this.mBooks.fGetBookIndexFileHREF(BookFileHREF);
  554.   if (Parts[0] >= 0)
  555.   {
  556.     HREFTitle = this.mBooks.fHREFToTitle(Parts[0], Parts[1]);
  557.   }
  558.   else
  559.   {
  560.     Parts = AbsoluteHREF.split("/");
  561.     HREFTitle = AbsoluteHREF[AbsoluteHREF.length - 1];
  562.   }
  563.  
  564.   return HREFTitle;
  565. }
  566.  
  567. function  WWHHelp_ShowPopup(ParamContext,
  568.                             ParamLink,
  569.                             ParamEvent)
  570. {
  571.   var  PopupHTML;
  572.  
  573.  
  574.   PopupHTML = this.mBooks.fGetPopupHTML(ParamContext, ParamLink);
  575.   if ((PopupHTML != null) &&
  576.       (PopupHTML.length > 0))
  577.   {
  578.     this.mPopup.fShow(PopupHTML, ParamEvent);
  579.   }
  580. }
  581.  
  582. function  WWHHelp_HidePopup()
  583. {
  584.   this.mPopup.fHide();
  585. }
  586.  
  587. function  WWHHelp_ClickedPopup(ParamContext,
  588.                                ParamLink)
  589. {
  590.   var  Link = WWHStringUtilities_NormalizeURL(ParamLink);
  591.   var  LinkHREF = null;
  592.   var  Book;
  593.  
  594.  
  595.   Book = this.mBooks.fGetContextBook(ParamContext);
  596.   if (Book != null)
  597.   {
  598.     // Clickable popup?
  599.     //
  600.     if (Book.mPopups.fIsPopupClickable(ParamLink))
  601.     {
  602.       // Hide the popup if it is visible
  603.       //
  604.       this.fHidePopup();
  605.  
  606.       WWHFrame.WWHHelp.fSetDocumentHREF(this.mBaseURL + Book.mDirectory + Link, false);
  607.     }
  608.   }
  609. }
  610.  
  611. function  WWHHelp_Update(ParamURL)
  612. {
  613.   var  URL;
  614.  
  615.  
  616.   if (this.mInitStage > 0)
  617.   {
  618.     URL = WWHStringUtilities_NormalizeURL(ParamURL);
  619.  
  620.     WWHFrame.WWHHandler.fUpdate(URL);
  621.  
  622.     this.fDocumentBookkeeping(URL);
  623.   }
  624.   else if (ParamURL.indexOf("wwhelp/wwhimpl/common/html/default.htm") == -1)
  625.   {
  626.     this.mDocumentLoaded = ParamURL;
  627.   }
  628. }
  629.  
  630. function  WWHHelp_DocumentBookkeeping(ParamURL)
  631. {
  632.   // Highlight search words
  633.   //
  634.   if (typeof WWHFrame.WWHHighlightWords != "undefined")
  635.   {
  636.     WWHFrame.WWHHighlightWords.fExec();
  637.   }
  638.  
  639.   // Update controls
  640.   //
  641.   WWHFrame.WWHControls.fUpdateHREF(ParamURL);
  642.  
  643.   // Update window title, if possible
  644.   //
  645.   if (ParamURL.indexOf("wwhelp/wwhimpl/common/html/default.htm") == -1)
  646.   {
  647.     if (WWHFrame.WWHBrowserInfo.mBrowser != 1)  // Shorthand for Netscape
  648.     {
  649.       WWHFrame.document.title = this.fHREFToTitle(ParamURL);
  650.     }
  651.   }
  652. }
  653.