// LOCALIZATION SECTION BEGINS // alt text for images var L_ExpandCollapseAlt_ToolTip = 'Expand or collapse text'; // expand var L_GlossaryAlt_ToolTip = 'View definition'; // glossary var L_TipImgAlt_AlternativeText = 'Tip'; // tip var L_NoteImgAlt_AlternativeText = 'Note'; // note var L_ImportantImgAlt_AlternativeText = 'Important'; // important var L_CautionImgAlt_AlternativeText = 'Caution'; // caution var L_WarningImgAlt_AlternativeText = 'Warning'; // warning var L_ConceptImgAlt_ToolTip = 'Concept'; // concept var L_ProcedureImgAlt_ToolTip = 'How To...'; // procedure var L_UrlImgAlt_ToolTip = 'Web link'; // web url var L_TroubleShootImgAlt_ToolTip = 'Troubleshooting'; // troubleshooter var L_RelTopAlt_AlternativeText = 'View Related Topics'; // related topics alt text var L_RelTopHeader_Text = '

Related Topics

'; // related topics header text var L_GraphicClickText_Text = 'Enlarge figure'; // hot text under thumbnail graphics // glossary var L_NoDefAlertTitle_Text = 'definition unavailable'; var L_NoDefAlert_Text = 'The glossary term and definition do not exist in the glossary file at this time.'; var L_BrowserAlert_Message = // downlevel browsers message 'You must use IE4 or greater in order to view popup glossary definitions.'; // linked-file load failure message var L_Error_Text = 'There was an error loading the HTML file.'; // shortcuts var L_ShortcutDIV_Text = '

Cannot Start the Application

You can manually start the application by following these instructions: '; var L_ShortcutImgAlt_AlternativeText = 'Start it now'; // XML See Also text var L_See_Text = 'See: '; var L_SeeAlso_Text = 'See Also: '; // localization styles: // notes var L_NotesAlign_Style = 'STYLE="MARGIN-LEFT:0EM;"'; // IMG element alignment var L_NotesLTR_Style = 'STYLE="margin-left :1.5em; margin-top:-1.1em;"'; // P element style var L_NotesRTL_Style = 'STYLE="margin-right:1.5em; margin-top:-1.1em;"'; // P element style // related topics popup alignment var L_RelPopAlign1_Style = 'STYLE="margin-top:-1.0em; margin-right:1.6em;"'; var L_RelPopAlign1RTL_Style = 'STYLE="margin-top:-1.0em; margin-left:1.6em;"'; var L_RelPopAlign1A_Style = 'STYLE="margin-top:-1.0em;"'; var L_RelPopAlign2_Style = 'STYLE="margin-top:-1.3em; margin-right:1.6em;"'; var L_RelPopAlign2A_Style = 'STYLE="margin-top:-1.3em;"'; // related topics: top right of page var L_RelPopPClassRight_Style = 'STYLE="text-align:right;"'; var L_RelPopPClassLeft_Style = 'STYLE="text-align:left;"'; // related topics popup font size var L_RelPopFontSize_Style = '100%'; // FAQ Expand alignment var L_ParentFAQStyle_Style = '11px'; var L_ExCoImgAlign_Style = 'margin-left:-11px'; var L_ExCoImgAlignRTL_Style = 'margin-right:-11px;'; // popup box style var L_PopUpBoxStyle_Style = 'visibility:hidden; position:absolute; top:0px; left:0px; width:200px; z-index:2; padding:10px; background-color:#FFFFCC; border:solid 1 #333333;'; // shortcuts var L_ShortcutAlign_Style = ''; // LOCALIZATION SECTION ENDS // FUNCTIONAL SETTINGS BEGIN var InlineImgOn = true; // if true, inline gifs appear left of glossary and expand/collapse links var xmlGloss = true; // if true, using XML glossary // FUNCTIONAL SETTINGS END // FILE LOCATIONS BEGIN var moniker = 'MS-ITS:'; // HTML Help (internal) file system prefix // hoistedRoot is defined in .htm files which are compiled a level // above where the normal .htm files reside for that topic. See adc01.htm // for an example. var BeforeReference = (typeof(hoistedRoot) == "undefined") ? '../' : '/'; // base directory var CHMRef = moniker + 'Exadmin.chm::'; // thumbnail windows base .chm var CHMRefHTML = moniker + 'Exadmin.chm::'; // procedure windows base .chm var GifLocation = 'Gif/'; // thumbnail locations var xmlFile = BeforeReference + 'Basics/Gloss.xml'; // glossary file // .gifs for the possible expand states var closed = BeforeReference + 'Basics/coe.gif'; var expand = BeforeReference + 'Basics/coc.gif'; var closedHot = BeforeReference + 'Basics/coeb.gif'; var expandHot = BeforeReference + 'Basics/cocb.gif'; // .gifs for the possible glossary states var glossaryCold = BeforeReference + 'Basics/glossarycold.gif'; var glossaryHot = BeforeReference + 'Basics/glossaryhot.gif'; var glossaryClick = BeforeReference + 'Basics/glossaryclick.gif'; // .gifs for the possible related topics button states var InnerNavCold = BeforeReference + 'Basics/relglyph.gif'; // onmouseout var InnerNavHot = BeforeReference + 'Basics/relglyph_.gif'; // onmouseover var InnerNavClick = BeforeReference + 'Basics/relglyph_c.gif'; // onclick // CSS styles with file names (inserted later) var CSSInsertion = ''; // insert CSS styles which require filenames (defined earlier) document.write(CSSInsertion); // FILE LOCATIONS END // VARIABLE DEFINITIONS BEGIN // "GLOSSARY POPUP BROWSER CHECK VARIABLE" var browser = navigator.appName + ' ' + parseInt(navigator.appVersion); // globals var theTimeOut, ReltopicS, TermDef, tiC, WorkText, AnotherTagIndex, noPopups, ieX, ieY, popOpen, theImg, theDiv, PopUp_InAPopUp, e, AnotherCheck, WindowOne, WindowTwo, theTagIndex, theTagIndex2, sParamFILE, lastClickedPopUp, IE4, IE5, checkIt2, checkIt, LiNker, HoldBookTitLe, HoldBookTitLe2; // HTML Help OCX declaration for graphic and procedure windows var ActX = 'TYPE="application/x-oleobject" CLASSID="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"'; // browser sniffing for popup support if ( (browser == 'Microsoft Internet Explorer 4') || (browser == 'Microsoft Internet Explorer 5') ) IE4 = true; else noPopups = true; if ( (navigator.appVersion.indexOf('MSIE 5') > 0) || ( (navigator.appVersion.indexOf('MSIE') > 0 && parseInt(navigator.appVersion) >= 5) ) ) IE5 = true; // linked files var inCr; var theObjectIdS; function public_get_innerHTML(){return document.body.innerHTML;} // used when accessing linked files var tiC = 0; // stores initial timeout for linked file var defContent = ''; // "picks up and holds glossary definition from txt file" // XML popup support var xmlTermRoot; // XML term root variable (move into function later) var xmlDOM; // The XMLDOM ActiveX object model var xmlDOMLoaded = false; // Not loaded til 1st glossary popup. Persists for see alsos // VARIABLE DEFINITIONS END // HTML TEXT DEFINITIONS BEGIN var SpacerGiffy = BeforeReference + 'Basics/spacer.gif'; // universal spacer image (1x1 square) var LtrOrRtlFloat = (document.dir == 'rtl')?'float:right;':'float:left;'; // thumbnail style used on onload() var _Cold = '#00309C'; // mouseout text color var _Hot = '#FF3300'; // mouseover text color var _Click = '#666666'; // glossary click text color // MMC navigation tree graphic var elleRTL = ''; var elleLTR = ''; if (InlineImgOn) // create inline images' html (set .gif height and width) { var initialClosed = // expand IMG ''
		+L_ExpandCollapseAlt_ToolTip
		+''; var initialClosed_B = // expand IMG ''
		+L_ExpandCollapseAlt_ToolTip
		+''; var glossInitial = // glossary IMG ''
		+L_GlossaryAlt_ToolTip
		+''; } // popups var popupDIV = // glossary popup inserted onload() ''; var RelPopupDiV = // related topics popup inserted onload() '
