// Detect It Easy: DiE-JS framework file
// Don't change anything unless you're sure about what you're doing

var File = DEX;
var X = DEX;


var DEX_isDexItemStringPresent = DEX.isDexItemStringPresent,
    DEX_isDexStringPresent = DEX.isDexStringPresent,
    DEX_itemStringSearchResults = {},
    DEX_stringSearchResults = {};

/**
 * Check if a DEX item string is present and cache the result.
 * @returns {Boolean}
 */
DEX.isDexItemStringPresent = function (sString) {
    var sCacheKey = "$" + sString;

    if (DEX_itemStringSearchResults[sCacheKey] === undefined) {
        DEX_itemStringSearchResults[sCacheKey] = DEX_isDexItemStringPresent(sString);
    }

    return DEX_itemStringSearchResults[sCacheKey];
}


/**
 * Check if a DEX string is present and cache the result.
 * @returns {Boolean}
 */
DEX.isDexStringPresent = function (sString) {
    var sCacheKey = "$" + sString;

    if (DEX_stringSearchResults[sCacheKey] === undefined) {
        DEX_stringSearchResults[sCacheKey] = DEX_isDexStringPresent(sString);
    }

    return DEX_stringSearchResults[sCacheKey];
}