"; LoadTopicDataHTML += ""; return LoadTopicDataHTML; } function WWHHelp_ProcessTopicResult(ParamTopicURL) { if (ParamTopicURL != null) { this.mDocumentURL = this.mBaseURL + this.mContextDir + ParamTopicURL; } } function WWHHelp_DisplayContextDocument() { WWHFrame.WWHHelp.fSetDocumentHREF(this.mDocumentURL, true); } function WWHHelp_GetURLPrefix(ParamURL) { var URLPrefix = null; var WorkingURL = ""; var Parts; var Index; // Standardize URL for processing // WorkingURL = ParamURL; // Strip any URL parameters // if (WorkingURL.indexOf("?") != -1) { Parts = WorkingURL.split("?"); WorkingURL = Parts[0]; } // Confirm URL in wwhelp hierarchy // if (((Index = WorkingURL.indexOf("/wwhelp/wwhimpl/common/html/switch.htm")) != -1) || ((Index = WorkingURL.indexOf("/wwhelp/wwhimpl/common/html/wwhelp.htm")) != -1) || ((Index = WorkingURL.indexOf("/wwhelp/wwhimpl/java/html/wwhelp.htm")) != -1) || ((Index = WorkingURL.indexOf("/wwhelp/wwhimpl/js/html/wwhelp.htm")) != -1)) { URLPrefix = WorkingURL.substring(0, Index); } else { // Look for match on top level "wwhelp.htm" file // Index = WorkingURL.lastIndexOf("/"); if ((Index != -1) && (Index == WorkingURL.indexOf("/wwhelp.htm"))) { URLPrefix = WorkingURL.substring(0, Index); } } return URLPrefix; } function WWHHelp_SetContextDocument(ParamURL) { var URL = WWHStringUtilities_NormalizeURL(ParamURL); var CurrentURLPrefix; var NewURLPrefix; var DocumentURL; // Confirm URL under same hierarchy // CurrentURLPrefix = WWHHelp_GetURLPrefix(this.mLocationURL); NewURLPrefix = WWHHelp_GetURLPrefix(URL); if ((CurrentURLPrefix != null) && (NewURLPrefix != null) && (CurrentURLPrefix == NewURLPrefix)) { // Check if in single topic mode // if (typeof WWHFrame.WWHNavigationFrame == "undefined") { // Check for required switch to frameset with navigation // WWHFrame.WWHSwitch.fProcessURL(ParamURL); if ( ! WWHFrame.WWHSwitch.mbSingle) { // Switch to frameset with navigation // if (WWHFrame.WWHSwitch.mParameters.length > 0) { // Context and topic supplied, use them // setTimeout("WWHFrame.location = \"" + WWHStringUtilities_EscapeURLForJavaScriptAnchor(ParamURL) + "\";", 1); } else { // Just switch to frameset with navigation and preserve the current document // DocumentURL = WWHStringUtilities_NormalizeURL(WWHFrame.WWHContentFrame.WWHDocumentFrame.location.href); DocumentURL = WWHFrame.WWHHelp.fGetBookFileHREF(DocumentURL); WWHFrame.WWHSwitch.fExec(false, WWHFrame.WWHHelp.mHelpURLPrefix + "/wwhelp/wwhimpl/common/html/wwhelp.htm?href=" + WWHStringUtilities_RestoreEscapedSpaces(DocumentURL)); } } else { // Update document frame // this.mLocationURL = URL; this.fSetDocumentFrame(); } } else { // Update document frame // this.mLocationURL = URL; this.fSetDocumentFrame(); } } else { // Some other help system requested, redirect to it // setTimeout("WWHFrame.location = \"" + WWHStringUtilities_EscapeURLForJavaScriptAnchor(ParamURL) + "\";", 1); } } function WWHHelp_GetBookFileHREF(ParamHREF) { var BookFileHREF = null; // Confirm HREF can be in same hierarchy as BaseURL // if ((this.mBaseURL.length > 0) && (ParamHREF.length > this.mBaseURL.length)) { var Prefix; var Suffix; Prefix = ParamHREF.substring(0, this.mBaseURL.length); Suffix = ParamHREF.substring(this.mBaseURL.length, ParamHREF.length); // Confirm HREF definitely is in same hierarchy as BaseURL // if (Prefix == this.mBaseURL) { BookFileHREF = Suffix; } } return BookFileHREF; } function WWHHelp_GetSyncPrevNext(ParamHREF) { var ResultArray = new Array(null, null, null); var Parts; var AbsoluteHREF; var BookFileHREF; // Trim named anchor entries // Parts = ParamHREF.split("#"); AbsoluteHREF = Parts[0]; BookFileHREF = this.fGetBookFileHREF(AbsoluteHREF); if (BookFileHREF != null) { if (BookFileHREF == "wwhelp/wwhimpl/common/html/default.htm") { ResultArray[2] = this.mBooks.fBookFileIndiciesToHREF(0, 0); } else { ResultArray = this.mBooks.fGetSyncPrevNext(BookFileHREF); } // Prefix with BaseURL if defined // // Current // if (ResultArray[0] != null) { ResultArray[0] = this.mBaseURL + ResultArray[0]; } // Previous // if (ResultArray[1] != null) { ResultArray[1] = this.mBaseURL + ResultArray[1]; } // Next // if (ResultArray[2] != null) { ResultArray[2] = this.mBaseURL + ResultArray[2]; } } else { // Unknown document, enable next button to go to first known page // ResultArray[2] = this.mBaseURL + this.mBooks.fBookFileIndiciesToHREF(0, 0); } return ResultArray; } function WWHHelp_HREFToTitle(ParamHREF) { var HREFTitle; var Parts; var AbsoluteHREF; var BookFileHREF; // Trim named anchor entries // Parts = ParamHREF.split("#"); AbsoluteHREF = Parts[0]; BookFileHREF = this.fGetBookFileHREF(AbsoluteHREF); Parts = this.mBooks.fGetBookIndexFileHREF(BookFileHREF); if (Parts[0] >= 0) { HREFTitle = this.mBooks.fHREFToTitle(Parts[0], Parts[1]); } else { Parts = AbsoluteHREF.split("/"); HREFTitle = AbsoluteHREF[AbsoluteHREF.length - 1]; } return HREFTitle; } function WWHHelp_ShowPopup(ParamContext, ParamLink, ParamEvent) { var PopupHTML; PopupHTML = this.mBooks.fGetPopupHTML(ParamContext, ParamLink); if ((PopupHTML != null) && (PopupHTML.length > 0)) { this.mPopup.fShow(PopupHTML, ParamEvent); } } function WWHHelp_HidePopup() { this.mPopup.fHide(); } function WWHHelp_ClickedPopup(ParamContext, ParamLink) { var Link = WWHStringUtilities_NormalizeURL(ParamLink); var LinkHREF = null; var Book; Book = this.mBooks.fGetContextBook(ParamContext); if (Book != null) { // Clickable popup? // if (Book.mPopups.fIsPopupClickable(ParamLink)) { // Hide the popup if it is visible // this.fHidePopup(); WWHFrame.WWHHelp.fSetDocumentHREF(this.mBaseURL + Book.mDirectory + Link, false); } } } function WWHHelp_Update(ParamURL) { var URL; if (this.mInitStage > 0) { URL = WWHStringUtilities_NormalizeURL(ParamURL); WWHFrame.WWHHandler.fUpdate(URL); this.fDocumentBookkeeping(URL); } else if (ParamURL.indexOf("wwhelp/wwhimpl/common/html/default.htm") == -1) { this.mDocumentLoaded = ParamURL; } } function WWHHelp_DocumentBookkeeping(ParamURL) { // Highlight search words // if (typeof WWHFrame.WWHHighlightWords != "undefined") { WWHFrame.WWHHighlightWords.fExec(); } // Update controls // WWHFrame.WWHControls.fUpdateHREF(ParamURL); // Update window title, if possible // if (ParamURL.indexOf("wwhelp/wwhimpl/common/html/default.htm") == -1) { if (WWHFrame.WWHBrowserInfo.mBrowser != 1) // Shorthand for Netscape { WWHFrame.document.title = this.fHREFToTitle(ParamURL); } } } function WWHControls_Object() { this.mSyncPrevNext = new Array(null, null, null); this.fSansNavigation = WWHControls_SansNavigation; this.fLeftHTML = WWHControls_LeftHTML; this.fRightHTML = WWHControls_RightHTML; this.fUpdateHREF = WWHControls_UpdateHREF; this.fSyncTOC = WWHControls_SyncTOC; this.fPrevious = WWHControls_Previous; this.fNext = WWHControls_Next; this.fRelatedTopics = WWHControls_RelatedTopics; this.fEmail = WWHControls_Email; this.fPrint = WWHControls_Print; this.fBookmark = WWHControls_Bookmark; this.fBookmarkData = WWHControls_BookmarkData; this.fBookmarkLink = WWHControls_BookmarkLink; } function WWHControls_SansNavigation() { var bSansNavigation = false; if (typeof WWHFrame.WWHNavigationFrame == "undefined") { bSansNavigation = true; } return bSansNavigation; } function WWHControls_LeftHTML() { var HTML = ""; var Settings = WWHFrame.WWHHelp.mSettings; HTML += "\n"; HTML += " \n"; // Display controls // if (this.fSansNavigation()) { HTML += " \n"; } else if (Settings.mbSyncContentsEnabled) { HTML += " \n"; } if (Settings.mbPrevEnabled) { HTML += " \n"; } if (Settings.mbNextEnabled) { HTML += " \n"; } HTML += " \n"; HTML += "
\n"; HTML += " \n"; HTML += " \""\n"; HTML += " \n"; HTML += " \n"; HTML += " \n"; HTML += " \""\n"; HTML += " \n"; HTML += " \n"; HTML += " \n"; HTML += " \""\n"; HTML += " \n"; HTML += " \n"; HTML += " \n"; HTML += " \""\n"; HTML += " \n"; HTML += "
\n"; return HTML; } function WWHControls_RightHTML() { var HTML = ""; var Settings = WWHFrame.WWHHelp.mSettings; // Confirm controls can be displayed // if (Settings.mbEmailEnabled) { Settings.mbEmailEnabled = ((typeof Settings.mEmailAddress == "string") && (Settings.mEmailAddress.length > 0)); } if (Settings.mbPrintEnabled) { Settings.mbPrintEnabled = ((typeof WWHFrame.WWHContentFrame.WWHDocumentFrame.focus != "undefined") && (typeof WWHFrame.WWHContentFrame.WWHDocumentFrame.print != "undefined")) } // Display controls // HTML += "\n"; HTML += " \n"; if (Settings.mbRelatedTopicsEnabled) { HTML += " \n"; } if (Settings.mbEmailEnabled) { HTML += " \n"; } if (Settings.mbPrintEnabled) { HTML += " \n"; } if (Settings.mbBookmarkEnabled) { HTML += " \n"; } HTML += " \n"; HTML += "
\n"; HTML += " \n"; HTML += " \""\n"; HTML += " \n"; HTML += " \n"; HTML += " \n"; HTML += " \""\n"; HTML += " \n"; HTML += " \n"; HTML += " \n"; HTML += " \""\n"; HTML += " \n"; HTML += " \n"; HTML += " \n"; HTML += " \""\n"; HTML += " \n"; HTML += "
\n"; return HTML; } function WWHControls_UpdateHREF(ParamHREF) { var DocumentBookmark = ""; var ControlsDocument; var Settings = WWHFrame.WWHHelp.mSettings; var Prefix = WWHFrame.WWHHelp.mHelpURLPrefix; var IconURL; // Update sync/prev/next array // this.mSyncPrevNext = WWHFrame.WWHHelp.fGetSyncPrevNext(ParamHREF); // Process left control frame // ControlsDocument = eval("WWHFrame.WWHContentFrame.WWHPageNavFrame.WWHControlsLeftFrame.document"); // Set Sync Icon // if (this.fSansNavigation()) { ; // Nothing to do } else if (Settings.mbSyncContentsEnabled) { if (this.mSyncPrevNext[0] != null) { IconURL = Prefix + "wwhelp/wwhimpl/common/images/sync.gif"; } else { IconURL = Prefix + "wwhelp/wwhimpl/common/images/syncx.gif"; } ControlsDocument.images["WWHSyncIcon"].src = IconURL; } // Set Previous Icon // if (Settings.mbPrevEnabled) { if (this.mSyncPrevNext[1] != null) { IconURL = Prefix + "wwhelp/wwhimpl/common/images/prev.gif"; } else { IconURL = Prefix + "wwhelp/wwhimpl/common/images/prevx.gif"; } ControlsDocument.images["WWHPrevIcon"].src = IconURL; } // Set Next Icon // if (Settings.mbNextEnabled) { if (this.mSyncPrevNext[2] != null) { IconURL = Prefix + "wwhelp/wwhimpl/common/images/next.gif"; } else { IconURL = Prefix + "wwhelp/wwhimpl/common/images/nextx.gif"; } ControlsDocument.images["WWHNextIcon"].src = IconURL; } // Process right control frame // ControlsDocument = eval("WWHFrame.WWHContentFrame.WWHPageNavFrame.WWHControlsRightFrame.document"); // Set Related Topics Icon // if (Settings.mbRelatedTopicsEnabled) { if (typeof WWHFrame.WWHContentFrame.WWHDocumentFrame.WWHDefineRelatedTopics == "function") { IconURL = Prefix + "wwhelp/wwhimpl/common/images/related.gif"; } else { IconURL = Prefix + "wwhelp/wwhimpl/common/images/relatedx.gif"; } ControlsDocument.images["WWHRelatedTopicsIcon"].src = IconURL; } // Set E-Mail Icon // if (Settings.mbEmailEnabled) { if (this.mSyncPrevNext[0] != null) { IconURL = Prefix + "wwhelp/wwhimpl/common/images/email.gif"; } else { IconURL = Prefix + "wwhelp/wwhimpl/common/images/emailx.gif"; } ControlsDocument.images["WWHEmailIcon"].src = IconURL; } // Set Print Icon // if (Settings.mbPrintEnabled) { if (this.mSyncPrevNext[0] != null) { IconURL = Prefix + "wwhelp/wwhimpl/common/images/print.gif"; } else { IconURL = Prefix + "wwhelp/wwhimpl/common/images/printx.gif"; } ControlsDocument.images["WWHPrintIcon"].src = IconURL; } // Set Bookmark Icon // if (Settings.mbBookmarkEnabled) { if (this.mSyncPrevNext[0] != null) { IconURL = Prefix + "wwhelp/wwhimpl/common/images/bkmark.gif"; } else { IconURL = Prefix + "wwhelp/wwhimpl/common/images/bkmarkx.gif"; } ControlsDocument.images["WWHBookmarkIcon"].src = IconURL; } } function WWHControls_SyncTOC() { var URL = WWHStringUtilities_NormalizeURL(WWHFrame.WWHContentFrame.WWHDocumentFrame.location.href); // Show navigation or reveal in TOC? // if (this.fSansNavigation()) { WWHFrame.WWHHandler.fSyncTOC(URL); } else { if (this.mSyncPrevNext[0] != null) { WWHFrame.WWHHandler.fSyncTOC(URL); } } } function WWHControls_Previous() { if (this.mSyncPrevNext[1] != null) { WWHFrame.WWHHelp.fSetDocumentHREF(this.mSyncPrevNext[1], false); } } function WWHControls_Next() { if (this.mSyncPrevNext[2] != null) { WWHFrame.WWHHelp.fSetDocumentHREF(this.mSyncPrevNext[2], false); } } function WWHControls_RelatedTopics() { if (typeof WWHFrame.WWHContentFrame.WWHDocumentFrame.WWHDefineRelatedTopics == "function") { WWHFrame.WWHRelatedTopics.fShow(); } } function WWHControls_Email() { if (this.mSyncPrevNext[0] != null) { WWHFrame.WWHContentFrame.WWHDocumentFrame.location = "mailto:" + WWHFrame.WWHHelp.mSettings.mEmailAddress + "?subject=Feedback: " + escape(this.mSyncPrevNext[0]); } } function WWHControls_Print() { if (this.mSyncPrevNext[0] != null) { WWHFrame.WWHContentFrame.WWHDocumentFrame.focus(); WWHFrame.WWHContentFrame.WWHDocumentFrame.print(); } } function WWHControls_Bookmark() { if (this.mSyncPrevNext[0] != null) { var BookmarkData; BookmarkData = this.fBookmarkData(); if ((BookmarkData[0] != null) && (BookmarkData[1] != null)) { if ((WWHFrame.WWHBrowserInfo.mBrowser == 2) && // Shorthand for IE ( ! WWHFrame.WWHBrowserInfo.mbMacIE45)) { window.external.AddFavorite(BookmarkData[1], BookmarkData[0]); } else { var Window; Window = window.open(WWHFrame.WWHHelp.mHelpURLPrefix + "wwhelp/wwhimpl/common/html/bookmark.htm", "WWHBookmarkLinkWindow", "width=400,height=20"); Window.document.open(); Window.document.writeln("

" + WWHFrame.WWHHelp.mMessages.mBookmarkLinkMessage + "

"); Window.document.writeln("

" + this.fBookmarkLink() + "

"); Window.document.close(); } } } } function WWHControls_BookmarkData() { var BookmarkData = new Array(null, null); if (this.mSyncPrevNext[0] != null) { var DocumentURL; // Determine bookmark link // DocumentURL = WWHFrame.WWHHelp.fGetBookFileHREF(this.mSyncPrevNext[0]); if (DocumentURL != null) { var DocumentTitle; var ResetEverything; var DocumentBookmarkURL; DocumentTitle = WWHFrame.WWHHelp.fHREFToTitle(this.mSyncPrevNext[0]); if ((WWHFrame.WWHBrowserInfo.mBrowser == 1) || // Shorthand for Netscape (WWHFrame.WWHBrowserInfo.mBrowser == 4)) // Shorthand for Netscape 6.0 { ResetEverything = "y=eval("document.open();document.writeln('<a href=\\""+x+"\\">"+x+"</a>');document.close();")"; } else { ResetEverything = "location=x"; } DocumentBookmarkURL = WWHFrame.WWHHelp.mHelpURLPrefix + "wwhelp/wwhimpl/common/html/wwhelp.htm?href=" + WWHStringUtilities_RestoreEscapedSpaces(DocumentURL); if (this.fSansNavigation()) { DocumentBookmarkURL += "&single=true" } DocumentBookmarkURL = "javascript:x=unescape('" + escape(DocumentBookmarkURL) + "');if(typeof window.WWHFrame!='undefined'){window.WWHFrame.WWHHelp.fSetContextDocument(x);}else{" + ResetEverything + ";}"; // Set bookmark data // BookmarkData[0] = DocumentTitle; BookmarkData[1] = DocumentBookmarkURL; } } return BookmarkData; } function WWHControls_BookmarkLink() { var BookmarkLink = ""; var BookmarkData = this.fBookmarkData(); if ((BookmarkData[0] != null) && (BookmarkData[1] != null)) { BookmarkLink = "" + BookmarkData[0] + ""; } return BookmarkLink; } function WWHRelatedTopics_Object() { this.mRelatedTopicList = new Array(); this.mPopup = new WWHPopup_Object("WWHFrame.WWHRelatedTopics.mPopup", "WWHFrame.WWHContentFrame.WWHDocumentFrame", WWHRelatedTopicsPopup_Translate, WWHRelatedTopicsPopup_Format, "WWHRelatedTopicsDIV", "WWHRelatedTopicsText", 10, 0, 0, WWHFrame.WWHHelp.mSettings.mRelatedTopics.mWidth); this.fClear = WWHRelatedTopics_Clear; this.fAdd = WWHRelatedTopics_Add; this.fHTML = WWHRelatedTopics_HTML; this.fDisplayTopic = WWHRelatedTopics_DisplayTopic; this.fUpdate = WWHRelatedTopics_Update; this.fShow = WWHRelatedTopics_Show; this.fShowAtEvent = WWHRelatedTopics_ShowAtEvent; this.fHide = WWHRelatedTopics_Hide; this.fInlineHTML = WWHRelatedTopics_InlineHTML; } function WWHRelatedTopics_Clear() { this.mRelatedTopicList.length = 0; } function WWHRelatedTopics_Add(ParamText, ParamContext, ParamFileURL) { this.mRelatedTopicList[this.mRelatedTopicList.length] = new WWHRelatedTopicEntry_Object(ParamText, ParamContext, ParamFileURL); } function WWHRelatedTopics_HTML() { var HTML = new WWHStringBuffer_Object(); var Settings = WWHFrame.WWHHelp.mSettings.mRelatedTopics; var MaxIndex; var Index; var ContextBook; for (MaxIndex = this.mRelatedTopicList.length, Index = 0 ; Index < MaxIndex ; Index++) { ContextBook = WWHFrame.WWHHelp.mBooks.fGetContextBook(this.mRelatedTopicList[Index].mContext); if (ContextBook != null) { HTML.fAppend(""); HTML.fAppend(""); HTML.fAppend(""); HTML.fAppend(""); HTML.fAppend(""); HTML.fAppend("
"); HTML.fAppend(""); HTML.fAppend(""); HTML.fAppend(""); HTML.fAppend(""); HTML.fAppend(""); HTML.fAppend(this.mRelatedTopicList[Index].mText); HTML.fAppend(""); HTML.fAppend("
\n"); } } return HTML.fGetBuffer(); } function WWHRelatedTopics_DisplayTopic(ParamIndex) { var ContextBook; var RelatedTopicURL = null; ContextBook = WWHFrame.WWHHelp.mBooks.fGetContextBook(this.mRelatedTopicList[ParamIndex].mContext); if (ContextBook != null) { RelatedTopicURL = WWHFrame.WWHHelp.mBaseURL + ContextBook.mDirectory + this.mRelatedTopicList[ParamIndex].mFileURL; // Hide popup to prevent JavaScript errors before displaying target document // this.fHide(); WWHFrame.WWHHelp.fSetDocumentHREF(RelatedTopicURL, false); } } function WWHRelatedTopics_Update() { // Clear list of topics // this.fClear(); // Load related topics if defined // if (typeof WWHFrame.WWHContentFrame.WWHDocumentFrame.WWHDefineRelatedTopics == "function") { WWHFrame.WWHContentFrame.WWHDocumentFrame.WWHDefineRelatedTopics(this); } } function WWHRelatedTopicEntry_Object(ParamText, ParamContext, ParamFileURL) { this.mText = ParamText; this.mContext = ParamContext; this.mFileURL = ParamFileURL; } function WWHRelatedTopics_Show() { var FakeEvent; // Create dummy event to pass to popup show command // FakeEvent = new WWHRelatedTopicsPopup_FakeEvent_Object(); // Assign coordinates to event base on browser type // Place event at far right and allow popup code to handle repositioning for display // if (WWHFrame.WWHBrowserInfo.mBrowser == 1) // Shorthand for Netscape 4.x { FakeEvent.layerX = WWHFrame.WWHContentFrame.WWHDocumentFrame.innerWidth + WWHFrame.WWHContentFrame.WWHDocumentFrame.pageXOffset; FakeEvent.layerY = WWHFrame.WWHContentFrame.WWHDocumentFrame.pageYOffset; } else if (WWHFrame.WWHBrowserInfo.mBrowser == 2) // Shorthand for IE { FakeEvent.x = WWHFrame.WWHContentFrame.WWHDocumentFrame.document.body.clientWidth; FakeEvent.y = 0; } else if (WWHFrame.WWHBrowserInfo.mBrowser == 4) // Shorthand for Netscape 6.x (Mozilla) { FakeEvent.layerX = WWHFrame.WWHContentFrame.WWHDocumentFrame.innerWidth + WWHFrame.WWHContentFrame.WWHDocumentFrame.pageXOffset; FakeEvent.layerY = WWHFrame.WWHContentFrame.WWHDocumentFrame.pageYOffset; } // Show popup // this.fShowAtEvent(FakeEvent); } function WWHRelatedTopics_ShowAtEvent(ParamEvent) { var RelatedTopicsHTML; // Show popup // this.fUpdate(); RelatedTopicsHTML = this.fHTML(); if (RelatedTopicsHTML.length > 0) { this.mPopup.fShow(RelatedTopicsHTML, ParamEvent); } } function WWHRelatedTopics_Hide() { this.mPopup.fHide(); } function WWHRelatedTopics_InlineHTML() { var HTML = ""; var Settings = WWHFrame.WWHHelp.mSettings.mRelatedTopics; var AnchorAttributes; var ForegroundColor; var BackgroundColor; var BorderColor; var ImageDir; var FontFamily = ""; var FontSize; if (Settings.mbInlineEnabled) { AnchorAttributes = "href=\"javascript:WWHShowRelatedTopicsHREF();\""; AnchorAttributes += " onClick=\"WWHShowRelatedTopicsPopup((document.all||document.getElementById||document.layers)?event:null);\""; ForegroundColor = Settings.mInlineForegroundColor; BackgroundColor = Settings.mInlineBackgroundColor; BorderColor = Settings.mInlineBorderColor; ImageDir = WWHFrame.WWHHelp.mHelpURLPrefix + "wwhelp/wwhimpl/common/images"; // Determine font family if running Netscape 4.x // Required due to errors processing style attributes // if (WWHFrame.WWHBrowserInfo.mBrowser == 1) // Shorthand for Netscape 4.x { FontFamily = WWHStringUtilities_ExtractStyleAttribute("font-family", Settings.mInlineFontStyle); FontSize = WWHStringUtilities_ExtractStyleAttribute("font-size", Settings.mInlineFontStyle); } HTML += "
"; HTML += ""; HTML += ""; HTML += ""; HTML += ""; HTML += ""; HTML += "
"; HTML += ""; if (FontFamily.length > 0) { HTML += ""; } HTML += ""; HTML += WWHFrame.WWHHelp.mMessages.mRelatedTopicsIconLabel; HTML += ""; HTML += " "; if (FontFamily.length > 0) { HTML += ""; } HTML += ""; HTML += ""; HTML += ""; HTML += ""; HTML += ""; HTML += "
"; HTML += "
"; } return HTML; } function WWHRelatedTopicsPopup_FakeEvent_Object() { } function WWHRelatedTopicsPopup_Translate(ParamText) { return ParamText; } function WWHRelatedTopicsPopup_Format(ParamWidth, ParamTextID, ParamText) { var FormattedText = ""; var Settings = WWHFrame.WWHHelp.mSettings.mRelatedTopics; var ImageDir = WWHFrame.WWHHelp.mHelpURLPrefix + "wwhelp/wwhimpl/common/images"; var BackgroundColor = Settings.mBackgroundColor; var BorderColor = Settings.mBorderColor; var TitleForegroundColor = Settings.mTitleForegroundColor; var TitleBackgroundColor = Settings.mTitleBackgroundColor; var ReqSpacer1w2h = ""; var ReqSpacer2w1h = ""; var ReqSpacer4w4h = ""; var Spacer1w2h = ReqSpacer1w2h; var Spacer2w1h = ReqSpacer2w1h; var Spacer4w4h = ReqSpacer4w4h; // Netscape 6.x (Mozilla) renders table cells with graphics // incorrectly inside of
tags that are rewritten on the fly // if (WWHFrame.WWHBrowserInfo.mBrowser == 4) // Shorthand for Netscape 6.x (Mozilla) { Spacer1w2h = ""; Spacer2w1h = ""; Spacer4w4h = ""; } FormattedText += ""; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += "
" + Spacer1w2h + "
" + Spacer2w1h + "" + Spacer4w4h + "" + Spacer2w1h + "
" + Spacer2w1h + "" + Spacer4w4h + "" + Spacer4w4h + "" + Spacer4w4h + "" + Spacer2w1h + "
" + ReqSpacer2w1h + "" + ReqSpacer4w4h + "" + ReqSpacer4w4h + "" + WWHFrame.WWHHelp.mMessages.mRelatedTopicsIconLabel + "" + ReqSpacer4w4h + "" + ReqSpacer4w4h + "" + ReqSpacer2w1h + "
" + Spacer2w1h + "" + Spacer4w4h + "" + Spacer4w4h + "" + Spacer4w4h + "" + Spacer2w1h + "
" + Spacer2w1h + "" + Spacer4w4h + "" + Spacer2w1h + "
" + ReqSpacer2w1h + "" + ReqSpacer4w4h + "" + ParamText + "" + ReqSpacer4w4h + "" + ReqSpacer2w1h + "
" + Spacer2w1h + "" + Spacer4w4h + "" + Spacer2w1h + "
" + Spacer1w2h + "
"; return FormattedText; } // Copyright (c) 2000-2001 Quadralay Corporation. All rights reserved. // function WWHStringUtilities_SearchReplace(ParamString, ParamSearchString, ParamReplaceString) { var ResultString; var Index; ResultString = ParamString; if ((ParamSearchString.length > 0) && (ResultString.length > 0)) { Index = 0; while ((Index = ResultString.indexOf(ParamSearchString, Index)) != -1) { ResultString = ResultString.substring(0, Index) + ParamReplaceString + ResultString.substring(Index + ParamSearchString.length, ResultString.length); Index += ParamReplaceString.length; } } return ResultString; } function WWHStringUtilities_EscapeHTML(ParamHTML) { var EscapedHTML = ParamHTML; // Escape problematic characters // & < > " // EscapedHTML = WWHStringUtilities_SearchReplace(EscapedHTML, "&", "&"); EscapedHTML = WWHStringUtilities_SearchReplace(EscapedHTML, "<", "<"); EscapedHTML = WWHStringUtilities_SearchReplace(EscapedHTML, ">", ">"); EscapedHTML = WWHStringUtilities_SearchReplace(EscapedHTML, "\"", """); return EscapedHTML; } function WWHStringUtilities_UnescapeHTML(ParamHTML) { var Text = ParamHTML; var EscapedExpression; var EscapedCharacter; var CharacterCode; var JavaScriptCharacter; // Unescape problematic characters // // & < > " // Text = WWHStringUtilities_SearchReplace(Text, "&", "&"); Text = WWHStringUtilities_SearchReplace(Text, "<", "<"); Text = WWHStringUtilities_SearchReplace(Text, ">", ">"); Text = WWHStringUtilities_SearchReplace(Text, """, "\""); // If any still exist, replace them with normal character // if (Text.indexOf("&#") != -1) { EscapedExpression = new RegExp("&#([0-9]+);"); while (EscapedExpression.test(Text)) { EscapedCharacter = EscapedExpression.lastMatch(); CharacterCode = parseInt(EscapedExpression.$1); // Turn character code into escaped JavaScript character // JavaScriptCharacter = eval("\\u" + WWHStringUtilities_DecimalToHex(CharacterCode)); // Replace in string // Text = WWHStringUtilities_SearchReplace(Text, EscapedCharacter, JavaScriptCharacter); } } return Text; } function WWHStringUtilities_DecimalToHex(ParamNumber) { var HexNumber = ""; HexNumber += WWHStringUtilities_HexDigit(ParamNumber >> 12); HexNumber += WWHStringUtilities_HexDigit(ParamNumber >> 8); HexNumber += WWHStringUtilities_HexDigit(ParamNumber >> 4); HexNumber += WWHStringUtilities_HexDigit(ParamNumber >> 0); return HexNumber; } function WWHStringUtilities_HexDigit(ParamDigit) { var HexDigit; var MaskedDigit = ParamDigit & 0x0F; // Translate to hex characters 'a' - 'f' if necessary // if (MaskedDigit == 10) { HexDigit = "a"; } else if (MaskedDigit == 11) { HexDigit = "b"; } else if (MaskedDigit == 12) { HexDigit = "c"; } else if (MaskedDigit == 13) { HexDigit = "d"; } else if (MaskedDigit == 14) { HexDigit = "e"; } else if (MaskedDigit == 15) { HexDigit = "f"; } else { HexDigit = MaskedDigit; } return HexDigit; } function WWHStringUtilities_NormalizeURL(ParamURL) { var URL = ParamURL; // Unescape URL for most browsers // if (WWHFrame.WWHBrowserInfo.mbUnescapeHREFs) { URL = unescape(URL); } else // IE unescapes everything automatically, except & { URL = WWHStringUtilities_SearchReplace(URL, "%26", "&"); } // Standardize protocol case // if (URL.indexOf(":") != -1) { var MaxIndex; Parts = URL.split(":"); URL = Parts[0].toLowerCase(); for (MaxIndex = Parts.length, Index = 1 ; Index < MaxIndex ; Index++) { URL += ":" + Parts[Index]; } } // Handle drive letters under Windows // if (WWHFrame.WWHBrowserInfo.mPlatform == 1) // Shorthand for Windows { var DrivePattern = new RegExp("^file:[/]+([a-zA-Z])[:\|][/](.*)$", "i"); var DrivePatternMatch; DrivePatternMatch = DrivePattern.exec(URL); if (DrivePatternMatch != null) { URL = "file:///" + DrivePatternMatch[1] + ":/" + DrivePatternMatch[2]; } } return URL; } function WWHStringUtilities_RestoreEscapedSpaces(ParamURL) { // Workaround for stupid Netscape 4.x bug // var StringWithSpace = "x x"; var EscapedURL = ParamURL; if (WWHFrame.WWHBrowserInfo.mbUnescapeHREFs) { EscapedURL = WWHStringUtilities_SearchReplace(EscapedURL, StringWithSpace.substring(1, 2), "%20"); } return EscapedURL; } function WWHStringUtilities_EscapeURLForJavaScriptAnchor(ParamURL) { var EscapedURL = ParamURL; // Escape problematic characters // \ " ' < > // EscapedURL = WWHStringUtilities_SearchReplace(EscapedURL, "\\", "\\\\"); EscapedURL = WWHStringUtilities_SearchReplace(EscapedURL, "\"", "\\u0022"); EscapedURL = WWHStringUtilities_SearchReplace(EscapedURL, "'", "\\u0027"); EscapedURL = WWHStringUtilities_SearchReplace(EscapedURL, "<", "\\u003c"); EscapedURL = WWHStringUtilities_SearchReplace(EscapedURL, ">", "\\u003e"); return EscapedURL; } function WWHStringUtilities_EscapeForJavaScript(ParamString) { var EscapedString = ParamString; // Escape problematic characters // \ " ' // EscapedString = WWHStringUtilities_SearchReplace(EscapedString, "\\", "\\\\"); EscapedString = WWHStringUtilities_SearchReplace(EscapedString, "\"", "\\u0022"); EscapedString = WWHStringUtilities_SearchReplace(EscapedString, "'", "\\u0027"); EscapedString = WWHStringUtilities_SearchReplace(EscapedString, "\n", "\\u000a"); EscapedString = WWHStringUtilities_SearchReplace(EscapedString, "\r", "\\u000d"); return EscapedString; } function WWHStringUtilities_EscapeRegExp(ParamWord) { var WordRegExpPattern = ParamWord; // Escape special characters // \ ( ) [ ] . ? + ^ $ // WordRegExpPattern = WWHStringUtilities_SearchReplace(WordRegExpPattern, "\\", "\\\\"); WordRegExpPattern = WWHStringUtilities_SearchReplace(WordRegExpPattern, ".", "\\."); WordRegExpPattern = WWHStringUtilities_SearchReplace(WordRegExpPattern, "?", "\\?"); WordRegExpPattern = WWHStringUtilities_SearchReplace(WordRegExpPattern, "+", "\\+"); WordRegExpPattern = WWHStringUtilities_SearchReplace(WordRegExpPattern, "|", "\\|"); WordRegExpPattern = WWHStringUtilities_SearchReplace(WordRegExpPattern, "^", "\\^"); WordRegExpPattern = WWHStringUtilities_SearchReplace(WordRegExpPattern, "$", "\\$"); WordRegExpPattern = WWHStringUtilities_SearchReplace(WordRegExpPattern, "(", "\\("); WordRegExpPattern = WWHStringUtilities_SearchReplace(WordRegExpPattern, ")", "\\)"); WordRegExpPattern = WWHStringUtilities_SearchReplace(WordRegExpPattern, "{", "\\{"); WordRegExpPattern = WWHStringUtilities_SearchReplace(WordRegExpPattern, "}", "\\}"); WordRegExpPattern = WWHStringUtilities_SearchReplace(WordRegExpPattern, "[", "\\["); WordRegExpPattern = WWHStringUtilities_SearchReplace(WordRegExpPattern, "]", "\\]"); // Windows IE 4.0 is brain dead // WordRegExpPattern = WWHStringUtilities_SearchReplace(WordRegExpPattern, "/", "[/]"); // Convert * to .* // WordRegExpPattern = WWHStringUtilities_SearchReplace(WordRegExpPattern, "*", ".*"); return WordRegExpPattern; } function WWHStringUtilities_WordToRegExpPattern(ParamWord) { var WordRegExpPattern; // Escape special characters // Convert * to .* // WordRegExpPattern = WWHStringUtilities_EscapeRegExp(ParamWord); // Add ^ and $ to force whole string match // WordRegExpPattern = "^" + WordRegExpPattern + "$"; return WordRegExpPattern; } function WWHStringUtilities_WordToRegExpWithSpacePattern(ParamWord) { var WordRegExpPattern; // Escape special characters // Convert * to .* // WordRegExpPattern = WWHStringUtilities_EscapeRegExp(ParamWord); // Add ^ and $ to force whole string match // Allow trailing whitespace // WordRegExpPattern = "^" + WordRegExpPattern + " *$"; return WordRegExpPattern; } function WWHStringUtilities_ExtractStyleAttribute(ParamAttribute, ParamFontStyle) { var Attribute = ""; var AttributeIndex; var AttributeStart; AttributeIndex = ParamFontStyle.indexOf(ParamAttribute, 0); if (AttributeIndex != -1) { AttributeStart = ParamFontStyle.indexOf(":", AttributeIndex); if (AttributeStart != -1) { AttributeStart += 1; AttributeEnd = ParamFontStyle.indexOf(";", AttributeStart); if (AttributeEnd == -1) { AttributeEnd = ParamFontStyle.length; } Attribute = ParamFontStyle.substring(AttributeStart + 1, AttributeEnd); } } return Attribute; } function WWHStringUtilities_NormalizeSearchWords(ParamSearchWords) { // Workaround for stupid Netscape 4.x bug // var StringWithSpace = "x x"; var Parts; var MaxIndex; var Index; var bStripChar; var CharAsInt; var CharIndex; // Handle some common cases // Parts = ParamSearchWords.split(StringWithSpace.substring(1, 2)); for (MaxIndex = Parts.length, Index = 0 ; Index < MaxIndex ; Index++) { // Remove leading characters @ % $ // bStripChar = true; while ((bStripChar) && (Parts[Index].length > 0)) { bStripChar = false; if ((Parts[Index].indexOf("@") == 0) || (Parts[Index].indexOf("%") == 0)) { bStripChar = true; } else if (Parts[Index].indexOf("$") == 0) { // Handle $ in front of numbers // if (Parts[Index].length > 1) { CharAsInt = parseInt(Parts[Index].substring(1, 2)); bStripChar = ((CharAsInt >= 0) && (CharAsInt <= 9)) ? false : true; } else { bStripChar = true; } } if (bStripChar) { Parts[Index] = Parts[Index].substring(1, Parts[Index].length); } } // Remove trailing characters ( ) % $ ; , // bStripChar = true; while ((bStripChar) && (Parts[Index].length > 0)) { bStripChar = false; CharIndex = Parts[Index].length - 1; if ((Parts[Index].lastIndexOf("(") == CharIndex) || (Parts[Index].lastIndexOf(")") == CharIndex) || (Parts[Index].lastIndexOf("%") == CharIndex) || (Parts[Index].lastIndexOf("$") == CharIndex) || (Parts[Index].lastIndexOf(";") == CharIndex) || (Parts[Index].lastIndexOf(",") == CharIndex)) { bStripChar = true; } if (bStripChar) { Parts[Index] = Parts[Index].substring(0, CharIndex); } } if (Parts[Index].length > 0) { // Replace embedded characters @ : , // Parts[Index] = WWHStringUtilities_SearchReplace(Parts[Index], "@", " "); Parts[Index] = WWHStringUtilities_SearchReplace(Parts[Index], ":", " "); Parts[Index] = WWHStringUtilities_SearchReplace(Parts[Index], ",", " "); } } return Parts.join(" "); } function WWHStringBuffer_Object() { this.mStringList = new Array(); this.mStringListEntries = 0; this.mSize = 0; this.fSize = WWHStringBuffer_Size; this.fReset = WWHStringBuffer_Reset; this.fAppend = WWHStringBuffer_Append; this.fGetBuffer = WWHStringBuffer_GetBuffer; } function WWHStringBuffer_Size() { return this.mSize; } function WWHStringBuffer_Reset() { this.mStringListEntries = 0; this.mSize = 0; } function WWHStringBuffer_Append(ParamString) { this.mSize += ParamString.length; this.mStringList[this.mStringListEntries] = ParamString; this.mStringListEntries++; } function WWHStringBuffer_GetBuffer() { this.mStringList.length = this.mStringListEntries; return this.mStringList.join(""); } // Copyright (c) 2000-2001 Quadralay Corporation. All rights reserved. // function WWHHighlightWords_Object() { this.mWords = null; this.fSetWordList = WWHHighlightWords_SetWordList; this.fExec = WWHHighlightWords_Exec; } function WWHHighlightWords_SetWordList(ParamWords) { if (WWHFrame.WWHHelp.mSettings.mbHighlightingEnabled) { this.mWords = ParamWords; } else { this.mWords = null; } } function WWHHighlightWords_Exec() { var WordList; var MaxIndex; var Index; var WordExpressions; var LongestWordExpression; var MaxExpressionIndex; var ExpressionIndex; var ExpressionHash = null; var ExpressionEntry; var Expression; var LongestWordExpressionKey; var NewHighlightedWords = null; var HighlightedWords = null; var TextRange; var LastCharTextRange; var bMatchFound; var bFirstMatch; var NewHighlightedWordsKey; if (this.mWords != null) { // Only works under IE on Windows // if ((WWHFrame.WWHBrowserInfo.mBrowser == 2) && // Shorthand for IE (WWHFrame.WWHBrowserInfo.mPlatform == 1)) // Shorthand for Windows { ExpressionHash = new WWHHighlightWords_ExpressionHash_Object(); HighlightedWords = new WWHHighlightWords_HighlightedWords_Object(); bFirstMatch = true; // Access search words // WordList = this.mWords.split(" "); for (MaxIndex = WordList.length, Index = 0 ; Index < MaxIndex ; Index++) { if (WordList[Index].length > 0) { // Determine longest sub-expression between '*' // WordExpressions = WordList[Index].split("*"); LongestWordExpression = ""; for (MaxExpressionIndex = WordExpressions.length, ExpressionIndex = 0 ; ExpressionIndex < MaxExpressionIndex ; ExpressionIndex++) { if (WordExpressions[ExpressionIndex].length > LongestWordExpression.length) { LongestWordExpression = WordExpressions[ExpressionIndex]; } } // Store search expression keyed by longest sub-expression // ExpressionEntry = ExpressionHash[LongestWordExpression + "~"]; if (typeof ExpressionEntry == "undefined") { ExpressionEntry = new WWHHighlightWords_ExpressionEntry_Object(); ExpressionHash[LongestWordExpression + "~"] = ExpressionEntry; } Expression = WWHStringUtilities_WordToRegExpWithSpacePattern(WordList[Index]); ExpressionEntry.mExpressions[ExpressionEntry.mExpressions.length] = new RegExp(Expression, "i"); } } // Search document based on longest sub-expressions // for (LongestWordExpressionKey in ExpressionHash) { LongestWordExpression = LongestWordExpressionKey.substring(0, LongestWordExpressionKey.length - 1); NewHighlightedWords = new WWHHighlightWords_HighlightedWords_Object(); TextRange = WWHFrame.WWHContentFrame.WWHDocumentFrame.document.body.createTextRange(); TextRange.collapse(); while (TextRange.findText(LongestWordExpression, 1)) { TextRange.expand("word"); ExpressionEntry = ExpressionHash[LongestWordExpression + "~"]; // Check word against search expression // bMatchFound = false; MaxExpressionIndex = ExpressionEntry.mExpressions.length; ExpressionIndex = 0; while (( ! bMatchFound) && (ExpressionIndex < MaxExpressionIndex)) { if (ExpressionEntry.mExpressions[ExpressionIndex].test(TextRange.text)) { // Highlight text if not processed already // if (typeof HighlightedWords[TextRange.text + "~"] == "undefined") { // Record text highlighted for this expression // NewHighlightedWords[TextRange.text + "~"] = true; // Try to trim off trailing whitespace or .s // LastCharTextRange = TextRange.duplicate(); LastCharTextRange.moveStart("character", TextRange.text.length - 1); if ((LastCharTextRange.text == " ") || (LastCharTextRange.text == ",") || (LastCharTextRange.text == ".")) { TextRange.moveEnd("character", -1); } TextRange.pasteHTML("" + TextRange.htmlText + ""); if (bFirstMatch) { TextRange.scrollIntoView(); bFirstMatch = false; } bMatchFound = true; } } ExpressionIndex++; } TextRange.collapse(false); } // Add highlighted words to hash // for (NewHighlightedWordsKey in NewHighlightedWords) { HighlightedWords[NewHighlightedWordsKey] = true; } } } } // Highlight words only once // this.mWords = null; } function WWHHighlightWords_ExpressionHash_Object() { } function WWHHighlightWords_ExpressionEntry_Object() { this.mExpressions = new Array(); } function WWHHighlightWords_HighlightedWords_Object() { } function WWHHandler_Object() { this.mbInitialized = false; this.fInit = WWHHandler_Init; this.fUpdate = WWHHandler_Update; this.fSyncTOC = WWHHandler_SyncTOC; } function WWHHandler_Init() { this.mbInitialized = true; WWHFrame.WWHHelp.fHandlerInitialized(); } function WWHHandler_Update(ParamURL) { } function WWHHandler_SyncTOC(ParamURL) { var DocumentURL; // Switch to frameset with navigation // DocumentURL = WWHFrame.WWHHelp.fGetBookFileHREF(ParamURL); WWHFrame.WWHSwitch.fExec(false, WWHFrame.WWHHelp.mHelpURLPrefix + "/wwhelp/wwhimpl/common/html/wwhelp.htm?href=" + WWHStringUtilities_RestoreEscapedSpaces(DocumentURL)); } function WWHCommonSettings_Object() { this.mbForceJavaScript = true; this.mbSyncContentsEnabled = false; this.mbPrevEnabled = true; this.mbNextEnabled = true; this.mbRelatedTopicsEnabled = false; this.mbEmailEnabled = false; this.mbPrintEnabled = true; this.mbBookmarkEnabled = false; this.mEmailAddress = "Your Company"; this.mRelatedTopics = new WWHCommonSettings_RelatedTopics_Object(); this.mPopup = new WWHCommonSettings_Popup_Object(); this.mbHighlightingEnabled = false; this.mHighlightingForegroundColor = "#FFFFFF"; this.mHighlightingBackgroundColor = "#333399"; } function WWHCommonSettings_RelatedTopics_Object() { this.mTitleFontStyle = "font-family: Verdana, Arial, Helvetica, sans-serif ; font-size: 10pt"; this.mTitleForegroundColor = "#FFFFFF"; this.mTitleBackgroundColor = "#999999"; this.mFontStyle = "font-family: Verdana, Arial, Helvetica, sans-serif ; font-size: 10pt"; this.mWidth = 250; this.mForegroundColor = "#003399"; this.mBackgroundColor = "#FFFFFF"; this.mBorderColor = "#666666"; this.mbInlineEnabled = true; this.mInlineFontStyle = "font-family: Verdana, Arial, Helvetica, sans-serif ; font-size: 10pt"; this.mInlineForegroundColor = "#003366"; } function WWHCommonSettings_Popup_Object() { this.mWidth = 200; this.mBackgroundColor = "#FFFFCC"; this.mBorderColor = "#999999"; } function WWHCommonMessages_Object() { // Set default messages // WWHCommonMessages_Set_en(this); this.fSetByLocale = WWHCommonMessages_SetByLocale; } function WWHCommonMessages_SetByLocale(ParamLocale) { var LocaleFunction = null; // Match locale // if ((ParamLocale.length > 1) && (eval("typeof WWHCommonMessages_Set_" + ParamLocale) == "function")) { LocaleFunction = eval("WWHCommonMessages_Set_" + ParamLocale); } else if ((ParamLocale.length > 1) && (eval("typeof WWHCommonMessages_Set_" + ParamLocale.substring(0, 2)) == "function")) { LocaleFunction = eval("WWHCommonMessages_Set_" + ParamLocale.substring(0, 2)); } // Default already set, only override if locale found // if (LocaleFunction != null) { LocaleFunction(this); } } function WWHCommonMessages_Set_en(ParamMessages) { // Icon Labels // ParamMessages.mShowNavigationIconLabel = "Show Navigation"; ParamMessages.mSyncIconLabel = "Show in Contents"; ParamMessages.mPrevIconLabel = "Previous"; ParamMessages.mNextIconLabel = "Next"; ParamMessages.mRelatedTopicsIconLabel = "Related Topics"; ParamMessages.mEmailIconLabel = "E-mail"; ParamMessages.mPrintIconLabel = "Print"; ParamMessages.mBookmarkIconLabel = "Bookmark"; ParamMessages.mBookmarkLinkMessage = "Right-click link and add it to your bookmarks."; // Browser support messages // ParamMessages.mBrowserNotSupported = "Your web browser does not support the necessary features\\nrequired to view this page properly. Supported browsers are:\\n\\n IE4 and later on Windows and UNIX\\n IE5 and later on Mac\\n Netscape 6.1 and later on Windows, Mac, and UNIX\\n Netscape 4.x on Windows, Mac, and UNIX\n\n\n\n"; } function WWHCommonMessages_Set_zh(ParamMessages) { // Icon Labels // ParamMessages.mShowNavigationIconLabel = "\u663e\u793a\u5bfc\u822a"; ParamMessages.mSyncIconLabel = "\u5728\u76ee\u5f55\u4e2d\u663e\u793a"; ParamMessages.mPrevIconLabel = "\u4e0a\u4e00\u9875"; ParamMessages.mNextIconLabel = "\u4e0b\u4e00\u9875"; ParamMessages.mRelatedTopicsIconLabel = "\u76f8\u5173\u4e3b\u9898"; ParamMessages.mEmailIconLabel = "\u7535\u5b50\u90ae\u4ef6"; ParamMessages.mPrintIconLabel = "\u6253\u5370"; ParamMessages.mBookmarkIconLabel = "\u4e66\u7b7e"; ParamMessages.mBookmarkLinkMessage = "\u53f3\u952e\u5355\u51fb\u94fe\u63a5\uff0c\u5c06\u5176\u6dfb\u52a0\u5230\u4e66\u7b7e\u4e2d\u3002"; // Browser support messages // ParamMessages.mBrowserNotSupported = "\u60a8\u7684 Web \u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u6b63\u786e\u67e5\u770b\u672c\u9875\u8981\u6c42\u7684\\n\u5fc5\u9700\u529f\u80fd\u3002 \u652f\u6301\u7684\u6d4f\u89c8\u5668\u6709\uff1a\\n\\nIE4 \u53ca\u66f4\u9ad8\u7248\u672c\uff08Windows \u548c UNIX\uff09\\nIE5 \u53ca\u66f4\u9ad8\u7248\u672c\uff08Mac\uff09\\nNetscape 6.1 \u53ca\u66f4\u9ad8\u7248\u672c\uff08Windows\u3001Mac \u548c UNIX\uff09\\nNetscape 4.x\uff08Windows\u3001Mac \u548c UNIX\uff09\n\n\n\n"; } function WWHCommonMessages_Set_es(ParamMessages) { // Icon Labels // ParamMessages.mShowNavigationIconLabel = "Mostrar barra de navegaci\u00f3n"; ParamMessages.mSyncIconLabel = "Mostrar en Contenido"; ParamMessages.mPrevIconLabel = "Atr\u00e1s"; ParamMessages.mNextIconLabel = "Adelante"; ParamMessages.mRelatedTopicsIconLabel = "Temas relacionados"; ParamMessages.mEmailIconLabel = "E-mail"; ParamMessages.mPrintIconLabel = "Imprimir"; ParamMessages.mBookmarkIconLabel = "Marcador"; ParamMessages.mBookmarkLinkMessage = "Haga clic con el bot\u00f3n derecho del mouse en el v\u00ednculo para agregarlo a la lista de favoritos."; // Browser support messages // ParamMessages.mBrowserNotSupported = "Su explorador de Internet no es compatible con las funciones\\nnecesarias para ver esta p\u00e1gina correctamente. Los exploradores compatibles son:\\n\\n IE4 y posteriores para Windows y UNIX\\n IE5 y posteriores para Mac\\n Netscape 6.1 y posteriores para Windows, Mac y UNIX\\n Netscape 4.x para Windows, Mac y UNIX\n\n\n\n"; } function WWHCommonMessages_Set_sv(ParamMessages) { // Icon Labels // ParamMessages.mShowNavigationIconLabel = "Visa navigering"; ParamMessages.mSyncIconLabel = "Visa i inneh\u00e5ll"; ParamMessages.mPrevIconLabel = "F\u00f6reg\u00e5ende"; ParamMessages.mNextIconLabel = "N\u00e4sta"; ParamMessages.mRelatedTopicsIconLabel = "N\u00e4rliggande information"; ParamMessages.mEmailIconLabel = "E-post"; ParamMessages.mPrintIconLabel = "Skriv ut"; ParamMessages.mBookmarkIconLabel = "Bokm\u00e4rke"; ParamMessages.mBookmarkLinkMessage = "H\u00f6gerklicka p\u00e5 l\u00e4nken och l\u00e4gg till den till dina bokm\u00e4rken."; // Browser support messages // ParamMessages.mBrowserNotSupported = "Webbl\u00e4saren har inte de funktioner som kr\u00e4vs f\u00f6r\\natt sidan ska visas p\u00e5 r\u00e4tt s\u00e4tt. Webbl\u00e4sare som kan anv\u00e4ndas \u00e4r:\\n\\n IE4 och senare i Windows och UNIX\\n IE5 och senare i Mac\\n Netscape 6.1 och senare i Windows, Mac och UNIX\\n Netscape 4.x i Windows, Mac och UNIX\n\n\n\n"; } function WWHCommonMessages_Set_de(ParamMessages) { // Icon Labels // ParamMessages.mShowNavigationIconLabel = "Navigation anzeigen"; ParamMessages.mSyncIconLabel = "Im Inhalt anzeigen"; ParamMessages.mPrevIconLabel = "Zur\u00fcck"; ParamMessages.mNextIconLabel = "Weiter"; ParamMessages.mRelatedTopicsIconLabel = "Verwandte Themen"; ParamMessages.mEmailIconLabel = "E-Mail"; ParamMessages.mPrintIconLabel = "Drucken"; ParamMessages.mBookmarkIconLabel = "Lesezeichen"; ParamMessages.mBookmarkLinkMessage = "Klicken Sie mit der rechten Maustaste auf die Verkn\u00fcpfung, und f\u00fcgen Sie sie Ihren Lesezeichen hinzu."; // Browser support messages // ParamMessages.mBrowserNotSupported = "Ihr Webbrowser unterst\u00fctzt die zum ordnungsgem\u00e4\u00dfen Anzeigen\\ndieser Seite erforderlichen Funktionen nicht. Folgende Browser werden unterst\u00fctzt:\\n\\n IE4 und h\u00f6her f\u00fcr Windows und UNIX\\n IE5 und h\u00f6her f\u00fcr Mac\\n Netscape 6.1 und h\u00f6her f\u00fcr Windows, Mac und UNIX\\n Netscape 4.x f\u00fcr Windows, Mac und UNIX\n\n\n\n"; } function WWHCommonMessages_Set_it(ParamMessages) { // Icon Labels // ParamMessages.mShowNavigationIconLabel = "Mostra navigazione"; ParamMessages.mSyncIconLabel = "Mostra in Contenuto"; ParamMessages.mPrevIconLabel = "Precedente"; ParamMessages.mNextIconLabel = "Avanti"; ParamMessages.mRelatedTopicsIconLabel = "Argomenti correlati"; ParamMessages.mEmailIconLabel = "E-mail"; ParamMessages.mPrintIconLabel = "Stampa"; ParamMessages.mBookmarkIconLabel = "Segnalibro"; ParamMessages.mBookmarkLinkMessage = "Fare clic con il tasto destro del mouse per aggiungere ai Segnalibri."; // Browser support messages // ParamMessages.mBrowserNotSupported = "Il browser Web in uso non supporta le funzioni necessarie\\nper visualizzare correttamente questa pagina. I browser supportati sono:\\n\\n IE4 e versioni successive su Windows e UNIX\\n IE5 e versioni successive su Mac\\n Netscape 6.1 e versioni successive per Windows, Mac e UNIX\\n Netscape 4.x su Windows, Mac e UNIX\n\n\n\n"; } function WWHCommonMessages_Set_pt(ParamMessages) { // Icon Labels // ParamMessages.mShowNavigationIconLabel = "Mostrar navega\u00e7\u00e3o"; ParamMessages.mSyncIconLabel = "Mostrar em conte\u00fado"; ParamMessages.mPrevIconLabel = "Voltar"; ParamMessages.mNextIconLabel = "Avan\u00e7ar"; ParamMessages.mRelatedTopicsIconLabel = "T\u00f3picos relacionados"; ParamMessages.mEmailIconLabel = "E-mail"; ParamMessages.mPrintIconLabel = "Imprimir"; ParamMessages.mBookmarkIconLabel = "Favoritos"; ParamMessages.mBookmarkLinkMessage = "Clique com o bot\u00e3o direito no link para adicion\u00e1-lo aos seus Favoritos."; // Browser support messages // ParamMessages.mBrowserNotSupported = "Seu navegador da web n\u00e3o suporta os recursos\\nnecess\u00e1rios \u00e0 visualiza\u00e7\u00e3o desta p\u00e1gina. Os navegadores suportados s\u00e3o:\\n\\n IE4 e vers\u00e3o posterior para Windows e UNIX\\n IE5 e vers\u00e3o posterior para Mac\\n Netscape 6.1 e vers\u00e3o posterior para Windows, Mac e UNIX\\n Netscape 4.x para Windows, Mac e UNIX\n\n\n\n"; } function WWHCommonMessages_Set_zh_tw(ParamMessages) { // Icon Labels // ParamMessages.mShowNavigationIconLabel = "\u986f\u793a\u5c0e\u89bd"; ParamMessages.mSyncIconLabel = "\u986f\u793a\u5728\u76ee\u9304\u4e2d"; ParamMessages.mPrevIconLabel = "\u4e0a\u4e00\u9801"; ParamMessages.mNextIconLabel = "\u4e0b\u4e00\u9801"; ParamMessages.mRelatedTopicsIconLabel = "\u76f8\u95dc\u4e3b\u984c"; ParamMessages.mEmailIconLabel = "\u9ede\u5b50\u90f5\u4ef6"; ParamMessages.mPrintIconLabel = "\u5217\u5370"; ParamMessages.mBookmarkIconLabel = "\u66f8\u7c64"; ParamMessages.mBookmarkLinkMessage = "\u53f3\u9375\u6309\u4e00\u4e0b\u9023\u7d50\uff0c\u5c07\u5b83\u52a0\u5165\u5230\u66f8\u7c64\u4e2d\u3002"; // Browser support messages // ParamMessages.mBrowserNotSupported = "Web \u700f\u89bd\u5668\u4e0d\u652f\u63f4\u6b63\u78ba\u6aa2\u8996\u672c\u9801\u9700\u8981\u7684\u529f\u80fd\u3002 \u652f\u63f4\u7684\u700f\u89bd\u5668\u5305\u62ec\uff1a\\n\\n Windows \u8207 UNIX \u4e0a\u652f\u63f4 IE 4 \u6216\u66f4\u65b0\u7248\u672c\\n Mac \u4e0a\u652f\u63f4 IE5 \u6216\u66f4\u65b0\u7248\u672c\\n Windows\u3001Mac \u8207 UNIX \u4e0a\u652f\u63f4 Netscape 6.1\\n Windows\u3001Mac \u8207 UNIX \u4e0a\u652f\u63f4 Netscape 4.x\n\n\n\n"; } function WWHCommonMessages_Set_ko(ParamMessages) { // Icon Labels // ParamMessages.mShowNavigationIconLabel = "\ub124\ube44\uac8c\uc774\uc158 \ud45c\uc2dc"; ParamMessages.mSyncIconLabel = "\ucee8\ud150\uce20\uc5d0\uc11c \ud45c\uc2dc"; ParamMessages.mPrevIconLabel = "\uc774\uc804"; ParamMessages.mNextIconLabel = "\ub2e4\uc74c"; ParamMessages.mRelatedTopicsIconLabel = "\uad00\ub828 \ud56d\ubaa9"; ParamMessages.mEmailIconLabel = "\uba54\uc77c"; ParamMessages.mPrintIconLabel = "\uc778\uc1c4"; ParamMessages.mBookmarkIconLabel = "\ubd81\ub9c8\ud06c"; ParamMessages.mBookmarkLinkMessage = "\ub9c1\ud06c\ub97c \ub9c8\uc6b0\uc2a4 \uc624\ub978\ucabd \ub2e8\ucd94\ub85c \ud074\ub9ad\ud558\uc5ec \ubd81\ub9c8\ud06c\uc5d0 \ucd94\uac00\ud569\ub2c8\ub2e4."; // Browser support messages // ParamMessages.mBrowserNotSupported = "\uc6f9 \ube0c\ub77c\uc6b0\uc800\uac00 \uc774 \ud398\uc774\uc9c0\ub97c \uc62c\ubc14\ub974\uac8c \ud45c\uc2dc\ud558\ub294 \ub370 \\n\ud544\uc694\ud55c \uae30\ub2a5\uc744 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. \uc9c0\uc6d0\ub418\ub294 \ube0c\ub77c\uc6b0\uc800:\\n\\nInternet Explorer 4 \uc774\uc0c1(Windows, UNIX )\\n Internet Explorer 5 \uc774\uc0c1(Mac)\\n Netscape 6.1 \uc774\uc0c1(Windows, Mac, UNIX)\\n Netscape 4.x(Windows, Mac, UNIX)\n\n\n\n"; } function WWHCommonMessages_Set_fr(ParamMessages) { // Icon Labels // ParamMessages.mShowNavigationIconLabel = "Navigation"; ParamMessages.mSyncIconLabel = "Afficher dans la table des mati\u00e8res"; ParamMessages.mPrevIconLabel = "Pr\u00e9c\u00e9dent"; ParamMessages.mNextIconLabel = "Suivant"; ParamMessages.mRelatedTopicsIconLabel = "Rubriques associ\u00e9es"; ParamMessages.mEmailIconLabel = "E-mail"; ParamMessages.mPrintIconLabel = "Imprimer"; ParamMessages.mBookmarkIconLabel = "Ajouter aux Favoris"; ParamMessages.mBookmarkLinkMessage = "Cliquez sur ce lien avec le bouton droit de la souris et ajoutez-le \u00e0 vos Favoris."; // Browser support messages // ParamMessages.mBrowserNotSupported = "Votre navigateur Web ne prend pas en charge les fonctions\\nrequises pour visualiser cette page de mani\u00e8re correcte. Les navigateurs pris en charge sont\u00a0:\\n\\n IE4 et version ult\u00e9rieure sous Windows et UNIX\\n IE5 et version ult\u00e9rieure sur Mac\\n Netscape 6.1 et version ult\u00e9rieure sous Windows, Mac et UNIX\\n Netscape 4.x sous Windows, Mac et UNIX\n\n\n\n"; } function WWHCommonMessages_Set_ja(ParamMessages) { // Icon Labels // ParamMessages.mShowNavigationIconLabel = "\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3 \u30d0\u30fc\u306e\u8868\u793a"; ParamMessages.mSyncIconLabel = "\u5185\u5bb9\u306e\u8868\u793a"; ParamMessages.mPrevIconLabel = "\u524d\u3078"; ParamMessages.mNextIconLabel = "\u6b21\u3078"; ParamMessages.mRelatedTopicsIconLabel = "\u95a2\u9023\u30c8\u30d4\u30c3\u30af"; ParamMessages.mEmailIconLabel = "\u96fb\u5b50\u30e1\u30fc\u30eb"; ParamMessages.mPrintIconLabel = "\u5370\u5237"; ParamMessages.mBookmarkIconLabel = "\u30d6\u30c3\u30af\u30de\u30fc\u30af"; ParamMessages.mBookmarkLinkMessage = "\u30ea\u30f3\u30af\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002"; // Browser support messages // ParamMessages.mBrowserNotSupported = "\u4f7f\u7528\u4e2d\u306e\u30d6\u30e9\u30a6\u30b6\u306f\u3001\u3053\u306e\u30da\u30fc\u30b8\u3092\u6b63\u3057\u304f\u8868\u793a\u3059\u308b\u305f\u3081\u306b\\n\u5fc5\u8981\u306a\u6a5f\u80fd\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30d6\u30e9\u30a6\u30b6: \\n\\nWindows \u304a\u3088\u3073 UNIX \u4e0a\u3067\u5b9f\u884c\u3055\u308c\u308b IE4 \u4ee5\u964d\\nMac \u4e0a\u3067\u5b9f\u884c\u3055\u308c\u308b IE5 \u4ee5\u964d\\nWindows\u3001Mac\u3001UNIX \u4e0a\u3067\u5b9f\u884c\u3055\u308c\u308b Netscape 6.1 \u4ee5\u964d\\nWindows\u3001Mac\u3001UNIX \u4e0a\u3067\u5b9f\u884c\u3055\u308c\u308b Netscape 4.x\n\n\n\n"; } function WWHTabs_Object() { this.mWidth = null; this.fInit = WWHTabs_Init; this.fDisplayTab = WWHTabs_DisplayTab; this.fHeadHTML = WWHTabs_HeadHTML; this.fBodyHTML = WWHTabs_BodyHTML; } function WWHTabs_Init() { var InitialTab = -1; var URLParams; var TabLabel; var Index; if (WWHFrame.WWHJavaScript.mPanels.mPanelEntries.length > 0) { // Set visible tab // URLParams = WWHHelp_GetURLParams(WWHFrame.WWHHelp.mLocationURL); if (URLParams[4] != null) { // Request for a particular tab to be visible // TabLabel = ""; if (URLParams[4] == ("toc")) { TabLabel = WWHFrame.WWHJavaScript.mMessages.mTabsTOCLabel; } else if (URLParams[4] == ("index")) { TabLabel = WWHFrame.WWHJavaScript.mMessages.mTabsIndexLabel; } else if (URLParams[4] ==("search")) { TabLabel = WWHFrame.WWHJavaScript.mMessages.mTabsSearchLabel; } // Determine which panel matches the desired tab // Index = 0; while ((InitialTab == -1) && (Index < WWHFrame.WWHJavaScript.mPanels.mPanelEntries.length)) { if (WWHFrame.WWHJavaScript.mPanels.mPanelEntries[Index].mPanelObject.mPanelTabTitle == TabLabel) { InitialTab = Index; } Index++; } } // If the initial tab has not been set, set it now // if (InitialTab == -1) { InitialTab = 0; } // Calculate width based on number of displayed tabs // this.mWidth = "" + 100/WWHFrame.WWHJavaScript.mPanels.mPanelEntries.length + "%"; } return InitialTab; } function WWHTabs_DisplayTab() { WWHFrame.WWHNavigationFrame.WWHTabsFrame.location.replace(WWHFrame.WWHHelp.mHelpURLPrefix + "wwhelp/wwhimpl/js/html/tabs.htm"); } function WWHTabs_HeadHTML() { var StylesHTML = ""; // Generate style section // StylesHTML += "\n"; return StylesHTML; } function WWHTabs_BodyHTML() { var TabsHTML = ""; var Height = 21; var MaxIndex; var Index; var CellType; var BorderColor; var BackgoundColor; var WrapPrefix; var WrapSuffix; var OnClick; // Setup table for tab display // TabsHTML += "\n"; TabsHTML += "\n"; for (MaxIndex = WWHFrame.WWHJavaScript.mPanels.mPanelEntries.length, Index = 0 ; Index < MaxIndex ; Index++) { // Display anchor only if not selected // if (Index == WWHFrame.WWHJavaScript.mCurrentTab) { CellType = "th"; BorderColor = WWHFrame.WWHJavaScript.mSettings.mTabs.mSelectedTabBorderColor; BackgroundColor = WWHFrame.WWHJavaScript.mSettings.mTabs.mSelectedTabColor; WrapPrefix = ""; WrapSuffix = ""; OnClick = ""; } else { CellType = "td"; BorderColor = WWHFrame.WWHJavaScript.mSettings.mTabs.mDefaultTabBorderColor; BackgroundColor = WWHFrame.WWHJavaScript.mSettings.mTabs.mDefaultTabColor; WrapPrefix = ""; WrapSuffix = ""; OnClick = " onClick=\"WWHFrame.WWHJavaScript.fStartChangeTabWithDelay(" + Index + ");\""; } TabsHTML += "\n"; } TabsHTML += "\n"; TabsHTML += "
"; TabsHTML += ""; TabsHTML += ""; TabsHTML += "<" + CellType + " nowrap align=center height=" + Height + " width=\"" + this.mWidth + "\" bgcolor=\"" + BackgroundColor + "\"" + OnClick + ">"; TabsHTML += WrapPrefix; TabsHTML += WWHFrame.WWHJavaScript.mPanels.mPanelEntries[Index].mPanelObject.mPanelTabTitle; TabsHTML += WrapSuffix; TabsHTML += ""; TabsHTML += ""; TabsHTML += "
"; TabsHTML += "
\n"; return TabsHTML; } function WWHOutline_Object() { var bUseSafeMethods = true; // Determine display method based on browser type // if ((WWHFrame.WWHBrowserInfo.mBrowser == 2) || // Shorthand for IE (WWHFrame.WWHBrowserInfo.mBrowser == 3) || // Shorthand for iCab (WWHFrame.WWHBrowserInfo.mBrowser == 4)) // Shorthand for Netscape 6.0 (Mozilla) { bUseSafeMethods = false; } this.mbPanelInitialized = false; this.mPanelAnchor = null; this.mPanelTabTitle = WWHFrame.WWHJavaScript.mMessages.mTabsTOCLabel; this.mInitIndex = 0; this.mBookEntryArray = new Array(); this.mEntryHash = new WWHOutlineEntryHash_Object(); this.mTopEntry = new WWHOutlineEntry_Top_Object(); this.mNextEntryID = 0; this.mMaxLevel = 0; this.mSyncBookID = null; this.mSyncFileHREF = null; this.mImagingObject = (bUseSafeMethods) ? new WWHOutlineImagingSafe_Object() : new WWHOutlineImagingFast_Object(); this.fInitHeadHTML = WWHOutline_InitHeadHTML; this.fInitBodyHTML = WWHOutline_InitBodyHTML; this.fInitGroupings = WWHOutline_InitGroupings; this.fInitLoadBookTOC = WWHOutline_InitLoadBookTOC; this.fHeadHTML = WWHOutline_HeadHTML; this.fStartHTMLSegments = WWHOutline_StartHTMLSegments; this.fAdvanceHTMLSegment = WWHOutline_AdvanceHTMLSegment; this.fGetHTMLSegment = WWHOutline_GetHTMLSegment; this.fEndHTMLSegments = WWHOutline_EndHTMLSegments; this.fHoverTextTranslate = WWHOutline_HoverTextTranslate; this.fHoverTextFormat = WWHOutline_HoverTextFormat; this.fDisplayDoc = WWHOutline_DisplayDoc; this.fExpand = WWHOutline_Expand; this.fCollapse = WWHOutline_Collapse; this.fSync = WWHOutline_Sync; } function WWHOutline_InitHeadHTML() { var InitHeadHTML = ""; return InitHeadHTML; } function WWHOutline_InitBodyHTML() { var HTML = new WWHStringBuffer_Object(); var BookList = WWHFrame.WWHHelp.mBooks.mBookList; var MaxIndex; var Index; // Display initializing message // HTML.fAppend("

" + WWHFrame.WWHJavaScript.mMessages.mInitializingMessage + "

\n"); // Create top level entries for groups and books // this.fInitGroupings(this.mTopEntry, WWHFrame.WWHHelp.mBookGroups); // Load book TOC data // this.mInitIndex = 0; for (MaxIndex = BookList.length, Index = 0 ; Index < MaxIndex ; Index++) { // Reference TOC data // HTML.fAppend("\n"); // Load TOC data for current book // HTML.fAppend("\n"); } return HTML.fGetBuffer(); } function WWHOutline_InitGroupings(ParamParentEntry, ParamGroup) { var MaxIndex; var Index; var GroupEntry; var TOCEntry; for (MaxIndex = ParamGroup.mChildren.length, Index = 0 ; Index < MaxIndex ; Index++) { GroupEntry = ParamGroup.mChildren[Index]; if (GroupEntry.mbGrouping) { // Create entry in TOC // TOCEntry = ParamParentEntry.fNewChild(GroupEntry.mTitle, "", GroupEntry.mIcon, GroupEntry.mOpenIcon); TOCEntry.mbExpanded = GroupEntry.mbExpand; this.fInitGroupings(TOCEntry, GroupEntry); } else // Must be a book directory { TOCEntry = ParamParentEntry.fNewChild(WWHFrame.WWHHelp.mBooks.mBookList[this.mBookEntryArray.length].mTitle, "", GroupEntry.mIcon, GroupEntry.mOpenIcon); // Set display options // TOCEntry.mbShow = GroupEntry.mbShow; if (GroupEntry.mbShow) { TOCEntry.mbExpanded = GroupEntry.mbExpand; } else { TOCEntry.mbExpanded = true; TOCEntry.mLevel = ParamParentEntry.mLevel; } // Add to mBookEntryArray // this.mBookEntryArray[this.mBookEntryArray.length] = TOCEntry; } } } function WWHOutline_InitLoadBookTOC(ParamAddTOCEntriesFunc) { var BookEntry; // Access book entry // BookEntry = this.mBookEntryArray[this.mInitIndex]; // Set Book Index // BookEntry.mBookIndex = this.mInitIndex; // Load TOC // ParamAddTOCEntriesFunc(BookEntry); // Assign URL for book entry // if ((BookEntry.mbShow) && (WWHFrame.WWHHelp.mBooks.mBookList[BookEntry.mBookIndex].mFiles.mFileList.length > 0)) { BookEntry.mURL = "0"; } // Increment init book index // this.mInitIndex++; // Mark initialized if done // if (this.mInitIndex == WWHFrame.WWHHelp.mBooks.mBookList.length) { this.mbPanelInitialized = true; // Sync contents if necessary // if ((this.mSyncBookID != null) && (this.mSyncFileHREF != null)) { this.fSync(this.mSyncBookID, this.mSyncFileHREF, false); this.mSyncBookID = null; this.mSyncFileHREF = null; } } } function WWHOutline_HeadHTML() { var HTML = new WWHStringBuffer_Object(); // Write formatting styles // HTML.fAppend(this.mImagingObject.fGenerateStyles()); return HTML.fGetBuffer(); } function WWHOutline_StartHTMLSegments() { var HTML = new WWHStringBuffer_Object(); // Reset imaging object // this.mImagingObject.fReset(); // Define accessor functions to reduce file size // HTML.fAppend("\n"); return HTML.fGetBuffer(); } function WWHOutline_AdvanceHTMLSegment() { return this.mImagingObject.fAdvance(WWHFrame.WWHJavaScript.mMaxHTMLSegmentSize); } function WWHOutline_GetHTMLSegment() { return this.mImagingObject.mHTMLSegment.fGetBuffer(); } function WWHOutline_EndHTMLSegments() { return ""; } function WWHOutline_HoverTextTranslate(ParamEntryID) { return this.mEntryHash[ParamEntryID].mText; } function WWHOutline_HoverTextFormat(ParamWidth, ParamTextID, ParamText) { var FormattedText = ""; var ForegroundColor = WWHFrame.WWHJavaScript.mSettings.mHoverText.mForegroundColor; var BackgroundColor = WWHFrame.WWHJavaScript.mSettings.mHoverText.mBackgroundColor; var BorderColor = WWHFrame.WWHJavaScript.mSettings.mHoverText.mBorderColor; var ImageDir = WWHFrame.WWHHelp.mHelpURLPrefix + "wwhelp/wwhimpl/common/images"; var ReqSpacer1w2h = ""; var ReqSpacer2w1h = ""; var ReqSpacer1w7h = ""; var ReqSpacer5w1h = ""; var Spacer1w2h = ReqSpacer1w2h; var Spacer2w1h = ReqSpacer2w1h; var Spacer1w7h = ReqSpacer1w7h; var Spacer5w1h = ReqSpacer5w1h; // Netscape 6.x (Mozilla) renders table cells with graphics // incorrectly inside of
tags that are rewritten on the fly // if (WWHFrame.WWHBrowserInfo.mBrowser == 4) // Shorthand for Netscape 6.x (Mozilla) { Spacer1w2h = ""; Spacer2w1h = ""; Spacer1w7h = ""; Spacer5w1h = ""; } FormattedText += ""; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += "
" + Spacer1w2h + "
" + Spacer2w1h + "" + Spacer1w7h + "" + Spacer2w1h + "
" + ReqSpacer2w1h + "" + ReqSpacer5w1h + "" + ParamText + "" + ReqSpacer5w1h + "" + ReqSpacer2w1h + "
" + Spacer2w1h + "" + Spacer1w7h + "" + Spacer2w1h + "
" + Spacer1w2h + "
"; return FormattedText; } function WWHOutline_DisplayDoc(ParamEntryID) { var Entry; var Parent; var Parts; var LinkFileIndex; var LinkAnchor; var BookListEntry; var NewHREF; // Close down any popups we had going to prevent JavaScript errors // WWHFrame.WWHJavaScript.mPanels.mPopup.fHide(); Entry = this.mEntryHash[ParamEntryID]; // Expand if folder // if (( ! Entry.mbExpanded) && (Entry.mChildren != null)) { this.fExpand(ParamEntryID); } // Determine which book this document belongs to // Parent = Entry; while ((Parent.mParent != null) && (typeof Parent.mBookIndex != "number")) { Parent = Parent.mParent; } if (typeof Parent.mBookIndex == "number") { // Confirm URL defined (handles group entries) // if (Entry.mURL.length > 0) { // Determine link file index and anchor // Parts = Entry.mURL.split("#"); LinkFileIndex = parseInt(Parts[0]); if (Parts.length > 1) { LinkAnchor = "#" + Parts[1]; } else { LinkAnchor = ""; } BookListEntry = WWHFrame.WWHHelp.mBooks.mBookList[Parent.mBookIndex]; NewHREF = WWHFrame.WWHHelp.mBaseURL + BookListEntry.mDirectory + BookListEntry.mFiles.fFileIndexToHREF(LinkFileIndex) + LinkAnchor; WWHFrame.WWHHelp.fSetDocumentHREF(NewHREF, false); } } } function WWHOutline_Expand(ParamEntryID) { var Entry = this.mEntryHash[ParamEntryID]; Entry.mbExpanded = true; this.mImagingObject.fUpdateEntry(Entry); } function WWHOutline_Collapse(ParamEntryID) { var Entry = this.mEntryHash[ParamEntryID]; Entry.mbExpanded = false; this.mImagingObject.fUpdateEntry(Entry); } function WWHOutline_Sync(ParamBookID, ParamFileHREF, bParamVisible) { var BookEntry; var MaxIndex; var Index; var Parts; var FileIndex; var Anchor; var SearchPattern; var Iterator; var MatchedEntry; var CandidateEntry; if ( ! this.mbPanelInitialized) { this.mSyncBookID = ParamBookID; this.mSyncFileHREF = ParamFileHREF; } else // (this.mbPanelInitialized) { BookEntry = null; MatchedEntry = null; // Find book entry // if (this.mBookEntryArray.length > 0) { // Find matching book entry // for (MaxIndex = this.mBookEntryArray.length, Index = 0 ; Index < MaxIndex ; Index++) { if (this.mBookEntryArray[Index].mBookIndex == ParamBookID) { BookEntry = this.mBookEntryArray[Index]; } } } // Confirm we found our matching book entry // if (BookEntry != null) { // Determine file index and anchor // Parts = ParamFileHREF.split("#"); FileIndex = WWHFrame.WWHHelp.mBooks.mBookList[BookEntry.mBookIndex].mFiles.fHREFToIndex(escape(Parts[0])); if (Parts.length > 1) { Anchor = "#" + Parts[1]; } else { Anchor = ""; } // Confirm we have a possible entry // if (FileIndex != -1) { SearchPattern = "" + FileIndex + Anchor; Iterator = new WWHOutlineIterator_Object(false); if (Anchor.length > 0) { // Look for match // Iterator.fReset(BookEntry); while ((MatchedEntry == null) && (Iterator.fAdvance(null))) { if (Iterator.mEntry.mURL == SearchPattern) { MatchedEntry = Iterator.mEntry; } } } // If match not found, search using just the file index without the anchor // if (MatchedEntry == null) { SearchPattern = "" + FileIndex; // Look for match // Iterator.fReset(BookEntry); while ((MatchedEntry == null) && (Iterator.fAdvance(null))) { // Trim of any trailing anchor information, if specified // if (Iterator.mEntry.mURL.indexOf("#") != -1) { CandidateEntry = Iterator.mEntry.mURL.substring(0, Iterator.mEntry.mURL.indexOf("#")); } else { CandidateEntry = Iterator.mEntry.mURL; } if (CandidateEntry == SearchPattern) { MatchedEntry = Iterator.mEntry; } } } // See if this matches the book entry // if ((MatchedEntry == null) && (BookEntry.mbShow)) { SearchPattern = "" + FileIndex; if (SearchPattern == BookEntry.mURL) { MatchedEntry = BookEntry; } } // Sync display if entry found // if (MatchedEntry != null) { // Update display // this.mImagingObject.fRevealEntry(MatchedEntry, bParamVisible); } } } // Display a message if the entry was not found // if ((BookEntry == null) || (MatchedEntry == null)) { setTimeout("alert(\"" + WWHFrame.WWHJavaScript.mMessages.mTOCFileNotFoundMessage + "\");", 1); } } } function WWHOutlineEntry_Top_Object() { this.mParent = null; this.mbShow = false; this.mText = "Top Level"; this.mURL = ""; this.mID = -1; this.mLevel = -1; this.mbExpanded = true; this.mChildren = null; this.fNewChild = WWHOutlineEntry_NewChild; this.fN = WWHOutlineEntry_NewChild; } function WWHOutlineEntry_Object(ParamParent, ParamText, ParamURL, ParamIcon, ParamOpenIcon) { this.mParent = ParamParent; this.mbShow = true; this.mText = ParamText; this.mURL = (typeof ParamURL == "string") ? ParamURL : ""; this.mID = WWHFrame.WWHOutline.mNextEntryID; this.mLevel = ParamParent.mLevel + 1; this.mbExpanded = false; this.mChildren = null; this.fNewChild = WWHOutlineEntry_NewChild; this.fN = WWHOutlineEntry_NewChild; // Assign custom icons if defined // if (typeof ParamIcon == "string") { this.mIcon = ParamIcon; } if (typeof ParamOpenIcon == "string") { this.mOpenIcon = ParamOpenIcon; } // Increment ID // WWHFrame.WWHOutline.mNextEntryID++; } function WWHOutlineEntry_NewChild(ParamText, ParamURL, ParamIcon, ParamOpenIcon) { var NewChild; // Create a new entry // NewChild = new WWHOutlineEntry_Object(this, ParamText, ParamURL, ParamIcon, ParamOpenIcon); // Add to entry hash keyed by ID // WWHFrame.WWHOutline.mEntryHash[NewChild.mID] = NewChild; // Add child to parent entry // if (this.mChildren == null) { this.mChildren = new Array(NewChild); } else { this.mChildren[this.mChildren.length] = NewChild; } // Bump mMaxLevel if we've exceeded it // if (NewChild.mLevel > WWHFrame.WWHOutline.mMaxLevel) { WWHFrame.WWHOutline.mMaxLevel = NewChild.mLevel; } return NewChild; } function WWHOutlineEntryHash_Object() { } function WWHOutlineIterator_Object(bParamVisibleOnly) { this.mbVisibleOnly = bParamVisibleOnly; this.mIteratorScope = null; this.mEntry = null; this.mStack = new Array(); this.fReset = WWHOutlineIterator_Reset; this.fAdvance = WWHOutlineIterator_Advance; } function WWHOutlineIterator_Reset(ParamEntry) { this.mIteratorScope = ParamEntry; this.mEntry = ParamEntry; this.mStack.length = 0; } function WWHOutlineIterator_Advance(ParamLevelStatusObject) { // Advance to the next visible entry // if (this.mEntry != null) { // Check for visible children // if ((this.mEntry.mChildren != null) && (( ! this.mbVisibleOnly) || (this.mEntry.mbExpanded))) { // Process children // this.mEntry = this.mEntry.mChildren[0]; this.mStack[this.mStack.length] = 0; if (ParamLevelStatusObject != null) { ParamLevelStatusObject.fOpenLevel(); } } // If we've reached the iterator scope, we're done // else if (this.mEntry.mID == this.mIteratorScope.mID) { this.mEntry = null; } else { var bSameLevel = true; var ParentEntry; var StackTop; ParentEntry = this.mEntry.mParent; this.mEntry = null; // Find next child of parent entry // while (ParentEntry != null) { // Increment position // StackTop = this.mStack.length - 1; this.mStack[StackTop]++; // Confirm this is a valid entry // if (this.mStack[StackTop] < ParentEntry.mChildren.length) { // Return the parent's next child // this.mEntry = ParentEntry.mChildren[this.mStack[StackTop]]; // Signal break from loop // ParentEntry = null; } else { // Last child of parent, try up a level // if (ParentEntry.mID == this.mIteratorScope.mID) { ParentEntry = null; } else { ParentEntry = ParentEntry.mParent; } this.mStack.length--; bSameLevel = false; if (ParamLevelStatusObject != null) { ParamLevelStatusObject.fCloseLevel(); } } } if (bSameLevel) { if (ParamLevelStatusObject != null) { ParamLevelStatusObject.fSameLevel(); } } } } return (this.mEntry != null); } function WWHOutlineImaging_ImageSrcDir() { var ImageSrcDir = "../../../"; // Update img src reference based on browser type and platform // if ((WWHFrame.WWHBrowserInfo.mBrowser == 2) && // Shorthand for IE (WWHFrame.WWHBrowserInfo.mPlatform == 2)) // Shorthand for Macintosh { ImageSrcDir = WWHFrame.WWHHelp.mHelpURLPrefix + "wwhelp/"; } return ImageSrcDir; } function WWHOutlineImaging_GetIconURL(ParamEntry) { var IconURL = ""; if (ParamEntry.mChildren != null) { if (ParamEntry.mbExpanded) { if (typeof ParamEntry.mOpenIcon == "string") { IconURL = this.mImageSrcDir + "images/" + ParamEntry.mOpenIcon; } else if (typeof ParamEntry.mIcon == "string") { IconURL = this.mImageSrcDir + "images/" + ParamEntry.mIcon; } else { IconURL = this.mImageSrcDir + "wwhimpl/common/images/fo.gif"; } } else { if (typeof ParamEntry.mIcon == "string") { IconURL = this.mImageSrcDir + "images/" + ParamEntry.mIcon; } else { IconURL = this.mImageSrcDir + "wwhimpl/common/images/fc.gif"; } } } else { if (typeof ParamEntry.mIcon == "string") { IconURL = this.mImageSrcDir + "images/" + ParamEntry.mIcon; } else { IconURL = this.mImageSrcDir + "wwhimpl/common/images/doc.gif"; } } return IconURL; } function WWHOutlineImaging_GetPopupAction(ParamEntry) { var PopupAction = ""; if (WWHFrame.WWHJavaScript.mSettings.mHoverText.mbEnabled) { PopupAction += " onMouseOver=\"fS(" + ParamEntry.mID + ", " + this.mEventString + ");\""; PopupAction += " onMouseOut=\"fH();\""; } return PopupAction; } function WWHOutlineImaging_GetLink(ParamEntry, ParamPrefixText) { var LinkHTML = ""; var Link = ""; // Add prefix to link HTML, if specified // if (ParamPrefixText != null) { LinkHTML += ParamPrefixText; } // Add link text // LinkHTML += ParamEntry.mText; // Set link // if ((ParamEntry.mURL.length > 0) || (ParamEntry.mChildren != null)) { Link += "" + LinkHTML + ""; } else { Link += LinkHTML; } return Link; } function WWHOutlineImagingSafe_Object() { this.mIterator = new WWHOutlineIterator_Object(true); this.mImageSrcDir = WWHOutlineImaging_ImageSrcDir(); this.mEventString = WWHPopup_EventString(); this.mHTMLSegment = new WWHStringBuffer_Object(); this.fGetIconURL = WWHOutlineImaging_GetIconURL; this.fGetPopupAction = WWHOutlineImaging_GetPopupAction; this.fGetLink = WWHOutlineImaging_GetLink; this.fGenerateStyles = WWHOutlineImagingSafe_GenerateStyles; this.fReset = WWHOutlineImagingSafe_Reset; this.fAdvance = WWHOutlineImagingSafe_Advance; this.fOpenLevel = WWHOutlineImagingSafe_OpenLevel; this.fCloseLevel = WWHOutlineImagingSafe_CloseLevel; this.fSameLevel = WWHOutlineImagingSafe_SameLevel; this.fDisplayEntry = WWHOutlineImagingSafe_DisplayEntry; this.fUpdateEntry = WWHOutlineImagingSafe_UpdateEntry; this.fRevealEntry = WWHOutlineImagingSafe_RevealEntry; } function WWHOutlineImagingSafe_GenerateStyles() { var StyleBuffer = new WWHStringBuffer_Object(); var MaxLevel; var Level; StyleBuffer.fAppend("\n"); return StyleBuffer.fGetBuffer(); } function WWHOutlineImagingSafe_Reset() { this.mIterator.fReset(WWHFrame.WWHOutline.mTopEntry); } function WWHOutlineImagingSafe_Advance(ParamMaxHTMLSegmentSize) { var Entry; this.mHTMLSegment.fReset(); while (((ParamMaxHTMLSegmentSize == -1) || (this.mHTMLSegment.fSize() < ParamMaxHTMLSegmentSize)) && (this.mIterator.fAdvance(this))) { Entry = this.mIterator.mEntry; // Process current entry // if (Entry.mbShow) { this.mHTMLSegment.fAppend(this.fDisplayEntry(Entry)); } } return (this.mHTMLSegment.fSize() > 0); // Return true if segment created } function WWHOutlineImagingSafe_OpenLevel() { } function WWHOutlineImagingSafe_CloseLevel() { } function WWHOutlineImagingSafe_SameLevel() { } function WWHOutlineImagingSafe_DisplayEntry(ParamEntry) { var EntryHTML = ""; var IconURL = this.fGetIconURL(ParamEntry); if (ParamEntry.mChildren == null) { EntryHTML += "

"; EntryHTML += ""; EntryHTML += this.fGetLink(ParamEntry, " "); EntryHTML += ""; EntryHTML += "

\n"; } else { if (ParamEntry.mbExpanded) { EntryHTML += "

"; EntryHTML += ""; EntryHTML += ""; EntryHTML += ""; EntryHTML += " " + this.fGetLink(ParamEntry, null); EntryHTML += ""; EntryHTML += "

\n"; } else { EntryHTML += "

"; EntryHTML += ""; EntryHTML += ""; EntryHTML += ""; EntryHTML += " " + this.fGetLink(ParamEntry, null); EntryHTML += ""; EntryHTML += "

\n"; } } return EntryHTML; } function WWHOutlineImagingSafe_UpdateEntry(ParamEntry) { var EntryURL; // Save/restore current position // WWHFrame.WWHJavaScript.mPanels.fSaveScrollPosition(); // Close down any popups we had going to prevent JavaScript errors // WWHFrame.WWHJavaScript.mPanels.mPopup.fHide(); // Reload page to display expanded/collapsed entry // WWHFrame.WWHJavaScript.mPanels.fDisplayPanel(); } function WWHOutlineImagingSafe_RevealEntry(ParamEntry, bParamVisible) { var ParentEntry; var LastClosedParentEntry = null; // Expand out enclosing entries // ParentEntry = ParamEntry.mParent; while (ParentEntry != null) { if ( ! ParentEntry.mbExpanded) { ParentEntry.mbExpanded = true; LastClosedParentEntry = ParentEntry; } ParentEntry = ParentEntry.mParent; } // Set target entry // WWHFrame.WWHOutline.mPanelAnchor = "t" + ParamEntry.mID; // Update display // if (bParamVisible) { // Update display if entry not already visible // if (LastClosedParentEntry != null) { this.fUpdateEntry(ParamEntry); } // Display target // WWHFrame.WWHJavaScript.mPanels.fJumpToAnchor(); } } function WWHOutlineImagingFast_Object() { this.mIterator = new WWHOutlineIterator_Object(true); this.mImageSrcDir = WWHOutlineImaging_ImageSrcDir(); this.mEventString = WWHPopup_EventString(); this.mHTMLSegment = new WWHStringBuffer_Object(); this.fGetIconURL = WWHOutlineImaging_GetIconURL; this.fGetPopupAction = WWHOutlineImaging_GetPopupAction; this.fGetLink = WWHOutlineImaging_GetLink; this.fGenerateStyles = WWHOutlineImagingFast_GenerateStyles; this.fReset = WWHOutlineImagingFast_Reset; this.fAdvance = WWHOutlineImagingFast_Advance; this.fOpenLevel = WWHOutlineImagingFast_OpenLevel; this.fCloseLevel = WWHOutlineImagingFast_CloseLevel; this.fSameLevel = WWHOutlineImagingFast_SameLevel; this.fDisplayEntry = WWHOutlineImagingFast_DisplayEntry; this.fUpdateEntry = WWHOutlineImagingFast_UpdateEntry; this.fRevealEntry = WWHOutlineImagingFast_RevealEntry; } function WWHOutlineImagingFast_GenerateStyles() { var StyleBuffer = new WWHStringBuffer_Object(); StyleBuffer.fAppend("\n"); return StyleBuffer.fGetBuffer(); } function WWHOutlineImagingFast_Reset() { this.mIterator.fReset(WWHFrame.WWHOutline.mTopEntry); } function WWHOutlineImagingFast_Advance(ParamMaxHTMLSegmentSize) { var Entry; this.mHTMLSegment.fReset(); while (((ParamMaxHTMLSegmentSize == -1) || (this.mHTMLSegment.fSize() < ParamMaxHTMLSegmentSize)) && (this.mIterator.fAdvance(this))) { Entry = this.mIterator.mEntry; // Process current entry // if (Entry.mbShow) { if (Entry.mLevel == 0) { this.mHTMLSegment.fAppend("
  • "); } else { this.mHTMLSegment.fAppend("
  • "); } this.mHTMLSegment.fAppend(this.fDisplayEntry(Entry)); } } return (this.mHTMLSegment.fSize() > 0); // Return true if segment created } function WWHOutlineImagingFast_OpenLevel() { this.mHTMLSegment.fAppend("
      \n"); } function WWHOutlineImagingFast_CloseLevel() { this.mHTMLSegment.fAppend("\n"); this.mHTMLSegment.fAppend("
    \n"); } function WWHOutlineImagingFast_SameLevel() { this.mHTMLSegment.fAppend("
  • \n"); } function WWHOutlineImagingFast_DisplayEntry(ParamEntry) { var EntryHTML = ""; var IconURL = this.fGetIconURL(ParamEntry); if (ParamEntry.mChildren == null) { EntryHTML += ""; EntryHTML += this.fGetLink(ParamEntry, " "); EntryHTML += "\n"; } else { if (ParamEntry.mbExpanded) { EntryHTML += ""; EntryHTML += ""; EntryHTML += ""; EntryHTML += " " + this.fGetLink(ParamEntry, null); EntryHTML += "\n"; } else { EntryHTML += ""; EntryHTML += ""; EntryHTML += ""; EntryHTML += " " + this.fGetLink(ParamEntry, null); EntryHTML += "\n"; } } return EntryHTML; } function WWHOutlineImagingFast_UpdateEntry(ParamEntry) { var ElementID = "i" + ParamEntry.mID; var EntryHTML = ""; // Get entry display // EntryHTML = this.fDisplayEntry(ParamEntry); // Reset iterator to process current entry's children // this.mIterator.fReset(ParamEntry); // Process display of children // if (this.fAdvance(-1)) { // Result already stored in this.mHTMLSegment // } // Close down any popups we had going to prevent JavaScript errors // WWHFrame.WWHJavaScript.mPanels.mPopup.fHide(); // Update HTML // if ((WWHFrame.WWHBrowserInfo.mBrowser == 2) || // Shorthand for IE (WWHFrame.WWHBrowserInfo.mBrowser == 3)) // Shorthand for iCab { WWHFrame.WWHNavigationFrame.WWHPanelFrame.document.all[ElementID].innerHTML = EntryHTML + this.mHTMLSegment.fGetBuffer(); } else if (WWHFrame.WWHBrowserInfo.mBrowser == 4) // Shorthand for Netscape 6.0 { WWHFrame.WWHNavigationFrame.WWHPanelFrame.document.getElementById(ElementID).innerHTML = EntryHTML + this.mHTMLSegment.fGetBuffer(); } } function WWHOutlineImagingFast_RevealEntry(ParamEntry, bParamVisible) { var ParentEntry; var LastClosedParentEntry = null; // Expand out enclosing entries // ParentEntry = ParamEntry.mParent; while (ParentEntry != null) { if ( ! ParentEntry.mbExpanded) { ParentEntry.mbExpanded = true; LastClosedParentEntry = ParentEntry; } ParentEntry = ParentEntry.mParent; } // Set target entry // WWHFrame.WWHOutline.mPanelAnchor = "t" + ParamEntry.mID; // Update display // if (bParamVisible) { // Expand parent entry to reveal target entry // if (LastClosedParentEntry != null) { this.fUpdateEntry(LastClosedParentEntry); } // Display target // WWHFrame.WWHJavaScript.mPanels.fJumpToAnchor(); } } function WWHIndex_Object() { this.mbPanelInitialized = false; this.mPanelAnchor = null; this.mPanelTabTitle = WWHFrame.WWHJavaScript.mMessages.mTabsIndexLabel; this.mInitIndex = 0; this.mOptions = new WWHIndexOptions_Object(); this.mTopEntry = new WWHIndexTopEntry_Object(); this.mMaxLevel = 0; this.mEntryCount = 0; this.mSeeAlsoArray = new Array(); this.mSectionIndex = null; this.mSectionCache = new WWHSectionCache_Object(); this.mIterator = new WWHIndexIterator_Object(); this.mHTMLSegment = new WWHStringBuffer_Object(); this.mEventString = WWHPopup_EventString(); this.mClickedEntry = null; this.fInitHeadHTML = WWHIndex_InitHeadHTML; this.fInitBodyHTML = WWHIndex_InitBodyHTML; this.fInitLoadBookIndex = WWHIndex_InitLoadBookIndex; this.fAddSeeAlsoEntry = WWHIndex_AddSeeAlsoEntry; this.fProcessSeeAlsoEntries = WWHIndex_ProcessSeeAlsoEntries; this.fHeadHTML = WWHIndex_HeadHTML; this.fStartHTMLSegments = WWHIndex_StartHTMLSegments; this.fAdvanceHTMLSegment = WWHIndex_AdvanceHTMLSegment; this.fGetHTMLSegment = WWHIndex_GetHTMLSegment; this.fEndHTMLSegments = WWHIndex_EndHTMLSegments; this.fHoverTextTranslate = WWHIndex_HoverTextTranslate; this.fHoverTextFormat = WWHIndex_HoverTextFormat; this.fGetPopupAction = WWHIndex_GetPopupAction; this.fThresholdExceeded = WWHIndex_ThresholdExceeded; this.fGetSectionNavigation = WWHIndex_GetSectionNavigation; this.fChangeSection = WWHIndex_ChangeSection; this.fSelectionListHeadHTML = WWHIndex_SelectionListHeadHTML; this.fSelectionListBodyHTML = WWHIndex_SelectionListBodyHTML; this.fDisplayLink = WWHIndex_DisplayLink; this.fGetEntry = WWHIndex_GetEntry; this.fClickedEntry = WWHIndex_ClickedEntry; this.fClickedSeeAlsoEntry = WWHIndex_ClickedSeeAlsoEntry; // Set options // WWHJavaScriptSettings_Index_DisplayOptions(this.mOptions); } function WWHIndex_InitHeadHTML() { var InitHeadHTML = ""; return InitHeadHTML; } function WWHIndex_InitBodyHTML() { var HTML = new WWHStringBuffer_Object(); var BookList = WWHFrame.WWHHelp.mBooks.mBookList; var bFoundRequiredGroupOptions = false; var RequiredGroup = null; var MaxIndex; var Index; var bRequiredGroupShowBuckets; var ItemKey; var Item; // Display initializing message // HTML.fAppend("

    " + WWHFrame.WWHJavaScript.mMessages.mInitializingMessage + "

    \n"); // Load index data // this.mInitIndex = 0; for (MaxIndex = BookList.length, Index = 0 ; Index < MaxIndex ; Index++) { // Reference Index data // HTML.fAppend("\n"); // Load Index data for current book // HTML.fAppend("\n"); } // Confirm required group options are defined // for (MaxIndex = this.mOptions.mGroupList.length, Index = 0 ; Index < MaxIndex ; Index++) { if (this.mOptions.mGroupList[Index].length == 0) // Required Group { bFoundRequiredGroupOptions = true; } } // Create required group options if not found // if ( ! bFoundRequiredGroupOptions) { this.mOptions.fGroup("", true, false, ""); } // Create always display entries // for (MaxIndex = this.mOptions.mGroupList.length, Index = 0 ; Index < MaxIndex ; Index++) { if (this.mOptions.mGroupList[Index].length == 0) // Required group { RequiredGroup = this.mTopEntry.fGetGroup(this.mOptions.mGroupList[Index]); } else if (this.mOptions.mGroupInfoHash[this.mOptions.mGroupList[Index] + "~"].mbAlwaysDisplay) // Always display grouping { this.mTopEntry.fGetGroup(this.mOptions.mGroupList[Index]); } } // Determine if buckets are going to be hidden // bRequiredGroupShowBuckets = this.mOptions.mGroupInfoHash["" + "~"].mbShowBuckets; // Add require items to required group // for (ItemKey in this.mOptions.mGroupMapping) { if (this.mOptions.mGroupMapping[ItemKey].length == 0) // Required item { Item = ItemKey.substring(0, ItemKey.length - 1); RequiredGroup.fGetBucket(Item, bRequiredGroupShowBuckets); } } return HTML.fGetBuffer(); } function WWHIndex_InitLoadBookIndex(ParamAddIndexEntriesFunc) { // Load Index // ParamAddIndexEntriesFunc(this.mTopEntry); // Increment init book index // this.mInitIndex++; // Check if done // if (this.mInitIndex == WWHFrame.WWHHelp.mBooks.mBookList.length) { // Process see also entries to set up links between source and target // Do this before the top level hashes are cleared by the sort children call // this.fProcessSeeAlsoEntries(); // Sort top level entries // if (this.mTopEntry.mChildrenSortArray == null) { WWHIndexEntry_SortChildren(this.mTopEntry); } // Panel is initialized // this.mbPanelInitialized = true; } } function WWHIndex_AddSeeAlsoEntry(ParamEntry) { this.mSeeAlsoArray[this.mSeeAlsoArray.length] = ParamEntry; } function WWHIndex_ProcessSeeAlsoEntries() { var MaxIndex; var Index; var FirstChar; var GroupTitle; var SeeAlsoTargetEntry; var GroupEntry; var BucketEntry; for (MaxIndex = this.mSeeAlsoArray.length, Index = 0 ; Index < MaxIndex ; Index++) { SeeAlsoEntry = this.mSeeAlsoArray[Index]; // Determine location of see also target // if (SeeAlsoEntry.mSeeAlso.length > 0) { FirstChar = SeeAlsoEntry.mSeeAlso.substring(0, 1); // toUpperCase is conditional to handle numbers // FirstChar = (typeof FirstChar.toUpperCase == "function") ? FirstChar.toUpperCase() : FirstChar; GroupTitle = WWHFrame.WWHIndex.mOptions.mGroupMapping[FirstChar + "~"]; if (typeof GroupTitle == "undefined") { GroupTitle = ""; // Put in required grouping } // Access target entry // SeeAlsoTargetEntry = null; GroupEntry = this.mTopEntry.mChildren[GroupTitle + "~"]; if ((typeof GroupEntry != "undefined") && (GroupEntry.mChildren != null)) { BucketEntry = GroupEntry.mChildren[FirstChar + "~"]; if ((typeof BucketEntry != "undefined") && (BucketEntry.mChildren != null)) { SeeAlsoTargetEntry = BucketEntry.mChildren[SeeAlsoEntry.mSeeAlso + "~"]; if (typeof SeeAlsoTargetEntry == "undefined") { SeeAlsoTargetEntry = null; } } } // Setup links between source and destination // if (SeeAlsoTargetEntry != null) { // See if target entry is already tagged // if (typeof SeeAlsoTargetEntry.mSeeAlsoTargetName == "undefined") { // Update target entry // SeeAlsoTargetEntry.mSeeAlsoTargetName = "s" + Index; } // Update source entry // SeeAlsoEntry.mSeeAlsoTargetName = SeeAlsoTargetEntry.mSeeAlsoTargetName; SeeAlsoEntry.mSeeAlsoTargetEntryKey = (GroupTitle.length > 0) ? GroupTitle : FirstChar; } } } } function WWHIndex_HeadHTML() { var HTML = new WWHStringBuffer_Object(); var MaxLevel; var Level; // Generate style section // HTML.fAppend("\n"); return HTML.fGetBuffer(); } function WWHIndex_StartHTMLSegments() { var HTML = new WWHStringBuffer_Object(); if (this.fThresholdExceeded()) { // Display sections of the index rather than the whole thing // // Select first entry if section not already picked // if (this.mSectionIndex == null) { this.mSectionIndex = 0; } // Calculate section navigation if not already cached // if (typeof this.mSectionCache[this.mSectionIndex] == "undefined") { this.mSectionCache[this.mSectionIndex] = this.fGetSectionNavigation(this.mSectionIndex); } // Display section selection // HTML.fAppend(this.mSectionCache[this.mSectionIndex]); HTML.fAppend("

     

    \n"); } else { // Display whole index // this.mSectionIndex = null; } // Setup iterator for display // this.mIterator.fReset(this.mSectionIndex, this.fThresholdExceeded()); // Define accessor functions to reduce file size // HTML.fAppend("\n"); return HTML.fGetBuffer(); } function WWHIndex_AdvanceHTMLSegment() { var MaxHTMLSegmentSize = WWHFrame.WWHJavaScript.mMaxHTMLSegmentSize; var Entry; var MaxIndex; var Index; var BaseEntryInfo = ""; var EntryInfo; var EntryAnchorName; var EntryPrefix; var EntrySuffix; // Add index in top entry to entry info if IteratorScope != TopEntry // if (this.mSectionIndex != null) { BaseEntryInfo += this.mSectionIndex; } this.mHTMLSegment.fReset(); while ((this.mHTMLSegment.fSize() < MaxHTMLSegmentSize) && (this.mIterator.fAdvance())) { Entry = this.mIterator.mEntry; // Check to see if this entry should be displayed // if ((Entry.mbBucket) && ( ! Entry.mbShow)) { // Don't display hidden buckets // // Do display break between other entries and first required entry // if (Entry.mbFirstRequiredEntry) { this.mHTMLSegment.fAppend("

     

    \n"); } } else { // Insert breaks between sections // if ((Entry.mbGroup) || (Entry.mbBucket)) { this.mHTMLSegment.fAppend("

     

    \n"); } // See if entry needs a named anchor target // if (typeof Entry.mSeeAlsoTargetName == "string") { EntryAnchorName = " name=\"" + Entry.mSeeAlsoTargetName + "\""; } else { EntryAnchorName = ""; } // Determine entry type // if (Entry.mbGroup) { EntryPrefix = ""; EntrySuffix = ""; } else if (Entry.mbBucket) { EntryPrefix = ""; EntrySuffix = ""; } else if (typeof Entry.mSeeAlso == "string") { if (typeof Entry.mSeeAlsoTargetName == "string") { // Use position stack for link info // EntryInfo = BaseEntryInfo; for (MaxIndex = this.mIterator.mPositionStack.length, Index = 0 ; Index < MaxIndex ; Index++) { if (EntryInfo.length > 0) { EntryInfo += ":"; } EntryInfo += this.mIterator.mPositionStack[Index]; } EntryPrefix = ""; EntrySuffix = ""; } else { EntryPrefix = ""; EntrySuffix = ""; } } else if (Entry.mBookLinks != null) { // Use position stack for link info // EntryInfo = BaseEntryInfo; for (MaxIndex = this.mIterator.mPositionStack.length, Index = 0 ; Index < MaxIndex ; Index++) { if (EntryInfo.length > 0) { EntryInfo += ":"; } EntryInfo += this.mIterator.mPositionStack[Index]; } EntryPrefix = ""; EntrySuffix = ""; } else if (EntryAnchorName.length > 0) { EntryPrefix = ""; EntrySuffix = ""; } else { EntryPrefix = ""; EntrySuffix = ""; } this.mHTMLSegment.fAppend("

    " + EntryPrefix + Entry.mText + EntrySuffix + "

    \n"); } } return (this.mHTMLSegment.fSize() > 0); } function WWHIndex_GetHTMLSegment() { return this.mHTMLSegment.fGetBuffer(); } function WWHIndex_EndHTMLSegments() { var HTML = ""; if ((this.mOptions.mThreshold <= 0) || (this.mEntryCount < this.mOptions.mThreshold)) { ; // Nothing to do } else // Display sections of the Index rather than the whole thing { // Display section selection // // HACK BEN // HTML += "

     

    \n"; // HTML += this.mSectionCache[this.mSectionIndex]; } return HTML; } function WWHIndex_HoverTextTranslate(ParamEntryInfo) { var Entry; // Locate specified entry // Entry = this.fGetEntry(ParamEntryInfo); return Entry.mText; } function WWHIndex_HoverTextFormat(ParamWidth, ParamTextID, ParamText) { var FormattedText = ""; var ForegroundColor = WWHFrame.WWHJavaScript.mSettings.mHoverText.mForegroundColor; var BackgroundColor = WWHFrame.WWHJavaScript.mSettings.mHoverText.mBackgroundColor; var BorderColor = WWHFrame.WWHJavaScript.mSettings.mHoverText.mBorderColor; var ImageDir = WWHFrame.WWHHelp.mHelpURLPrefix + "wwhelp/wwhimpl/common/images"; var ReqSpacer1w2h = ""; var ReqSpacer2w1h = ""; var ReqSpacer1w7h = ""; var ReqSpacer5w1h = ""; var Spacer1w2h = ReqSpacer1w2h; var Spacer2w1h = ReqSpacer2w1h; var Spacer1w7h = ReqSpacer1w7h; var Spacer5w1h = ReqSpacer5w1h; // Netscape 6.x (Mozilla) renders table cells with graphics // incorrectly inside of
    tags that are rewritten on the fly // if (WWHFrame.WWHBrowserInfo.mBrowser == 4) // Shorthand for Netscape 6.x (Mozilla) { Spacer1w2h = ""; Spacer2w1h = ""; Spacer1w7h = ""; Spacer5w1h = ""; } FormattedText += ""; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += "
    " + Spacer1w2h + "
    " + Spacer2w1h + "" + Spacer1w7h + "" + Spacer2w1h + "
    " + ReqSpacer2w1h + "" + ReqSpacer5w1h + "" + ParamText + "" + ReqSpacer5w1h + "" + ReqSpacer2w1h + "
    " + Spacer2w1h + "" + Spacer1w7h + "" + Spacer2w1h + "
    " + Spacer1w2h + "
    "; return FormattedText; } function WWHIndex_GetPopupAction(ParamEntryInfo) { var PopupAction = ""; if (WWHFrame.WWHJavaScript.mSettings.mHoverText.mbEnabled) { PopupAction += " onMouseOver=\"fS('" + ParamEntryInfo + "', " + this.mEventString + ");\""; PopupAction += " onMouseOut=\"fH();\""; } return PopupAction; } function WWHIndex_ThresholdExceeded() { var bThresholdExceeded; if ((this.mOptions.mThreshold > 0) && (this.mEntryCount > this.mOptions.mThreshold)) { bThresholdExceeded = true; } else { bThresholdExceeded = false; } return bThresholdExceeded; } function WWHIndex_GetSectionNavigation(ParamSection) { var SectionNavHTML = ""; var SectionArray; var MaxIndex; var Index; SectionNavHTML += "

    "; // Calculate section selection // SectionArray = this.mTopEntry.mChildrenSortArray; for (MaxIndex = SectionArray.length, Index = 0 ; Index < MaxIndex ; Index++) { // Add spacers if necessary // if (Index > 0) { SectionNavHTML += this.mOptions.mSeperator; } // Display section with or without link as necessary // if (Index == this.mSectionIndex) // Currently being displayed { SectionNavHTML += SectionArray[Index].mText; } else if ((SectionArray[Index].mChildren == null) && // Always display group (SectionArray[Index].mChildrenSortArray == null)) // SortArray null before sort, hash null after { SectionNavHTML += "" + SectionArray[Index].mText + ""; } else { SectionNavHTML += "" + SectionArray[Index].mText + ""; } } SectionNavHTML += "

    "; return SectionNavHTML; } function WWHIndex_ChangeSection(ParamSectionIndex) { // Set section // this.mSectionIndex = ParamSectionIndex; // Reload panel // WWHFrame.WWHJavaScript.mPanels.fClearScrollPosition(); WWHFrame.WWHJavaScript.mPanels.fDisplayPanel(); } function WWHIndex_SelectionListHeadHTML() { var HTML = new WWHStringBuffer_Object(); var Level; HTML.fAppend("\n"); return HTML.fGetBuffer(); } function WWHIndex_SelectionListBodyHTML() { var HTML = new WWHStringBuffer_Object(); var BookList = WWHFrame.WWHHelp.mBooks.mBookList; var MaxBookIndex; var BookIndex; var BookListEntry; var LinkArray; var MaxLinkIndex; var LinkIndex; var Parts; var PrevLinkFileIndex; var LinkFileIndex; var LinkAnchor; var DocumentURL; // Display multiple entry message // HTML.fAppend("

    "); HTML.fAppend(WWHFrame.WWHJavaScript.mMessages.mIndexSelectMessage1 + " "); HTML.fAppend(WWHFrame.WWHJavaScript.mMessages.mIndexSelectMessage2); HTML.fAppend("

    \n"); // Display text of entry clicked // HTML.fAppend("

    " + this.mClickedEntry.mText + "

    \n"); // Display each book's link for this entry // for (MaxBookIndex = BookList.length, BookIndex = 0 ; BookIndex < MaxBookIndex ; BookIndex++) { if (typeof this.mClickedEntry.mBookLinks[BookIndex] != "undefined") { BookListEntry = BookList[BookIndex]; // Write the book's title // HTML.fAppend("

     

    \n"); HTML.fAppend("

    " + BookListEntry.mTitle + ""); // Sort link array to group files with anchors // // Use for loop to copy entries to workaround bug/problem in IE 5.0 on Windows // LinkArray = new Array(); for (MaxLinkIndex = this.mClickedEntry.mBookLinks[BookIndex].length, LinkIndex = 0 ; LinkIndex < MaxLinkIndex ; LinkIndex++) { LinkArray[LinkIndex] = this.mClickedEntry.mBookLinks[BookIndex][LinkIndex]; } LinkArray = LinkArray.sort(); // Now display file links // PrevLinkFileIndex = null; for (MaxLinkIndex = LinkArray.length, LinkIndex = 0 ; LinkIndex < MaxLinkIndex ; LinkIndex++) { // Determine link file index and anchor // Parts = LinkArray[LinkIndex].split("#"); LinkFileIndex = parseInt(Parts[0]); if (Parts.length > 1) { LinkAnchor = "#" + Parts[1]; } else { LinkAnchor = ""; } // Determine if all links for a single document have been processed // if ((PrevLinkFileIndex == null) || (LinkFileIndex != PrevLinkFileIndex)) { HTML.fAppend("

    \n"); // Build up absolute link URL // DocumentURL = WWHFrame.WWHHelp.mBaseURL + BookListEntry.mDirectory + BookListEntry.mFiles.fFileIndexToHREF(LinkFileIndex) + LinkAnchor; DocumentURL = WWHStringUtilities_RestoreEscapedSpaces(DocumentURL); DocumentURL = WWHStringUtilities_EscapeURLForJavaScriptAnchor(DocumentURL); HTML.fAppend("

    "); HTML.fAppend(""); HTML.fAppend(BookListEntry.mFiles.fFileIndexToTitle(LinkFileIndex) + ""); } else { // Build up absolute link URL // DocumentURL = WWHFrame.WWHHelp.mBaseURL + BookListEntry.mDirectory + BookListEntry.mFiles.fFileIndexToHREF(LinkFileIndex) + LinkAnchor; DocumentURL = WWHStringUtilities_RestoreEscapedSpaces(DocumentURL); DocumentURL = WWHStringUtilities_EscapeURLForJavaScriptAnchor(DocumentURL); HTML.fAppend(", "); HTML.fAppend(""); HTML.fAppend((LinkIndex + 1) + ""); } PrevLinkFileIndex = LinkFileIndex; } HTML.fAppend("

    \n"); } } return HTML.fGetBuffer(); } function WWHIndex_DisplayLink(ParamURL) { WWHFrame.WWHHelp.fSetDocumentHREF(ParamURL, false); } function WWHIndex_GetEntry(ParamEntryInfo) { var Entry = null; var EntryInfoParts; var MaxIndex; var Index; // Locate specified entry // Entry = this.mTopEntry; EntryInfoParts = ParamEntryInfo.split(":"); for (MaxIndex = EntryInfoParts.length, Index = 0 ; Index < MaxIndex ; Index++) { Entry = Entry.mChildrenSortArray[EntryInfoParts[Index]]; } return Entry; } function WWHIndex_ClickedEntry(ParamEntryInfo) { var Entry; var BookCount; var BookIndex; var BookListEntry; var Parts; var LinkFileIndex; var LinkAnchor; var DocumentURL; // Locate specified entry // Entry = this.fGetEntry(ParamEntryInfo); // Display target document or selection list // BookCount = 0; for (BookIndex in Entry.mBookLinks) { BookCount++; } // See if this is a single entry // if ((BookCount == 1) && (Entry.mBookLinks[BookIndex].length == 1)) { BookListEntry = WWHFrame.WWHHelp.mBooks.mBookList[BookIndex]; // Determine link file index and anchor // Parts = Entry.mBookLinks[BookIndex][0].split("#"); LinkFileIndex = parseInt(Parts[0]); if (Parts.length > 1) { LinkAnchor = "#" + Parts[1]; } else { LinkAnchor = ""; } // Set Document // DocumentURL = WWHFrame.WWHHelp.mBaseURL + BookListEntry.mDirectory + BookListEntry.mFiles.fFileIndexToHREF(LinkFileIndex) + LinkAnchor; } else { // Display selection list // this.mClickedEntry = Entry; DocumentURL = WWHFrame.WWHHelp.mBaseURL + "wwhelp/wwhimpl/js/html/indexsel.htm"; } this.fDisplayLink(DocumentURL); } function WWHIndex_ClickedSeeAlsoEntry(ParamEntryInfo) { var Entry; var TargetSectionIndex; var MaxIndex; var Index; // Locate specified entry // Entry = this.fGetEntry(ParamEntryInfo); // Confirm entry has target information // if ((typeof Entry.mSeeAlsoTargetName == "string") && (typeof Entry.mSeeAlsoTargetEntryKey == "string")) { TargetSectionIndex = null; // Determine if we need to jump to another page // if (this.fThresholdExceeded()) { MaxIndex = this.mTopEntry.mChildrenSortArray.length; Index = 0; while ((TargetSectionIndex == null) && (Index < MaxIndex)) { if (this.mTopEntry.mChildrenSortArray[Index].mText == Entry.mSeeAlsoTargetEntryKey) { TargetSectionIndex = Index; } Index++; } } // Set target entry // this.mPanelAnchor = Entry.mSeeAlsoTargetName; if (((TargetSectionIndex != null) && (this.mSectionIndex != null)) && (TargetSectionIndex != this.mSectionIndex)) { // Need to switch to proper section // this.fChangeSection(TargetSectionIndex); } else { // We're on the right page, so just jump to the correct entry // WWHFrame.WWHJavaScript.mPanels.fJumpToAnchor(); } } } function WWHIndexIterator_Object() { this.mIteratorScope = null; this.mEntry = null; this.mParentStack = new Array(); this.mPositionStack = new Array(); this.mbThresholdExceeded = false; this.mStackOffset = 1; this.fReset = WWHIndexIterator_Reset; this.fAdvance = WWHIndexIterator_Advance; } function WWHIndexIterator_Reset(ParamIndex, bParamThresholdExceeded) { if (ParamIndex == null) // Iterate buckets as well! { this.mIteratorScope = WWHFrame.WWHIndex.mTopEntry; } else { this.mIteratorScope = WWHFrame.WWHIndex.mTopEntry.mChildrenSortArray[ParamIndex]; } this.mEntry = this.mIteratorScope; this.mParentStack.length = 0; this.mPositionStack.length = 0; this.mbThresholdExceeded = bParamThresholdExceeded; this.mStackOffset = 1; } function WWHIndexIterator_Advance() { // Advance to the next visible entry // if (this.mEntry != null) { // Check for children // if (this.mEntry.mChildren != null) { // Determine sort order if necessary // if (this.mEntry.mChildrenSortArray == null) { WWHIndexEntry_SortChildren(this.mEntry); } } // Process children // if (this.mEntry.mChildrenSortArray != null) { // Modify stack offset as needed // if (( ! this.mbThresholdExceeded) && (this.mEntry.mbBucket) && ( ! this.mEntry.mbShow)) { this.mStackOffset += 1; } this.mParentStack[this.mParentStack.length] = this.mEntry; this.mPositionStack[this.mPositionStack.length] = 0; this.mEntry = this.mEntry.mChildrenSortArray[0]; } // If we've reached the iterator scope, we're done // else if (this.mEntry == this.mIteratorScope) { this.mEntry = null; } else { var ParentEntry; var StackTop; ParentEntry = this.mParentStack[this.mParentStack.length - 1]; this.mEntry = null; // Find next child of parent entry // while (ParentEntry != null) { // Increment position // StackTop = this.mPositionStack.length - 1; this.mPositionStack[StackTop]++; // Confirm this is a valid entry // if (this.mPositionStack[StackTop] < ParentEntry.mChildrenSortArray.length) { // Return the parent's next child // this.mEntry = ParentEntry.mChildrenSortArray[this.mPositionStack[StackTop]]; // Signal break from loop // ParentEntry = null; } else { // Last child of parent, try up a level // if (ParentEntry == this.mIteratorScope) { ParentEntry = null; } else { // Restore stack offset as needed // if (( ! this.mbThresholdExceeded) && (ParentEntry.mbBucket) && ( ! ParentEntry.mbShow)) { this.mStackOffset -= 1; } ParentEntry = ParentEntry.mParent; this.mParentStack.length--; this.mPositionStack.length--; ParentEntry = this.mParentStack[this.mParentStack.length - 1]; } } } } } return (this.mEntry != null); } function WWHIndexTopEntry_Object() { this.mLevel = -1; this.mChildren = null; this.mChildrenSortArray = null; this.fGetGroup = WWHIndexTopEntry_GetGroup; this.fAddEntry = WWHIndexTopEntry_AddEntry; this.fA = WWHIndexTopEntry_AddEntry; } function WWHIndexTopEntry_GetGroup(ParamGroupTitle) { var GroupEntry; // See if this object has any children // if (this.mChildren == null) { this.mChildren = new WWHIndexEntryHash_Object(); } // Access entry, creating it if it doesn't exist // GroupEntry = this.mChildren[ParamGroupTitle + "~"]; if (typeof GroupEntry == "undefined") { GroupEntry = new WWHIndexEntry_Object(0, 0, WWHStringUtilities_EscapeHTML(ParamGroupTitle), null, null); GroupEntry.mbGroup = true; this.mChildren[ParamGroupTitle + "~"] = GroupEntry; } return GroupEntry; } function WWHIndexTopEntry_AddEntry(ParamText, ParamLinks, ParamSortKey, ParamSeeAlso) { var FirstChar = ""; var GroupTitle; var GroupEntry; var BucketEntry; var NewEntry; // Grab first character // if ((typeof ParamSortKey == "string") && (ParamSortKey.length > 0)) { FirstChar = ParamSortKey.substring(0, 1); // Check for encoded characters // if (FirstChar == "&") { FirstChar = WWHStringUtilities_UnescapeHTML(ParamSortKey); FirstChar = FirstChar.substring(0, 1); } // toUpperCase is conditional to handle numbers // FirstChar = (typeof FirstChar.toUpperCase == "function") ? FirstChar.toUpperCase() : FirstChar; } else if (ParamText.length > 0) { FirstChar = ParamText.substring(0, 1); // Check for encoded characters // if (FirstChar == "&") { FirstChar = WWHStringUtilities_UnescapeHTML(ParamText); FirstChar = FirstChar.substring(0, 1); } // toUpperCase is conditional to handle numbers // FirstChar = (typeof FirstChar.toUpperCase == "function") ? FirstChar.toUpperCase() : FirstChar; } // Check for a group // GroupTitle = WWHFrame.WWHIndex.mOptions.mGroupMapping[FirstChar + "~"]; if (typeof GroupTitle == "undefined") { GroupTitle = ""; // Put in required grouping } // Access group // GroupEntry = this.fGetGroup(GroupTitle); // Access bucket // BucketEntry = GroupEntry.fGetBucket(FirstChar, WWHFrame.WWHIndex.mOptions.mGroupInfoHash[GroupTitle + "~"].mbShowBuckets); // Add entry // NewEntry = BucketEntry.fAddEntry(ParamText, ParamLinks, ParamSortKey, ParamSeeAlso); return NewEntry; } function WWHIndexEntry_Object(ParamBookIndex, ParamLevel, ParamText, ParamLinks, ParamSeeAlso) { this.mText = ParamText; this.mBookLinks = null; this.mLevel = ParamLevel; this.mChildren = null; this.mChildrenSortArray = null; if (typeof ParamSeeAlso == "string") { this.mSeeAlso = ParamSeeAlso; } this.fGetBucket = WWHIndexEntry_GetBucket; this.fAddEntry = WWHIndexEntry_AddEntry; this.fA = WWHIndexEntry_AddEntry; // Bump MaxLevel if exceeded // if (WWHFrame.WWHIndex.mMaxLevel < this.mLevel) { WWHFrame.WWHIndex.mMaxLevel = this.mLevel; } // Bump entry count // WWHFrame.WWHIndex.mEntryCount++; // Add links // if ((typeof ParamLinks != "undefined") && (ParamLinks != null)) { this.mBookLinks = new WWHIndexEntryBookHash_Object(); this.mBookLinks[ParamBookIndex] = ParamLinks; } } function WWHIndexEntry_GetBucket(ParamText, bParamShow) { var BucketEntry; // See if this object has any children // if (this.mChildren == null) { this.mChildren = new WWHIndexEntryHash_Object(); } // Access entry, creating it if it doesn't exist // BucketEntry = this.mChildren[ParamText + "~"]; if (typeof BucketEntry == "undefined") { var Level; // Keep level the same if buckets not visible // if (bParamShow) { Level = this.mLevel + 1; } else { Level = this.mLevel; } BucketEntry = new WWHIndexEntry_Object(0, Level, WWHStringUtilities_EscapeHTML(ParamText), null, null); BucketEntry.mbBucket = true; BucketEntry.mbShow = bParamShow; this.mChildren[ParamText + "~"] = BucketEntry; } return BucketEntry; } function WWHIndexEntry_AddEntry(ParamText, ParamLinks, ParamSortKey, ParamSeeAlso) { var HashKey; var ChildEntry; var BookIndex = WWHFrame.WWHIndex.mInitIndex; var Links = null; // Set links if entries exist // if ((typeof ParamLinks != "undefined") && (ParamLinks != null) && (ParamLinks.length > 0)) { Links = ParamLinks; } // See if this object has any children // if (this.mChildren == null) { this.mChildren = new WWHIndexEntryHash_Object(); } // Access entry, creating it if it doesn't exist // HashKey = ((typeof ParamSortKey == "string") ? ParamSortKey : "") + ParamText; ChildEntry = this.mChildren[HashKey + "~"]; if (typeof ChildEntry == "undefined") { ChildEntry = new WWHIndexEntry_Object(BookIndex, this.mLevel + 1, ParamText, Links, ParamSeeAlso); this.mChildren[HashKey + "~"] = ChildEntry; // Add entry to see also collection if it is a see also entry // if (typeof ParamSeeAlso == "string") { WWHFrame.WWHIndex.fAddSeeAlsoEntry(ChildEntry); } } else // Child entry exists, update with new information { // Add book links // if (Links != null) { if (ChildEntry.mBookLinks == null) { ChildEntry.mBookLinks = new WWHIndexEntryBookHash_Object(); } if (typeof ChildEntry.mBookLinks[BookIndex] == "undefined") { ChildEntry.mBookLinks[BookIndex] = Links; } else // Append new links { var BookLinks = ChildEntry.mBookLinks[BookIndex]; var MaxIndex; var Index; for (MaxIndex = Links.length, Index = 0 ; Index < MaxIndex ; Index++) { BookLinks[BookLinks.length] = Links[Index]; } } } } return ChildEntry; } function WWHIndexEntry_SortChildren(ParamEntry) { var SortedArray; // Sort top entry according to group order // if (ParamEntry == WWHFrame.WWHIndex.mTopEntry) { var GroupList = WWHFrame.WWHIndex.mOptions.mGroupList; var MaxGroupIndex; var GroupIndex; var GroupEntry; // Accumulate entries in sort order // SortedArray = new Array(); for (MaxGroupIndex = GroupList.length, GroupIndex = 0 ; GroupIndex < MaxGroupIndex ; GroupIndex++) { GroupEntry = ParamEntry.mChildren[GroupList[GroupIndex] + "~"]; if (typeof GroupEntry != "undefined") { if (GroupList[GroupIndex].length == 0) // Required group list found { // Sort required group entries // WWHIndexEntry_SortChildren(GroupEntry); // Add children to sorted array // for (MaxIndex = GroupEntry.mChildrenSortArray.length, Index = 0 ; Index < MaxIndex ; Index++) { SortedArray[SortedArray.length] = GroupEntry.mChildrenSortArray[Index]; // Mark first required group entry // if (Index == 0) { SortedArray[SortedArray.length - 1].mbFirstRequiredEntry = true; } } } else { SortedArray[SortedArray.length] = GroupEntry; } } } } else { var UnsortedArray; var HashKey; var SortKey; var MaxIndex; var Index; // Accumulate hash keys // UnsortedArray = new Array(); for (HashKey in ParamEntry.mChildren) { // toUpperCase is conditional to handle numbers // SortKey = ((typeof HashKey.toUpperCase == "function") ? HashKey.toUpperCase() : HashKey) + "\n" + HashKey; UnsortedArray[UnsortedArray.length] = SortKey; } // Sort array // SortedArray = UnsortedArray.sort(); // Replace sort keys with entries // for (MaxIndex = SortedArray.length, Index = 0 ; Index < MaxIndex ; Index++) { SortKey = SortedArray[Index]; HashKey = SortKey.substring(SortKey.indexOf("\n") + 1, SortKey.length) SortedArray[Index] = ParamEntry.mChildren[HashKey]; } } // Set children sort array // Clear hash table as it is no longer needed // ParamEntry.mChildrenSortArray = SortedArray; ParamEntry.mChildren = null; } function WWHIndexEntryHash_Object() { } function WWHIndexEntryBookHash_Object() { } function WWHSectionCache_Object() { } function WWHIndexOptions_Object() { this.mThreshold = 0; this.mGroupList = new Array(); this.mGroupInfoHash = new WWHIndexOptionsGroupInfoHash_Object(); this.mGroupMapping = new WWHIndexOptionsGroupMapping_Object(); this.fSetThreshold = WWHIndexOptions_SetThreshold; this.fSetSeperator = WWHIndexOptions_SetSeperator; this.fGroup = WWHIndexOptions_Group; } function WWHIndexOptions_SetThreshold(ParamThreshold) { this.mThreshold = ParamThreshold; } function WWHIndexOptions_SetSeperator(ParamSeperator) { this.mSeperator = ParamSeperator; } function WWHIndexOptions_Group(ParamGroupTitle, bParamAlwaysDisplay, bParamShowBuckets, ParamGroupEntries) { var GroupEntries; var MaxIndex; var Index; // Record display order // this.mGroupList[this.mGroupList.length] = ParamGroupTitle; // Record group info // if (ParamGroupTitle != "") { this.mGroupInfoHash[ParamGroupTitle + "~"] = new WWHIndexOptionsGroupInfo_Object(bParamAlwaysDisplay, bParamShowBuckets); } else // Handle required group { this.mGroupInfoHash[ParamGroupTitle + "~"] = new WWHIndexOptionsGroupInfo_Object(true, bParamShowBuckets); } // Record entries for each group // GroupEntries = ParamGroupEntries.split(""); for (MaxIndex = GroupEntries.length, Index = 0 ; Index < MaxIndex ; Index++) { if ((ParamGroupTitle.length == 0) || // Required items always have precendence (typeof this.mGroupMapping[GroupEntries[Index] + "~"] == "undefined")) // Otherwise, prevent reseting entries { this.mGroupMapping[GroupEntries[Index] + "~"] = ParamGroupTitle; } } } function WWHIndexOptionsGroupInfoHash_Object() { } function WWHIndexOptionsGroupInfo_Object(bParamAlwaysDisplay, bParamShowBuckets) { this.mbAlwaysDisplay = bParamAlwaysDisplay; this.mbShowBuckets = bParamShowBuckets; } function WWHIndexOptionsGroupMapping_Object() { } function WWHSearch_Object() { this.mbPanelInitialized = false; this.mPanelAnchor = null; this.mPanelTabTitle = WWHFrame.WWHJavaScript.mMessages.mTabsSearchLabel; this.mbBookSearchInfoLoaded = false; this.mInitIndex = 0; this.mBookSearchInfoList = new Array(); this.mSavedSearchWords = ""; this.mSavedSearchScope = 0; this.mSearchWordList = new Array(); this.mSearchWordRegExpList = new Array(); this.mBookIndex = 0; this.mBookMatchesList = new Array(); this.mCombinedResults = new WWHSearchResults_Object(); this.fInitHeadHTML = WWHSearch_InitHeadHTML; this.fInitBodyHTML = WWHSearch_InitBodyHTML; this.fInitLoadBookSearchInfo = WWHSearch_InitLoadBookSearchInfo; this.fHeadHTML = WWHSearch_HeadHTML; this.fStartHTMLSegments = WWHSearch_StartHTMLSegments; this.fAdvanceHTMLSegment = WWHSearch_AdvanceHTMLSegment; this.fGetHTMLSegment = WWHSearch_GetHTMLSegment; this.fEndHTMLSegments = WWHSearch_EndHTMLSegments; this.fHoverTextTranslate = WWHSearch_HoverTextTranslate; this.fHoverTextFormat = WWHSearch_HoverTextFormat; this.fDisplaySearchForm = WWHSearch_DisplaySearchForm; this.fSubmit = WWHSearch_Submit; this.fSetSearchWords = WWHSearch_SetSearchWords; this.fCheckForMatch = WWHSearch_CheckForMatch; this.fSearchComplete = WWHSearch_SearchComplete; this.fCombineResults = WWHSearch_CombineResults; this.fShowEntry = WWHSearch_ShowEntry; } function WWHSearch_InitHeadHTML() { var InitHeadHTML = ""; return InitHeadHTML; } function WWHSearch_InitBodyHTML() { var HTML = new WWHStringBuffer_Object(); var BookList = WWHFrame.WWHHelp.mBooks.mBookList; var MaxIndex; var Index; var MaxBookIndex; var BookIndex; var BookDirectory; if ( ! this.mbBookSearchInfoLoaded) { // Display initializing message // HTML.fAppend("

    " + WWHFrame.WWHJavaScript.mMessages.mInitializingMessage + "

    \n"); // Load search info // this.mInitIndex = 0; for (MaxIndex = BookList.length, Index = 0 ; Index < MaxIndex ; Index++) { // Reference search info // HTML.fAppend("\n"); // Load search info for current book // HTML.fAppend("\n"); } } else // Perform search { // Display searching message // HTML.fAppend("

    " + WWHFrame.WWHJavaScript.mMessages.mSearchSearchingMessage + "

    \n"); // Handle single book search // if (this.mSavedSearchScope > 0) { MaxBookIndex = this.mSavedSearchScope; BookIndex = this.mSavedSearchScope - 1; } else { MaxBookIndex = BookList.length; BookIndex = 0; } // Generate search actions // this.mBookIndex = BookIndex; for ( ; BookIndex < MaxBookIndex ; BookIndex++) { BookDirectory = BookList[BookIndex].mDirectory; for (MaxIndex = this.mBookSearchInfoList[BookIndex].mSearchFileCount, Index = 0 ; Index < MaxIndex ; Index++) { HTML.fAppend("\n"); HTML.fAppend("\n"); } HTML.fAppend("\n"); } HTML.fAppend("\n"); } return HTML.fGetBuffer(); } function WWHSearch_InitLoadBookSearchInfo(ParamSearchFileCount, ParamMinimumWordLength, ParamSearchSkipWordsFunc) { // Load book search info // this.mBookSearchInfoList[this.mInitIndex] = new WWHBookSearchInfo_Object(ParamSearchFileCount, ParamMinimumWordLength); ParamSearchSkipWordsFunc(this.mBookSearchInfoList[this.mInitIndex]); // Create match objects for each book // this.mBookMatchesList[this.mBookMatchesList.length] = new WWHSearchBookMatches_Object(); // Increment init book index // this.mInitIndex++; // Mark initialized if done // if (this.mInitIndex == WWHFrame.WWHHelp.mBooks.mBookList.length) { this.mbPanelInitialized = true; this.mbBookSearchInfoLoaded = true; } } function WWHSearch_HeadHTML() { var HTML = new WWHStringBuffer_Object(); var Settings = WWHFrame.WWHJavaScript.mSettings.mSearch; // Generate style section // HTML.fAppend("\n"); return HTML.fGetBuffer(); } function WWHSearch_StartHTMLSegments() { var HTML = new WWHStringBuffer_Object(); if (this.mbPanelInitialized) { HTML.fAppend(this.fDisplaySearchForm()); if (this.mSavedSearchWords.length == 0) { HTML.fAppend("

    " + WWHFrame.WWHJavaScript.mMessages.mSearchDefaultMessage + "

    \n"); } else if ((typeof this.mCombinedResults.mEntries != "undefined") && (this.mCombinedResults.mEntries.length > 0)) { this.mCombinedResults.fDisplayReset(); } else { HTML.fAppend("

    " + WWHFrame.WWHJavaScript.mMessages.mSearchNothingFoundMessage + "

    \n"); } } // Define accessor functions to reduce file size // HTML.fAppend("\n"); return HTML.fGetBuffer(); } function WWHSearch_AdvanceHTMLSegment() { var bSegmentCreated = false; if (this.mbPanelInitialized) { bSegmentCreated = this.mCombinedResults.fDisplayAdvance(); } return bSegmentCreated; } function WWHSearch_GetHTMLSegment() { return this.mCombinedResults.mHTMLSegment.fGetBuffer(); } function WWHSearch_EndHTMLSegments() { return ""; } function WWHSearch_HoverTextTranslate(ParamEntryID) { var HTML = ""; var BookList = WWHFrame.WWHHelp.mBooks.mBookList; var Settings = WWHFrame.WWHJavaScript.mSettings.mSearch; var Messages = WWHFrame.WWHJavaScript.mMessages; var Entry; var Rank = ""; var Title; var Book = ""; var Format; // Retrieve specified entry // Entry = this.mCombinedResults.mEntries[ParamEntryID]; // Get Rank // if (Settings.mbShowRank) { Rank = Math.floor((Entry.mScore / this.mCombinedResults.mMaxScore) * 100) + "%"; } // Get Title // Title = Entry.mTitle; // Get Book // if (Settings.mbShowBook) { if ((BookList.length > 1) && // More than one book exists (this.mCombinedResults.mSortedBy == 1)) // By Score { Book = BookList[Entry.mBookIndex].mTitle; } } // Format for display // if ((Rank.length == 0) && (Book.length == 0)) { // Simple format, just the title // HTML = Title; } else { Format = " align=\"left\" valign=\"top\">"; // Complex format, requires a table // HTML += ""; if (Rank.length > 0) { HTML += ""; HTML += ""; HTML += ""; HTML += ""; } HTML += ""; HTML += ""; HTML += ""; HTML += ""; if (Book.length > 0) { HTML += ""; HTML += ""; HTML += ""; HTML += ""; } HTML += "
    "; } return HTML; } function WWHSearch_HoverTextFormat(ParamWidth, ParamTextID, ParamText) { var FormattedText = ""; var ForegroundColor = WWHFrame.WWHJavaScript.mSettings.mHoverText.mForegroundColor; var BackgroundColor = WWHFrame.WWHJavaScript.mSettings.mHoverText.mBackgroundColor; var BorderColor = WWHFrame.WWHJavaScript.mSettings.mHoverText.mBorderColor; var ImageDir = WWHFrame.WWHHelp.mHelpURLPrefix + "wwhelp/wwhimpl/common/images"; var ReqSpacer1w2h = ""; var ReqSpacer2w1h = ""; var ReqSpacer1w7h = ""; var ReqSpacer5w1h = ""; var Spacer1w2h = ReqSpacer1w2h; var Spacer2w1h = ReqSpacer2w1h; var Spacer1w7h = ReqSpacer1w7h; var Spacer5w1h = ReqSpacer5w1h; // Netscape 6.x (Mozilla) renders table cells with graphics // incorrectly inside of
    tags that are rewritten on the fly // if (WWHFrame.WWHBrowserInfo.mBrowser == 4) // Shorthand for Netscape 6.x (Mozilla) { Spacer1w2h = ""; Spacer2w1h = ""; Spacer1w7h = ""; Spacer5w1h = ""; } FormattedText += ""; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += " "; FormattedText += "
    " + Spacer1w2h + "
    " + Spacer2w1h + "" + Spacer1w7h + "" + Spacer2w1h + "
    " + ReqSpacer2w1h + "" + ReqSpacer5w1h + "" + ParamText + "" + ReqSpacer5w1h + "" + ReqSpacer2w1h + "
    " + Spacer2w1h + "" + Spacer1w7h + "" + Spacer2w1h + "
    " + Spacer1w2h + "
    "; return FormattedText; } function WWHSearch_DisplaySearchForm() { var HTML = ""; var BookList = WWHFrame.WWHHelp.mBooks.mBookList; HTML += "
    \n"; HTML += "\n"; HTML += "\n"; HTML += "\n"; HTML += "\n"; if (BookList.length > 1) { var SelectedIndex = this.mSavedSearchScope - 1; var MaxIndex; var Index; HTML += "
    \n"; HTML += "\n"; } HTML += "
    \n"; return HTML; } function WWHSearch_Submit() { var SearchForm = WWHFrame.WWHNavigationFrame.WWHPanelFrame.document.forms["WWHSearchForm"]; var NewSearchWords; var NewSearchScope; var bSearchChanged = false; // Update search words // NewSearchWords = SearchForm.elements["WWHSearchWordsText"].value; if (NewSearchWords != this.mSavedSearchWords) { this.mSavedSearchWords = NewSearchWords; bSearchChanged = true; } // Update search scope // if (WWHFrame.WWHHelp.mBooks.mBookList.length > 1) { NewSearchScope = SearchForm.elements["WWHSearchScope"].selectedIndex; if (NewSearchScope != this.mSavedSearchScope) { this.mSavedSearchScope = NewSearchScope; bSearchChanged = true; } } // Perform search if something changed // if (bSearchChanged) { if (this.mSavedSearchWords.length > 0) { var MaxIndex; var Index; // Clear previous results // for (MaxIndex = this.mBookMatchesList.length, Index = 0 ; Index < MaxIndex ; Index++) { this.mBookMatchesList[Index].fClear(); } this.mCombinedResults.fClear(); // Save/restore current position // WWHFrame.WWHJavaScript.mPanels.fSaveScrollPosition(); // Perform search // this.fSetSearchWords(WWHStringUtilities_NormalizeSearchWords(this.mSavedSearchWords)); this.mbPanelInitialized = false; setTimeout("WWHFrame.WWHJavaScript.mPanels.fDisplayPanel();", 50); // Need to finish submit } } return bSearchChanged; } function WWHSearch_SetSearchWords(ParamSearchWordsString) { // Workaround for stupid Netscape 4.x bug // var StringWithSpace = "x x"; var SearchWordList; var MaxIndex; var Index; var SearchWord; var SearchRegExpPattern; // Clear search words // this.mSearchWordList.length = 0; this.mSearchWordRegExpList.length = 0; // Add search words to hash // SearchWordList = ParamSearchWordsString.split(StringWithSpace.substring(1, 2)); for (MaxIndex = SearchWordList.length, Index = 0 ; Index < MaxIndex ; Index++) { // Skip 0 length words // if (SearchWordList[Index].length > 0) { // Add to search words hash // SearchWord = SearchWordList[Index].toLowerCase(); SearchRegExpPattern = WWHStringUtilities_WordToRegExpPattern(SearchWord); this.mSearchWordList[this.mSearchWordList.length] = SearchWord; this.mSearchWordRegExpList[this.mSearchWordRegExpList.length] = new RegExp(SearchRegExpPattern, "i"); } } } function WWHSearch_CheckForMatch(ParamSearchFunc) { var Count; var MaxIndex; var Index; var BookSearchInfoEntry; var SearchPattern; Count = 0; for (MaxIndex = this.mSearchWordList.length, Index = 0 ; Index < MaxIndex ; Index++) { BookSearchInfoEntry = this.mBookSearchInfoList[this.mBookIndex] if (this.mBookSearchInfoList[this.mBookIndex].fValidSearchWord(this.mSearchWordList[Index])) { BookMatchesListEntry = this.mBookMatchesList[this.mBookIndex]; BookMatchesListEntry.fSetMatchedWordIndex(Count); SearchPattern = this.mSearchWordRegExpList[Index]; SearchPattern.t = SearchPattern.test; ParamSearchFunc(SearchPattern, BookMatchesListEntry); Count++; } } } function WWHSearch_SearchComplete() { // Set flag so that results can be displayed // this.mbPanelInitialized = true; // Combine results for display // this.fCombineResults(); // Sort results based on single or multi-book display // if ((WWHFrame.WWHHelp.mBooks.mBookList.length == 1) || (this.mSavedSearchScope > 0)) { this.mCombinedResults.fSortByBookIndex(); } else { this.mCombinedResults.fSortByScore(); } } function WWHSearch_CombineResults() { var MaxBookIndex; var BookIndex; var BookMatches; var BookListEntry; var FileID; var FileIndex; this.mCombinedResults.fClear(); for (MaxBookIndex = this.mBookMatchesList.length, BookIndex = 0 ; BookIndex < MaxBookIndex ; BookIndex++) { BookMatches = this.mBookMatchesList[BookIndex]; BookListEntry = WWHFrame.WWHHelp.mBooks.mBookList[BookIndex]; // Add results // BookMatches.fJoinFileScores(); for (FileID in BookMatches.mFileScores) { FileIndex = parseInt(FileID.substring(1, FileID.length)); this.mCombinedResults.fAddEntry(BookIndex, FileIndex, BookMatches.mFileScores[FileID], BookListEntry.mFiles.fFileIndexToTitle(FileIndex)); } } } function WWHSearch_ShowEntry(ParamIndex) { this.mCombinedResults.fShowEntry(ParamIndex); } function WWHBookSearchInfo_Object(ParamSearchFileCount, ParamMinimumWordLength) { this.mSearchFileCount = ParamSearchFileCount; this.mMinimumWordLength = ParamMinimumWordLength; this.mSkipWords = new WWHBookSearchInfo_SkipWords_Object(); this.fAddSkipWord = WWHBookSearchInfo_AddSkipWord; this.fA = WWHBookSearchInfo_AddSkipWord; this.fValidSearchWord = WWHBookSearchInfo_ValidSearchWord; } function WWHBookSearchInfo_AddSkipWord(ParamSkipWord) { if (ParamSkipWord.length > 0) { this.mSkipWords[ParamSkipWord + "~"] = 1; } } function WWHBookSearchInfo_ValidSearchWord(ParamSearchWord) { var bValid = true; if ((ParamSearchWord.length < this.mMinimumWordLength) || (typeof this.mSkipWords[ParamSearchWord + "~"] == "number")) { bValid = false; } return bValid; } function WWHBookSearchInfo_SkipWords_Object() { } function WWHSearchBookMatches_Object() { this.mFirstMatchedWordIndex = -1; this.mMatchedWordIndex = -1; this.mWordFileScores = new Array(); this.mFileScores = new WWHSearchBookMatches_FileScores_Object(); this.fClear = WWHSearchBookMatches_Clear; this.fSetMatchedWordIndex = WWHSearchBookMatches_SetMatchedWordIndex; this.fAddMatches = WWHSearchBookMatches_AddMatches; this.f = WWHSearchBookMatches_AddMatches; // For smaller search files this.fJoinFileScores = WWHSearchBookMatches_JoinFileScores; } function WWHSearchBookMatches_Clear() { this.mFirstMatchedWordIndex = -1; this.mMatchedWordIndex = -1; this.mWordFileScores.length = 0; this.mFileScores = new WWHSearchBookMatches_FileScores_Object(); } function WWHSearchBookMatches_SetMatchedWordIndex(ParamMatchedWordIndex) { this.mMatchedWordIndex = ParamMatchedWordIndex; if (ParamMatchedWordIndex == this.mWordFileScores.length) { this.mWordFileScores[this.mWordFileScores.length] = new WWHSearchBookMatches_FileScores_Object(); } } function WWHSearchBookMatches_AddMatches(ParamMatchString) { var MatchList = null; var WordFileScoresEntry; var MaxIndex; var Index; var FileID; var Score; if (typeof ParamMatchString != "undefined") { MatchList = ParamMatchString.split(","); } if ((MatchList != null) && (MatchList.length > 0)) { WordFileScoresEntry = this.mWordFileScores[this.mMatchedWordIndex]; // Add all entries to word file score entry // for (MaxIndex = MatchList.length, Index = 0 ; Index < MaxIndex ; Index += 2) { FileID = "i" + MatchList[Index]; Score = MatchList[Index + 1]; WordFileScoresEntry[FileID] = parseInt(Score); } } } function WWHSearchBookMatches_JoinFileScores() { var WordFileScoresEntry; this.mFileScores = new WWHSearchBookMatches_FileScores_Object(); for (MaxIndex = this.mWordFileScores.length, Index = 0 ; Index < MaxIndex ; Index++) { WordFileScoresEntry = this.mWordFileScores[Index]; if (Index == 0) { // Add all entries if first entry // this.mFileScores = WordFileScoresEntry; } else { // Remove all entries not found in results set // for (FileID in this.mFileScores) { if (typeof WordFileScoresEntry[FileID] == "number") { this.mFileScores[FileID] += WordFileScoresEntry[FileID]; } else { delete this.mFileScores[FileID]; } } } } } function WWHSearchBookMatches_FileScores_Object() { } function WWHSearchResults_Object() { this.mSortedBy = null; this.mEntries = new Array(); this.mMaxScore = 0; this.mDisplayIndex = 0; this.mHTMLSegment = new WWHStringBuffer_Object(); this.mEventString = WWHPopup_EventString(); this.fClear = WWHSearchResults_Clear; this.fAddEntry = WWHSearchResults_AddEntry; this.fSortByScore = WWHSearchResults_SortByScore; this.fSortByBookIndex = WWHSearchResults_SortByBookIndex; this.fDisplayReset = WWHSearchResults_DisplayReset; this.fDisplayAdvance = WWHSearchResults_DisplayAdvance; this.fGetPopupAction = WWHSearchResults_GetPopupAction; this.fShowEntry = WWHSearchResults_ShowEntry; } function WWHSearchResults_Clear() { this.mSortedBy = null; this.mEntries.length = 0; this.mMaxScore = 0; } function WWHSearchResults_AddEntry(ParamBookIndex, ParamFileIndex, ParamScore, ParamTitle) { // Add a new entry // this.mEntries[this.mEntries.length] = new WWHSearchResultsEntry_Object(ParamBookIndex, ParamFileIndex, ParamScore, ParamTitle); // Bump mMaxScore if necessary // if (ParamScore > this.mMaxScore) { this.mMaxScore = ParamScore; } } function WWHSearchResults_SortByScore() { this.mSortedBy = 1; // By Score if (this.mEntries.length > 0) { this.mEntries = this.mEntries.sort(WWHSearchResultsEntry_ByScoreByBookIndexByTitleFileIndexURL); } } function WWHSearchResults_SortByBookIndex() { this.mSortedBy = 2; // By BookIndex if (this.mEntries.length > 0) { this.mEntries = this.mEntries.sort(WWHSearchResultsEntry_ByBookIndexByScoreByTitleFileIndexURL); } } function WWHSearchResults_DisplayReset() { this.mDisplayIndex = 0; } function WWHSearchResults_DisplayAdvance() { var bSegmentCreated = false; var Settings = WWHFrame.WWHJavaScript.mSettings.mSearch; var HTML; var MaxHTMLSegmentSize; var BookList; var MaxIndex; var Index; var Entry; var ByBookDetect; // Insure that there is something to display // if ((this.mSortedBy != null) && (this.mEntries.length > 0)) { MaxHTMLSegmentSize = WWHFrame.WWHJavaScript.mMaxHTMLSegmentSize; this.mHTMLSegment.fReset(); BookList = WWHFrame.WWHHelp.mBooks.mBookList; ByBookDetect = -1; // If this is the first entry, display the headers and open the list // if (this.mDisplayIndex == 0) { HTML = ""; HTML += "

    "; // Display column headers // if (Settings.mbShowRank) { HTML += WWHFrame.WWHJavaScript.mMessages.mSearchRankLabel + " "; } HTML += WWHFrame.WWHJavaScript.mMessages.mSearchTitleLabel; if (Settings.mbShowBook) { if ((BookList.length > 1) && // More than one book exists (this.mSortedBy == 1)) // By Score { HTML += ", " + WWHFrame.WWHJavaScript.mMessages.mSearchBookLabel; } } HTML += "

    \n"; HTML += "
      \n"; this.mHTMLSegment.fAppend(HTML); } // Display result entries // MaxIndex = this.mEntries.length; Index = this.mDisplayIndex; while ((this.mHTMLSegment.fSize() < MaxHTMLSegmentSize) && (Index < MaxIndex)) { HTML = ""; Entry = this.mEntries[Index]; if ((BookList.length > 1) && // More than one book exists (this.mSortedBy == 2)) // By BookIndex { if (ByBookDetect != Entry.mBookIndex) { // HACK BEN // ByBook only used for single books // No book title will be emitted // // HTML += "

       

      "; // HTML += "

      " + BookList[Entry.mBookIndex].mTitle + "

      "; ByBookDetect = Entry.mBookIndex; } } // Display Rank // if (Settings.mbShowRank) { HTML += "
    1. "; } else { HTML += "
    2. "; } // Display Title // HTML += ""; HTML += Entry.mTitle; HTML += ""; // Display Book // if (Settings.mbShowBook) { if ((BookList.length > 1) && // More than one book exists (this.mSortedBy == 1)) // By Score { HTML += ", " + BookList[Entry.mBookIndex].mTitle; } } HTML += "
    3. \n"; this.mHTMLSegment.fAppend(HTML); Index++; } // Record current display index so we can pick up where we left off // this.mDisplayIndex = Index; if (this.mHTMLSegment.fSize() > 0) { bSegmentCreated = true; } // If this is the last entry, close the list // if (this.mDisplayIndex == this.mEntries.length) { this.mHTMLSegment.fAppend("
    \n"); } } return bSegmentCreated; } function WWHSearchResults_GetPopupAction(ParamEntryIndex) { var PopupAction = ""; if (WWHFrame.WWHJavaScript.mSettings.mHoverText.mbEnabled) { PopupAction += " onMouseOver=\"fS('" + ParamEntryIndex + "', " + this.mEventString + ");\""; PopupAction += " onMouseOut=\"fH();\""; } return PopupAction; } function WWHSearchResults_ShowEntry(ParamIndex) { var Entry; var BookListEntry; var URL; // Update highlight words // WWHFrame.WWHHighlightWords.fSetWordList(WWHStringUtilities_NormalizeSearchWords(WWHFrame.WWHSearch.mSavedSearchWords)); // Display document // Entry = this.mEntries[ParamIndex]; BookListEntry = WWHFrame.WWHHelp.mBooks.mBookList[Entry.mBookIndex]; URL = WWHFrame.WWHHelp.mBaseURL + BookListEntry.mDirectory + BookListEntry.mFiles.fFileIndexToHREF(Entry.mFileIndex); WWHFrame.WWHHelp.fSetDocumentHREF(URL, false); } function WWHSearchResultsEntry_Object(ParamBookIndex, ParamFileIndex, ParamScore, ParamTitle) { this.mBookIndex = ParamBookIndex; this.mFileIndex = ParamFileIndex; this.mScore = ParamScore; this.mTitle = ParamTitle; } function WWHSearchResultsEntry_ByScoreByBookIndexByTitleFileIndexURL(ParamAlphaEntry, ParamBetaEntry) { var Result; Result = WWHSearchResultsEntry_CompareByScore(ParamAlphaEntry, ParamBetaEntry); if (Result == 0) { Result = WWHSearchResultsEntry_CompareByBookIndex(ParamAlphaEntry, ParamBetaEntry); } if (Result == 0) { Result = WWHSearchResultsEntry_CompareByTitleFileIndexURL(ParamAlphaEntry, ParamBetaEntry); } return Result; } function WWHSearchResultsEntry_ByBookIndexByScoreByTitleFileIndexURL(ParamAlphaEntry, ParamBetaEntry) { var Result; Result = WWHSearchResultsEntry_CompareByBookIndex(ParamAlphaEntry, ParamBetaEntry); if (Result == 0) { Result = WWHSearchResultsEntry_CompareByScore(ParamAlphaEntry, ParamBetaEntry); } if (Result == 0) { Result = WWHSearchResultsEntry_CompareByTitleFileIndexURL(ParamAlphaEntry, ParamBetaEntry); } return Result; } function WWHSearchResultsEntry_CompareByScore(ParamAlphaEntry, ParamBetaEntry) { var Result = 0; // Sort by score // if (ParamAlphaEntry.mScore < ParamBetaEntry.mScore) { Result = 1; } else if (ParamAlphaEntry.mScore > ParamBetaEntry.mScore) { Result = -1; } return Result; } function WWHSearchResultsEntry_CompareByBookIndex(ParamAlphaEntry, ParamBetaEntry) { var Result = 0; if (ParamAlphaEntry.mBookIndex < ParamBetaEntry.mBookIndex) { Result = -1; } else if (ParamAlphaEntry.mBookIndex > ParamBetaEntry.mBookIndex) { Result = 1; } return Result; } function WWHSearchResultsEntry_CompareByTitleFileIndexURL(ParamAlphaEntry, ParamBetaEntry) { var Result = 0; var BookList; var AlphaBookEntry; var BetaBookEntry; var AlphaURL; var BetaURL; // Sort by Title // if (ParamAlphaEntry.mTitle < ParamBetaEntry.mTitle) { Result = -1; } else if (ParamAlphaEntry.mTitle > ParamBetaEntry.mTitle) { Result = 1; } // Sort by FileIndex // else if (ParamAlphaEntry.mFileIndex < ParamBetaEntry.mFileIndex) { Result = -1; } else if (ParamAlphaEntry.mFileIndex > ParamBetaEntry.mFileIndex) { Result = 1; } // Sort by URL // else { BookList = WWHFrame.WWHHelp.mBooks.mBookList; AlphaBookEntry = BookList[ParamAlphaEntry.mBookIndex]; BetaBookEntry = BookList[ParamBetaEntry.mBookIndex]; AlphaURL = WWHFrame.WWHHelp.mBaseURL + AlphaBookEntry.mDirectory + AlphaBookEntry.mFiles.fFileIndexToHREF(ParamAlphaEntry.mFileIndex); BetaURL = WWHFrame.WWHHelp.mBaseURL + BetaBookEntry.mDirectory + BetaBookEntry.mFiles.fFileIndexToHREF(ParamBetaEntry.mFileIndex); if (AlphaURL < BetaURL) { Result = -1; } else if (AlphaURL > BetaURL) { Result = 1; } } return Result; } function WWHPanelsEntry_Object(ParamPanelObject) { this.mPanelObject = ParamPanelObject; this.mScrollPosition = new Array(0, 0); } function WWHPanels_Object() { this.mPanelEntries = new Array(); this.mPopup = new WWHPopup_Object("WWHFrame.WWHJavaScript.mPanels.mPopup", "WWHFrame.WWHNavigationFrame.WWHPanelFrame", WWHPanelHoverText_Translate, WWHPanelHoverText_Format, "WWHPanelPopupDIV", "WWHPanelPopupText", 1000, 12, 20, WWHFrame.WWHJavaScript.mSettings.mHoverText.mWidth); this.fClearScrollPosition = WWHPanels_ClearScrollPosition; this.fSaveScrollPosition = WWHPanels_SaveScrollPosition; this.fRestoreScrollPosition = WWHPanels_RestoreScrollPosition; this.fJumpToAnchor = WWHPanels_JumpToAnchor; this.fGetCurrentPanelObject = WWHPanels_GetCurrentPanelObject; this.fDisplayPanel = WWHPanels_DisplayPanel; this.fPanelLoaded = WWHPanels_PanelLoaded; // Add visible panels // if (WWHFrame.WWHJavaScript.mSettings.mTOC.mbShow) { this.mPanelEntries[this.mPanelEntries.length] = new WWHPanelsEntry_Object(WWHFrame.WWHOutline); } if (WWHFrame.WWHJavaScript.mSettings.mIndex.mbShow) { this.mPanelEntries[this.mPanelEntries.length] = new WWHPanelsEntry_Object(WWHFrame.WWHIndex); } if (WWHFrame.WWHJavaScript.mSettings.mSearch.mbShow) { this.mPanelEntries[this.mPanelEntries.length] = new WWHPanelsEntry_Object(WWHFrame.WWHSearch); } } function WWHPanels_ClearScrollPosition() { var CurrentTab = WWHFrame.WWHJavaScript.mCurrentTab; this.mPanelEntries[CurrentTab].mScrollPosition[0] = 0; this.mPanelEntries[CurrentTab].mScrollPosition[1] = 0; } function WWHPanels_SaveScrollPosition() { var CurrentTab = WWHFrame.WWHJavaScript.mCurrentTab; if ((WWHFrame.WWHBrowserInfo.mBrowser == 1) || // Shorthand for Netscape (WWHFrame.WWHBrowserInfo.mBrowser == 4)) // Shorthand for Netscape 6.0 (Mozilla) { this.mPanelEntries[CurrentTab].mScrollPosition[0] = WWHFrame.WWHNavigationFrame.WWHPanelFrame.window.pageXOffset; this.mPanelEntries[CurrentTab].mScrollPosition[1] = WWHFrame.WWHNavigationFrame.WWHPanelFrame.window.pageYOffset; } else if (WWHFrame.WWHBrowserInfo.mBrowser == 2) // Shorthand for IE { // Test required to avoid JavaScript error under IE5.5 on Windows // if (typeof WWHFrame.WWHNavigationFrame.WWHPanelFrame.document.body == "undefined") { this.mPanelEntries[CurrentTab].mScrollPosition[0] = 0; this.mPanelEntries[CurrentTab].mScrollPosition[1] = 0; } else { this.mPanelEntries[CurrentTab].mScrollPosition[0] = WWHFrame.WWHNavigationFrame.WWHPanelFrame.document.body.scrollLeft; this.mPanelEntries[CurrentTab].mScrollPosition[1] = WWHFrame.WWHNavigationFrame.WWHPanelFrame.document.body.scrollTop; } } } function WWHPanels_RestoreScrollPosition() { var PanelEntry = this.mPanelEntries[WWHFrame.WWHJavaScript.mCurrentTab]; var ScrollPosition = PanelEntry.mScrollPosition; // See if a target position has been specified // if (PanelEntry.mPanelObject.mPanelAnchor != null) { this.fJumpToAnchor(); } else { // setTimeout required for correct operation in Netscape 6.0 // setTimeout("WWHFrame.WWHNavigationFrame.WWHPanelFrame.window.scroll(" + ScrollPosition[0] + ", " + ScrollPosition[1] + ");", 10); } } function WWHPanels_JumpToAnchor() { var PanelObject = this.fGetCurrentPanelObject(); var bEnableNavigatorWorkaround = false; if (WWHFrame.WWHBrowserInfo.mBrowser == 1) // Shorthand for Netscape { // Navigator reloads the page if the hash isn't already defined // if (WWHFrame.WWHNavigationFrame.WWHPanelFrame.location.hash.length == 0) { bEnableNavigatorWorkaround = true; } } // Jump to anchor // WWHFrame.WWHNavigationFrame.WWHPanelFrame.location.hash = PanelObject.mPanelAnchor; // Navigator reloads the page if the hash isn't already defined // if ( ! bEnableNavigatorWorkaround) { PanelObject.mPanelAnchor = null; } } function WWHPanels_GetCurrentPanelObject() { return this.mPanelEntries[WWHFrame.WWHJavaScript.mCurrentTab].mPanelObject; } function WWHPanels_DisplayPanel() { var PanelObject = this.fGetCurrentPanelObject(); var ExtraAction = ""; if ((WWHFrame.WWHBrowserInfo.mBrowser == 1) || // Shorthand for Netscape (WWHFrame.WWHBrowserInfo.mBrowser == 4)) // Shorthand for Netscape 6.0 (Mozilla) { // Navigator has trouble if the hash is defined // if (WWHFrame.WWHNavigationFrame.WWHPanelFrame.location.hash.length != 0) { ExtraAction = "WWHFrame.WWHNavigationFrame.WWHPanelFrame.location.hash = \"\"; "; if (WWHFrame.WWHBrowserInfo.mBrowser == 4) // Shorthand for Netscape 6.0 (Mozilla) { ExtraAction += "WWHFrame.WWHNavigationFrame.WWHPanelFrame.location.replace(\"" + WWHStringUtilities_EscapeURLForJavaScriptAnchor(WWHFrame.WWHHelp.mHelpURLPrefix + "wwhelp/wwhimpl/js/html/panel.htm") + "\"); " } } } // Close down any popups we had going to prevent JavaScript errors // this.mPopup.fHide(); if ( ! PanelObject.mbPanelInitialized) { setTimeout(ExtraAction + "WWHFrame.WWHNavigationFrame.WWHPanelFrame.location.replace(\"" + WWHStringUtilities_EscapeURLForJavaScriptAnchor(WWHFrame.WWHHelp.mHelpURLPrefix + "wwhelp/wwhimpl/js/html/panelini.htm") + "\");", 1); } else { setTimeout(ExtraAction + "WWHFrame.WWHNavigationFrame.WWHPanelFrame.location.replace(\"" + WWHStringUtilities_EscapeURLForJavaScriptAnchor(WWHFrame.WWHHelp.mHelpURLPrefix + "wwhelp/wwhimpl/js/html/panel.htm") + "\");", 1); } } function WWHPanels_PanelLoaded() { WWHFrame.WWHJavaScript.fEndChangeTab(); } function WWHPanelHoverText_Translate(ParamEntryID) { var PanelObject = WWHFrame.WWHJavaScript.mPanels.fGetCurrentPanelObject(); return PanelObject.fHoverTextTranslate(ParamEntryID); } function WWHPanelHoverText_Format(ParamWidth, ParamTextID, ParamText) { var PanelObject = WWHFrame.WWHJavaScript.mPanels.fGetCurrentPanelObject(); return PanelObject.fHoverTextFormat(ParamWidth, ParamTextID, ParamText); } function WWHJavaScript_Object() { this.mSettings = new WWHJavaScriptSettings_Object(); this.mMessages = new WWHJavaScriptMessages_Object(); this.mbChangingTabs = false; this.mCurrentTab = -1; this.mPanels = null; this.mTabs = null; this.mMaxHTMLSegmentSize = 8192; // Best tested value is 8192 this.fInit = WWHJavaScript_Init; this.fStartChangeTab = WWHJavaScript_StartChangeTab; this.fStartChangeTabWithDelay = WWHJavaScript_StartChangeTabWithDelay; this.fEndChangeTab = WWHJavaScript_EndChangeTab; this.fSyncTOC = WWHJavaScript_SyncTOC; // Load up messages // this.mMessages.fSetByLocale(WWHFrame.WWHHelp.mLocale); } function WWHJavaScript_Init() { var InitialTab; // Create panels and tabs objects // this.mPanels = new WWHPanels_Object(); this.mTabs = new WWHTabs_Object(); // Set inital tab to display // InitialTab = this.mTabs.fInit(); // Display tab and panel // this.fStartChangeTab(InitialTab); } function WWHJavaScript_StartChangeTab(ParamIndex) { if (( ! this.mbChangingTabs) && ((this.mCurrentTab == -1) || (this.mCurrentTab != ParamIndex))) { // Signal that we are changing tabs // this.mbChangingTabs = true; // Record current scroll position // if (this.mCurrentTab != -1) { this.mPanels.fSaveScrollPosition(); } // Update tab index // this.mCurrentTab = ParamIndex; // Update tab frame and panel frame // this.mTabs.fDisplayTab(); this.mPanels.fDisplayPanel(); } } function WWHJavaScript_StartChangeTabWithDelay(ParamIndex) { setTimeout("WWHFrame.WWHJavaScript.fStartChangeTab(" + ParamIndex + ");", 1); } function WWHJavaScript_EndChangeTab() { // Check for frame set reloading (back or forward button used) // if (WWHFrame.WWHHelp.mInitStage > 0) { // Restore window position // this.mPanels.fRestoreScrollPosition(); } // Signal that the change tab process is complete // this.mbChangingTabs = false; // Complete initialization process // if ( ! WWHFrame.WWHHandler.mbInitialized) { WWHFrame.WWHHandler.mbInitialized = true; WWHFrame.WWHHelp.fHandlerInitialized(); } } function WWHJavaScript_SyncTOC(ParamHREF) { // Confirm TOC is available as a tab // if (this.mSettings.mTOC.mbShow) { var BookFileHREF; // Confirm file is part of a known book // BookFileHREF = WWHFrame.WWHHelp.fGetBookFileHREF(ParamHREF); if (BookFileHREF != null) { var BookIndexFileHREF; var BookIndex; var FileHREF; // Determine book index and file href // BookIndexFileHREF = WWHFrame.WWHHelp.mBooks.fGetBookIndexFileHREF(BookFileHREF) BookIndex = BookIndexFileHREF[0]; FileHREF = BookIndexFileHREF[1]; // Sync outline if match found // if ((BookIndex != -1) && (FileHREF != null)) { var bVisible = false; // Determine visibility // if (this.mPanels.fGetCurrentPanelObject().mPanelTabTitle == this.mMessages.mTabsTOCLabel) { bVisible = true; } // Sync TOC // WWHFrame.WWHOutline.fSync(BookIndex, FileHREF, bVisible); // Change tabs if not visible // if ( ! bVisible) { var TabIndex; var Index; // Determine tab to display for TOC // TabIndex = -1; Index = 0; while ((TabIndex == -1) && (Index < WWHFrame.WWHJavaScript.mPanels.mPanelEntries.length)) { if (WWHFrame.WWHJavaScript.mPanels.mPanelEntries[Index].mPanelObject.mPanelTabTitle == WWHFrame.WWHJavaScript.mMessages.mTabsTOCLabel) { TabIndex = Index; } Index++; } if (TabIndex != -1) { WWHFrame.WWHJavaScript.fStartChangeTab(TabIndex); } } } } } } // Set reference to top level help frame // var WWHFrame = eval("window.self"); window.name = "WWHFrame"; // Create browser info object // var WWHBrowserInfo = new WWHBrowserInfo_Object(); // Create new help object // var WWHHelp = new WWHHelp_Object(location.href); // Create controls object // var WWHControls = new WWHControls_Object(); // Create related topics object // var WWHRelatedTopics = new WWHRelatedTopics_Object(); // Create highlight words object // var WWHHighlightWords = new WWHHighlightWords_Object(); // Create new handler object // var WWHHandler = new WWHHandler_Object(); // Create new JavaScript Help object // var WWHJavaScript = new WWHJavaScript_Object(); // Create new outline object // var WWHOutline = new WWHOutline_Object(); // Create new index object // var WWHIndex = new WWHIndex_Object(); // Create new search object // var WWHSearch = new WWHSearch_Object(); // -->