'; // related topics var InnerNavInitial = // related topics IMG for pages with related topics ''
	+L_RelTopAlt_AlternativeText
	+''; var RelPopSpacerGif = // placeholder IMG for pages without related topics ''; var RelTOpSpacerGif = // spacer used in laying out related topics at bottom of the page ''; // notes var tipImg = // tip IMG ''
	+L_TipImgAlt_AlternativeText
	+''; var noteImg = // note IMG ''
	+L_NoteImgAlt_AlternativeText
	+''; var importantImg = // important IMG ''
	+L_ImportantImgAlt_AlternativeText
	+''; var cautionImg = // caution IMG ''
	+L_CautionImgAlt_AlternativeText
	+''; var warningImg = // warning IMG ''
	+L_WarningImgAlt_AlternativeText
	+''; // shortcuts var shortcutIMG_Hot = ''
	+L_ShortcutImgAlt_AlternativeText
	+''; var shortcutIMG_Cold = ''
	+L_ShortcutImgAlt_AlternativeText
	+''; var shortcutIMG_Selected = ''
	+L_ShortcutImgAlt_AlternativeText
	+''; // HTML DEFINITIONS END // FUNCTION DEFINITIONS BEGIN function displayLinkedDocument() // function launched at end of window_onload { var a = theObjectIdS.length; // grab object from array for (var b = 1; b < a; b++) { var ItsIt = 'linkedFile' + b; var theSpot = theObjectIdS[b]; var seeme; if (document.getElementsByTagName("*")[theSpot].object.innerHTML != null) { seeme = document.getElementsByTagName("*")[theSpot].object.innerHTML; function ReplaceHTML(s,fromtext,totext,findendtextfromend,replacementtext) { var from = s.indexOf(fromtext); var to = ((findendtextfromend)?s.lastIndexOf(totext):s.indexOf(totext)); var totextlength = to.length; if (Math.min(from,to) < 0) return s; var target = s.substring(from,to+totextlength); return s.replace(target,replacementtext); } // 1) remove relpopupwindow divs seeme = ReplaceHTML(seeme,'
',true,''); // 2) remove popupwindow divs seeme = ReplaceHTML(seeme,'
',true,''); if (seeme.indexOf('LinKs') > -1) { // 3) remove reltopic links if (0 > seeme.indexOf('

Related Topics')) seeme = ReplaceHTML(seeme,'

Related Topics','',true,''); else if (0 > seeme.indexOf('

Related Topics')) seeme = ReplaceHTML(seeme,'

Related Topics','',true,''); else if (0 > seeme.indexOf('

Related Topics')) seeme = ReplaceHTML(seeme,'

Related Topics' ,'',true,''); // 4) remove reltopic links if (document.dir == 'rtl') { if (0 > seeme.indexOf('

')) seeme = ReplaceHTML(seeme,'

','',true,''); if (0 > seeme.indexOf('

')) seeme = ReplaceHTML(seeme,'

','',true,''); } } // 5) remove printable booktitles seeme = ReplaceHTML(seeme,'',false,''); // 6) remove top level booktitles if (seeme.indexOf('BookTitleA') != -1) seeme = ReplaceHTML(seeme,'

',false,''); if (seeme.indexOf('booktitleARTL') != -1) seeme = ReplaceHTML(seeme,'
',false,''); if (seeme.indexOf('BookTitleB') != -1) seeme = ReplaceHTML(seeme,'',false,''); if (seeme.indexOf('booktitleBRTL') != -1) seeme = ReplaceHTML(seeme,'',false,''); // 10) remove top level booktitles seeme = ReplaceHTML(seeme,'

',false,'class=SPECIALHEADING>'); // 12) alter top level booktitles if (seeme.indexOf('

',false,'class=SPECIALPROCLABEL>'); } // IF PAGE RETURNS UNDEFINED THE TIMEOUT IS UPPED AND IT'S TRIED AGAIN else for (theTimeOut = 1; theTimeOut < 5; theTimeOut++) { if (theTimeOut != 5) { tiC =+ 1000; window.setTimeout('displayLinkedDocument()', tiC); } if (theTimeOut == 5) seeme = L_Error_Text; } // THIS WRITES THE OBJECT'S INNERHTML TO THE PROPER LOCATION var theDocument = document.getElementsByTagName("*")[ItsIt]; theDocument.innerHTML = seeme; LiNker = false; } } // WINDOW ONLOAD /////////////////////////////////////////////////// function window_onload() { ProcessSPANTags(); // linked file objects created here ProcessATags(); ProcessOLTags(); ProcessDIVTags(); ProcessPTags(); ProcessPopups(); ProcessShortcuts(); if ((IE4) && (LiNker)) window.setTimeout('displayLinkedDocument()', 0); // callback to rip out parts of any linked documents } function ProcessSPANTags() { inCr = 0; theObjectIdS = new Array('Scriptlet0'); // one-based legacy array var colln = document.getElementsByTagName('SPAN'); // SPAN tags var i,imax = colln.length; var theIdIs; // 'ScriptletX' var href; // target A tag for (var i=0; i'; document.body.insertAdjacentHTML('beforeEnd', sObjectText); colln[i].outerHTML = ''; } LiNker = (inCr > 0); } function ProcessATags() { var colln = document.getElementsByTagName('A'); var tmp; for (var i=0; i -1) ProcessATags_Thumbnail (colln[i]); else if (tmp.indexOf('shortcutA' ) > -1) ProcessATags_Shortcut (colln[i]); else if (tmp.indexOf('PopUp' ) > -1) ProcessATags_Glossary (colln[i]); else if (tmp.indexOf('ExPand' ) > -1) ProcessATags_Expand (colln[i]); else if (tmp.indexOf('FAQExPanD' ) > -1) ProcessATags_FAQ (colln[i]); else if (tmp.indexOf('Concept_Gif' ) > -1) ProcessATags_Concept (colln[i]); else if (tmp.indexOf('Procedure_Gif' ) > -1) ProcessATags_Procedure (colln[i]); else if (tmp.indexOf('Url_Gif' ) > -1) ProcessATags_WWWLink (colln[i]); else if (tmp.indexOf('TroubleShoot_Gif' ) > -1) ProcessATags_Troubleshoot (colln[i]); } } function ProcessATags_Thumbnail(e,floatdir) { var sThumbnailImg = e.href.toLowerCase(); var sAltText = e.title; sThumbnailImg = BeforeReference + get_TheUrL(sThumbnailImg); e.innerHTML = ''
				+sAltText
				+'
