/************************************ REVISION LOG ENTRY Revision By: Mihai Filimon ( mfl@exontrol.com ) Created on 2/27/2018 2:00:00 PM Revised on 12/08/20208 10:00:00 AM Comments: howto.js, howto.css This code may be used in compiled form in any way you desire. This file may not be redistributed modified or unmodified without the authors written consent. ************************************/ var oDEF = oDEF || { FR: "FR", // {string} specifies the filter-parameter for the frames F: "F", // {string} specifies the filter-parameter for the document Q: "Q", // {string} specifies the question-only parameter (the filter matches the questions-only) W: "W", // {string} specifies the word-only parameter (the filter matches for word-only) ONLY: "only", // {string} indicates the value of `Q`or `W` parameter (for instance W=Only ~ word-only) E: "E", // {string} specifies the expand parameter (specifies the index of the question to expand) QOCLS: "question-only", // {string} specifies the class to add to `Full` option when it is not checked WOCLS: "word-only", // {string} specifies the class to add to `Word` option when it is checked QID: "question", // {string} indicates the `question` identifier EXP: "expand", // {string} specifies the class to add to question so it is displayed as expanded HGQ: "header-group-questions", // {string} specifies the class to add to question so it is displayed as expanded CHM: !document.URL.toString().indexOf("mk:@") // {boolean} runs the CHM file (IE7) }, oe2A; // {object} holds an object of window.onload = loadW; window.onclick = clickW; window.onmousemove = moveW; window.onresize = sizeW; window.onscroll = scrollW; window.onkeypress = keyW; !hasFilter() && (document.onreadystatechange = showBody); /** * @description The trim() method removes whitespace from both sides of a string (!!! required by CHM (running under IE)) */ !String.prototype.trim && (String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); }); /** * @description The getElementsByClassName method of Document interface returns an array-like object of all child elements which have all of the given class name(s) // !!! required by CHM (running under IE) */ !document.getElementsByClassName && (document.getElementsByClassName = function(search) { var d = document, elements, pattern, i, results = []; if (d.querySelectorAll) { // IE8 return d.querySelectorAll("." + search); } if (d.evaluate) { // IE6, IE7 pattern = ".//*[contains(concat(' ', @class, ' '), ' " + search + " ')]"; elements = d.evaluate(pattern, d, null, 0, null); while ((i = elements.iterateNext())){ results.push(i); } } else { elements = d.getElementsByTagName("*"); pattern = new RegExp("(^|\\s)" + search + "(\\s|$)"); for (i = 0; i < elements.length; i++) { if ( pattern.test(elements[i].className) ) { results.push(elements[i]); } } } return results; }); /** * @description The forEach() method executes a provided function once for each array element (!!! required by CHM (running under IE)) */ !Array.prototype.forEach && (Array.prototype.forEach = function(callback, thisArg) { for ( var i = 0, l = this.length; i < l; i++ ) callback.call(thisArg, this[i], i, this); }); /** * @description The firstElementChildOf() method returns the object's first child Element, or null if there are no child elements // !!! required by CHM (running under IE) * @param {object} oElement Indicates the element to start searching for the first child element from * @returns {object} Returns the object's first child Element, or null if there are no child elements */ function firstElementChildOf(oElement) { return oElement && oElement.firstElementChild || (function() { var node, nodes = oElement.childNodes, i = 0; while (node = nodes[i++]) if (node.nodeType === 1 /*Node.ELEMENT_NODE 1 An Element node like

or

.*/) return node; })(); } /** * @description The feU/forEachUntil() method enumerates the elements of a HTMLCollection or Array object (!!! required by CHM (running under IE)) * @param {object} collection Indicates a HTMLCollection or Array object * @param {callback} callback Specifies the callback to invoked for each element * @returns {any} Returns the value of the last callback */ function feU(collection, callback) { var oResult; for ( var i = 0, l = collection.length; !oResult && i < l; i++ ) oResult = callback(collection[i] /*Array*/ || collection.item(i) /*HTMLCollection*/); return oResult; } /** * @description eVV/EnsureVisibleVertical() method scrolls the view to ensures that the element fits the control's client area * @param {object} oElement Indicates the element to fit the view */ function eVV(oElement) { oElement && oElement.scrollIntoView( { behavior: 'smooth', block: 'nearest' }); } /** * @description The tryC() method calls the callback between a try/catch statement * @param {callback} callback Indicates a callback to call * @param {object} thisArg Specifies the value of "this" keyword during the callback * @returns {any} Returns the result of the callback */ function tryC(callback, thisArg) { try { return callback.call(thisArg || this); } catch (error) { } } /** * @description The getDoc() method returns the window's document (requests it between a try/catch statement) * @param {object} window Indicates the window to get document for * @returns {object} Returns the window's document */ function getDoc(window) { return tryC(function() { return window.document; }); } /** * @description The getFrameDoc() method gets the document of the "; iFrames++; } } p = nextID(p); } setSessionItem("mainSectionFrames", iFrames ); startFilterFrames(); !iFrames && endFilterFrames(); } } c.innerHTML = iFrame; c.style.display = ""; } } } var footer = document.getElementById("footerInfo"); if ( footer ) { var info = "", oInfo = "

<%INFO%>

", nURL = getURLBase(); if ( nURL.length ) { nURL += ( nURL.indexOf("?") > 0 ) ? "&" : "?"; nURL += "F="+ escape(text); if ( isFilterForQ() ) { nURL += ( nURL.indexOf("?") > 0 ) ? "&" : "?"; nURL += oDEF.Q + "=only"; } if ( isFilterForW() ) { nURL += ( nURL.indexOf("?") > 0 ) ? "&" : "?"; nURL += oDEF.W + "=only"; } } if ( text.length ) { if ( !nResults ) info = "no results"; else info += nResults.toString() + " result" + ((nResults > 1) ? "s" : ""); if ( nURL.length ) info += ", at " + shortOf(nURL) + ""; } oInfo = oInfo.replace( "<%INFO%>", info ); footer.outerHTML = oInfo; addR(nResults); } if ( nResults && !getSessionItem("showFirstResult") ) { setSessionItem("showFirstResult", "done"); (nResults == 1) && ExpandCollapse(firstElementChildOf(firstElementChildOf(feU(document.getElementsByTagName("TR"), function(oQuestion) { return oQuestion.id == oDEF.QID && (oQuestion.style.display != "none") && oQuestion; })))); } miniHeader(); toTop(); } /** * @description The sPages/showPages() method shows or hides the pages (< 2 1 >) * @param {boolean} bVisible Specifies whether the pages are shown or hidden */ function sPages(bVisible) { var p = document.getElementById("pages"), oResults = document.getElementById("results"); if ( p ) p.style.display = bVisible ? "" : "none"; if (oResults) { oResults.className = window[bVisible ? "delCL" : "addCL"](oResults.className, "show"); oResults.innerText = ""; oResults.innerResult = 0; } } /** * @description The addR() method adds results to the master `results` element * @param {number} nResults Indicates the number of results to add */ function addR(nResults) { var oParentDoc = getDoc(window.parent), oResults = oParentDoc && oParentDoc.getElementById("results") || document.getElementById("results"); if ( oResults ) { oResults.innerResult = (oResults.innerResult || 0) + nResults; oResults.innerText = (oResults.innerResult ? oResults.innerResult : "no") + " result" + (oResults.innerResult != 1 ? "s" : ""); oResults.className = window[!oResults.innerResult ? "addCL" : "delCL"](oResults.className, "zero"); } } /** * @description The loadF() method occurs once a