/************************************
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