' +L_GraphicClickText_Text +'
'; e.outerHTML = '

' +e.outerHTML +'
'; } function ProcessATags_Shortcut(e) { // pull text from error div to insert after Shortcut var aaa = e.parentElement.sourceIndex; var bbb = document.getElementsByTagName("*")[aaa]; var ccc; for (var c = 0; c < bbb.all.length; c++) if (bbb.all[c].id.indexOf('shortcutDIV') != -1) ccc = ": " + bbb.all[c].innerHTML; // add shortcut image and error div after Shortcut if (InlineImgOn) e.innerHTML = shortcutIMG_Cold + e.innerHTML; e.insertAdjacentHTML('afterEnd',ccc); e.title = L_ShortcutImgAlt_AlternativeText; } function ProcessATags_Glossary(e) { e.title = L_GlossaryAlt_ToolTip; if (InlineImgOn) e.innerHTML = glossInitial + e.innerHTML; // write glossary .gifs } function ProcessATags_Expand(e) { e.title = L_ExpandCollapseAlt_ToolTip; if (InlineImgOn) e.innerHTML = initialClosed + e.innerHTML; // write expand gifs } function ProcessATags_FAQ(e) { if (InlineImgOn) if (document.dir == 'rtl') e.parentElement.style.marginRight = L_ParentFAQStyle_Style; else e.parentElement.style.marginLeft = L_ParentFAQStyle_Style; e.outerHTML = '' +((InlineImgOn)?initialClosed_B:'') // +e.innerHTML +''; e.title = L_ExpandCollapseAlt_ToolTip; } function ProcessATags_Concept(e) { e.outerHTML = RelTOpSpacerGif +'

' +e.outerHTML +'

'; } function ProcessATags_Procedure(e) { e.outerHTML = RelTOpSpacerGif +'

' +e.outerHTML +'

'; } function ProcessATags_WWWLink(e) { e.outerHTML = RelTOpSpacerGif +'

' +e.outerHTML +'

'; } function ProcessATags_Troubleshoot(e) { e.outerHTML = RelTOpSpacerGif +'

' +e.outerHTML +'

'; } function ProcessOLTags() { var colln = document.getElementsByTagName('OL'); var tmp; for (var i=0; i -1) ProcessOLTags_TreeIndent (colln[i]); } } function ProcessOLTags_TreeIndent(e) { var indent = -1.75; var colln = e.all; for (var i=0; i -1) { if (document.dir == 'rtl') { colln[i].innerHTML = elleRTL + colln[i].innerHTML; colln[i].style.marginRight = indent + 'em'; } else { colln[i].innerHTML = elleLTR + colln[i].innerHTML; colln[i].style.marginLeft = indent + 'em'; } indent += .75; } } function ProcessDIVTags() { var colln = document.getElementsByTagName('DIV'); var tmp,cls,contents; for (var i=0; i -1) ProcessDIVTags_BookTitle(colln[i],true ); else if (tmp.indexOf('BooKTitlE' ) > -1) ProcessDIVTags_BookTitle(colln[i],false); else { // Display any text automatically highlighted by HTML Help Search: cls = colln[i].className.toLowerCase(); if ( (cls == 'expand' ) || (cls == 'expand1') || (cls == 'expand2') || (cls == 'expand3') ) { contents = colln[i].innerHTML; if ( (contents.indexOf(' -1) && (contents.indexOf('BACKGROUND-COLOR:') > -1) ) colln[i].style.display = 'block'; } } } } function RemoveTags(fromString) { var len = fromString.length; for (i = 0; i', i) + 1; fromString = fromString.replace(fromString.substring(i, end), ''); i--; len = len - (end - i); } } return fromString; } function ProcessDIVTags_BookTitle(e,bIsTop) { // Strip any markup added by HTML Help Search: var contents = e.innerHTML; if (contents.indexOf('BACKGROUND-COLOR:') > -1) { contents = RemoveTags(contents) } HoldBookTitLe = contents; // Calculate a magic number: var lengthfactor = (HoldBookTitLe.length > 60)?8:10; var cutAt = ( (parseInt(contents.length/3) )+( parseInt(contents.length/lengthfactor)) ); var h = contents.substring(0, cutAt); var test = h.lastIndexOf(' '); // Calculate predicates: // bIsTop (function parameter) var bIsRTL = document.dir.toLowerCase() == 'rtl'; var bSplit = (test != -1); var bIsLong = (HoldBookTitLe.length > 60); // Slice into two lines of text: var firstString, secondString; if (bSplit) // two lines { firstString = h.substring(0, test); secondString = contents.substring(((firstString.length) + (1)), contents.length); } else // one line { firstString = contents; secondString = ''; } // Build HTML: var sTextAlign, sTopSpan, sDiv1Class, sDiv1A, sDiv1BClass, sDiv1BID, sDiv1CClass, sDiv1CID, sDiv2, sDiv3Class; if (bIsTop) // TOP LEVEL { if (bIsRTL) // RTL { sTextAlign = 'left'; sDiv1Class = 'booktitleARTL'; sDiv1A = '
'; sDiv1BClass = 'booktitletextoneARTL'; sDiv1BID = 'booktitletextoneARTL'; sDiv1CClass = 'booktitletexttwoARTL'; sDiv1CID = 'booktitletexttwoARTL'; sDiv2 = '
'; sDiv3Class = 'booktitlespacerARTL'; } else // LTR { sTextAlign = 'right'; sDiv1Class = 'BookTitleA'; sDiv1A = ''; sDiv1BClass = 'BookTitleTextOneA'; sDiv1BID = 'BookTitleTextOneA'; sDiv1CClass = 'BookTitleTextTwoA'; sDiv1CID = 'BookTitleTextTwoA'; sDiv2 = '
'; sDiv3Class = 'BookTitleSpacerA'; } sTopSpan = '' +HoldBookTitLe +'
\n\n'; } else // LEVEL2 { if (bIsRTL) // RTL { sDiv1Class = 'booktitleBRTL'; sDiv1A = '
'; sDiv1BClass = 'booktitletextoneBRTL'; sDiv1BID = 'booktitletextoneBRTL'; sDiv1CClass = 'booktitletexttwoBRTL'; sDiv1CID = 'booktitletexttwoBRTL'; sDiv2 = ''; sDiv3Class = 'booktitlespacerBRTL'; } else // LTR { sDiv1Class = 'BookTitleB'; sDiv1A = ''; sDiv1BClass = 'BookTitleTextOneB'; sDiv1BID = 'BookTitleTextOneB'; sDiv1CClass = 'BookTitleTextTwoB'; sDiv1CID = 'BookTitleTextTwoB'; sDiv2 = ''; sDiv3Class = 'BookTitleSpacerB'; } sTopSpan = ''; } e.outerHTML = sTopSpan +'
' +sDiv1A +'
' +firstString +'' +'
' +secondString +'
' +sDiv2 +'
\n\n'; // Assign additional styles when text is extra long: if(bIsLong) { var tmp1 = document.getElementById(sDiv1BID).style; var tmp2 = document.getElementById(sDiv1CID).style; tmp1.fontSize = '10pt'; tmp1.top = '2px'; tmp2.fontSize = '8pt'; tmp2.letterSpacing = '-.2mm'; tmp2.top = '14px'; } } function ProcessPTags() { var bIsRTL = document.dir.toLowerCase() == 'rtl'; var s1 = '

'; var s2 = '

'; var colln = document.getElementsByTagName('P'); var e; for (var i=0; i'+InnerNavInitial+''; } else // if no popups { if (bIsH1) // if H1 sStyleHorP = L_RelPopAlign1A_Style; else // if PROCLABEL sStyleHorP = L_RelPopAlign2A_Style; sA = RelPopSpacerGif; } if (bIsH1) { sStartHorP = '

' +sA +'

' +sStartHorP +sStyleHorP +'>' +TiTLE.innerHTML +sCloseHorP; } if (IE4) // Insert popup boxes into the document { document.body.insertAdjacentHTML('beforeEnd', popupDIV); document.body.insertAdjacentHTML('beforeEnd', RelPopupDiV); } } function ProcessShortcuts() { // Separate pass to insert additional A tags for Shortcut Errors var tempname = "#ShortcutError"; var temppre = ''; var collnA = document.getElementById('shortcutA'); if (collnA != null) { if (collnA.length == null) // If there's only one shortcut { collnA.errorName = tempname + '0'; collnA.onblur = shortcutA_doOnBlur; collnA.insertAdjacentHTML('BeforeBegin',temppre + '0' + temppost); } else // Multiple shortcuts for (var i = 0; i < collnA.length; i++) { collnA(i).errorName = tempname + i; collnA(i).onblur = shortcutError_doOnBlur; collnA(i).insertAdjacentHTML('BeforeBegin',temppre + i + temppost); } } // Insert standard preface text in shortcut DIVs var collnDIV = document.getElementById('shortcutDIV'); if (collnDIV != null) { if (collnDIV.length == null) // If there's only one shortcut { collnDIV.insertAdjacentHTML('AfterBegin',L_ShortcutDIV_Text); collnDIV.className = 'shortcutDIV_Inactive'; } else // Multiple shortcuts for (var i = 0; i < collnDIV.length; i++) { collnDIV(i).insertAdjacentHTML('AfterBegin',L_ShortcutDIV_Text); collnDIV(i).className = 'shortcutDIV_Inactive'; } } } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // DYNAMIC CODE BEGINS // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ONMOUSE-OVER //////////////////////////////////////////////////// function document_onmouseover() { e = window.event.srcElement; // Artificial bubbling scheme (why?) probably for A tag IDs only so could be simplified further: for (var a = 0; a < 5; a++) // 5 is a magic number, and must *break* to exit loop(!) { if ((e.tagName != 'A') && (e.parentElement != null)) e = e.parentElement; var eID = e.id; if ( (eID == 'shortcutA') && (e.style.color != _Click) ) // Shortcuts { shortcutIMG_Change(e,'Hot'); e.style.color = _Hot; break; } else if (eID.indexOf('ExPand') != -1) // Expand/Collapse { if (InlineImgOn) { e.style.color = _Hot; var theDiv = GrabtheExpandDiv(e); // locate the div theImg = getImage(e); theImg.src = (theDiv.style.display == 'block')?expandHot:closedHot; } else { e.style.color = _Hot; e.style.textDecoration = 'underline'; } break; } else if ( (eID.indexOf('PopUp') != -1) && (theTagIndex != e.sourceIndex) ) // Glossary (no action if already clicked) { if (InlineImgOn) { e.style.color = _Hot; theImg = getImage(e); theImg.src = glossaryHot; } else { e.style.color = _Hot; e.style.textDecoration = 'underline'; } break; } else if ( (eID.indexOf('InnerNav') != -1) && (theTagIndex2 != e.sourceIndex) ) // RelTopic (no action if already clicked) { theImg = getImage(e); theImg.src = InnerNavHot; break; } } } // ONMOUSE-OUT ///////////////////////////////////////////////////// function document_onmouseout() { e = window.event.srcElement; // Artificial bubbling scheme (why?) probably for A tag IDs only so could be simplified further: for (var a = 0; a < 5; a++) // 5 is a magic number, and must *break* to exit loop(!) { if ((e.tagName != 'A') && (e.parentElement != null)) e = e.parentElement; var eID = e.id; // Shortcuts: if ( (eID == 'shortcutA') && (e.style.color != _Click) ) { shortcutIMG_Change(e,'Cold'); e.style.color = _Cold; break; } // Expand/Collapse: else if (eID.indexOf('ExPand') != -1) { if (InlineImgOn) { e.style.color = _Cold; var theDiv = GrabtheExpandDiv(e); // locate the div theImg = getImage(e); theImg.src = (theDiv.style.display == 'block')?expand:closed; } else { e.style.color = _Cold; e.style.textDecoration = 'none'; } break; } // Glossary: ("doesn't send if glossary term clicked and rolled over") else if ( (eID.indexOf('PopUp')!= -1) && (theTagIndex != e.sourceIndex) ) { if (InlineImgOn) { e.style.color = _Cold; theImg = getImage(e); theImg.src = glossaryCold; } else { e.style.color = _Cold; e.style.textDecoration = 'none'; } break; } // Related Topic Link: ("doesn't send if reltopic icon clicked and rolled over") else if ( (eID.indexOf('InnerNav') != -1) && (theTagIndex2 != e.sourceIndex) ) { theImg = getImage(e); theImg.src = InnerNavCold; break; } } } // ONCLICK ///////////////////////////////////////////////////////// function document_onclick() { e = window.event.srcElement; // Hide any open popups: document.getElementsByTagName("*").RelpopUpWindow.style.visibility = 'hidden'; document.getElementsByTagName("*").popUpWindow.style.visibility = 'hidden'; // Reset popup state variables (used in onresize) WindowOne = false; // popup WindowTwo = false; // innernav // Reset glossary popup state variables popOpen = false; // is a Glossary popup visible PopUp_InAPopUp = false; // user clicks a see-also term AnotherCheck = false; // inline gifs are off and HTMLHelp added html // Artificial bubbling scheme (why?) probably for A tag IDs only so could be simplified further: for (var a = 0; a < 5; a++) // 5 is a magic number, and must *break* to exit loop(!) { if ( (e.tagName != 'A') && (e.parentElement != null) ) e = e.parentElement; eID = e.id; // ("XML code allows TDC to coexist because of this") xmlTermRoot = ''; if (e.hash != null) xmlTermRoot = e.hash; // Variables to control click color of glossary link text: if ( checkIt2 && ( (eID.indexOf('PopUp') == -1) || (eID.indexOf('In_PopuP') == -1) ) ) { var changeBack = document.getElementById(theTagIndex); changeBack.style.color = _Cold; changeBack.style.textDecoration = 'none'; if (InlineImgOn) { theImg = getImage2(theTagIndex); theImg.src = glossaryCold; } theTagIndex = false; checkIt2 = false; } // Variables to control click color of related topics icon: if ( checkIt && (theTagIndex2 != -1) && (eID.indexOf('InnerNav') == -1) ) { theImg = getImage2(theTagIndex2); theImg.src = InnerNavCold; theTagIndex2 = false; checkIt = false; } if (eID.indexOf('ThumbNail') != -1) { callThumbnail(e); break; } // Thumbnail else if (eID.indexOf('ProCedure') != -1) { callProcedure(e); break; } // Procedure else if (eID == 'shortcutA') { callShortcut(e); break; } // Shortcut else if (eID.indexOf('ExPand') != -1) { callExpand(e,InlineImgOn); break; } // Expand/Collapse if (eID.indexOf('InnerNav') != -1) // reltopic { lastClickedPopUp = e; // used by onresize() WindowTwo = true; checkIt = true; theTagIndex2 = e.sourceIndex; theImg = getImage2(theTagIndex2); theImg.src = InnerNavClick; callRelatedTopicS(e); break; } else if (eID.indexOf('PopUp') != -1) // glossary { lastClickedPopUp = e; // used by onresize() WindowOne = true; // Set variables to control click color of glossary link text: checkIt2 = true; theTagIndex = true; theTagIndex = e.sourceIndex; AnotherTagIndex = parseInt(theTagIndex); e.style.color = _Click; if (InlineImgOn) // the onclick color of the glossary text { theImg = getImage2(theTagIndex); theImg.src = glossaryClick; } else e.style.textDecoration = 'underline'; WorkText = e.innerHTML; // Capture the html containing the term var bAddedHTML = WorkText.indexOf('BACKGROUND-COLOR:') != -1; // has HTMLHelp added html if (InlineImgOn) // if glossary image is on { if (bAddedHTML) GetTheRealTerm(); else GetTheRealTerm2(); } else // if no image on { if (bAddedHTML) // has HTMLHelp added html { AnotherCheck = true; GetTheRealTerm(); } else TermDef = e.innerHTML; } // Now perform the term lookup: callGlossary(e, TermDef); break; } else if (eID.indexOf('In_PopuP') != -1) // Glossary SEE ALSO { // Set variables to control click color of glossary link text: checkIt2 = true; theTagIndex = parseInt(AnotherTagIndex); var changeBack = document.getElementById(theTagIndex); changeBack.style.color = _Click; if (InlineImgOn) { theImg = getImage2(theTagIndex); theImg.src = glossaryClick; } else changeBack.style.textDecoration = 'underline'; // Set a state variable and perform the term lookup: PopUp_InAPopUp = true; TermDef = e.innerHTML; callGlossary(e, TermDef); break; } } } // ONKEYPRESS ////////////////////////////////////////////////////// function document_onkeypress() { if (window.event.keyCode == 27) { document.getElementsByTagName("*").popUpWindow.style.visibility = 'hidden'; popOpen = false; // state variable } } // ONRESIZE //////////////////////////////////////////////////////// function window_onresize() { // Shortcut popup windows var collnDIV = document.getElementById('shortcutDIV'); if (collnDIV != null) { var theA = null; var theDIV = null; if ((collnDIV.length == null) && (collnDIV.className == 'shortcutDIV_Active')) { theA = document.getElementById('shortcutA'); theDIV = collnDIV; } else for (var i = 0; i < collnDIV.length; i++) if (collnDIV(i).className == 'shortcutDIV_Active') { theA = document.getElementById('shortcutA')(i); theDIV = collnDIV(i); break; } if (theA != null) { theDIV.style.left = Math.min((theA.children.tags('IMG')(0).offsetLeft), ((document.body.clientWidth - theDIV.offsetWidth) - ((1) * (document.body.leftMargin)))); theDIV.style.top = ((theA.offsetTop) + (theA.offsetHeight) + (1)); } } // Pre-shortcut code... if(lastClickedPopUp) { var nClientWidth = document.body.clientWidth; var nPopupWidth = popUpWindow.style.pixelWidth; var nLeft; // popUpWindow.style.pixelLeft var nTop; // popUpWindow.style.pixelTop if (WindowOne) // glossary popups { if (lastClickedPopUp.offsetParent.tagName.toLowerCase() == 'body') { if((nPopupWidth + lastClickedPopUp.offsetLeft) <= nClientWidth) nLeft = lastClickedPopUp.offsetLeft; else nLeft = ((nClientWidth - 10) > nPopupWidth)?(nClientWidth - nPopupWidth):10; nTop = lastClickedPopUp.offsetTop + lastClickedPopUp.offsetHeight + 1; } else if (lastClickedPopUp.offsetParent.offsetParent.tagName.toLowerCase() == 'body') { if((nPopupWidth + lastClickedPopUp.offsetLeft + lastClickedPopUp.offsetParent.offsetLeft) <= nClientWidth) nLeft = lastClickedPopUp.offsetLeft + lastClickedPopUp.offsetParent.offsetLeft; else nLeft = ((nClientWidth - 10) > nPopupWidth)?(nClientWidth - nPopupWidth):10; nTop = lastClickedPopUp.offsetHeight + lastClickedPopUp.offsetTop + 1 + lastClickedPopUp.offsetParent.offsetTop; } else if (lastClickedPopUp.offsetParent.offsetParent.offsetParent.tagName.toLowerCase() == 'body') { if((nPopupWidth + lastClickedPopUp.offsetLeft + lastClickedPopUp.offsetParent.offsetLeft + lastClickedPopUp.offsetParent.offsetParent.offsetLeft) <= nClientWidth) nLeft = lastClickedPopUp.offsetLeft + lastClickedPopUp.offsetParent.offsetLeft + lastClickedPopUp.offsetParent.offsetParent.offsetLeft; else nLeft = ((nClientWidth - 10) > nPopupWidth)?(nClientWidth - nPopupWidth):10; nTop = lastClickedPopUp.offsetHeight + lastClickedPopUp.offsetTop + 1 + lastClickedPopUp.offsetParent.offsetTop + lastClickedPopUp.offsetParent.offsetParent.offsetTop; } else { if ((popUpWindow.style.pixelLeft + nPopupWidth) > document.body.clientWidth) nLeft = document.body.clientWidth - nPopupWidth; if ((popUpWindow.style.pixelTop + popUpWindow.style.pixelHeight) > document.body.clientHeight) nTop = document.body.clientHeight - popUpWindow.style.pixelHeight; } if (nLeft != null) popUpWindow.style.pixelLeft = nLeft; // popUpWindow.style.pixelLeft if (nTop != null) popUpWindow.style.pixelTop = nTop; // popUpWindow.style.pixelTop } // Related Topics popups else if (WindowTwo) { RelpopUpWindow.style.pixelLeft = (document.dir=='rtl') ?10 :nClientWidth - RelpopUpWindow.style.pixelWidth - 10; RelpopUpWindow.style.pixelTop = ((lastClickedPopUp.offsetTop) + (lastClickedPopUp.offsetHeight) + (1)); } } } // parse the popup term (IF WorkText.indexOf('BACKGROUND-COLOR:') != -1) function GetTheRealTerm() { var c; var d = ''; var f = WorkText; if (!AnotherCheck) // in this case we don't need to remove images (inline images are off) { // AnotherCheck = false when inline gifs are off and HTMLHelp added html c = f.indexOf('width=12>'); if (c == -1) return; f = f.substring((c+9),f.length); } f = f.replace(d,''); // remove all but the term and the HTML from HTMLHelp // this removes HTML added by HTMLHelp, leaving the term var g = f.indexOf('<'); var h = f.indexOf('>'); if ( (g == -1) || (h == -1) ) return; var i = f.substring(g,(h+1)); f = f.replace(i,''); TermDef = f; return TermDef; } // parse the popup term when HTMLHelp has not added HTML (IF *NOT* WorkText.indexOf('BACKGROUND-COLOR:') != -1) function GetTheRealTerm2() { var c = WorkText.lastIndexOf('width=12>'); if (c == -1) return; else TermDef = WorkText.substring((c+9),WorkText.length); return TermDef; } // Shortcut onouseover, onmouseout state changes function shortcutIMG_Change(theA,newstate) { var t; switch (newstate) { case 'Hot' : t = BeforeReference + 'Basics/shortcuthot.gif'; break; case 'Selected' : t = BeforeReference + 'Basics/shortcutclick.gif'; break; case 'Cold' : default : t = BeforeReference + 'Basics/shortcutcold.gif'; break; } theA.children.tags('IMG')(0).src = t; } // FIND AREA TO EXPAND/COLLAPSE function GrabtheExpandDiv(e) { var theExpandDiv, sTagName, sClassName; for (var a = 0; a < 5; a++) // magic number, apparently { var theTag = e.sourceIndex + e.children.length + a; theExpandDiv = document.getElementById(theTag); sTagName = theExpandDiv.tagName; sClassName = theExpandDiv.className.toLowerCase(); if ( ( ( (sTagName == 'DIV') || (sTagName == 'SPAN') ) && ( (sClassName == 'expand') || (sClassName == 'expand1') || (sClassName == 'expand2') || (sClassName == 'expand3') ) ) || theTag == document.getElementsByTagName("*").length ) break; } return theExpandDiv; } // rollovers and Expand getImage function getImage(e) { var ee = e; for (var a = 0; a < 5; a++) // more magic numbers { if ((ee.tagName != 'A') && (ee.parentElement != null)) ee = ee.parentElement; if(ee.tagName == 'A') return ee.all.tags('IMG')(0); } return ee; // not a good idea } // handles gray state of Related Topic and Glossary popups function getImage2() // incredibly wrong... { // theTagIndex/2 & checkIt/2 are passed, and are visible as such only b/c no params defined here. Incredibly wrong. var TheSpot; if ((checkIt) && (theTagIndex2 != -1)) // if Related Topic TheSpot = document.getElementById(theTagIndex2); else if ((checkIt2) && (theTagIndex != -1)) // if Glossary TheSpot = document.getElementById(theTagIndex); else return; for (var a = 0; a < 5; a++) // another magic number { if ((TheSpot.tagName != 'A') && (TheSpot.parentElement != null)) TheSpot = TheSpot.parentElement; if(TheSpot.tagName == 'A') return TheSpot.all.tags('IMG')(0); } return TheSpot; // also very bad } // call the Thumbnail window function callThumbnail() { event.returnValue = false; // kill event var eH = e.href.toLowerCase(); sParamFILE = get_TheUrL(eH); sParamFILE = CHMRef + sParamFILE; if (document.hhThumbnail) // if exists, delete document.hhThumbnail.outerHTML = ''; var h = ''; document.body.insertAdjacentHTML('beforeEnd', h); // create and activate document.hhThumbnail.hhclick(); } // call the Procedure window function callProcedure() { event.returnValue = false; // kill event var eH = e.href.toLowerCase(); sParamFILE = get_TheUrL(eH); sParamFILE = CHMRefHTML + sParamFILE; if (document.hhProcedure) // if exists, delete document.hhProcedure.outerHTML = ''; var h = ''; document.body.insertAdjacentHTML('beforeEnd', h); // create and activate document.hhProcedure.hhclick(); } // designed to get the URL out of 'funky'-style HREF fields function get_TheUrL(sHREF) { var spaces = /\s/g; var eH = unescape(sHREF); eH = eH.replace(spaces,''); eH_ = eH.toLowerCase(); // added var sParamFILE = ''; var sParamCHM = ''; var iFILE = eH_.lastIndexOf('file='); if (iFILE != -1) sParamFILE = eH.substring(iFILE+5, eH.length); var iCHM = eH_.lastIndexOf('chm='); if (iCHM != -1) { sParamCHM = ''; // eH.substring(iCHM+4, iFILE) + "::/"; sParamFILE= sParamCHM + sParamFILE; } return sParamFILE; } // invoke the Shortcut (to launch an app) function callShortcut(theA) { event.returnValue = false; // kill event if (theA.APPLICATION == null) return; var pmItem1 = ''; var pmItem2 = (theA.WINDOW_MSG == null) ?'' :('"; // () grouping looks incorrect // "if theA.WINDOW_MSG doesn't exist, it == nothing, else it == " var pmWindow = ''; if (document.objShortcut) // if exists, delete document.objShortcut.outerHTML = ''; var sObjectText = ''; document.body.insertAdjacentHTML('beforeEnd',sObjectText); // create shortcutIMG_Change(theA,'Selected'); theA.style.color = _Click; document.objShortcut.hhClick(); // activate } // call Related Topics popup function callRelatedTopicS() { event.returnValue = false; // kill event document.getElementsByTagName("*").RelpopUpWindow.innerHTML = L_RelTopHeader_Text + ReltopicS; document.getElementsByTagName("*").RelpopUpWindow.style.fontSize = L_RelPopFontSize_Style; document.getElementsByTagName("*").RelpopUpWindow.style.left = (document.dir == 'rtl') ?10 :(document.body.clientWidth - RelpopUpWindow.style.pixelWidth - 10); document.getElementsByTagName("*").RelpopUpWindow.style.top = document.getElementsByTagName("*").InnerNav.offsetTop + document.getElementsByTagName("*").InnerNav.offsetHeight + 1; document.getElementsByTagName("*").RelpopUpWindow.style.visibility = 'visible'; } // call Glossary popup function callGlossary() { event.returnValue = false; // kill event // set XY popup coordinates if (PopUp_InAPopUp) { ieX = document.getElementsByTagName("*").popUpWindow.style.left; ieY = document.getElementsByTagName("*").popUpWindow.style.top; } else { if (e.offsetParent.tagName.toLowerCase() == 'body') { ieX = e.offsetLeft; ieY = e.offsetTop + e.offsetHeight + 1; } else if (e.offsetParent.offsetParent.tagName.toLowerCase() == 'body') { ieX = e.offsetLeft + e.offsetParent.offsetLeft; ieY = e.offsetHeight + e.offsetTop + e.offsetParent.offsetTop + 1; } else if (e.offsetParent.offsetParent.offsetParent.tagName.toLowerCase() == 'body') { ieX = e.offsetLeft + e.offsetParent.offsetLeft + e.offsetParent.offsetParent.offsetLeft; ieY = e.offsetHeight + e.offsetTop + e.offsetParent.offsetTop + e.offsetParent.offsetParent.offsetTop + 1; } else { ieX = window.event.clientX; ieY = window.event.clientY + document.body.scrollTop; } } // if a popup window is open, pause then reissue function call if (popOpen) window.setTimeout('callGlossary()', 50); if (noPopups) // if not IE4+ { alert (L_BrowserAlert_Message); noPopups = false; return; } // if no popup open, proceed to display popup... if (IE4 && !popOpen) iePopup(); } // build the popup window function iePopup() { // adjust if the popup will be offscreen var rightlimit = ieX + document.getElementsByTagName("*").popUpWindow.offsetWidth; if (rightlimit >= document.body.clientWidth) ieX -= (rightlimit - document.body.clientWidth); // set and position popup document.getElementsByTagName("*").popUpWindow.innerHTML = ''; document.getElementsByTagName("*").popUpWindow.style.height = 0; if (xmlGloss) // if glossary is in XML control { document.getElementsByTagName("*").popUpWindow.innerHTML = getXMLPopupContent(xmlTermRoot); // load formatted popup content or not found // callback required to get popup height (are you *sure*? this property should be immediately available) window.setTimeout ('iePopHeight()', 0); // set popup's XY coordinates document.getElementsByTagName("*").popUpWindow.style.top = ieY; document.getElementsByTagName("*").popUpWindow.style.left = ieX; popOpen = true; // state variable: popup is ready return (false); // kill bubble } else // else glossary is in TDC control { if (document.tdcGloss) // if TDC exists, delete document.tdcGloss.outerHTML = ''; var h = '' +'' +''; document.body.insertAdjacentHTML('beforeEnd', h); // create TDC var RS = tdcGloss.recordset; RS.moveFirst(); // default text when no term is found document.getElementsByTagName("*").popUpWindow.innerHTML = '

' +L_NoDefAlertTitle_Text +'

' +L_NoDefAlert_Text +'

'; while (!RS.EOF) { if (TermDef.toLowerCase() == RS.fields('Term').value.toLowerCase()) // if found, get def { defContent = RS.fields('Definition').value; if (RS.fields('SeeAlso').value) // handle any See Also's if (RS.fields('SeeAlso').value.indexOf('~') != -1) ParseOtherDefs(); else document.getElementsByTagName("*").popUpWindow.innerHTML = '

' +TermDef +'

' +defContent +'

See Also: ' +RS.fields('SeeAlso').value +'

'; else document.getElementsByTagName("*").popUpWindow.innerHTML = '

' +TermDef +'

' +defContent +'

'; break; } RS.moveNext(); } // callback required to get popup height (are you *sure*? this property should be immediately available) window.setTimeout ('iePopHeight()', 0); // set popup's XY coordinates document.getElementsByTagName("*").popUpWindow.style.top = ieY; document.getElementsByTagName("*").popUpWindow.style.left = ieX; popOpen = true; // state variable: popup is ready return false; // kill bubble } } // handle case of multiple See Also's in a TDC file (not used by XML glossary) function ParseOtherDefs() { var FstStop = 0; var FstWrd = ''; var AimPnt = tdcGloss.recordset.fields('SeeAlso').value; var DefsString = 'See Also: '; while ( (FstStop = AimPnt.indexOf('~')) > -1) // loop through each See Also, separated by tildes ('~') { FstWrd = AimPnt.substring(0, FstStop); DefsString = DefsString +'' +FstWrd +', '; AimPnt = AimPnt.substring(FstStop + 1, AimPnt.length); } DefsString = DefsString +'' +AimPnt +''; document.getElementsByTagName("*").popUpWindow.innerHTML = '

' +TermDef +'

' +defContent +'

' +DefsString +'

'; } // get popup height, nudge if necessary, and display popup function iePopHeight() { var pageBottom = document.body.scrollTop + document.body.clientHeight; var popHeight = document.getElementsByTagName("*").popUpWindow.offsetHeight; document.getElementsByTagName("*").popUpWindow.style.height = popHeight - 2 * (parseInt(document.getElementsByTagName("*").popUpWindow.style.borderWidth)); if (popHeight + ieY >= pageBottom) // if popup longer than screen, move to top of screen document.getElementsByTagName("*").popUpWindow.style.top = (popHeight <= pageBottom)?(pageBottom-popHeight):0; document.getElementsByTagName("*").popUpWindow.style.visibility = 'visible'; // display popup } // show/hide Expand block function callExpand(e,InlineImgOn) { event.returnValue = false; // kill bubble var theDiv = GrabtheExpandDiv(e); theDiv.style.display = (theDiv.style.display == 'block')?'none':'block'; if (!InlineImgOn) { var theImg = getImage(e); theImg.src = (theDiv.style.display == 'block')?closed:expand; } if (theDiv.style.display == 'none') document.body.innerHTML = document.body.innerHTML + " "; } // Shortcuts // returns pointer to corresponding div function fLookupShortcutDIV(Index) { var collnDIV = document.getElementById('shortcutDIV'); if (collnDIV == null) return null; var bIsACollection = (collnDIV.length != null); if ( (Index < 0) || ((!bIsACollection) && (Index != 0)) || ((bIsACollection) && (Index >= collnDIV.length))) return null; return (bIsACollection)?collnDIV(Index):collnDIV; } // shortcut error function function doShortcutError() { var e = window.event.srcElement; var collnA = document.getElementById('shortcutA'); var theA; if (collnA.length == null) theA = collnA; else for (var i = 0; i < collnA.length; i++) if (collnA(i).errorName == e.name) { theA = collnA(i); break; } shortcutIMG_Change(theA,'Selected'); theA.style.color = _Click; var theDIV = fLookupShortcutDIV(1*e.name.substr(14)); theDIV.className = 'shortcutDIV_Active'; theDIV.style.top = ((theA.offsetTop) + (theA.offsetHeight) + (1)); theDIV.style.left = Math.min((theA.children.tags('IMG')(0).offsetLeft), (document.body.clientWidth-theDIV.offsetWidth-(1*document.body.leftMargin))); } // close the Shortcut error div function shortcutA_doOnBlur() { shortcutCommonBlur(); return; // !!! /* var e = window.event.srcElement; var collnA = document.getElementById('shortcutA'); var theA; if (collnA.length == null) theA = collnA; else for (var i=0; i

' +L_NoDefAlert_Text +'

'; // CHECK THAT TERM ROOT EXISTS if (theXMLTermRoot.length > 1) { theXMLTermID = theXMLTermRoot.substring(1, theXMLTermRoot.length); i = theXMLTermID.indexOf(':'); if (i > 0) theXMLTerm = theXMLTermID.substring(i+1, theXMLTermID.length); else return (noDef); } else return (noDef); if (!xmlDOMLoaded) // load the XML object the first time through { xmlDOM = new ActiveXObject('Microsoft.XMLDOM'); xmlDOM.async = false; xmlDOM.validateOnParse = false; xmlDOM.load(xmlFile); xmlDOMLoaded = true; // state variable } outText = noDef; theEntry = xmlDOM.nodeFromID(theXMLTerm); // look up term if (theEntry == null) outText = noDef; else // term found { theScopeDefs = theEntry.selectNodes('scopeDef'); scopeFound = false; for (i = 0; i < theScopeDefs.length && !scopeFound; i++) { theScopes = theScopeDefs(i).selectNodes('scope'); for (j = 0; j < theScopes.length; j++) // this loop could be replaced with a single XSL pattern { if (theScopes(j).attributes.getNamedItem('scopeTermID').text == theXMLTermID) // checking for scopedef match { // FOUND SCOPE IN ENTERY - GET AND FORMAT THE TERM AND DEF DATA scopeFound = true; outText = formatXMLTerm(theEntry.selectSingleNode('term').text); if (theScopeDefs(i).selectSingleNode('def') != null) { theDefinition = formatXMLDef(theScopeDefs(i).selectSingleNode('def')); outText += theDefinition; // get def theSeeAlsos = theScopeDefs(i).selectNodes('seeAlso'); seeAlsoID = ''; seeAlsoTerm = ''; for (k = 0; k < theSeeAlsos.length; k++) // search for See Alsos { seeAlsoID = theSeeAlsos(k).attributes.getNamedItem('seeAlsoID').text; l = seeAlsoID.indexOf(':'); if (l > 0) { seeAlsoScope = seeAlsoID.substring(0, l+1); seeAlsoID = seeAlsoID.substring(l+1, seeAlsoID.length); } else seeAlsoScope = ''; seeAlsoTerm = xmlDOM.nodeFromID(seeAlsoID).selectSingleNode('term').text; // if k == 0, format first See Also outText += formatXMLSeeAlso(seeAlsoScope + seeAlsoID, seeAlsoTerm, (k == 0)); } if (k > 0) outText = outText + '

'; // if See Alsos, add trailing paragraph mark } else { theSeeEntry = theScopeDefs(i).selectSingleNode('seeEntry'); seeID = theSeeEntry.attributes.getNamedItem('seeID').text; k = seeID.indexOf(':'); if (k > 0) { seeScope = seeID.substring(0, k+1); seeID = seeID.substring(k+1, seeID.length); } else seeScope = ''; seeTerm = xmlDOM.nodeFromID(seeID).selectSingleNode('term').text; outText += formatXMLSee(seeScope + seeID, seeTerm); } }//end if-scope-found block } } } xmlTermRoot = ''; // clean up global // for debugging: return ("XML -" + xmlTermRoot + "/" + theXMLTerm + "termText:" + termText + "defText:" + defText + outText); return outText; } // helper functions to format the glossary text function formatXMLTerm(theTerm) // term { return ('

'+theTerm+'

'); } function formatXMLDef(theDef) // def { var theParas = theDef.selectNodes('para'); var theDefOut = ''; for (var i = 0; i < theParas.length; i++) theDefOut += '

'+theParas(i).text+'

'; return theDefOut; } function formatXMLSee(theSeeTermID, theSeeTerm) // see also { var theSeeText; theSeeText = ''+theSeeTerm+''; return ('

'+L_See_Text+theSeeText); } function formatXMLSeeAlso(theSeeAlsoTermID, theSeeAlsoTerm, bFirstOne) // see alsos { var theSeeAlsoText = '' +theSeeAlsoTerm +''; return ( ((bFirstOne)?('

'+L_SeeAlso_Text):(', ')) + theSeeAlsoText ); } // EVENT HANDLER HOOKS BEGIN window.onload = window_onload; window.onresize = window_onresize; document.onkeypress = document_onkeypress; document.onclick = document_onclick; document.onmouseover = document_onmouseover; document.onmouseout = document_onmouseout; // legacy event handler names function loadInitialThings() { window_onload(); } function fixPopUps() { window_onresize(); } function ieKey() { document_onkeypress(); } function clickAndDo() { document_onclick(); } function gettingHot() { document_onmouseover(); } function gettingCold() { document_onmouseout(); } // EVENT HANDLER HOOKS END