/* Copyright © 1998, 2012, Oracle and/or its affiliates.  All rights reserved. */
/* Version 11.1.0.0 */

//* <XBuild version="11.1.0-release,trace,browser.all,playback,hint-1"/>
//* <BaseDir path="E:/BUILDROOT_SUN/Builds/Branches/Hacienda/tfs/TargetApps/BrowserAppsBuild/Build/Source/Applications/"/>
//* <FileRef type="source" path="stdhemi/smarthelpie/smarthelpie.js" time="2012-01-13T11:50:33"/>
//* <FileRef type="reference" path="../Include/Tools/ResourceManager.js" time="2012-01-13T11:50:46"/>
//* <FileRef type="reference" path="../Include/Tools/Base.js" version="1" time="2012-01-13T11:50:45"/>
//* <FileRef type="reference" path="../Include/Tools/Sanity.js" time="2012-01-13T11:50:46"/>
//* <FileRef type="reference" path="../Include/Tools/Fail.js" time="2012-01-13T11:50:45"/>
//* <FileRef type="reference" path="../Include/Tools/Trace.js" time="2012-01-13T11:50:47"/>
//* <FileRef type="reference" path="../Include/Tools/Error.js" time="2012-01-13T11:50:45"/>
//* <FileRef type="reference" path="../Include/Tools/Json.js" time="2012-01-13T11:50:47"/>
//* <FileRef type="reference" path="../Include/Tools/Main.js" time="2012-01-13T11:50:46"/>
//* <FileRef type="reference" path="../Include/Tools/Browser.js" time="2012-01-13T11:50:45"/>
//* <FileRef type="reference" path="../Include/NoTrace.js" time="2012-01-13T11:50:38"/>
//* <FileRef type="reference" path="../Include/Tools/Assert.js" time="2012-01-13T11:50:45"/>
//* <FileRef type="reference" path="../Include/Tools/HashMap.js" version="1" time="2012-01-13T11:50:45"/>
//* <FileRef type="reference" path="../Include/Tools/String.js" time="2012-01-13T11:50:46"/>
//* <FileRef type="reference" path="../Include/Tools/AjaxRequest.js" time="2012-01-13T11:50:44"/>
//* <FileRef type="reference" path="../Include/Tools/UniqueId.js" time="2012-01-13T11:50:46"/>
//* <FileRef type="reference" path="../Include/Tools/Array.js" version="1" time="2012-01-13T11:50:45"/>
//* <FileRef type="reference" path="stdhemi/resources/resources.js" time="2012-01-13T11:50:31"/>
//* <FileRef type="reference" path="../Include/Common/ConfigData.js" time="2012-01-13T11:50:40"/>
//* <FileRef type="reference" path="../Include/Tools/ConfigNode.js" time="2012-01-13T11:50:45"/>
//* <FileRef type="reference" path="../Include/Common/ConfigDefaults.js" time="2012-01-13T11:50:40"/>
//* <FileRef type="reference" path="../Include/Application/ApplicationMap.js" time="2012-01-13T11:50:39"/>
//* <FileRef type="reference" path="../Include/Application/ApplicationBase.js" time="2012-02-07T03:11:01"/>
//* <FileRef type="reference" path="../Include/Application/EcidSearch.js" time="2012-01-13T11:50:40"/>
//* <FileRef type="reference" path="../Include/Common/ContextPart.js" time="2012-01-13T11:50:40"/>
//* <FileRef type="reference" path="../Include/Common/SearchExpression.js" time="2012-01-13T11:50:41"/>
//* <FileRef type="reference" path="../Include/CoreScripts/Escape.js" time="2012-01-13T11:50:41"/>
//* <FileRef type="reference" path="../Include/CoreScripts/_escape.js" time="2012-01-13T11:50:41"/>
//* <FileRef type="reference" path="../Include/Common/SearchExpressionNode.js" time="2012-01-13T11:50:40"/>
//* <FileRef type="reference" path="../Include/Common/SearchExpressionBuilder.js" time="2012-01-13T11:50:40"/>
//* <FileRef type="reference" path="../Include/Common/ContextType.js" time="2012-01-13T11:50:40"/>
//* <FileRef type="reference" path="../Include/Common/PartDescriptor.js" time="2012-01-13T11:50:40"/>
//* <FileRef type="reference" path="../Include/Common/UpkMeta.js" time="2012-02-07T03:11:01"/>
//* <FileRef type="reference" path="../Include/Tools/Url.js" time="2012-01-13T11:50:47"/>
//* <FileRef type="reference" path="../Include/Tools/Dom.js" time="2012-01-13T11:50:45"/>
//* <FileRef type="reference" path="../Include/Tools/Window.js" time="2012-02-07T03:11:01"/>
//* <FileRef type="reference" path="../Include/Tools/RawQuery.js" time="2012-01-13T11:50:47"/>
//* <FileRef type="reference" path="../Include/Common/ApplicationInfo.js" time="2012-01-13T11:50:40"/>
//* <FileRef type="reference" path="../Include/Common/ApplicationFeature.js" time="2012-01-13T11:50:40"/>
//* <FileRef type="reference" path="../Include/Application/ApplicationContext.js" time="2012-01-13T11:50:40"/>
//* <FileRef type="reference" path="../Include/Tools/Html.js" time="2012-01-13T11:50:45"/>
//* <FileRef type="reference" path="../Include/Application/ApplicationType.js" time="2012-01-13T11:50:39"/>
//* <FileRef type="reference" path="stdhemi/smarthelp/common.js" time="2012-01-13T11:50:31"/>
//* <FileRef type="reference" path="stdhemi/smarthelp/smarthelpversions.js" time="2012-01-18T03:07:51"/>


//* <FileBegin path="stdhemi/smarthelpie/smarthelpie.js"/>
//x /// <reference path="../../../Include/Tools/ResourceManager.js"/>

//* <FileBegin path="../Include/Tools/ResourceManager.js"/>
//x /// <reference path="Base.js" />
//x /// <reference path="HashMap.js" />
//x /// <reference path="Main.js" />
//x /// <reference path="String.js" />
//x /// <reference path="AjaxRequest.js" />
//x /// <reference path="Array.js" />

//* <FileBegin path="../Include/Tools/Base.js"/>
//x /// <reference path="Sanity.js" />

//* <FileBegin path="../Include/Tools/Sanity.js"/>
//x /// <reference path="Fail.js"/>

//* <FileBegin path="../Include/Tools/Fail.js"/>
//x /// <reference path="Trace.js" xconfig="Trace,Debug"/>
//x /// <reference path="Error.js"/>

//* <FileBegin path="../Include/Tools/Trace.js"/>
//x //: <if xconfig="Debug,Trace"/>
//x /// <reference path="Error.js"/>
//x /// <reference path="Json.js"/>
//x /// <reference path="Browser.js"/>

//* <FileBegin path="../Include/Tools/Error.js"/>
// Don't reference Trace.js in this file

/** @constructor */ // ../Include/Tools/Error.js: 3
function ArgumentError(message) { // ../Include/Tools/Error.js: 4
    this.name = 'ArgumentError'; // ../Include/Tools/Error.js: 5
    this.message = message; // ../Include/Tools/Error.js: 6
    this.toString = function() { return this.message; } // ../Include/Tools/Error.js: 7
} // ../Include/Tools/Error.js: 8

/** @constructor */ // ../Include/Tools/Error.js: 10
function ApplicationError(message) { // ../Include/Tools/Error.js: 11
    this.name = 'ApplicationError'; // ../Include/Tools/Error.js: 12
    this.message = message; // ../Include/Tools/Error.js: 13
    this.toString = function() { return this.message; } // ../Include/Tools/Error.js: 14
} // ../Include/Tools/Error.js: 15

//x //: <if xconfig="Debug,Trace"/>
function GetCallStack(droppedFrames) { // ../Include/Tools/Error.js: 18
    var fn = arguments.callee.caller; // ../Include/Tools/Error.js: 19
    if (droppedFrames) { // ../Include/Tools/Error.js: 20
        while (fn && droppedFrames > 0) { // ../Include/Tools/Error.js: 21
            fn = fn.caller; // ../Include/Tools/Error.js: 22
            --droppedFrames; // ../Include/Tools/Error.js: 23
        } // ../Include/Tools/Error.js: 24
    } // ../Include/Tools/Error.js: 25
    var callStack = []; // ../Include/Tools/Error.js: 26
    while (fn) { // ../Include/Tools/Error.js: 27
        var body = fn.toString(); // ../Include/Tools/Error.js: 28
        var posEndParam = body.indexOf(')'); // ../Include/Tools/Error.js: 29
        var name = body.substr(0, posEndParam + 1); // ../Include/Tools/Error.js: 30
        if (posEndParam != -1) { // ../Include/Tools/Error.js: 31
            var posNewLine = body.indexOf('\n', posEndParam); // ../Include/Tools/Error.js: 32
            if (posNewLine != -1) { // ../Include/Tools/Error.js: 33
                var line = body.substr(posEndParam + 1, posNewLine - posEndParam - 1); // ../Include/Tools/Error.js: 34
                var commentPos = line.indexOf('//'); // ../Include/Tools/Error.js: 35
                if (commentPos != -1) { // ../Include/Tools/Error.js: 36
                    var endPos = line.length - ((line[line.length - 1] == '\r') ? 1 : 0); // ../Include/Tools/Error.js: 37
                    var comment = line.substr(commentPos, endPos - commentPos); // ../Include/Tools/Error.js: 38
                    name += ' ' + comment; // ../Include/Tools/Error.js: 39
                } // ../Include/Tools/Error.js: 40
            } // ../Include/Tools/Error.js: 41
        } // ../Include/Tools/Error.js: 42
        callStack.push(name); // ../Include/Tools/Error.js: 43
        fn = fn.caller; // ../Include/Tools/Error.js: 44
    } // ../Include/Tools/Error.js: 45
    return callStack; // ../Include/Tools/Error.js: 46
} // ../Include/Tools/Error.js: 47
//x //: <end/>

//* <FileEnd path="../Include/Tools/Error.js"/>


//* <FileBegin path="../Include/Tools/Json.js"/>
//x /// <reference path="Main.js"/>
//x /// <reference path="Browser.js"/>

//* <FileBegin path="../Include/Tools/Main.js"/>
//x //: Don't add references in this file!

//x //: <if xconfig="Ignore"/>
//x function TYPEDEF(name_eq_new_TypeName) {
//x     /// <summary>Enable IntelliSense for an arbitrary object: TYPEDEF(name = new TypeName());</summary>
//x }
//x //: <end/>

function NameOf(name) { // ../Include/Tools/Main.js: 9
    return ((name != null) ? '"' + name + '"' : '(null)'); // ../Include/Tools/Main.js: 10
} // ../Include/Tools/Main.js: 11

function TypeOf(value) { // ../Include/Tools/Main.js: 13
    if (value == null) // ../Include/Tools/Main.js: 14
        return ((value === void 0) ? 'undefined' : 'null'); // ../Include/Tools/Main.js: 15
    var type = typeof value; // ../Include/Tools/Main.js: 16
    //Gyuri issue 1
    //See below
    if (IsArray(value)) { // ../Include/Tools/Main.js: 19
        return 'object Array'; // ../Include/Tools/Main.js: 20
    } // ../Include/Tools/Main.js: 21
    if (type != 'object' || value.constructor == null) // ../Include/Tools/Main.js: 22
        return type; // ../Include/Tools/Main.js: 23
    var result = /function\s+([^\(]*)\(/.exec(value.constructor.toString()); // ../Include/Tools/Main.js: 24
    return (type + ((result && result.length > 1 && result[1].length > 0) ? ' ' + result[1] : '')); // ../Include/Tools/Main.js: 25
} // ../Include/Tools/Main.js: 26

function IsNullOrString(obj) { // ../Include/Tools/Main.js: 28
    return ((obj == null) || (typeof obj == 'string') || (obj instanceof String)); // ../Include/Tools/Main.js: 29
} // ../Include/Tools/Main.js: 30

function IsNullOrNumber(obj) { // ../Include/Tools/Main.js: 32
    return ((obj == null) || (typeof obj == 'number') || (obj instanceof Number)); // ../Include/Tools/Main.js: 33
} // ../Include/Tools/Main.js: 34

function IsNullOrBoolean(obj) { // ../Include/Tools/Main.js: 36
    return ((obj == null) || (typeof obj == 'boolean') || (obj instanceof Boolean)); // ../Include/Tools/Main.js: 37
} // ../Include/Tools/Main.js: 38

function IsNullOrRegExp(obj) { // ../Include/Tools/Main.js: 40
    return ((obj == null) || (obj instanceof RegExp)); // ../Include/Tools/Main.js: 41
} // ../Include/Tools/Main.js: 42

function IsNullOrArray(obj) { // ../Include/Tools/Main.js: 44
    return ((obj == null) || IsArray(obj)); // ../Include/Tools/Main.js: 45
} // ../Include/Tools/Main.js: 46

function IsNullOrInstanceOf(obj, type) { // ../Include/Tools/Main.js: 48
    return ((obj == null) || (obj instanceof type)); // ../Include/Tools/Main.js: 49
} // ../Include/Tools/Main.js: 50

function IsUndefined(obj) { // ../Include/Tools/Main.js: 52
    return (typeof (obj) == 'undefined'); // ../Include/Tools/Main.js: 53
} // ../Include/Tools/Main.js: 54

function IsString(obj) { // ../Include/Tools/Main.js: 56
    return ((typeof obj == 'string') || (typeof obj == 'object' && obj.constructor === String)); // ../Include/Tools/Main.js: 57
} // ../Include/Tools/Main.js: 58

function IsNumber(obj) { // ../Include/Tools/Main.js: 60
    return ((typeof obj == 'number') || (typeof obj == 'object' && obj.constructor === Number)); // ../Include/Tools/Main.js: 61
} // ../Include/Tools/Main.js: 62

function IsBoolean(obj) { // ../Include/Tools/Main.js: 64
    return ((typeof obj == 'boolean') || (typeof obj == 'object' && obj.constructor === Boolean)); // ../Include/Tools/Main.js: 65
} // ../Include/Tools/Main.js: 66

//Gyuri issue 1, use other function to determine whether the actual object is an array
//Firefox gives error for an array created in the chrome environment
//Permission denied for <http://www.google.hu> to get property Array.constructor from <>.
/*
function IsArray(obj) {
return (obj != null) && (obj.constructor === Array);
}
*/ // ../Include/Tools/Main.js: 75
function IsArray(obj) { // ../Include/Tools/Main.js: 76
    return (typeof (obj) == 'object' && (obj.join != void 0) && (obj.push != void 0) && (obj.length != void 0)); // ../Include/Tools/Main.js: 77
} // ../Include/Tools/Main.js: 78


function IsFunction(obj) { // ../Include/Tools/Main.js: 81
    return (typeof obj == 'function') || ((obj != null) && (obj.constructor === Function)); // ../Include/Tools/Main.js: 82
} // ../Include/Tools/Main.js: 83

//TODO: Matyi: Ez mifele allat???
//Gyuri: olyanfajta, amit a YUI is használ...
//Matyi: :)
/*
    isObject: function(o) {
return (o && (typeof o === 'object' || L.isFunction(o))) || false;
    },
    isFunction: function(o) {
        return (typeof o === 'function') || Object.prototype.toString.apply(o) === '[object Function]';
    },    
*/     // ../Include/Tools/Main.js: 95

function IsObject(obj) { // ../Include/Tools/Main.js: 97
    return ((typeof (obj) == 'object' || IsFunction(obj)) && obj != null); // ../Include/Tools/Main.js: 98
} // ../Include/Tools/Main.js: 99

function IsInstanceOf(obj, type) { // ../Include/Tools/Main.js: 101
    return (obj instanceof type); // ../Include/Tools/Main.js: 102
} // ../Include/Tools/Main.js: 103

function IsHash(obj) { // ../Include/Tools/Main.js: 105
    return ( // ../Include/Tools/Main.js: 106
        (obj != null) && // ../Include/Tools/Main.js: 107
        (typeof obj == 'object') && // ../Include/Tools/Main.js: 108
        (obj.constructor !== String) && // ../Include/Tools/Main.js: 109
        (obj.constructor !== Number) && // ../Include/Tools/Main.js: 110
        (obj.constructor !== Boolean) && // ../Include/Tools/Main.js: 111
        (obj.constructor !== Array) && // ../Include/Tools/Main.js: 112
        (obj.constructor !== Date) // ../Include/Tools/Main.js: 113
    ); // ../Include/Tools/Main.js: 114
} // ../Include/Tools/Main.js: 115

function IsEmpty(obj) { // ../Include/Tools/Main.js: 117
    return (!obj || !obj.length); // ../Include/Tools/Main.js: 118
} // ../Include/Tools/Main.js: 119

//* <FileEnd path="../Include/Tools/Main.js"/>


//* <FileBegin path="../Include/Tools/Browser.js"/>
//x /// <reference path="Main.js"/>

function IsIE() { // ../Include/Tools/Browser.js: 3
    return (navigator.appName == 'Microsoft Internet Explorer'); // ../Include/Tools/Browser.js: 4
} // ../Include/Tools/Browser.js: 5

function IsFF() { // ../Include/Tools/Browser.js: 7
    return (navigator.appName == 'Netscape'); // ../Include/Tools/Browser.js: 8
} // ../Include/Tools/Browser.js: 9

//calling execScript once on a window object causes the eval method magically to reappear, if it was disappeared before
function ForceEval(obj) { // ../Include/Tools/Browser.js: 12
    if (IsIE()) { // ../Include/Tools/Browser.js: 13
        if (IsObject(obj) && IsFunction(obj.eval)) { // ../Include/Tools/Browser.js: 14
            if (IsObject(obj.execScript)) { // ../Include/Tools/Browser.js: 15
                obj.execScript('null'); // ../Include/Tools/Browser.js: 16
            } // ../Include/Tools/Browser.js: 17
        } // ../Include/Tools/Browser.js: 18
    } // ../Include/Tools/Browser.js: 19
} // ../Include/Tools/Browser.js: 20

//x //: <if xconfig="Browser.IE*,Browser.All"/>

function IE_ConvertVBArrayToArray(obj) { // ../Include/Tools/Browser.js: 24
    return ((obj == null)? null: obj['toArray']()); // ../Include/Tools/Browser.js: 25
} // ../Include/Tools/Browser.js: 26

//x //: <end/>

var _BrowserType = { // ../Include/Tools/Browser.js: 30
    NotDetected: -1, // ../Include/Tools/Browser.js: 31
    MicrosoftInternetExplorer: 0, // ../Include/Tools/Browser.js: 32
    MozillaFirefox: 1, // ../Include/Tools/Browser.js: 33
    GoogleChrome: 2 // ../Include/Tools/Browser.js: 34
}; // ../Include/Tools/Browser.js: 35

var _Browser = { // ../Include/Tools/Browser.js: 37
    Type: _BrowserType.NotDetected, // ../Include/Tools/Browser.js: 38
    Version: void 0, // ../Include/Tools/Browser.js: 39
    IE: void 0, // ../Include/Tools/Browser.js: 40
    FF: void 0, // ../Include/Tools/Browser.js: 41
    CR: void 0, // ../Include/Tools/Browser.js: 42
    GetVersionFn: [ // ../Include/Tools/Browser.js: 43
        function() { // ../Include/Tools/Browser.js: 44
            var agent = navigator.userAgent; // ../Include/Tools/Browser.js: 45
            var tokenBegin = agent.indexOf('MSIE '); // ../Include/Tools/Browser.js: 46
            if (tokenBegin != -1) { // ../Include/Tools/Browser.js: 47
                tokenBegin += 5; // ../Include/Tools/Browser.js: 48
                var tokenEnd = agent.indexOf(';', tokenBegin); // ../Include/Tools/Browser.js: 49
                if (tokenEnd != -1) // ../Include/Tools/Browser.js: 50
                    return Number(agent.substr(tokenBegin, tokenEnd - tokenBegin)); // ../Include/Tools/Browser.js: 51
            } // ../Include/Tools/Browser.js: 52
            return -1; // ../Include/Tools/Browser.js: 53
        }, // ../Include/Tools/Browser.js: 54
        null, // ../Include/Tools/Browser.js: 55
        null // ../Include/Tools/Browser.js: 56
    ] // ../Include/Tools/Browser.js: 57
}; // ../Include/Tools/Browser.js: 58

var Browser = { // ../Include/Tools/Browser.js: 60
    IsIE: function() { // ../Include/Tools/Browser.js: 61
        if (_Browser.IE !== void 0) // ../Include/Tools/Browser.js: 62
            return _Browser.IE; // ../Include/Tools/Browser.js: 63
        if (!!(_Browser.IE = (navigator.userAgent.indexOf('MSIE ') != -1))) { // ../Include/Tools/Browser.js: 64
            _Browser.Type = _BrowserType.MicrosoftInternetExplorer; // ../Include/Tools/Browser.js: 65
            return true; // ../Include/Tools/Browser.js: 66
        } // ../Include/Tools/Browser.js: 67
        return false; // ../Include/Tools/Browser.js: 68
    }, // ../Include/Tools/Browser.js: 69
    IsFF: function() { // ../Include/Tools/Browser.js: 70
        if (_Browser.FF !== void 0) // ../Include/Tools/Browser.js: 71
            return _Browser.FF; // ../Include/Tools/Browser.js: 72
        if (!!(_Browser.FF = (navigator.userAgent.indexOf('Firefox') != -1))) { // ../Include/Tools/Browser.js: 73
            _Browser.Type = _BrowserType.MozillaFirefox; // ../Include/Tools/Browser.js: 74
            return true; // ../Include/Tools/Browser.js: 75
        } // ../Include/Tools/Browser.js: 76
    }, // ../Include/Tools/Browser.js: 77
    //IsCR: function() { },
    GetVersion: function() { // ../Include/Tools/Browser.js: 79
        if (_Browser.Version !== void 0) // ../Include/Tools/Browser.js: 80
            return _Browser.Version; // ../Include/Tools/Browser.js: 81
        var getVersionFn = _Browser.GetVersionFn[_Browser.Type]; // ../Include/Tools/Browser.js: 82
        var version = ((getVersionFn && getVersionFn()) || -1); // ../Include/Tools/Browser.js: 83
        _Browser.Version = version; // ../Include/Tools/Browser.js: 84
        return version; // ../Include/Tools/Browser.js: 85
    } // ../Include/Tools/Browser.js: 86
}; // ../Include/Tools/Browser.js: 87


//* <FileEnd path="../Include/Tools/Browser.js"/>


// Author: Csaba Márton <csaba.marton@oracle.com>
// Version: 0.9.0
// 
// Supported browsers: IE 7+, Firefox 1.5+, Chrome 4+.
// Other browsers were not tested.
//
// Documentation: http://image.hu.oracle.com/matyi/js-encoding/
//
// JSON
// ====
//
// The JSON decoder is RFC 4627 compliant and passes JSON.org's
// JSON checker test suite: http://www.json.org/JSON_checker/test.zip
//
// The JSON encoder is RFC 4627 and ECMA-262 compliant with the 
// modification that Json.EncodeObject will not throw TypeError if 
// it contains a cyclic reference; it will return undefined instead. 
// Json.DecodeObject will also return undefined if an error occurs.
//
//   RFC 4627: The application/json Media Type for JavaScript Object Notation 
//   http://www.ietf.org/rfc/rfc4627.txt
//
//   ECMA-262: ECMAScript Language Specification, 5th Edition, December 2009
//   http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf
//

// IMPORTANT NOTE: Because PRIMAP6 implemented non-standard toJSON functions the 
// toJSON function function call was removed from this implementation. For this 
// reason the native implementation will be always tested to be valid.

var _Json = { // ../Include/Tools/Json.js: 34
    Indent: '  ' // ../Include/Tools/Json.js: 35
}; // ../Include/Tools/Json.js: 36

var Json = { // ../Include/Tools/Json.js: 38
    EncodeObject: function(obj, indent) { // ../Include/Tools/Json.js: 39
        try { return JSON.stringify(obj, null, (indent ? _Json.Indent : null)); } // ../Include/Tools/Json.js: 40
        catch (xe) { if (typeof TypeError == 'undefined' || !xe || xe.constructor !== TypeError) throw xe; } // ../Include/Tools/Json.js: 41
    }, // ../Include/Tools/Json.js: 42
    DecodeObject: function(str) { // ../Include/Tools/Json.js: 43
        if (str != null) // ../Include/Tools/Json.js: 44
            try { return JSON.parse(str); } catch (xe) { } // ../Include/Tools/Json.js: 45
    } // ../Include/Tools/Json.js: 46
}; // ../Include/Tools/Json.js: 47

function _Json_Emulate() { // ../Include/Tools/Json.js: 49
    var xt = /[^",:\{\}\[\] \t\r\n]|"""|"[ \t\r\n]+"]|[\}\]][ \t\r\n]*[:\{\[]|[\{\[][ \t\r\n]*[,:]|[,:][ \t\r\n]*[,:\}\]]/; // compliance test
    var xn = /"(?:[^"\\\x00-\x1F]|\\["\\\/bnfrt]|\\u[0-9a-fA-F]{4})*"|null|true|false|-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+\-]?[0-9]+)?/g; // tokens regexp
    var innerException = new Error(''); // ../Include/Tools/Json.js: 52
    function _u(n) { // ../Include/Tools/Json.js: 53
        var c = n.toString(16); // ../Include/Tools/Json.js: 54
        switch (c.length) { // ../Include/Tools/Json.js: 55
            case 1: return '\\u000' + c; // ../Include/Tools/Json.js: 56
            case 2: return '\\u00' + c; // ../Include/Tools/Json.js: 57
            case 3: return '\\u0' + c; // ../Include/Tools/Json.js: 58
            case 4: return '\\u' + c; // ../Include/Tools/Json.js: 59
        } // ../Include/Tools/Json.js: 60
        return '?'; // ../Include/Tools/Json.js: 61
    } // ../Include/Tools/Json.js: 62
    var _f = IsFunction; // ../Include/Tools/Json.js: 63
    var _c; // contains(array, item) or cyclic
    var _i; // indexOf(array, item)
    (function() { // ../Include/Tools/Json.js: 66
        try { // ../Include/Tools/Json.js: 67
            if (typeof [].indexOf == 'function' && [1, 2, 3, 4].indexOf(3) == 2) { // ../Include/Tools/Json.js: 68
                _c = function(a, o) { return (a.indexOf(o) != -1); }; // ../Include/Tools/Json.js: 69
                _i = function(a, o) { return a.indexOf(o); }; // ../Include/Tools/Json.js: 70
                return; // ../Include/Tools/Json.js: 71
            } // ../Include/Tools/Json.js: 72
        } // ../Include/Tools/Json.js: 73
        catch (ex) { }; // ../Include/Tools/Json.js: 74
        _c = function(a, o) { for (var i = 0, n = a.length; i < n; ++i) { if (a[i] === o) return true; } return false; }; // ../Include/Tools/Json.js: 75
        _i = function(a, o) { for (var i = 0, n = a.length; i < n; ++i) { if (a[i] === o) return i; } return -1; }; // ../Include/Tools/Json.js: 76
    })(); // ../Include/Tools/Json.js: 77
    var ae = '????????btn?fr??????????????????'; // 0x00..0x1F escape abreviation
    function _q(o) { // quote_string(input)
        return ('"' + String(o) // ../Include/Tools/Json.js: 80
              .replace(/(["\\])/g, "\\$1") // ../Include/Tools/Json.js: 81
              .replace(/([\x00-\x1F])/g, function(c) { // ../Include/Tools/Json.js: 82
                  var n = c.charCodeAt(0); // ../Include/Tools/Json.js: 83
                  var x = ae.charAt(n); // ../Include/Tools/Json.js: 84
                  return (x == '?' ? _u(n) : '\\' + x); // ../Include/Tools/Json.js: 85
              }) + '"'); // ../Include/Tools/Json.js: 86
    } // ../Include/Tools/Json.js: 87
    function _2(v) { // pad_to_2_digits(value) - pad decimals less than 9 with one zero. the input is guaranteed to be positive or zero
        return ((v < 10) ? '0' + v : v); // ../Include/Tools/Json.js: 89
    } // ../Include/Tools/Json.js: 90
    function _s(o, c, k) { // stringify(object, stack, key)
        // object is not undefined, null or function
        var t = typeof o; // ../Include/Tools/Json.js: 93
        // Matyi: The following lines were removed from standard implementation because PRIMAP6 implemented non-standard toJSON functions
        // if (t == 'object' && _f(o.toJSON)) {
        //     o = o.toJSON(k);
        //     t = typeof o;
        // }
        if (t != 'object') { // ../Include/Tools/Json.js: 99
            if (t == 'string') return _q(o); // ../Include/Tools/Json.js: 100
            if (t == 'number') return (isFinite(o) ? String(o) : 'null'); // ../Include/Tools/Json.js: 101
            if (t == 'boolean') return (o ? 'true' : 'false'); // ../Include/Tools/Json.js: 102
            return; // ../Include/Tools/Json.js: 103
        } // ../Include/Tools/Json.js: 104
        if (o === null) return 'null'; // ../Include/Tools/Json.js: 105
        if (o.constructor === String) return _q(o); // ../Include/Tools/Json.js: 106
        if (o.constructor === Number) return (isFinite(o) ? String(o) : 'null'); // ../Include/Tools/Json.js: 107
        if (o.constructor === Boolean) return (o ? 'true' : 'false'); // ../Include/Tools/Json.js: 108
        if (o.constructor === Date) return ''.concat(o.getUTCFullYear(), '-', _2(o.getUTCMonth()), '-', _2(o.getUTCDate()), 'T', _2(o.getUTCHours()), ':', _2(o.getUTCMinutes()), ':', _2(o.getUTCSeconds()), 'Z'); // ../Include/Tools/Json.js: 109
        if (o.constructor === Function) return; // ../Include/Tools/Json.js: 110
        if (_c(c, o)) throw innerException; // ensure no circular references
        var a = []; // ../Include/Tools/Json.js: 112
        c.push(o); // ../Include/Tools/Json.js: 113
        if (o.constructor === Array) { // ../Include/Tools/Json.js: 114
            for (var i = 0, n = o.length; i < n; ++i) { // ../Include/Tools/Json.js: 115
                var v1 = o[i]; // ../Include/Tools/Json.js: 116
                if (v1 == null || _f(v1)) // ../Include/Tools/Json.js: 117
                    a.push('null'); // ../Include/Tools/Json.js: 118
                else a.push(_s(v1, c, String(i))); // ../Include/Tools/Json.js: 119
            } // ../Include/Tools/Json.js: 120
            c.pop(); // ../Include/Tools/Json.js: 121
            return ('[' + a.join() + ']'); // ../Include/Tools/Json.js: 122
        } // ../Include/Tools/Json.js: 123
        for (var m in o) { // ../Include/Tools/Json.js: 124
            var v2 = o[m]; // ../Include/Tools/Json.js: 125
            if (v2 == null || _f(v2)) { // ../Include/Tools/Json.js: 126
                if (v2 === null) // ../Include/Tools/Json.js: 127
                    a.push(_q(m) + ':null'); // ../Include/Tools/Json.js: 128
            } // ../Include/Tools/Json.js: 129
            else if ((v2 = _s(v2, c, m)) != null) // ../Include/Tools/Json.js: 130
                a.push(_q(m) + ':' + v2); // ../Include/Tools/Json.js: 131
        } // ../Include/Tools/Json.js: 132
        c.pop(); // ../Include/Tools/Json.js: 133
        return ('{' + a.join() + '}'); // ../Include/Tools/Json.js: 134
    } // ../Include/Tools/Json.js: 135
    Json.EncodeObject = function(o) { // ../Include/Tools/Json.js: 136
        if (o == null || _f(o)) { // ../Include/Tools/Json.js: 137
            if (o === null) // ../Include/Tools/Json.js: 138
                return 'null'; // ../Include/Tools/Json.js: 139
            return; // ../Include/Tools/Json.js: 140
        } // ../Include/Tools/Json.js: 141
        try { return _s(o, [], ''); } catch (ex) { if (ex !== innerException) throw ex; }; // ../Include/Tools/Json.js: 142
    }; // ../Include/Tools/Json.js: 143
    Json.DecodeObject = function(s) { // ../Include/Tools/Json.js: 144
        try { // ../Include/Tools/Json.js: 145
            if ((s != null) && !xt.test(s.replace(xn, '""'))) // ../Include/Tools/Json.js: 146
                return eval('(' + s + ')'); // ../Include/Tools/Json.js: 147
        } // ../Include/Tools/Json.js: 148
        catch (ex) { } // ../Include/Tools/Json.js: 149
    }; // ../Include/Tools/Json.js: 150
} // ../Include/Tools/Json.js: 151

function _Json_CheckImplementation() { // ../Include/Tools/Json.js: 153
    if ((typeof (window['JSON']) != 'undefined') && (typeof (JSON.stringify && JSON.parse) != 'undefined')) { // ../Include/Tools/Json.js: 154
        try { // ../Include/Tools/Json.js: 155
            var xo = { a: "", b: 0.1, c: null, d: true, e: false, f: new Array([new Object(), { g: function() { return 1; }, h: 1 }, new Function("return 0;"), function() { return 1; }, 1]) }; // ../Include/Tools/Json.js: 156
            var xs = '{"a":"","b":0.1,"c":null,"d":true,"e":false,"f":[[{},{"h":1},null,null,1]]}'; // ../Include/Tools/Json.js: 157
            var sxo = JSON.stringify(xo); // ../Include/Tools/Json.js: 158
            if ((sxo == xs) && (sxo == JSON.stringify(JSON.parse(xs))) && (/2345-12-23T12:34:56(?:\.789[0]*)?Z/.test(JSON.stringify(new Date(Date.UTC(2345, 11, 23, 12, 34, 56, 789)))))) { // ../Include/Tools/Json.js: 159
                return; // ../Include/Tools/Json.js: 160
            } // ../Include/Tools/Json.js: 161
        } // ../Include/Tools/Json.js: 162
        catch (ex) { } // ../Include/Tools/Json.js: 163
    } // ../Include/Tools/Json.js: 164
    _Json_Emulate(); // ../Include/Tools/Json.js: 165
} // ../Include/Tools/Json.js: 166

_Json_CheckImplementation(); // ../Include/Tools/Json.js: 168

//* <FileEnd path="../Include/Tools/Json.js"/>


var _Trace = { // ../Include/Tools/Trace.js: 6
    _Filters: [], // ../Include/Tools/Trace.js: 7
    _Enabled: null, // ../Include/Tools/Trace.js: 8
    _SourceLines: [], // ../Include/Tools/Trace.js: 9
    _SourceOffset: 0, // ../Include/Tools/Trace.js: 10
    _LastEnabled: true, // ../Include/Tools/Trace.js: 11
    _Output: 'console', // ../Include/Tools/Trace.js: 12
    _TestGroup: function (group) { // ../Include/Tools/Trace.js: 13
        var filters = _Trace._Filters; // ../Include/Tools/Trace.js: 14
        var result = !filters.length; // ../Include/Tools/Trace.js: 15
        for (var i = 0, n = filters.length; i < n; ++i) { // ../Include/Tools/Trace.js: 16
            if (filters[i][0].test(group)) // ../Include/Tools/Trace.js: 17
                result = filters[i][1]; // ../Include/Tools/Trace.js: 18
        } // ../Include/Tools/Trace.js: 19
        return result; // ../Include/Tools/Trace.js: 20
    }, // ../Include/Tools/Trace.js: 21
    _CreateRegExp: function (filter) { // ../Include/Tools/Trace.js: 22
        if (filter == null) // ../Include/Tools/Trace.js: 23
            return new RegExp('.?'); // ../Include/Tools/Trace.js: 24
        if (!/^[\w\-\.\*,]*$/.test(filter)) // ../Include/Tools/Trace.js: 25
            throw new ArgumentError('Trace: Invalid filter "' + filter + '". Valid characters: [A-Za-z0-9_\-\.,].'); // ../Include/Tools/Trace.js: 26
        return new RegExp('^(?:.*,)?(?:' + filter.replace(/\./g, '\\.').replace(/\*/g, '.*').replace(/,/g, '|') + ')(?:\\.[^,]*)?(,?:.*)?$'); // ../Include/Tools/Trace.js: 27
    }, // ../Include/Tools/Trace.js: 28
    _CreateMessage: function (group, message) { // ../Include/Tools/Trace.js: 29
        return ('[' + (group || '*') + ']' + ((message == void 0) ? '' : ': ' + message)); // ../Include/Tools/Trace.js: 30
    }, // ../Include/Tools/Trace.js: 31
    _GetConsole: function () { // ../Include/Tools/Trace.js: 32
        var console = window['console'] || null; // ../Include/Tools/Trace.js: 33
        if (console) { // ../Include/Tools/Trace.js: 34
            if (typeof window['content'] != 'object') { // ../Include/Tools/Trace.js: 35
                return console; // ../Include/Tools/Trace.js: 36
            } // ../Include/Tools/Trace.js: 37
        } // ../Include/Tools/Trace.js: 38
//x         //: <if xconfig="SmartHelp"/>
//x         //: <if xconfig="Browser.FF*"/>
//x         try {
//x             if (typeof window['content'] == 'object' &&
//x             typeof window['content']['wrappedJSObject'] == 'object')
//x                 console = window['content']['wrappedJSObject']['console'] || null;
//x         }
//x         catch (xe) { }
//x         //: <end/>
//x         //: <end/>
        return console; // ../Include/Tools/Trace.js: 49
    }, // ../Include/Tools/Trace.js: 50
    Output: function (output) { // ../Include/Tools/Trace.js: 51
        _Trace._Output = output; // ../Include/Tools/Trace.js: 52
    }, // ../Include/Tools/Trace.js: 53
    Log: function (group, message) { // ../Include/Tools/Trace.js: 54
        var enabled = _Trace.TestGroup(group); // ../Include/Tools/Trace.js: 55
        if (enabled || _Trace._LastEnabled) { // ../Include/Tools/Trace.js: 56
            _Trace._LastEnabled = enabled; // ../Include/Tools/Trace.js: 57
            if (_Trace._Output == 'console') { // ../Include/Tools/Trace.js: 58
                var console = _Trace._GetConsole(); // ../Include/Tools/Trace.js: 59
                if (console && console['log']) // ../Include/Tools/Trace.js: 60
                    console['log'](enabled ? _Trace._CreateMessage(group, message) : '... NoTrace ...'); // ../Include/Tools/Trace.js: 61
            } // ../Include/Tools/Trace.js: 62
            else if (_Trace._Output == 'viewer') { // ../Include/Tools/Trace.js: 63
                var _group = 'HTML'; // ../Include/Tools/Trace.js: 64
                var _message = (group || '*') + ' : ' + ((message == void 0) ? '' : message); // ../Include/Tools/Trace.js: 65
                if (IsIE()) { // ../Include/Tools/Trace.js: 66
                    try { // ../Include/Tools/Trace.js: 67
                        var viewer = new ActiveXObject('ODTraceCom.ODTrace'); // ../Include/Tools/Trace.js: 68
                        if (viewer) { // ../Include/Tools/Trace.js: 69
                            viewer.Write(_group, _message); // ../Include/Tools/Trace.js: 70
                        } // ../Include/Tools/Trace.js: 71
                    } // ../Include/Tools/Trace.js: 72
                    catch (e) { } // ../Include/Tools/Trace.js: 73

                } // ../Include/Tools/Trace.js: 75
                if (IsFF()) { // ../Include/Tools/Trace.js: 76
                    try { // ../Include/Tools/Trace.js: 77
                        if ('createEvent' in document) { // ../Include/Tools/Trace.js: 78
                            var element = document.getElementById('ODTraceMessageId'); // ../Include/Tools/Trace.js: 79
                            if (!element) { // ../Include/Tools/Trace.js: 80
                                element = document.createElement('ODTraceMessage'); // ../Include/Tools/Trace.js: 81
                                element.setAttribute('id', 'ODTraceMessageId'); // ../Include/Tools/Trace.js: 82
                                if (document.documentElement != null) // ../Include/Tools/Trace.js: 83
                                    document.documentElement.appendChild(element); // ../Include/Tools/Trace.js: 84
                            } // ../Include/Tools/Trace.js: 85

                            element.setAttribute('msg', _message); // ../Include/Tools/Trace.js: 87
                            element.setAttribute('ids', _group); // ../Include/Tools/Trace.js: 88
                            var ev = document.createEvent('Events'); // ../Include/Tools/Trace.js: 89
                            ev.initEvent('ODTraceEvent', true, false); // ../Include/Tools/Trace.js: 90
                            element.dispatchEvent(ev); // ../Include/Tools/Trace.js: 91
                        } // ../Include/Tools/Trace.js: 92
                    } // ../Include/Tools/Trace.js: 93
                    catch (e) { } // ../Include/Tools/Trace.js: 94
                } // ../Include/Tools/Trace.js: 95
            } // ../Include/Tools/Trace.js: 96
        } // ../Include/Tools/Trace.js: 97
    }, // ../Include/Tools/Trace.js: 98
    Error: function (group, message) { // ../Include/Tools/Trace.js: 99
        _Trace.Log(group, message); // ../Include/Tools/Trace.js: 100
        var console = _Trace._GetConsole(); // ../Include/Tools/Trace.js: 101
        if (console && console['error']) // ../Include/Tools/Trace.js: 102
            console['error'](_Trace._CreateMessage(group, message)); // ../Include/Tools/Trace.js: 103
    }, // ../Include/Tools/Trace.js: 104
    Warning: function (group, message) { // ../Include/Tools/Trace.js: 105
        _Trace.Log(group, message); // ../Include/Tools/Trace.js: 106
        var console = _Trace._GetConsole(); // ../Include/Tools/Trace.js: 107
        if (console && console['warn']) // ../Include/Tools/Trace.js: 108
            console['warn'](_Trace._CreateMessage(group, message)); // ../Include/Tools/Trace.js: 109
    }, // ../Include/Tools/Trace.js: 110
    AddFilter: function (filter, type) { // ../Include/Tools/Trace.js: 111
        _Trace._Filters.push([_Trace._CreateRegExp(filter || null), type]); // ../Include/Tools/Trace.js: 112
        _Trace._Enabled = null; // ../Include/Tools/Trace.js: 113
    }, // ../Include/Tools/Trace.js: 114
    ResetFilters: function () { // ../Include/Tools/Trace.js: 115
        _Trace._Filters = []; // ../Include/Tools/Trace.js: 116
        _Trace._Enabled = null; // ../Include/Tools/Trace.js: 117
    }, // ../Include/Tools/Trace.js: 118
    TestGroup: function (group) { // ../Include/Tools/Trace.js: 119
        if (group == null) // ../Include/Tools/Trace.js: 120
            group = ''; // ../Include/Tools/Trace.js: 121
        if (_Trace._Enabled == null) // ../Include/Tools/Trace.js: 122
            _Trace._Enabled = {}; // ../Include/Tools/Trace.js: 123
        var isEnabled; // ../Include/Tools/Trace.js: 124
        if ((isEnabled = _Trace._Enabled[group]) != void 0) // ../Include/Tools/Trace.js: 125
            return isEnabled; // ../Include/Tools/Trace.js: 126
        _Trace._Enabled[group] = isEnabled = _Trace._TestGroup(group); // ../Include/Tools/Trace.js: 127
        return isEnabled; // ../Include/Tools/Trace.js: 128
    }, // ../Include/Tools/Trace.js: 129
    _CaptureFileSource: function (fileName) { // ../Include/Tools/Trace.js: 130
        if (!/.js$/i.test(fileName)) // ../Include/Tools/Trace.js: 131
            return false; // ../Include/Tools/Trace.js: 132
        if (typeof (AjaxRequest) != 'undefined') { // ../Include/Tools/Trace.js: 133
            setTimeout( // ../Include/Tools/Trace.js: 134
                function () { // ../Include/Tools/Trace.js: 135
                    new AjaxRequest(fileName, { // ../Include/Tools/Trace.js: 136
                        'asynchronous': true, // ../Include/Tools/Trace.js: 137
                        'OnDone': function (arq) { // ../Include/Tools/Trace.js: 138
                            try { // ../Include/Tools/Trace.js: 139
                                var text = arq.request.responseText || ''; // ../Include/Tools/Trace.js: 140
                                _Trace._SourceOffset = -1; // ../Include/Tools/Trace.js: 141
                                _Trace._SourceLines = text.split('\n'); // ../Include/Tools/Trace.js: 142
                            } // ../Include/Tools/Trace.js: 143
                            catch (xe) { // ../Include/Tools/Trace.js: 144
                            } // ../Include/Tools/Trace.js: 145
                        } // ../Include/Tools/Trace.js: 146
                    }); // ../Include/Tools/Trace.js: 147
                }, // ../Include/Tools/Trace.js: 148
                10 // ../Include/Tools/Trace.js: 149
            ); // ../Include/Tools/Trace.js: 150
        } // ../Include/Tools/Trace.js: 151
        return true; // ../Include/Tools/Trace.js: 152
    }, // ../Include/Tools/Trace.js: 153
    _CaptureEvalSource: function (entryPoint) { // ../Include/Tools/Trace.js: 154
        if (/^OnDemand_IPXFF_JScriptManager_Eval\("window\.OraUpk=\{\}/.test(entryPoint)) // ../Include/Tools/Trace.js: 155
            _Trace._SourceOffset = 16; // ../Include/Tools/Trace.js: 156
        else if (/^\("window\.OraUpk=\{\}/.test(entryPoint)) // ../Include/Tools/Trace.js: 157
            _Trace._SourceOffset = 13; // ../Include/Tools/Trace.js: 158
        else if (/^_firebugInjectedEvaluate\("with\(_FirebugCommandLine\)/.test(entryPoint)) // ../Include/Tools/Trace.js: 159
            _Trace._SourceOffset = -71; // ../Include/Tools/Trace.js: 160
        else return false; // ../Include/Tools/Trace.js: 161
        ++_Trace._SourceOffset; // ../Include/Tools/Trace.js: 162
        _Trace._SourceLines = entryPoint.split('\\n'); // ../Include/Tools/Trace.js: 163
        return true; // ../Include/Tools/Trace.js: 164
    }, // ../Include/Tools/Trace.js: 165
    Initialize: function () { // ../Include/Tools/Trace.js: 166
//x         //: <if xconfig="Browser.All,Browser.FF*"/>
//x         //: <if-not xconfig="Browser.FF*"/>
        if (Browser.IsFF()) { // ../Include/Tools/Trace.js: 169
//x             //: <end/>
            var xe = new Error(); // ../Include/Tools/Trace.js: 171
//x             //: <if xconfig="Ignore"/>
//x             (function (xe) {
//x                 _Trace.Log('Trace.Initialize', 'fileName: ' + xe.fileName + ', lineNumber: ' + xe.lineNumber);
//x                 var lines = xe.stack.split('\n');
//x                 for (var i = 0; i < lines.length; ++i) {
//x                     _Trace.Log('Trace.Initialize', 'stack[' + i + ']: ' + xe.stack);
//x                 }
//x             })(xe);
//x             //: <end/>
            if (!(xe.fileName && _Trace._CaptureFileSource(xe.fileName)) && xe.stack) { // ../Include/Tools/Trace.js: 181
                var stackFrames = xe.stack.split('\n'); // ../Include/Tools/Trace.js: 182
                if (stackFrames.length >= 2) { // ../Include/Tools/Trace.js: 183
                    // var console = _Trace._GetConsole();
                    // var firebugVer = (console && console['firebug']) || null;
                    // firebugVer == "1.6.2"
                    _Trace._CaptureEvalSource(stackFrames.pop()) || _Trace._CaptureEvalSource(stackFrames.pop()); // ../Include/Tools/Trace.js: 187
                } // ../Include/Tools/Trace.js: 188
            } // ../Include/Tools/Trace.js: 189
//x             //: <if-not xconfig="Browser.FF*"/>
        } // ../Include/Tools/Trace.js: 191
//x         //: <end/>
//x         //: <end/>
    } // ../Include/Tools/Trace.js: 194
}; // ../Include/Tools/Trace.js: 195

function Trace(group, message) { // ../Include/Tools/Trace.js: 197
    _Trace.Log(group, message); // ../Include/Tools/Trace.js: 198
} // ../Include/Tools/Trace.js: 199

Trace.Allow = function(filter) { // ../Include/Tools/Trace.js: 201
    _Trace.AddFilter(filter, true); // ../Include/Tools/Trace.js: 202
} // ../Include/Tools/Trace.js: 203

Trace.Deny = function(filter) { // ../Include/Tools/Trace.js: 205
    _Trace.AddFilter(filter, false); // ../Include/Tools/Trace.js: 206
} // ../Include/Tools/Trace.js: 207

Trace.Output = function(output) { // ../Include/Tools/Trace.js: 209
    _Trace.Output(output); // ../Include/Tools/Trace.js: 210
} // ../Include/Tools/Trace.js: 211

Trace.Reset = function() { // ../Include/Tools/Trace.js: 213
    _Trace.ResetFilters(); // ../Include/Tools/Trace.js: 214
} // ../Include/Tools/Trace.js: 215

Trace.Object = function(group, value, name) { // ../Include/Tools/Trace.js: 217
    _Trace.Log(group, (name ? (name + ' = ') : '') + Json.EncodeObject(value)); // ../Include/Tools/Trace.js: 218
} // ../Include/Tools/Trace.js: 219

Trace.Warning = function(group, message) { // ../Include/Tools/Trace.js: 221
    _Trace.Warning(group, message); // ../Include/Tools/Trace.js: 222
} // ../Include/Tools/Trace.js: 223

Trace.Error = function(group, message) { // ../Include/Tools/Trace.js: 225
    _Trace.Error(group, message); // ../Include/Tools/Trace.js: 226
} // ../Include/Tools/Trace.js: 227

Trace.Exception = function(group, xe, droppedFrames) { // ../Include/Tools/Trace.js: 229
    var message = 'Exception: ' + ((xe && xe.message) || 'UNKNOWN'); // ../Include/Tools/Trace.js: 230
//x     //: <if xconfig="Browser.All,Browser.FF*"/>
    if (xe.stack) { // ../Include/Tools/Trace.js: 232
        try { // ../Include/Tools/Trace.js: 233
            var stackFrames = xe.stack.split('\n'); // ../Include/Tools/Trace.js: 234
            while (stackFrames.length) { // ../Include/Tools/Trace.js: 235
                var entryPoint = stackFrames.pop(); // ../Include/Tools/Trace.js: 236
                if (!/^_firebugInjectedEvaluate/.test(entryPoint)) { // ../Include/Tools/Trace.js: 237
                    stackFrames.push(entryPoint); // ../Include/Tools/Trace.js: 238
                    break; // ../Include/Tools/Trace.js: 239
                } // ../Include/Tools/Trace.js: 240
            } // ../Include/Tools/Trace.js: 241
            droppedFrames = (droppedFrames || 0); // ../Include/Tools/Trace.js: 242
            for (var i = droppedFrames, n = stackFrames.length; i < n; ++i) { // ../Include/Tools/Trace.js: 243
                var stackFrame = stackFrames[i] || '(unknown)'; // ../Include/Tools/Trace.js: 244
                var locationPos = stackFrame.lastIndexOf('@'); // ../Include/Tools/Trace.js: 245
                var call = (locationPos == -1) ? stackFrame : stackFrame.substr(0, locationPos); // ../Include/Tools/Trace.js: 246
                var callLocation = stackFrame.substr(locationPos + 1); // ../Include/Tools/Trace.js: 247
                if (locationPos != -1) { // ../Include/Tools/Trace.js: 248
                    var linePos = callLocation.lastIndexOf(':'); // ../Include/Tools/Trace.js: 249
                    if (linePos != -1) { // ../Include/Tools/Trace.js: 250
                        var line = Number(callLocation.substr(linePos + 1)) + _Trace._SourceOffset; // ../Include/Tools/Trace.js: 251
                        if (line >= 0 && line < _Trace._SourceLines.length) { // ../Include/Tools/Trace.js: 252
                            var sourceLine = _Trace._SourceLines[line]; // ../Include/Tools/Trace.js: 253
                            var commentPos = sourceLine.lastIndexOf('//'); // ../Include/Tools/Trace.js: 254
                            callLocation = (commentPos == -1) ? sourceLine : sourceLine.substr(commentPos); // ../Include/Tools/Trace.js: 255
                            if (/\\r$/.test(callLocation)) // ../Include/Tools/Trace.js: 256
                                callLocation = callLocation.substr(0, callLocation.length - 2); // ../Include/Tools/Trace.js: 257
                        } // ../Include/Tools/Trace.js: 258
                    } // ../Include/Tools/Trace.js: 259
                } // ../Include/Tools/Trace.js: 260
                message += '\n  ' + call + ': ' + callLocation; // ../Include/Tools/Trace.js: 261
            } // ../Include/Tools/Trace.js: 262
        } // ../Include/Tools/Trace.js: 263
        catch (xe2) { // ../Include/Tools/Trace.js: 264
            FailAlert(xe2.message); // ../Include/Tools/Trace.js: 265
        } // ../Include/Tools/Trace.js: 266
    } // ../Include/Tools/Trace.js: 267
//x     //: <end/>
    _Trace.Error(group, message); // ../Include/Tools/Trace.js: 269
} // ../Include/Tools/Trace.js: 270

TraceIf = function(condition, group, message) { // ../Include/Tools/Trace.js: 272
    if (condition) // ../Include/Tools/Trace.js: 273
        _Trace.Log(group, message); // ../Include/Tools/Trace.js: 274
} // ../Include/Tools/Trace.js: 275

TraceIf.Object = function(condition, group, value, name) { // ../Include/Tools/Trace.js: 277
    if (condition) // ../Include/Tools/Trace.js: 278
        _Trace.Log(group, (name ? (name + ' = ') : '') + Json.EncodeObject(value)); // ../Include/Tools/Trace.js: 279
} // ../Include/Tools/Trace.js: 280

TraceIf.Warning = function(condition, group, message) { // ../Include/Tools/Trace.js: 282
    if (condition) // ../Include/Tools/Trace.js: 283
        _Trace.Warning(group, message); // ../Include/Tools/Trace.js: 284
} // ../Include/Tools/Trace.js: 285

//x /// <reference path="../NoTrace.js"/>

//* <FileBegin path="../Include/NoTrace.js"/>
//x /// <reference path="Tools/Trace.js" xconfig="Ignore"/>

//Trace.Deny();
//Trace.Allow('Recognition');

Trace.Allow(); // ../Include/NoTrace.js: 6
Trace.Deny('SmartMatchApplication'); // ../Include/NoTrace.js: 7
//Trace.Deny('Recognition.GetPlaybackContext.*');
//Trace.Output('viewer');

//* <FileEnd path="../Include/NoTrace.js"/>


_Trace.Initialize(); // ../Include/Tools/Trace.js: 289

//x //: <end/>

//* <FileEnd path="../Include/Tools/Trace.js"/>


//x //: <if xconfig="Debug"/>
//x var FailMessages = {};
//x var FailAlert = function(message) {
//x     if (FailMessages[message] || (FailMessages[message] == void 0)) {
//x         FailMessages[message] = confirm(message + '\n\nCall stack:\n' + GetCallStack(2).join('\n') + '\n\nIgnore similar messages?');
//x     }
//x };
//x //: <end/>

// It is declared as a var to enable to be hooked
var Fail = function(source, message1, message2, droppedFrames) { // ../Include/Tools/Fail.js: 14
    var body = 'Failed: ' + message1 + ((message2 != null) ? ', ' + message2 : ''); // ../Include/Tools/Fail.js: 15
    var message = source + ' ' + body; // ../Include/Tools/Fail.js: 16
    Trace.Exception(source, new Error(body), (droppedFrames || 0) + 1); // ../Include/Tools/Fail.js: 17
//x     //: <if xconfig="Debug"/>
//x     FailAlert(message);
//x     //: <end/>
    throw new ApplicationError(message); // ../Include/Tools/Fail.js: 21
}; // ../Include/Tools/Fail.js: 22

Fail.NotImplemented = function(source) { // ../Include/Tools/Fail.js: 24
    Fail(source, 'Not implemented.', null, 2); // ../Include/Tools/Fail.js: 25
}; // ../Include/Tools/Fail.js: 26

Fail.Exception = function(source, xe) { // ../Include/Tools/Fail.js: 28
    Trace.Exception(source, xe, 0); // ../Include/Tools/Fail.js: 29
    Fail(source, 'Exception: ' + xe.message, null, 2); // ../Include/Tools/Fail.js: 30
}; // ../Include/Tools/Fail.js: 31

//* <FileEnd path="../Include/Tools/Fail.js"/>

//x //: <if xconfig="Debug,Trace"/>
//x /// <reference path="Assert.js"/>
//x /// <reference path="Json.js"/>

//* <FileBegin path="../Include/Tools/Assert.js"/>
//x //: <if xconfig="Debug,Trace"/>
//x /// <reference path="Fail.js"/>
//x /// <reference path="Main.js"/>

function Assert(source, value, message) { // ../Include/Tools/Assert.js: 5
    if (!value) // ../Include/Tools/Assert.js: 6
        Fail('Assert.Message', source, message, 2); // ../Include/Tools/Assert.js: 7
} // ../Include/Tools/Assert.js: 8
    
Assert.Condition = function(source, value, name) { // ../Include/Tools/Assert.js: 10
    if (!value) // ../Include/Tools/Assert.js: 11
        Fail('Assert.Condition', source, NameOf(name) + ' does not hold', 2); // ../Include/Tools/Assert.js: 12
}; // ../Include/Tools/Assert.js: 13

Assert.True = function(source, value, name) { // ../Include/Tools/Assert.js: 15
    if (value !== true) // ../Include/Tools/Assert.js: 16
        Fail('Assert.True', source, NameOf(name) + ' is not true', 2); // ../Include/Tools/Assert.js: 17
}; // ../Include/Tools/Assert.js: 18

Assert.False = function(source, value, name) { // ../Include/Tools/Assert.js: 20
    if (value !== false) // ../Include/Tools/Assert.js: 21
        Fail('Assert.False', source, NameOf(name) + ' is not false', 2); // ../Include/Tools/Assert.js: 22
}; // ../Include/Tools/Assert.js: 23

Assert.Null = function(source, value, name) { // ../Include/Tools/Assert.js: 25
    if (value != null) // ../Include/Tools/Assert.js: 26
        Fail('Assert.Null', source, NameOf(name) + ' is not null', 2); // ../Include/Tools/Assert.js: 27
}; // ../Include/Tools/Assert.js: 28

Assert.NonNull = function(source, value, name) { // ../Include/Tools/Assert.js: 30
    if (value == null) // ../Include/Tools/Assert.js: 31
        Fail('Assert.NonNull', source, NameOf(name) + ' is null', 2); // ../Include/Tools/Assert.js: 32
}; // ../Include/Tools/Assert.js: 33

Assert.Defined = function(source, value, name) { // ../Include/Tools/Assert.js: 35
    if (value == void 0) // ../Include/Tools/Assert.js: 36
        Fail('Assert.Defined', source, NameOf(name) + ' is undefined', 2); // ../Include/Tools/Assert.js: 37
}; // ../Include/Tools/Assert.js: 38

Assert.Undefined = function(source, value, name) { // ../Include/Tools/Assert.js: 40
    if (value != void 0) // ../Include/Tools/Assert.js: 41
        Fail('Assert.Undefined', source, NameOf(name) + ' is defined', 2); // ../Include/Tools/Assert.js: 42
}; // ../Include/Tools/Assert.js: 43

Assert.Equals = function(source, value1, value2, name1, name2) { // ../Include/Tools/Assert.js: 45
    if (value1 != value2) // ../Include/Tools/Assert.js: 46
        Fail('Assert.Equals', source, NameOf(name1) + ' and ' + NameOf(name2) + ' are not equal', 2); // ../Include/Tools/Assert.js: 47
}; // ../Include/Tools/Assert.js: 48

Assert.Range = function(source, value, minValue, maxValue, name) { // ../Include/Tools/Assert.js: 50
    if (value < minValue || value > maxValue) // ../Include/Tools/Assert.js: 51
        Fail('Assert.Range', source, NameOf(name) + ' must be in range ' + minValue + ',  ' + maxValue, 2); // ../Include/Tools/Assert.js: 52
}; // ../Include/Tools/Assert.js: 53

Assert.ArrayIndex = function(source, index, arrayObj, indexName, arrayObjName) { // ../Include/Tools/Assert.js: 55
    if (arrayObj == null) // ../Include/Tools/Assert.js: 56
        Fail('Assert.ArrayIndex', source, NameOf(arrayObjName) + ' is null', 2); // ../Include/Tools/Assert.js: 57
    if (index < 0 || index >= arrayObj.length) // ../Include/Tools/Assert.js: 58
        Fail('Assert.ArrayIndex', source, NameOf(indexName) + ' invalid array index ' + index + ' in ' + NameOf(arrayObjName) + ', length = ' + arrayObj.length, 2); // ../Include/Tools/Assert.js: 59
}; // ../Include/Tools/Assert.js: 60

Assert.Length = function(source, value, length, name) { // ../Include/Tools/Assert.js: 62
    if (value == null) // ../Include/Tools/Assert.js: 63
        Fail('Assert.Length', source, NameOf(name) + ' is null', 2); // ../Include/Tools/Assert.js: 64
    if (value.length != length) // ../Include/Tools/Assert.js: 65
        Fail('Assert.Length', source, NameOf(name) + ' must have ' + length + ' elements', 2); // ../Include/Tools/Assert.js: 66
}; // ../Include/Tools/Assert.js: 67

Assert.MinLength = function(source, value, minLength, name) { // ../Include/Tools/Assert.js: 69
    if (value == null) // ../Include/Tools/Assert.js: 70
        Fail('Assert.MinLength', source, NameOf(name) + ' is null', 2); // ../Include/Tools/Assert.js: 71
    if (value.length < minLength) // ../Include/Tools/Assert.js: 72
        Fail('Assert.MinLength', source, NameOf(name) + ' must have at least ' + minLength + ' elements', 2); // ../Include/Tools/Assert.js: 73
}; // ../Include/Tools/Assert.js: 74

Assert.EqualLength = function(source, value1, value2, name1, name2) { // ../Include/Tools/Assert.js: 76
    if (value1 == null) // ../Include/Tools/Assert.js: 77
        Fail('Assert.EqualLength', source, NameOf(name1) + ' is null', 2); // ../Include/Tools/Assert.js: 78
    if (value2 == null) // ../Include/Tools/Assert.js: 79
        Fail('Assert.EqualLength', source, NameOf(name2) + ' is null', 2); // ../Include/Tools/Assert.js: 80
    if (value1.length != value2.length) // ../Include/Tools/Assert.js: 81
        Fail('Assert.EqualLength', source, NameOf(name1) + ' and ' + NameOf(name2) + ' length is not equal', 2); // ../Include/Tools/Assert.js: 82
}; // ../Include/Tools/Assert.js: 83

Assert.Identical = function(source, value1, value2, name1, name2) { // ../Include/Tools/Assert.js: 85
    if (value1 !== value2) // ../Include/Tools/Assert.js: 86
        Fail('Assert.Identical', source, NameOf(name1) + ' and ' + NameOf(name2) + ' are not identical', 2); // ../Include/Tools/Assert.js: 87
}; // ../Include/Tools/Assert.js: 88

Assert.String = function(source, value, name) { // ../Include/Tools/Assert.js: 90
    if (value == null) // ../Include/Tools/Assert.js: 91
        Fail('Assert.String', source, NameOf(name) + ' is null', 2); // ../Include/Tools/Assert.js: 92
    if (!IsString(value)) // ../Include/Tools/Assert.js: 93
        Fail('Assert.String', source, NameOf(name) + ' is not a String', 2); // ../Include/Tools/Assert.js: 94
}; // ../Include/Tools/Assert.js: 95

Assert.Number = function(source, value, name) { // ../Include/Tools/Assert.js: 97
    if (value == null) // ../Include/Tools/Assert.js: 98
        Fail('Assert.Number', source, NameOf(name) + ' is null', 2); // ../Include/Tools/Assert.js: 99
    if (!IsNumber(value)) // ../Include/Tools/Assert.js: 100
        Fail('Assert.Number', source, NameOf(name) + ' is not a Number', 2); // ../Include/Tools/Assert.js: 101
}; // ../Include/Tools/Assert.js: 102

Assert.Array = function(source, value, name) { // ../Include/Tools/Assert.js: 104
    if (value == null) // ../Include/Tools/Assert.js: 105
        Fail('Assert.Array', source, NameOf(name) + ' is null', 2); // ../Include/Tools/Assert.js: 106
    if (!IsArray(value)) // ../Include/Tools/Assert.js: 107
        Fail('Assert.Array', source, NameOf(name) + ' is not an Array', 2); // ../Include/Tools/Assert.js: 108
}; // ../Include/Tools/Assert.js: 109

Assert.Hash = function(source, value, name) { // ../Include/Tools/Assert.js: 111
    if (value == null) // ../Include/Tools/Assert.js: 112
        Fail('Assert.Hash', source, NameOf(name) + ' is null', 2); // ../Include/Tools/Assert.js: 113
    if (!IsHash(value)) // ../Include/Tools/Assert.js: 114
        Fail('Assert.Hash', source, NameOf(name) + ' is not a hash Object', 2); // ../Include/Tools/Assert.js: 115
}; // ../Include/Tools/Assert.js: 116

Assert.InstanceOf = function(source, value, type, name, tname) { // ../Include/Tools/Assert.js: 118
    if (!(value instanceof type)) // ../Include/Tools/Assert.js: 119
        Fail('Assert.InstanceOf', source, NameOf(name) + ' is not instance of ' + NameOf(tname), 2); // ../Include/Tools/Assert.js: 120
}; // ../Include/Tools/Assert.js: 121

Assert.NullOrNumber = function(source, value, name) { // ../Include/Tools/Assert.js: 123
    if (!IsNullOrNumber(value)) // ../Include/Tools/Assert.js: 124
        Fail('Assert.NullOrNumber', source, NameOf(name) + ' is not a Number', 2); // ../Include/Tools/Assert.js: 125
}; // ../Include/Tools/Assert.js: 126

Assert.NullOrString = function(source, value, name) { // ../Include/Tools/Assert.js: 128
    if (!IsNullOrString(value)) // ../Include/Tools/Assert.js: 129
        Fail('Assert.NullOrString', source, NameOf(name) + ' is not a String', 2); // ../Include/Tools/Assert.js: 130
}; // ../Include/Tools/Assert.js: 131

Assert.NullOrArray = function(source, value, name) { // ../Include/Tools/Assert.js: 133
    if (!IsNullOrArray(value)) // ../Include/Tools/Assert.js: 134
        Fail('Assert.NullOrArray', source, NameOf(name) + ' is not an Array', 2); // ../Include/Tools/Assert.js: 135
}; // ../Include/Tools/Assert.js: 136

Assert.NullOrInstanceOf = function(source, value, type, name, tname) { // ../Include/Tools/Assert.js: 138
    if (!IsNullOrInstanceOf(value, type)) // ../Include/Tools/Assert.js: 139
        Fail('Assert.InstanceOf', source, NameOf(name) + ' is not instance of ' + NameOf(tname), 2); // ../Include/Tools/Assert.js: 140
}; // ../Include/Tools/Assert.js: 141

Assert.InRange = function(source, value, min, max, name) { // ../Include/Tools/Assert.js: 143
    if (!InRange(value, min, max)) // ../Include/Tools/Assert.js: 144
        Fail('Assert.InRange', source, NameOf(name) + ' is not in range [' + min + ', ' + max + ']', 2); // ../Include/Tools/Assert.js: 145
}; // ../Include/Tools/Assert.js: 146

Assert.Match = function(source, value, name, regexp, regexpName) { // ../Include/Tools/Assert.js: 148
    if (!IsString(value)) // ../Include/Tools/Assert.js: 149
        Fail('Assert.Match', source, NameOf(name) + ' is not a String', 2); // ../Include/Tools/Assert.js: 150
    if (regexp == null) // ../Include/Tools/Assert.js: 151
        Fail('Assert.Match', source, NameOf(regexpName) + ' is null', 2); // ../Include/Tools/Assert.js: 152
    if (!value.match(regexp)) // ../Include/Tools/Assert.js: 153
        Fail('Assert.Match', source, NameOf(name) + ' must match ' + NameOf(regexpName), 2); // ../Include/Tools/Assert.js: 154
}; // ../Include/Tools/Assert.js: 155

Assert.MustOverride = function(source) { // ../Include/Tools/Assert.js: 157
    Fail('Assert.MustOverride', source, NameOf(source) + ' must be overriden', 2); // ../Include/Tools/Assert.js: 158
}; // ../Include/Tools/Assert.js: 159

//x //: <end/>

//* <FileEnd path="../Include/Tools/Assert.js"/>


function DumpValue(value) { // ../Include/Tools/Sanity.js: 6
    var type = TypeOf(value); // ../Include/Tools/Sanity.js: 7
    var str = type; // ../Include/Tools/Sanity.js: 8
    if (value != (void 0) && type != '[function]' && type != '[object Function]') { // ../Include/Tools/Sanity.js: 9
        var encoded; // ../Include/Tools/Sanity.js: 10
        try { encoded = Json.EncodeObject(value); } catch (xe) { } // ../Include/Tools/Sanity.js: 11
        str += ':' + ((encoded == void 0) ? '(complex object)' : encoded); // ../Include/Tools/Sanity.js: 12
    } // ../Include/Tools/Sanity.js: 13
    return str; // ../Include/Tools/Sanity.js: 14
} // ../Include/Tools/Sanity.js: 15

function Dump(obj) { // ../Include/Tools/Sanity.js: 17
    if (obj == null) // ../Include/Tools/Sanity.js: 18
        return '(null)'; // ../Include/Tools/Sanity.js: 19
    var list = []; // ../Include/Tools/Sanity.js: 20
    for (var member in obj) // ../Include/Tools/Sanity.js: 21
        list.push(member + '=' + DumpValue(obj[member])); // ../Include/Tools/Sanity.js: 22
    return list.join(', '); // ../Include/Tools/Sanity.js: 23
} // ../Include/Tools/Sanity.js: 24

function Called(params) { // ../Include/Tools/Sanity.js: 26
    var str = 'Called'; // ../Include/Tools/Sanity.js: 27
    if (params != null) // ../Include/Tools/Sanity.js: 28
        str += ' with: ' + Dump(params); // ../Include/Tools/Sanity.js: 29
    return str; // ../Include/Tools/Sanity.js: 30
} // ../Include/Tools/Sanity.js: 31

function Returned(params) { // ../Include/Tools/Sanity.js: 33
    return ('Returned: ' + DumpValue(params)); // ../Include/Tools/Sanity.js: 34
} // ../Include/Tools/Sanity.js: 35

function ComplexObject(obj) { // ../Include/Tools/Sanity.js: 37
    return ((obj != null) ? (function() { }) : obj); // ../Include/Tools/Sanity.js: 38
} // ../Include/Tools/Sanity.js: 39


//x //: <end/>

//* <FileEnd path="../Include/Tools/Sanity.js"/>


//<!--Version 1-->

function _ExtendDeepObj(target, key, obj) { // ../Include/Tools/Base.js: 5
    if (targetObj === obj) // ../Include/Tools/Base.js: 6
        return; // ../Include/Tools/Base.js: 7
    var targetObj = target[key]; // ../Include/Tools/Base.js: 8
    if (!IsHash(targetObj)) // ../Include/Tools/Base.js: 9
        target[key] = targetObj = {}; // ../Include/Tools/Base.js: 10
    for (var objKey in obj) { // ../Include/Tools/Base.js: 11
        var value = obj[objKey]; // ../Include/Tools/Base.js: 12
        if (IsHash(value)) // ../Include/Tools/Base.js: 13
            _ExtendDeepObj(targetObj, objKey, value); // ../Include/Tools/Base.js: 14
        else targetObj[objKey] = value; // ../Include/Tools/Base.js: 15
    } // ../Include/Tools/Base.js: 16
} // ../Include/Tools/Base.js: 17

function _ExtendDeepList(target, objs) { // ../Include/Tools/Base.js: 19
    if (target == void 0 || !IsHash(target)) // ../Include/Tools/Base.js: 20
        target = {}; // ../Include/Tools/Base.js: 21
    for (var i = 0, n = objs.length, obj; i < n; ++i) { // ../Include/Tools/Base.js: 22
        if (IsHash(obj = objs[i]) && target !== obj) { // ../Include/Tools/Base.js: 23
            for (var key in obj) { // ../Include/Tools/Base.js: 24
                var value = obj[key]; // ../Include/Tools/Base.js: 25
                if (IsHash(value)) // ../Include/Tools/Base.js: 26
                    _ExtendDeepObj(target, key, value); // ../Include/Tools/Base.js: 27
                else target[key] = value; // ../Include/Tools/Base.js: 28
            } // ../Include/Tools/Base.js: 29
        } // ../Include/Tools/Base.js: 30
    } // ../Include/Tools/Base.js: 31
    return target; // ../Include/Tools/Base.js: 32
} // ../Include/Tools/Base.js: 33

function _ExtendFlatList(target, objs) { // ../Include/Tools/Base.js: 35
    if (target == void 0 || !IsHash(target)) // ../Include/Tools/Base.js: 36
        target = {}; // ../Include/Tools/Base.js: 37
    for (var i = 0, n = objs.length, obj; i < n; ++i) { // ../Include/Tools/Base.js: 38
        if (IsHash(obj = objs[i]) && target !== obj) { // ../Include/Tools/Base.js: 39
            for (var key in obj) // ../Include/Tools/Base.js: 40
                target[key] = obj[key]; // ../Include/Tools/Base.js: 41
        } // ../Include/Tools/Base.js: 42
    } // ../Include/Tools/Base.js: 43
    return target; // ../Include/Tools/Base.js: 44
} // ../Include/Tools/Base.js: 45

function Extend(deep) { // ../Include/Tools/Base.js: 47
    if (deep !== !!deep) // ../Include/Tools/Base.js: 48
        return _ExtendFlatList(arguments[0], [].slice.call(arguments, 1)); // ../Include/Tools/Base.js: 49
    if (deep) // ../Include/Tools/Base.js: 50
        return _ExtendDeepList(arguments[1], [].slice.call(arguments, 2)); // ../Include/Tools/Base.js: 51
    return _ExtendFlatList(arguments[1], [].slice.call(arguments, 2)); // ../Include/Tools/Base.js: 52
} // ../Include/Tools/Base.js: 53

function CloneObject(obj) { // ../Include/Tools/Base.js: 55
    return Extend(true, {}, obj); // ../Include/Tools/Base.js: 56
} // ../Include/Tools/Base.js: 57

function CloneHash(obj) { // ../Include/Tools/Base.js: 59
    var result = {}; // ../Include/Tools/Base.js: 60
    for (var m in obj) // ../Include/Tools/Base.js: 61
        result[m] = obj[m]; // ../Include/Tools/Base.js: 62
    return result; // ../Include/Tools/Base.js: 63
} // ../Include/Tools/Base.js: 64

function GetValue(obj, member, def) { // ../Include/Tools/Base.js: 66
    return ((typeof obj[member] == 'undefined') ? def : obj[member]); // ../Include/Tools/Base.js: 67
} // ../Include/Tools/Base.js: 68

function GetNonEmpty(value, def) { // ../Include/Tools/Base.js: 70
    return ((value && value.length) ? value : def); // ../Include/Tools/Base.js: 71
} // ../Include/Tools/Base.js: 72

function RandomInteger(min, max) { // ../Include/Tools/Base.js: 74
    return (min + Math.floor(Math.random() * (max - min + 1))); // ../Include/Tools/Base.js: 75
} // ../Include/Tools/Base.js: 76

function RandomIndex(length) { // ../Include/Tools/Base.js: 78
    return Math.floor(Math.random() * length); // ../Include/Tools/Base.js: 79
} // ../Include/Tools/Base.js: 80

function InRange(value, min, max) { // ../Include/Tools/Base.js: 82
    return (value >= min && value <= max); // ../Include/Tools/Base.js: 83
} // ../Include/Tools/Base.js: 84

function ExtendClass(base) { // ../Include/Tools/Base.js: 86
    var proto = {BaseClass: base}; // ../Include/Tools/Base.js: 87
    for (var key in base) // ../Include/Tools/Base.js: 88
        proto[key] = base[key]; // ../Include/Tools/Base.js: 89
    for (var i = 1, n = arguments.length; i < n; ++i) { // ../Include/Tools/Base.js: 90
        var arg_i = arguments[i]; // ../Include/Tools/Base.js: 91
        for (var key_i in arg_i) // ../Include/Tools/Base.js: 92
            proto[key_i] = arg_i[key_i]; // ../Include/Tools/Base.js: 93
    } // ../Include/Tools/Base.js: 94
    return proto; // ../Include/Tools/Base.js: 95
} // ../Include/Tools/Base.js: 96

//* <FileEnd path="../Include/Tools/Base.js"/>


//* <FileBegin path="../Include/Tools/HashMap.js"/>
//<!--Version 1-->

var HashMap = { // ../Include/Tools/HashMap.js: 3
    FromArray: function(arrayObj, value) { // ../Include/Tools/HashMap.js: 4
        if (value == void 0) // ../Include/Tools/HashMap.js: 5
            value = true; // ../Include/Tools/HashMap.js: 6
        var map = {}; // ../Include/Tools/HashMap.js: 7
        for (var i = 0, n = arrayObj.length; i < n; ++i) { // ../Include/Tools/HashMap.js: 8
            map[arrayObj[i]] = value; // ../Include/Tools/HashMap.js: 9
        } // ../Include/Tools/HashMap.js: 10
        return map; // ../Include/Tools/HashMap.js: 11
    }, // ../Include/Tools/HashMap.js: 12
    AddNewItem: function(hashObj, key, value) { // ../Include/Tools/HashMap.js: 13
        var doesntExists = (hashObj[key] === void 0); // ../Include/Tools/HashMap.js: 14
        if (doesntExists) // ../Include/Tools/HashMap.js: 15
            hashObj[key] = value; // ../Include/Tools/HashMap.js: 16
        return doesntExists; // ../Include/Tools/HashMap.js: 17
    }, // ../Include/Tools/HashMap.js: 18
    Extend: function(hashObj, source) { // ../Include/Tools/HashMap.js: 19
        for (var key in source) { // ../Include/Tools/HashMap.js: 20
            hashObj[key] = source[key]; // ../Include/Tools/HashMap.js: 21
        } // ../Include/Tools/HashMap.js: 22
        return hashObj; // ../Include/Tools/HashMap.js: 23
    }, // ../Include/Tools/HashMap.js: 24
    AddNewItems: function(hashObj, source) { // ../Include/Tools/HashMap.js: 25
        for (var key in source) { // ../Include/Tools/HashMap.js: 26
            if (hashObj[key] === void 0) // ../Include/Tools/HashMap.js: 27
                hashObj[key] = source[key]; // ../Include/Tools/HashMap.js: 28
        } // ../Include/Tools/HashMap.js: 29
    }, // ../Include/Tools/HashMap.js: 30
    GetKeys: function(hashObj) { // ../Include/Tools/HashMap.js: 31
        var keys = []; // ../Include/Tools/HashMap.js: 32
        for (var key in hashObj) // ../Include/Tools/HashMap.js: 33
            keys.push(key); // ../Include/Tools/HashMap.js: 34
        return keys; // ../Include/Tools/HashMap.js: 35
    }, // ../Include/Tools/HashMap.js: 36
    FromKeys: function(hashObj, value) { // ../Include/Tools/HashMap.js: 37
        if (value == void 0) // ../Include/Tools/HashMap.js: 38
            value = true; // ../Include/Tools/HashMap.js: 39
        var map = {}; // ../Include/Tools/HashMap.js: 40
        for (var key in hashObj) { // ../Include/Tools/HashMap.js: 41
            map[key] = value; // ../Include/Tools/HashMap.js: 42
        } // ../Include/Tools/HashMap.js: 43
        return map; // ../Include/Tools/HashMap.js: 44
    }, // ../Include/Tools/HashMap.js: 45
    Equals: function(hashObj1, hashObj2) { // ../Include/Tools/HashMap.js: 46
        if (hashObj1 == null) // ../Include/Tools/HashMap.js: 47
            return (hashObj2 == null); // ../Include/Tools/HashMap.js: 48
        else if (hashObj2 == null) // ../Include/Tools/HashMap.js: 49
            return false; // ../Include/Tools/HashMap.js: 50
        var count = 0; // ../Include/Tools/HashMap.js: 51
        var m; // ../Include/Tools/HashMap.js: 52
        for (m in hashObj1) ++count; // ../Include/Tools/HashMap.js: 53
        for (m in hashObj2) { // ../Include/Tools/HashMap.js: 54
            --count; // ../Include/Tools/HashMap.js: 55
            if (hashObj1[m] != hashObj2[m]) // ../Include/Tools/HashMap.js: 56
                return false; // ../Include/Tools/HashMap.js: 57
        } // ../Include/Tools/HashMap.js: 58
        return (count == 0); // ../Include/Tools/HashMap.js: 59
    }, // ../Include/Tools/HashMap.js: 60
    FindMembers: function(hashObj, memberNames, neededCount) { // ../Include/Tools/HashMap.js: 61
        if (neededCount == void 0) // ../Include/Tools/HashMap.js: 62
            neededCount = memberNames.length; // ../Include/Tools/HashMap.js: 63
        Assert.Condition('HashMap.FindMembers', neededCount <= memberNames.length, 'neededCount <= memberNames.length'); // ../Include/Tools/HashMap.js: 64
        for (var i = 0, n = memberNames.length; i < n; ++i) { // ../Include/Tools/HashMap.js: 65
            if (typeof (hashObj[memberNames[i]]) != 'undefined') { // ../Include/Tools/HashMap.js: 66
                if (--neededCount == 0) // ../Include/Tools/HashMap.js: 67
                    return true; // ../Include/Tools/HashMap.js: 68
            } // ../Include/Tools/HashMap.js: 69
        } // ../Include/Tools/HashMap.js: 70
        return false; // ../Include/Tools/HashMap.js: 71
    } // ../Include/Tools/HashMap.js: 72

}; // ../Include/Tools/HashMap.js: 74

//* <FileEnd path="../Include/Tools/HashMap.js"/>


//* <FileBegin path="../Include/Tools/String.js"/>

function Trim(str) { // ../Include/Tools/String.js: 2
    return str.replace(/^\s+|\s+$/g, ''); // ../Include/Tools/String.js: 3
} // ../Include/Tools/String.js: 4

function FindSubString(sPattern, sString, sEnd) { // ../Include/Tools/String.js: 6
    var sResult = ''; // ../Include/Tools/String.js: 7
    if (sString.length == 0 || sPattern.length == 0) // ../Include/Tools/String.js: 8
        return sResult; // ../Include/Tools/String.js: 9

    sString.toLowerCase(); // ../Include/Tools/String.js: 11
    sPattern.toLowerCase(); // ../Include/Tools/String.js: 12

    var l = sString.length; // ../Include/Tools/String.js: 14
    var ll = sPattern.length; // ../Include/Tools/String.js: 15

    var i = sString.indexOf(sPattern); // ../Include/Tools/String.js: 17
    var j = 0; // ../Include/Tools/String.js: 18

    if (i != -1) { // ../Include/Tools/String.js: 20
        if (sEnd.length > 0) { // ../Include/Tools/String.js: 21
            sEnd.toLowerCase(); // ../Include/Tools/String.js: 22
            j = sString.indexOf(sEnd, i); // ../Include/Tools/String.js: 23
            if (j == -1) // ../Include/Tools/String.js: 24
                j = l; // ../Include/Tools/String.js: 25
        } // ../Include/Tools/String.js: 26
        else { // ../Include/Tools/String.js: 27
            j = l; // ../Include/Tools/String.js: 28
        } // ../Include/Tools/String.js: 29

        if (j != -1) { // ../Include/Tools/String.js: 31
            sResult = sString.substr(i + ll, j - i - ll); // ../Include/Tools/String.js: 32
        } // ../Include/Tools/String.js: 33
    } // ../Include/Tools/String.js: 34
    sResult.toUpperCase(); // ../Include/Tools/String.js: 35

    return sResult; // ../Include/Tools/String.js: 37
} // ../Include/Tools/String.js: 38
 
//* <FileEnd path="../Include/Tools/String.js"/>


//* <FileBegin path="../Include/Tools/AjaxRequest.js"/>
//x /// <reference path="Assert.js"/>
//x /// <reference path="Base.js" />
//x /// <reference path="Json.js" />
//x /// <reference path="UniqueId.js" />
//x /// <reference path="HashMap.js" />

//* <FileBegin path="../Include/Tools/UniqueId.js"/>

var UniqueId = { // ../Include/Tools/UniqueId.js: 2
    _uid: {}, // ../Include/Tools/UniqueId.js: 3
    Next: function(label) { // ../Include/Tools/UniqueId.js: 4
//x         /// <summary>Generate next in sequence of a unique number or label</summary>
//x         /// <param name="label">Sequence name</param>
//x         /// <returns>Number (String when sequence name given)</returns>
//x         /// label = UniqueId.Next('SequenceName');
//x         /// number = UniqueId.Next();  
        var k = ((label == void 0) ? '__uid__' : label); // ../Include/Tools/UniqueId.js: 10
        var v; // ../Include/Tools/UniqueId.js: 11
        if (UniqueId._uid[k] === void 0) // ../Include/Tools/UniqueId.js: 12
            v = UniqueId._uid[k] = 1; // ../Include/Tools/UniqueId.js: 13
        else v = ++UniqueId._uid[k]; // ../Include/Tools/UniqueId.js: 14
        return ((label == void 0) ? v : (label + v)); // ../Include/Tools/UniqueId.js: 15
    }, // ../Include/Tools/UniqueId.js: 16
    Reset: function(label) { // ../Include/Tools/UniqueId.js: 17
//x         /// <summary>Reset sequence counter for a unique numbers or label to zero</summary>
//x         /// <param name="label">Sequence name</param>
//x         /// <returns>Number last used (String last used when sequence name given)</returns>
//x         /// lastUsedLabel = UniqueId.Reset('SequenceName');
//x         /// lastUsedNumber = UniqueId.Reset();  
        var k = ((label == void 0) ? '__uid__' : label); // ../Include/Tools/UniqueId.js: 23
        var v = UniqueId._uid[k] || 0; // ../Include/Tools/UniqueId.js: 24
        UniqueId._uid[k] = 0; // ../Include/Tools/UniqueId.js: 25
        return ((label == void 0) ? v : (label + v)); // ../Include/Tools/UniqueId.js: 26
    } // ../Include/Tools/UniqueId.js: 27
}; // ../Include/Tools/UniqueId.js: 28


//* <FileEnd path="../Include/Tools/UniqueId.js"/>


// AjaxRequest
// ==========================================================================

/** @constructor */ // ../Include/Tools/AjaxRequest.js: 10
function AjaxRequest(url, options) { // ../Include/Tools/AjaxRequest.js: 11
//x /// <summary>
//x ///    Ajax request handling for (IE + Firefox ?) browsers
//x /// </summary>
//x /// <param name="url" type="String">
//x /// </param> 
//x /// <param name="options" type="Object">
//x ///     { [method : GET|POST|HEAD], [parameters : ?], [asynchronous : true|false] }
//x /// </param> 

    Assert.NonNull('AjaxRequest', url, 'url'); // ../Include/Tools/AjaxRequest.js: 21
    this.url = url; // ../Include/Tools/AjaxRequest.js: 22

    var o = options || {}; // ../Include/Tools/AjaxRequest.js: 24
    this.options = o; // ../Include/Tools/AjaxRequest.js: 25
    this.method = o.method ? o.method.toUpperCase() : 'GET'; // ../Include/Tools/AjaxRequest.js: 26
    Assert.Match('AjaxRequest', this.method, 'options.method', /^GET$|^POST$|^HEAD$/, 'GET, POST, or HEAD'); // ../Include/Tools/AjaxRequest.js: 27

    //this.asynchronous = !!this.options.asynchronous || false;
    this.asynchronous = !!o.asynchronous; // ../Include/Tools/AjaxRequest.js: 30
    this.contentType = o.contentType || 'application/x-www-form-urlencoded'; // ../Include/Tools/AjaxRequest.js: 31
    this.parameters = HashMap.Extend({}, (o.parameters || {})); // ../Include/Tools/AjaxRequest.js: 32
    if (o.forceGet) // ../Include/Tools/AjaxRequest.js: 33
        this.parameters['_'] = new Date().getTime(); // ../Include/Tools/AjaxRequest.js: 34

    this.id = UniqueId.Next('AjaxRequest'); // ../Include/Tools/AjaxRequest.js: 36
    this.queryParams = AjaxRequest.$CreateQueryString(this.parameters); // ../Include/Tools/AjaxRequest.js: 37
    // when GET, append parameters to URL
    if (this.method != 'POST' && this.queryParams.length > 0) { // ../Include/Tools/AjaxRequest.js: 39
        this.url += ((this.url.indexOf('?') >= 0) ? '&' : '?') + this.queryParams; // ../Include/Tools/AjaxRequest.js: 40
    } // ../Include/Tools/AjaxRequest.js: 41
    // else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) params += '&_=';
    this.body = (this.method == 'POST') ? this.queryParams : null; // ../Include/Tools/AjaxRequest.js: 43

    this.request = null; // ../Include/Tools/AjaxRequest.js: 45
    this.aborted = false; // ../Include/Tools/AjaxRequest.js: 46
    this.$completed = false; // ../Include/Tools/AjaxRequest.js: 47

    if (window.XMLHttpRequest) // ../Include/Tools/AjaxRequest.js: 49
        this.request = new XMLHttpRequest(); // ../Include/Tools/AjaxRequest.js: 50
    else if (window['ActiveXObject'] && !(this.request = new ActiveXObject("Msxml2.XMLHTTP"))) // ../Include/Tools/AjaxRequest.js: 51
        this.request = new ActiveXObject("Microsoft.XMLHTTP"); // ../Include/Tools/AjaxRequest.js: 52
    if (!this.request) // ../Include/Tools/AjaxRequest.js: 53
        throw new Error('AjaxRequest, no transport');    // ../Include/Tools/AjaxRequest.js: 54
        
    this.$DoRequest(); // ../Include/Tools/AjaxRequest.js: 56
} // ../Include/Tools/AjaxRequest.js: 57

AjaxRequest.PingUrl = function(url, options) { // ../Include/Tools/AjaxRequest.js: 59
//x /// <summary>
//x ///      Uses AjaxRequest to test HTTP status code
//x /// </summary>
//x /// <param name="url" type="String">
//x /// </param>
//x /// <param name="options" type="Object">
//x ///     { [method : GET|POST|HEAD], [parameters : ?], [asynchronous : true|false] }
//x /// </param> 
//x /// <returns type="Boolean"/>
    var o = options || {}; // ../Include/Tools/AjaxRequest.js: 69
    o.method = 'HEAD'; // ../Include/Tools/AjaxRequest.js: 70
    o.asynchronous = false; // ../Include/Tools/AjaxRequest.js: 71
    return new AjaxRequest(url, o).Success(); // ../Include/Tools/AjaxRequest.js: 72
} // ../Include/Tools/AjaxRequest.js: 73

AjaxRequest.Load = function(url, options) { // ../Include/Tools/AjaxRequest.js: 75
//x /// <summary>
//x ///     Alternate constructor for synchronous AjaxRequest
//x /// </summary>
//x /// <param name="url" type="String">
//x /// </param>
//x /// <param name="options" type="Object">
//x /// </param>
//x /// <returns type="AjaxRequest"/>
    var o = options || {}; // ../Include/Tools/AjaxRequest.js: 84
    o.asynchronous = false; // ../Include/Tools/AjaxRequest.js: 85
    return new AjaxRequest(url, o); // ../Include/Tools/AjaxRequest.js: 86
} // ../Include/Tools/AjaxRequest.js: 87

AjaxRequest.LoadText = function(url, options) { // ../Include/Tools/AjaxRequest.js: 89
//x /// <summary>
//x ///    Uses AjaxRequest to return response content at url
//x /// </summary>
//x /// <param name="url" type="String">
//x /// </param>
//x /// <param name="options" type="Object">
//x ///     { [method : GET|POST|HEAD], [parameters : ?], [asynchronous : true|false] }
//x /// </param> 
//x /// <returns type="String"/>
    return AjaxRequest.Load(url, options).GetResponseText(); // ../Include/Tools/AjaxRequest.js: 99
} // ../Include/Tools/AjaxRequest.js: 100

AjaxRequest.LoadXml = function(url, options) { // ../Include/Tools/AjaxRequest.js: 102
//x /// <summary>
//x ///    Uses AjaxRequest to return response xml content at url
//x /// </summary>
//x /// <param name="url" type="String">
//x /// </param>
//x /// <param name="options" type="Object">
//x ///     { [method : GET|POST|HEAD], [parameters : ?], [asynchronous : true|false] }
//x /// </param> 
//x /// <returns type="Object"/>
    return AjaxRequest.Load(url, options).GetResponseXML(); // ../Include/Tools/AjaxRequest.js: 112
} // ../Include/Tools/AjaxRequest.js: 113

AjaxRequest.LoadJson = function(url, options) { // ../Include/Tools/AjaxRequest.js: 115
//x /// <summary>
//x ///    Uses AjaxRequest to return an object from JSON content at url
//x /// </summary>
//x /// <param name="url" type="String">
//x /// </param>
//x /// <param name="options" type="Object">
//x ///     { [method : GET|POST|HEAD], [parameters : ?], [asynchronous : true|false] }
//x /// </param>
//x /// <returns type="Object"/>
    var json = AjaxRequest.Load(url, options).GetResponseText(); // ../Include/Tools/AjaxRequest.js: 125
    return Json.DecodeObject(json); // ../Include/Tools/AjaxRequest.js: 126
} // ../Include/Tools/AjaxRequest.js: 127


AjaxRequest.States = [ // ../Include/Tools/AjaxRequest.js: 130
    'Unsent',          // 0 
    'Opened',          // 1
    'HeadersReceived', // 2 
    'Loading',         // 3
    'Done'             // 4
]; // ../Include/Tools/AjaxRequest.js: 136

AjaxRequest.Nop = function() { } // maybe someone can explain why this is needed

AjaxRequest.$CreateQueryString = function(params) { // ../Include/Tools/AjaxRequest.js: 140
    if (params == void 0) // ../Include/Tools/AjaxRequest.js: 141
        params = {}; // ../Include/Tools/AjaxRequest.js: 142
    var a = []; // ../Include/Tools/AjaxRequest.js: 143
    for (var key in params) { // ../Include/Tools/AjaxRequest.js: 144
        var value = params[key]; // ../Include/Tools/AjaxRequest.js: 145
        a.push((value == void 0) ? key : key + '=' + encodeURIComponent(String(value))); // ../Include/Tools/AjaxRequest.js: 146
    } // ../Include/Tools/AjaxRequest.js: 147
    return a.join('&'); // ../Include/Tools/AjaxRequest.js: 148
} // ../Include/Tools/AjaxRequest.js: 149

AjaxRequest.prototype.$OnReadyStateChange = function() { // ../Include/Tools/AjaxRequest.js: 151
    if (this.$completed) { // ../Include/Tools/AjaxRequest.js: 152
        return; // ../Include/Tools/AjaxRequest.js: 153
    } // ../Include/Tools/AjaxRequest.js: 154

    var rs = this.request.readyState; // ../Include/Tools/AjaxRequest.js: 156
    var state = AjaxRequest.States[rs]; // ../Include/Tools/AjaxRequest.js: 157

    if (rs == 4) { // ../Include/Tools/AjaxRequest.js: 159
        this.$completed = true; // ../Include/Tools/AjaxRequest.js: 160
    } // ../Include/Tools/AjaxRequest.js: 161

    try { // ../Include/Tools/AjaxRequest.js: 163
        var onState = this.options['On' + state]; // ../Include/Tools/AjaxRequest.js: 164
        if (onState) // ../Include/Tools/AjaxRequest.js: 165
            onState(this); // ../Include/Tools/AjaxRequest.js: 166
    } // ../Include/Tools/AjaxRequest.js: 167
    catch (e) { // ../Include/Tools/AjaxRequest.js: 168
        if (this.options.OnException) // ../Include/Tools/AjaxRequest.js: 169
            this.options.OnException(this, e); // ../Include/Tools/AjaxRequest.js: 170
        else // ../Include/Tools/AjaxRequest.js: 171
            Fail('AjaxRequest.$OnReadyStateChange', e); // ../Include/Tools/AjaxRequest.js: 172
    } // ../Include/Tools/AjaxRequest.js: 173

    if (this.$completed) { // ../Include/Tools/AjaxRequest.js: 175
        // avoid memory leak (IE)
        this.request.onreadystatechange = function() { }; // ../Include/Tools/AjaxRequest.js: 177

        try { // ../Include/Tools/AjaxRequest.js: 179
            var onCompleted = this.options['On' + (this.Success() ? 'Success' : 'Failure')]; // ../Include/Tools/AjaxRequest.js: 180
            if (onCompleted) // ../Include/Tools/AjaxRequest.js: 181
                onCompleted(this); // ../Include/Tools/AjaxRequest.js: 182
        } // ../Include/Tools/AjaxRequest.js: 183
        catch (e) { // ../Include/Tools/AjaxRequest.js: 184
            if (this.options.OnException) { // ../Include/Tools/AjaxRequest.js: 185
                this.options.OnException(this, e); // ../Include/Tools/AjaxRequest.js: 186
            } // ../Include/Tools/AjaxRequest.js: 187
            else { // ../Include/Tools/AjaxRequest.js: 188
                Fail('AjaxRequest.$OnReadyStateChange', 'IE memory leak code', e); // ../Include/Tools/AjaxRequest.js: 189
            } // ../Include/Tools/AjaxRequest.js: 190
        } // ../Include/Tools/AjaxRequest.js: 191
    } // ../Include/Tools/AjaxRequest.js: 192
} // ../Include/Tools/AjaxRequest.js: 193

AjaxRequest.prototype.$DoRequest = function() { // ../Include/Tools/AjaxRequest.js: 195
    try { // ../Include/Tools/AjaxRequest.js: 196
        var myself = this; // ../Include/Tools/AjaxRequest.js: 197
        this.request.onreadystatechange = function() { myself.$OnReadyStateChange(); } // ../Include/Tools/AjaxRequest.js: 198
        this.request.open(this.method, this.url, this.asynchronous); // ../Include/Tools/AjaxRequest.js: 199
        this.$SetHeaders(); // ../Include/Tools/AjaxRequest.js: 200
        this.request.send(this.body); // ../Include/Tools/AjaxRequest.js: 201
        if (!this.asynchronous) myself.$OnReadyStateChange(); // Force ready state 4 for synchronous requests
    } // ../Include/Tools/AjaxRequest.js: 203
    catch (e) { // ../Include/Tools/AjaxRequest.js: 204
        if (this.options.OnException) { // ../Include/Tools/AjaxRequest.js: 205
            this.options.OnException(this, e); // ../Include/Tools/AjaxRequest.js: 206
        } // ../Include/Tools/AjaxRequest.js: 207
        else { // ../Include/Tools/AjaxRequest.js: 208
            Fail('AjaxRequest.$DoRequest', e); // ../Include/Tools/AjaxRequest.js: 209
        } // ../Include/Tools/AjaxRequest.js: 210
    } // ../Include/Tools/AjaxRequest.js: 211
} // ../Include/Tools/AjaxRequest.js: 212

AjaxRequest.prototype.$SetHeaders = function() { // ../Include/Tools/AjaxRequest.js: 214
    var header = { // ../Include/Tools/AjaxRequest.js: 215
        'Accept': 'text/plain, text/javascript, text/html, text/xml, application/xml, */*' // ../Include/Tools/AjaxRequest.js: 216
    }; // ../Include/Tools/AjaxRequest.js: 217

    if (this.method == 'POST') { // ../Include/Tools/AjaxRequest.js: 219
        if (!!this.contentType) // ../Include/Tools/AjaxRequest.js: 220
            header['Content-type'] = this.contentType + '; charset=UTF-8'; // ../Include/Tools/AjaxRequest.js: 221

        // Force "Connection: close" for older Mozilla browsers to work around a bug where 
        // XMLHttpRequest sends an incorrect Content-length header. See Mozilla Bugzilla #246651.
        if (this.request.overrideMimeType && (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0, 2005])[1] < 2005) // ../Include/Tools/AjaxRequest.js: 225
            header['Connection'] = 'close'; // ../Include/Tools/AjaxRequest.js: 226
    } // ../Include/Tools/AjaxRequest.js: 227

    if (!!this.options.header) { // ../Include/Tools/AjaxRequest.js: 229
        for (var m in this.options.header) { // ../Include/Tools/AjaxRequest.js: 230
            header[m] = this.options.header[m]; // ../Include/Tools/AjaxRequest.js: 231
        } // ../Include/Tools/AjaxRequest.js: 232
    } // ../Include/Tools/AjaxRequest.js: 233
    for (var m in header) { // ../Include/Tools/AjaxRequest.js: 234
        this.request.setRequestHeader(m, header[m]); // ../Include/Tools/AjaxRequest.js: 235
    } // ../Include/Tools/AjaxRequest.js: 236
} // ../Include/Tools/AjaxRequest.js: 237

AjaxRequest.prototype.Abort = function() { // ../Include/Tools/AjaxRequest.js: 239
    if (!this.$completed) { // ../Include/Tools/AjaxRequest.js: 240
        this.request.abort(); // ../Include/Tools/AjaxRequest.js: 241
    }  // ../Include/Tools/AjaxRequest.js: 242
} // ../Include/Tools/AjaxRequest.js: 243

AjaxRequest.prototype.Success = function() { // ../Include/Tools/AjaxRequest.js: 245
    var s = this.GetStatus(); // ../Include/Tools/AjaxRequest.js: 246
    return (!s || (s >= 200 && s < 300)); // ../Include/Tools/AjaxRequest.js: 247
} // ../Include/Tools/AjaxRequest.js: 248

AjaxRequest.prototype.GetStatus = function() { // ../Include/Tools/AjaxRequest.js: 250
    try { // ../Include/Tools/AjaxRequest.js: 251
        return this.request.status || 0; // ../Include/Tools/AjaxRequest.js: 252
    } // ../Include/Tools/AjaxRequest.js: 253
    catch (e) { // ../Include/Tools/AjaxRequest.js: 254
        return 0;  // ../Include/Tools/AjaxRequest.js: 255
    } // ../Include/Tools/AjaxRequest.js: 256
} // ../Include/Tools/AjaxRequest.js: 257

AjaxRequest.prototype.GetResponseHeader = function(name) { // ../Include/Tools/AjaxRequest.js: 259
    try { // ../Include/Tools/AjaxRequest.js: 260
        return this.request.getResponseHeader(name) || null; // ../Include/Tools/AjaxRequest.js: 261
    } // ../Include/Tools/AjaxRequest.js: 262
    catch (e) { // ../Include/Tools/AjaxRequest.js: 263
        return null; // ../Include/Tools/AjaxRequest.js: 264
    } // ../Include/Tools/AjaxRequest.js: 265
} // ../Include/Tools/AjaxRequest.js: 266

AjaxRequest.prototype.GetResponseText = function() { // ../Include/Tools/AjaxRequest.js: 268
    return (this.Success() ? this.request.responseText : null);  // ../Include/Tools/AjaxRequest.js: 269
} // ../Include/Tools/AjaxRequest.js: 270

AjaxRequest.prototype.GetResponseXML = function() { // ../Include/Tools/AjaxRequest.js: 272
    return (this.Success() ? this.request.responseXML : null);  // ../Include/Tools/AjaxRequest.js: 273
} // ../Include/Tools/AjaxRequest.js: 274

/* Rolled into each call above for Fail()
AjaxRequest.prototype.$OnException = function(e) {
  if (this.options.OnException)
    this.options.OnException(this, e);
  else
    Fail('', e);
}
*/ // ../Include/Tools/AjaxRequest.js: 283

//* <FileEnd path="../Include/Tools/AjaxRequest.js"/>


//* <FileBegin path="../Include/Tools/Array.js"/>
//<!--Version 1-->

function ArrayPad(a, obj, count) { // ../Include/Tools/Array.js: 3
    while (a.length < count) // ../Include/Tools/Array.js: 4
        a.push(obj); // ../Include/Tools/Array.js: 5
    return a; // ../Include/Tools/Array.js: 6
} // ../Include/Tools/Array.js: 7

function ArrayClone(obj) { // ../Include/Tools/Array.js: 9
    return [].concat(obj); // ../Include/Tools/Array.js: 10
} // ../Include/Tools/Array.js: 11

function ArrayIndexOf(a, item, i) { // ../Include/Tools/Array.js: 13
    i = i || 0; // ../Include/Tools/Array.js: 14
    var l = a.length; // ../Include/Tools/Array.js: 15
    if (i < 0) i = l + i; // ../Include/Tools/Array.js: 16
    for (; i < l; i++) if (a[i] == item) return i; // ../Include/Tools/Array.js: 17
    return -1; // ../Include/Tools/Array.js: 18
} // ../Include/Tools/Array.js: 19
//* <FileEnd path="../Include/Tools/Array.js"/>


var _ResourceManager = { // ../Include/Tools/ResourceManager.js: 8
    _Cache: {}, // ../Include/Tools/ResourceManager.js: 9
    _RxReference: /[^\{]+|\{(?:rc:[^\}]+\})?/g, // ../Include/Tools/ResourceManager.js: 10
    _LoadResourceObject: function(url, language, loadNeutral) { // ../Include/Tools/ResourceManager.js: 11
        language = language || ''; // ../Include/Tools/ResourceManager.js: 12

        // add default language files
        var languageList = [language]; // ../Include/Tools/ResourceManager.js: 15
        if (loadNeutral && language) // ../Include/Tools/ResourceManager.js: 16
            languageList.push(''); // ../Include/Tools/ResourceManager.js: 17

        // compose resource object
        var resource = {}; // ../Include/Tools/ResourceManager.js: 20
        while (languageList.length) { // ../Include/Tools/ResourceManager.js: 21
            language = languageList.shift().toLowerCase(); // ../Include/Tools/ResourceManager.js: 22
            var key = url + '?' + language; // ../Include/Tools/ResourceManager.js: 23
            var obj = _ResourceManager._Cache[key]; // ../Include/Tools/ResourceManager.js: 24
            if (obj == void 0) { // ../Include/Tools/ResourceManager.js: 25
                obj = _ResourceManager.LoadXmlResource(url, language) || {}; // ../Include/Tools/ResourceManager.js: 26
                _ResourceManager._Cache[key] = obj; // ../Include/Tools/ResourceManager.js: 27
            } // ../Include/Tools/ResourceManager.js: 28
            HashMap.AddNewItems(resource, obj); // ../Include/Tools/ResourceManager.js: 29
        } // ../Include/Tools/ResourceManager.js: 30
        return resource; // ../Include/Tools/ResourceManager.js: 31
    }, // ../Include/Tools/ResourceManager.js: 32
    _BindString: function(stack, rc, rcl, rci, m, v, ri) { // ../Include/Tools/ResourceManager.js: 33
        if (rc[m] !== void 0) // ../Include/Tools/ResourceManager.js: 34
            return rc[m]; // ../Include/Tools/ResourceManager.js: 35

        var nonbase = (v === void 0); // ../Include/Tools/ResourceManager.js: 37
        if (nonbase) { // ../Include/Tools/ResourceManager.js: 38
            // search loops
            for (var i = 0; i < stack.length; ++i) // ../Include/Tools/ResourceManager.js: 40
                if (stack[i] == m) // ../Include/Tools/ResourceManager.js: 41
            { rc[m] = ''; return ''; } // ../Include/Tools/ResourceManager.js: 42

            ri = rci[m]; // ../Include/Tools/ResourceManager.js: 44
            if (ri !== void 0) // ../Include/Tools/ResourceManager.js: 45
                v = rcl[ri][m]; // ../Include/Tools/ResourceManager.js: 46

            if (v === void 0) // ../Include/Tools/ResourceManager.js: 48
            { rc[m] = ''; return ''; } // ../Include/Tools/ResourceManager.js: 49

            stack.push(m); // ../Include/Tools/ResourceManager.js: 51
        } // ../Include/Tools/ResourceManager.js: 52

        // bind string tokens
        var vb = null; // ../Include/Tools/ResourceManager.js: 55
        var vp = null; // ../Include/Tools/ResourceManager.js: 56
        var r = ''; // ../Include/Tools/ResourceManager.js: 57
        var a = v.match(_ResourceManager._RxReference); // ../Include/Tools/ResourceManager.js: 58
        if (a) { // ../Include/Tools/ResourceManager.js: 59
            for (var i = 0, n = a.length; i < n; ++i) { // ../Include/Tools/ResourceManager.js: 60
                var t = a[i]; // ../Include/Tools/ResourceManager.js: 61
                if (t.charAt(0) != '{' || t.length == 1) // ../Include/Tools/ResourceManager.js: 62
                    r += t; // ../Include/Tools/ResourceManager.js: 63
                else { // ../Include/Tools/ResourceManager.js: 64
                    var x = t.substr(4, t.length - 5); // ../Include/Tools/ResourceManager.js: 65
                    if (x == 'base') { // ../Include/Tools/ResourceManager.js: 66
                        if (vb == null) { // ../Include/Tools/ResourceManager.js: 67
                            vb = ''; // ../Include/Tools/ResourceManager.js: 68
                            var bi = ri; // ../Include/Tools/ResourceManager.js: 69
                            while (bi > 0) { // ../Include/Tools/ResourceManager.js: 70
                                --bi; // ../Include/Tools/ResourceManager.js: 71
                                var bs = rcl[bi][m]; // ../Include/Tools/ResourceManager.js: 72
                                if (bs !== void 0) { // ../Include/Tools/ResourceManager.js: 73
                                    vb = _ResourceManager._BindString(stack, rc, rcl, rci, m, bs, bi); // ../Include/Tools/ResourceManager.js: 74
                                    break; // ../Include/Tools/ResourceManager.js: 75
                                } // ../Include/Tools/ResourceManager.js: 76
                            } // ../Include/Tools/ResourceManager.js: 77
                        } // ../Include/Tools/ResourceManager.js: 78
                        r += vb; // ../Include/Tools/ResourceManager.js: 79
                    } // ../Include/Tools/ResourceManager.js: 80
                    else if (x == 'parent') { // ../Include/Tools/ResourceManager.js: 81
                        if (vp == null) { // ../Include/Tools/ResourceManager.js: 82
                            vp = ''; // ../Include/Tools/ResourceManager.js: 83
                            var p = m.lastIndexOf('.'); // ../Include/Tools/ResourceManager.js: 84
                            if (p >= 0) // ../Include/Tools/ResourceManager.js: 85
                                vp = _ResourceManager._BindString(stack, rc, rcl, rci, m.substring(0, p)); // ../Include/Tools/ResourceManager.js: 86
                        } // ../Include/Tools/ResourceManager.js: 87
                        r += vp; // ../Include/Tools/ResourceManager.js: 88
                    } // ../Include/Tools/ResourceManager.js: 89
                    else { // ../Include/Tools/ResourceManager.js: 90
                        var c0 = x.charAt(0); // ../Include/Tools/ResourceManager.js: 91
                        if (c0.toUpperCase() != c0) // ../Include/Tools/ResourceManager.js: 92
                            r += '(Invalid:' + t + ')'; // ../Include/Tools/ResourceManager.js: 93
                        else r += _ResourceManager._BindString(stack, rc, rcl, rci, x); // ../Include/Tools/ResourceManager.js: 94
                    } // ../Include/Tools/ResourceManager.js: 95
                } // ../Include/Tools/ResourceManager.js: 96
            } // ../Include/Tools/ResourceManager.js: 97
        } // ../Include/Tools/ResourceManager.js: 98

        if (nonbase) { // ../Include/Tools/ResourceManager.js: 100
            rc[m] = r; // ../Include/Tools/ResourceManager.js: 101
            stack.pop(); // ../Include/Tools/ResourceManager.js: 102
        } // ../Include/Tools/ResourceManager.js: 103

        return r; // ../Include/Tools/ResourceManager.js: 105
    }, // ../Include/Tools/ResourceManager.js: 106
    _BindResources: function(rcl, def) { // ../Include/Tools/ResourceManager.js: 107
        // merge plain strings
        var rc = {}; // ../Include/Tools/ResourceManager.js: 109
        //Add defaults
        for (var a in def) { // ../Include/Tools/ResourceManager.js: 111
            rc[a] = def[a]; // ../Include/Tools/ResourceManager.js: 112
        } // ../Include/Tools/ResourceManager.js: 113

        var rci = {}; // ../Include/Tools/ResourceManager.js: 115
        for (var i = rcl.length; i >= 0; --i) { // ../Include/Tools/ResourceManager.js: 116
            var rcn = rcl[i]; // ../Include/Tools/ResourceManager.js: 117
            for (var m in rcn) { // ../Include/Tools/ResourceManager.js: 118
                if (rc[m] !== void 0) // ../Include/Tools/ResourceManager.js: 119
                    continue; // ../Include/Tools/ResourceManager.js: 120
                var v = rcn[m]; // ../Include/Tools/ResourceManager.js: 121
                if (rcn[m].indexOf('{rc:') < 0) { // ../Include/Tools/ResourceManager.js: 122
                    rc[m] = v; // ../Include/Tools/ResourceManager.js: 123
                } // ../Include/Tools/ResourceManager.js: 124
                else if (rci[m] === void 0) // ../Include/Tools/ResourceManager.js: 125
                    rci[m] = i; // ../Include/Tools/ResourceManager.js: 126
            } // ../Include/Tools/ResourceManager.js: 127
        } // ../Include/Tools/ResourceManager.js: 128

        // bind resource strings containing references
        var empty = []; // ../Include/Tools/ResourceManager.js: 131
        for (var m in rci) { // ../Include/Tools/ResourceManager.js: 132
            _ResourceManager._BindString(empty, rc, rcl, rci, m); // ../Include/Tools/ResourceManager.js: 133
        } // ../Include/Tools/ResourceManager.js: 134

        return rc; // ../Include/Tools/ResourceManager.js: 136
    }, // ../Include/Tools/ResourceManager.js: 137
    _LoadResources: function(that, lang) { // ../Include/Tools/ResourceManager.js: 138
        var rcl = that.ParentResource ? _ResourceManager._LoadResources(that.ParentResource.that, lang) : []; // ../Include/Tools/ResourceManager.js: 139
        var rcn = {}; // ../Include/Tools/ResourceManager.js: 140
        for (var i = 0, n = that.ResourceSet.length; i < n; ++i) { // ../Include/Tools/ResourceManager.js: 141
            var rco = _ResourceManager._LoadResourceObject(that.ResourceSet[i], lang, 'en', true); // ../Include/Tools/ResourceManager.js: 142
            if (rco) // ../Include/Tools/ResourceManager.js: 143
                HashMap.Extend(rcn, rco); // ../Include/Tools/ResourceManager.js: 144
        } // ../Include/Tools/ResourceManager.js: 145
        rcl.push(rcn); // ../Include/Tools/ResourceManager.js: 146
        return rcl; // ../Include/Tools/ResourceManager.js: 147
    }, // ../Include/Tools/ResourceManager.js: 148
    AttachResource: function(that, url) { // ../Include/Tools/ResourceManager.js: 149
        var index = ArrayIndexOf(that.ResourceSet, url); // ../Include/Tools/ResourceManager.js: 150
        if (index != -1) // ../Include/Tools/ResourceManager.js: 151
            that.ResourceSet.splice(index, 1); // ../Include/Tools/ResourceManager.js: 152
        that.ResourceSet.push(url); // ../Include/Tools/ResourceManager.js: 153
    }, // ../Include/Tools/ResourceManager.js: 154
    LoadResources: function(that, language, def) { // ../Include/Tools/ResourceManager.js: 155
        language = language ? language.toUpperCase() : ''; // ../Include/Tools/ResourceManager.js: 156
        if (that.Language == language) // ../Include/Tools/ResourceManager.js: 157
            return that.ResourceObject; // ../Include/Tools/ResourceManager.js: 158

        var rc = _ResourceManager._BindResources(_ResourceManager._LoadResources(that, language), def); // ../Include/Tools/ResourceManager.js: 160
        that.Language = language; // ../Include/Tools/ResourceManager.js: 161
        that.ResourceObject = rc; // ../Include/Tools/ResourceManager.js: 162
        return rc; // ../Include/Tools/ResourceManager.js: 163
    }, // ../Include/Tools/ResourceManager.js: 164
    _GetXmlNodeTextContent: function(node) { // ../Include/Tools/ResourceManager.js: 165
        if (node.textConent !== void 0) // ../Include/Tools/ResourceManager.js: 166
            return node.textContent; // ../Include/Tools/ResourceManager.js: 167
        var c = node.childNodes; // ../Include/Tools/ResourceManager.js: 168
        var t = ''; // ../Include/Tools/ResourceManager.js: 169
        for (var i = 0, n = c.length; i < n; ++i) { // ../Include/Tools/ResourceManager.js: 170
            var $i = c[i]; // ../Include/Tools/ResourceManager.js: 171
            if ($i.nodeType == 1) // ../Include/Tools/ResourceManager.js: 172
                t += _ResourceManager._GetXmlNodeTextContent($i); // ../Include/Tools/ResourceManager.js: 173
            else if ($i.nodeType == 3) // ../Include/Tools/ResourceManager.js: 174
                t += $i.nodeValue; // ../Include/Tools/ResourceManager.js: 175
            else if ($i.nodeType == 4) // ../Include/Tools/ResourceManager.js: 176
                t += $i.data; // ../Include/Tools/ResourceManager.js: 177
        } // ../Include/Tools/ResourceManager.js: 178
        return t; // ../Include/Tools/ResourceManager.js: 179
    }, // ../Include/Tools/ResourceManager.js: 180
    GetXmlResourceUrl: function(url, lang) { // ../Include/Tools/ResourceManager.js: 181
        url = url || ''; // ../Include/Tools/ResourceManager.js: 182
        var rclang = (lang && lang != '') ? lang.toLowerCase() + '.' : ''; // ../Include/Tools/ResourceManager.js: 183
        var rcs = ((url == '' || /[\/]$/.test(url)) ? '' : '.') + rclang + 'resources.xml'; // ../Include/Tools/ResourceManager.js: 184
        return url.replace(/(?:\.[^\.\/]*)?$/, rcs); // ../Include/Tools/ResourceManager.js: 185
    }, // ../Include/Tools/ResourceManager.js: 186
    LoadXmlResource: function(url, lang) { // ../Include/Tools/ResourceManager.js: 187
        lang = lang || ''; // ../Include/Tools/ResourceManager.js: 188
        var rsu = _ResourceManager.GetXmlResourceUrl(url, lang); // ../Include/Tools/ResourceManager.js: 189
        var xrc = AjaxRequest.LoadXml(rsu); // ../Include/Tools/ResourceManager.js: 190
        var rc = {}; // ../Include/Tools/ResourceManager.js: 191
        if (xrc) { // ../Include/Tools/ResourceManager.js: 192
            var erg = xrc.getElementsByTagName('resource'); // ../Include/Tools/ResourceManager.js: 193
            for (var i = 0, n = erg.length; i < n; ++i) { // ../Include/Tools/ResourceManager.js: 194
                var $i = erg[i]; // ../Include/Tools/ResourceManager.js: 195
                //Matyi: The following failed on Opera
                //var a = $i.attributes.getNamedItem('xml:id').nodeValue;
                var a = $i.attributes[0].nodeValue; // ../Include/Tools/ResourceManager.js: 198
                if (!a) continue; // ../Include/Tools/ResourceManager.js: 199
                rc[a] = Trim(_ResourceManager._GetXmlNodeTextContent($i)); // ../Include/Tools/ResourceManager.js: 200
            } // ../Include/Tools/ResourceManager.js: 201
        } // ../Include/Tools/ResourceManager.js: 202
        return rc; // ../Include/Tools/ResourceManager.js: 203
    } // ../Include/Tools/ResourceManager.js: 204
}; // ../Include/Tools/ResourceManager.js: 205

var ResourceManager = { // ../Include/Tools/ResourceManager.js: 207
    Create: function(parentResource) { // ../Include/Tools/ResourceManager.js: 208
        var that = {}; // ../Include/Tools/ResourceManager.js: 209
        that.ParentResource = parentResource || null; // ../Include/Tools/ResourceManager.js: 210
        that.Language = null; // ../Include/Tools/ResourceManager.js: 211
        that.ResourceObject = {}; // ../Include/Tools/ResourceManager.js: 212
        that.ResourceSet = []; // ../Include/Tools/ResourceManager.js: 213
        var rc = function(id, defaultValue) { // ../Include/Tools/ResourceManager.js: 214
            var value = that.ResourceObject[id]; // ../Include/Tools/ResourceManager.js: 215
            var returnValue = ((value === void 0) ? ((defaultValue === void 0) ? 'Undefined:' + id : defaultValue) : value); // ../Include/Tools/ResourceManager.js: 216
            return returnValue; // ../Include/Tools/ResourceManager.js: 217
        } // ../Include/Tools/ResourceManager.js: 218
        rc.AttachResource = function(url) { _ResourceManager.AttachResource(that, url) }; // ../Include/Tools/ResourceManager.js: 219
        rc.LoadResources = function(lang, def) { _ResourceManager.LoadResources(that, lang, def) }; // ../Include/Tools/ResourceManager.js: 220
        rc.GetStrings = function() { return that.ResourceObject; }; // ../Include/Tools/ResourceManager.js: 221
        rc.that = that; // ../Include/Tools/ResourceManager.js: 222
        return rc; // ../Include/Tools/ResourceManager.js: 223
    }, // ../Include/Tools/ResourceManager.js: 224
    GetResources: function(urls, lang) { // ../Include/Tools/ResourceManager.js: 225
        var rc = ResourceManager.Create(); // ../Include/Tools/ResourceManager.js: 226
        urls = (urls && urls.length) ? (IsString(urls) ? ['' + urls] : urls) : ['']; // ../Include/Tools/ResourceManager.js: 227
        for (var i = 0, n = urls.length; i < n; ++i) // ../Include/Tools/ResourceManager.js: 228
            rc.AttachResource(urls[i]); // ../Include/Tools/ResourceManager.js: 229
        rc.LoadResources(lang); // ../Include/Tools/ResourceManager.js: 230
        return rc; // ../Include/Tools/ResourceManager.js: 231
    } // ../Include/Tools/ResourceManager.js: 232
}; // ../Include/Tools/ResourceManager.js: 233

// Resource
// ==========================================================================

/*
Gkod.Helper.GetResourceUrl = function(url, lang) {
    var l_lang = lang.toLowerCase();
    var rcurl = url.replace(/\.([^\.\/]*)$/, '.' + l_lang + '.$1');
    if (rcurl == url) rcurl += '.' + l_lang;
    return rcurl;
}
*/ // ../Include/Tools/ResourceManager.js: 245

ResourceManager.ContentURL = ''; // ../Include/Tools/ResourceManager.js: 247
ResourceManager.GetContentURL = function() { // ../Include/Tools/ResourceManager.js: 248
    return ResourceManager.ContentURL; // ../Include/Tools/ResourceManager.js: 249
}; // ../Include/Tools/ResourceManager.js: 250

ResourceManager.Resources = {}; // ../Include/Tools/ResourceManager.js: 252
ResourceManager.GetResource = function(id) { // ../Include/Tools/ResourceManager.js: 253
    return ResourceManager.Resources[id]; // ../Include/Tools/ResourceManager.js: 254
}; // ../Include/Tools/ResourceManager.js: 255

//* <FileEnd path="../Include/Tools/ResourceManager.js"/>

ResourceManager.ContentURL = '../../'; // stdhemi/smarthelpie/smarthelpie.js: 2
//x /// <reference path="../resources/resources.js"/>
//x /// <reference path="../../../Include/Common/ConfigData.js"/>
//x /// <reference path="../smarthelp/common.js"/>
//x /// <reference path="../../../Include/Tools/Json.js"/>
//x /// <reference path="../smarthelp/smarthelpversions.js"/>

//* <FileBegin path="stdhemi/resources/resources.js"/>
var rm = ResourceManager.Create(); // stdhemi/resources/resources.js: 1
var url = ResourceManager.GetContentURL() + 'stdhemi/smarthelp/strings.resources'; // stdhemi/resources/resources.js: 2
rm.AttachResource(url); // stdhemi/resources/resources.js: 3
rm.LoadResources(/*null, { 'PRODUCTNAME': 'SmartHelp', 'SOT_PRODUCTNAME': 'Stay-On-Top' }*/); // stdhemi/resources/resources.js: 4
ResourceManager.Resources = rm.GetStrings(); // stdhemi/resources/resources.js: 5

//* <FileEnd path="stdhemi/resources/resources.js"/>


//* <FileBegin path="../Include/Common/ConfigData.js"/>
//x /// <reference path="../Tools/ConfigNode.js"/>
//x /// <reference path="../Tools/HashMap.js"/>
//x /// <reference path="../Tools/AjaxRequest.js"/>
//x /// <reference path="ConfigDefaults.js"/>

//* <FileBegin path="../Include/Tools/ConfigNode.js"/>
//x /// <reference path="Base.js"/>
//x /// <reference path="Assert.js"/>

/** @constructor */ // ../Include/Tools/ConfigNode.js: 4
function ConfigNode(node, key) { // ../Include/Tools/ConfigNode.js: 5
    this.Node = node; // ../Include/Tools/ConfigNode.js: 6
    this.Key = key; // ../Include/Tools/ConfigNode.js: 7
} // ../Include/Tools/ConfigNode.js: 8

ConfigNode.FindPath = function(node, nameList) { // ../Include/Tools/ConfigNode.js: 10
    if (!node) // ../Include/Tools/ConfigNode.js: 11
        return void 0; // ../Include/Tools/ConfigNode.js: 12
    for (var i = 0, n = nameList.length; i < n; ++i) { // ../Include/Tools/ConfigNode.js: 13
        if ((node = node[nameList[i]]) === void 0) // ../Include/Tools/ConfigNode.js: 14
            return void 0; // ../Include/Tools/ConfigNode.js: 15
    } // ../Include/Tools/ConfigNode.js: 16
    return node; // ../Include/Tools/ConfigNode.js: 17
}; // ../Include/Tools/ConfigNode.js: 18

ConfigNode.FindKey = function(node, key) { // ../Include/Tools/ConfigNode.js: 20
    return ((key && key.length) ? ConfigNode.FindPath(node, key.split('.')) : node); // ../Include/Tools/ConfigNode.js: 21
}; // ../Include/Tools/ConfigNode.js: 22

ConfigNode.CreatePath = function(node, nameList) { // ../Include/Tools/ConfigNode.js: 24
    Assert.NonNull('ConfigNode.CreatePath', node, 'node'); // ../Include/Tools/ConfigNode.js: 25
    for (var i = 0, n = nameList.length; i < n; ++i) { // ../Include/Tools/ConfigNode.js: 26
        var next = node[nameList[i]]; // ../Include/Tools/ConfigNode.js: 27
        if (next === void 0) { // ../Include/Tools/ConfigNode.js: 28
            while (i < n) { // ../Include/Tools/ConfigNode.js: 29
                node[nameList[i]] = next = {}; // ../Include/Tools/ConfigNode.js: 30
                node = next; // ../Include/Tools/ConfigNode.js: 31
                ++i; // ../Include/Tools/ConfigNode.js: 32
            } // ../Include/Tools/ConfigNode.js: 33
            return node; // ../Include/Tools/ConfigNode.js: 34
        } // ../Include/Tools/ConfigNode.js: 35
        Assert.Hash('ConfigNode.CreatePath', next, 'node[nameList[i]]'); // ../Include/Tools/ConfigNode.js: 36
        node = next; // ../Include/Tools/ConfigNode.js: 37
    } // ../Include/Tools/ConfigNode.js: 38
    return node; // ../Include/Tools/ConfigNode.js: 39
}; // ../Include/Tools/ConfigNode.js: 40

ConfigNode.CreateKey = function(node, key) { // ../Include/Tools/ConfigNode.js: 42
    return ConfigNode.CreatePath(node, key.split('.')); // ../Include/Tools/ConfigNode.js: 43
}; // ../Include/Tools/ConfigNode.js: 44

ConfigNode.prototype = { // ../Include/Tools/ConfigNode.js: 46
    GetRoot: function() { // ../Include/Tools/ConfigNode.js: 47
        return this.Node; // ../Include/Tools/ConfigNode.js: 48
    }, // ../Include/Tools/ConfigNode.js: 49
    CreateKey: function(key) { // ../Include/Tools/ConfigNode.js: 50
        Assert.String('ConfigNode.CreateKey', key, 'key'); // ../Include/Tools/ConfigNode.js: 51
        return new ConfigNode(ConfigNode.CreateKey(this.Node, key), this.GetAbsoluteKey(key)); // ../Include/Tools/ConfigNode.js: 52
    }, // ../Include/Tools/ConfigNode.js: 53
    OpenKey: function(key) { // ../Include/Tools/ConfigNode.js: 54
        Assert.String('ConfigNode.OpenKey', key, 'key'); // ../Include/Tools/ConfigNode.js: 55
        Assert.NonNull('ConfigNode.OpenKey', this.Node, 'this.Node'); // ../Include/Tools/ConfigNode.js: 56
        var node = ConfigNode.FindKey(this.Node, key); // ../Include/Tools/ConfigNode.js: 57
        Assert('ConfigNode.GetValue', node !== void 0, NameOf(key) + ' does not exists' + (this.Key ? ' at ' + NameOf(this.Key) : '')); // ../Include/Tools/ConfigNode.js: 58
        return new ConfigNode(node, this.GetAbsoluteKey(key)); // ../Include/Tools/ConfigNode.js: 59
    }, // ../Include/Tools/ConfigNode.js: 60
    TryOpenKey: function(key) { // ../Include/Tools/ConfigNode.js: 61
        Assert.String('ConfigNode.TryOpenKey', key, 'key'); // ../Include/Tools/ConfigNode.js: 62
        Assert.NonNull('ConfigNode.TryOpenKey', this.Node, 'this.Node'); // ../Include/Tools/ConfigNode.js: 63
        var node = ConfigNode.FindKey(this.Node, key); // ../Include/Tools/ConfigNode.js: 64
        return (node? new ConfigNode(node, this.GetAbsoluteKey(key)): null); // ../Include/Tools/ConfigNode.js: 65
    }, // ../Include/Tools/ConfigNode.js: 66
    GetValue: function(name) { // ../Include/Tools/ConfigNode.js: 67
        Assert.String('ConfigNode.GetValue', name, 'name'); // ../Include/Tools/ConfigNode.js: 68
        Assert.NonNull('ConfigNode.GetValue', this.Node, 'this.Node'); // ../Include/Tools/ConfigNode.js: 69
        Assert('ConfigNode.GetValue', (this.Node[name] !== void 0), NameOf(name) + ' does not exists' + (this.Key ? ' at ' + NameOf(this.Key) : '')); // ../Include/Tools/ConfigNode.js: 70
        return this.Node[name]; // ../Include/Tools/ConfigNode.js: 71
    }, // ../Include/Tools/ConfigNode.js: 72
    TryGetValue: function(name, defaultValue) { // ../Include/Tools/ConfigNode.js: 73
        Assert.String('ConfigNode.TryGetValue', name, 'name'); // ../Include/Tools/ConfigNode.js: 74
        Assert.NonNull('ConfigNode.TryGetValue', this.Node, 'this.Node'); // ../Include/Tools/ConfigNode.js: 75
        var value = this.Node[name]; // ../Include/Tools/ConfigNode.js: 76
        return ((value === void 0) ? defaultValue : value); // ../Include/Tools/ConfigNode.js: 77
    }, // ../Include/Tools/ConfigNode.js: 78
    GetValueByKey: function(key) { // ../Include/Tools/ConfigNode.js: 79
        Assert.NullOrString('ConfigNode.GetValueByKey', key, 'key'); // ../Include/Tools/ConfigNode.js: 80
        Assert.NonNull('ConfigNode.GetValueByKey', this.Node, 'this.Node'); // ../Include/Tools/ConfigNode.js: 81
        var value = ConfigNode.FindKey(this.Node, key); // ../Include/Tools/ConfigNode.js: 82
        Assert('ConfigNode.GetValue', value !== void 0, NameOf(key) + ' does not exists' + (this.Key ? ' at ' + NameOf(this.Key) : '')); // ../Include/Tools/ConfigNode.js: 83
        return value; // ../Include/Tools/ConfigNode.js: 84
    }, // ../Include/Tools/ConfigNode.js: 85
    TryGetValueByKey: function(key, defaultValue) { // ../Include/Tools/ConfigNode.js: 86
        Assert.NullOrString('ConfigNode.GetValueByKey', key, 'key'); // ../Include/Tools/ConfigNode.js: 87
        Assert.NonNull('ConfigNode.GetValueByKey', this.Node, 'this.Node'); // ../Include/Tools/ConfigNode.js: 88
        var value = ConfigNode.FindKey(this.Node, key); // ../Include/Tools/ConfigNode.js: 89
        return ((value === void 0) ? defaultValue : value); // ../Include/Tools/ConfigNode.js: 90
    }, // ../Include/Tools/ConfigNode.js: 91
    GetAbsoluteKey: function(key) { // ../Include/Tools/ConfigNode.js: 92
        Assert.NullOrString('ConfigNode.GetKeyPath', key, 'key'); // ../Include/Tools/ConfigNode.js: 93
        return (this.Key ? (this.Key + (key ? '.' + key : '')) : key); // ../Include/Tools/ConfigNode.js: 94
    }, // ../Include/Tools/ConfigNode.js: 95
    Extend: function(node) { // ../Include/Tools/ConfigNode.js: 96
        Assert.NonNull('ConfigNode.Extend', node, 'node'); // ../Include/Tools/ConfigNode.js: 97
        if (this.Node == null) // ../Include/Tools/ConfigNode.js: 98
            this.Node = {}; // ../Include/Tools/ConfigNode.js: 99
        Extend(true, this.Node, node); // ../Include/Tools/ConfigNode.js: 100
    }, // ../Include/Tools/ConfigNode.js: 101
    Delete: function(name) { // ../Include/Tools/ConfigNode.js: 102
        Assert.String('ConfigNode.Delete', name, 'name'); // ../Include/Tools/ConfigNode.js: 103
        Assert.NonNull('ConfigNode.Delete', this.Node, 'this.Node'); // ../Include/Tools/ConfigNode.js: 104
        delete this.Node[name]; // ../Include/Tools/ConfigNode.js: 105
    } // ../Include/Tools/ConfigNode.js: 106
}; // ../Include/Tools/ConfigNode.js: 107


//* <FileEnd path="../Include/Tools/ConfigNode.js"/>


//* <FileBegin path="../Include/Common/ConfigDefaults.js"/>

var ConfigDefaults = { // ../Include/Common/ConfigDefaults.js: 2
    'SmartHelp': { // ../Include/Common/ConfigDefaults.js: 3
        'HelpKey': 'F9', // ../Include/Common/ConfigDefaults.js: 4
        'ContentMap': [] // ../Include/Common/ConfigDefaults.js: 5
    } // ../Include/Common/ConfigDefaults.js: 6
}; // ../Include/Common/ConfigDefaults.js: 7

//* <FileEnd path="../Include/Common/ConfigDefaults.js"/>


//TODO: Matyi: I don't like this reference to ApplicationMap, but this should remain for now.
//x /// <reference path="../Application/ApplicationMap.js"/>

//* <FileBegin path="../Include/Application/ApplicationMap.js"/>
//x /// <reference path="../Tools/Base.js"/>
//x /// <reference path="ApplicationBase.js"/>

//* <FileBegin path="../Include/Application/ApplicationBase.js"/>
//x /// <reference path="../Tools/Base.js"/>
//x /// <reference path="EcidSearch.js" xconfig="Playback"/>
//x /// <reference path="../Common/ContextPart.js"/>
//x /// <reference path="../Common/SearchExpression.js" xconfig="Playback"/>
//x /// <reference path="../Common/SearchExpressionBuilder.js" xconfig="Playback"/>
//x /// <reference path="../Common/ContextType.js"/>
//x /// <reference path="../Common/PartDescriptor.js"/>
//x /// <reference path="../Common/UpkMeta.js"/>
//x /// <reference path="../Common/ApplicationFeature.js"/>
//x /// <reference path="ApplicationContext.js"/>
//x /// <reference path="ApplicationType.js"/>

//* <FileBegin path="../Include/Application/EcidSearch.js"/>

var EcidSearch = { // ../Include/Application/EcidSearch.js: 2
    All: 1, // ../Include/Application/EcidSearch.js: 3
    AnyPart: 2, // ../Include/Application/EcidSearch.js: 4
    WithOrWithoutPrefix: 3, // ../Include/Application/EcidSearch.js: 5
    WithoutPrefix: 4 // ../Include/Application/EcidSearch.js: 6
}; // ../Include/Application/EcidSearch.js: 7

//* <FileEnd path="../Include/Application/EcidSearch.js"/>


//* <FileBegin path="../Include/Common/ContextPart.js"/>
//x /// <reference path="../Tools/Base.js"/>

var ContextPart = { // ../Include/Common/ContextPart.js: 3
    CreateValue: function(name, caption, useNameAsPrefix, searchable, multiPart) { // ../Include/Common/ContextPart.js: 4
        return [name, caption, ((useNameAsPrefix == void 0) ? true : useNameAsPrefix), ((searchable == void 0) ? true : searchable), ((multiPart == void 0) ? false : multiPart)]; // ../Include/Common/ContextPart.js: 5
    }, // ../Include/Common/ContextPart.js: 6
    CreateMeta: function(name) { // ../Include/Common/ContextPart.js: 7
        return ['MC.' + name, name, false, false, false]; // ../Include/Common/ContextPart.js: 8
    }, // ../Include/Common/ContextPart.js: 9
    HasMultipleParts: function(contextPart) { // ../Include/Common/ContextPart.js: 10
        return !!contextPart[4]; // ../Include/Common/ContextPart.js: 11
    } // ../Include/Common/ContextPart.js: 12
}; // ../Include/Common/ContextPart.js: 13

//* <FileEnd path="../Include/Common/ContextPart.js"/>


//* <FileBegin path="../Include/Common/SearchExpression.js"/>
//x /// <reference path="../Tools/Base.js"/>
//x /// <reference path="../Tools/HashMap.js"/>
//x /// <reference path="../CoreScripts/Escape.js"/>
//x /// <reference path="SearchExpressionNode.js"/>

//* <FileBegin path="../Include/CoreScripts/Escape.js"/>
//x //: <if-not xconfig="PlayerScripts"/>
//x /// <reference path="_escape.js"/>

//* <FileBegin path="../Include/CoreScripts/_escape.js"/>
/*--
Copyright © 1998, 2012, Oracle and/or its affiliates.  All rights reserved.
--*/ // ../Include/CoreScripts/_escape.js: 3

var Escape = {}; // ../Include/CoreScripts/_escape.js: 5

//*****************************************************************
//Safe Escape/UnEscape support

Escape.SafeUri_EscapeCharacter = '/'; // ../Include/CoreScripts/_escape.js: 10

Escape.SafeUri_UnsafeCharacters = ['<', '>', '"', '\'', '%', ';', '(', ')', '&', '+']; // ../Include/CoreScripts/_escape.js: 12

Escape.SafeUriEscape = function(s) { // ../Include/CoreScripts/_escape.js: 14
    return Escape.__Escape(s, 1); // ../Include/CoreScripts/_escape.js: 15
} // ../Include/CoreScripts/_escape.js: 16

Escape.SafeUriUnEscape = function(s) { // ../Include/CoreScripts/_escape.js: 18
    return Escape.__UnEscape(s, 1); // ../Include/CoreScripts/_escape.js: 19
} // ../Include/CoreScripts/_escape.js: 20


//*****************************************************************
// Simple Escape/UnEscape support

Escape.MyEscape = function(s) { // ../Include/CoreScripts/_escape.js: 26
    return Escape.__Escape(s, 0); // ../Include/CoreScripts/_escape.js: 27
} // ../Include/CoreScripts/_escape.js: 28

Escape.MyUnEscape = function(s) { // ../Include/CoreScripts/_escape.js: 30
    return Escape.__UnEscape(s, 0); // ../Include/CoreScripts/_escape.js: 31
} // ../Include/CoreScripts/_escape.js: 32

//*****************************************************************
// private

Escape.__Escape = function(s, safe) { // ../Include/CoreScripts/_escape.js: 37
    var snew = ""; // ../Include/CoreScripts/_escape.js: 38
    for (var i = 0; i < s.length; i++) { // ../Include/CoreScripts/_escape.js: 39
        ss = s.substr(i, 1); // ../Include/CoreScripts/_escape.js: 40
        if (safe == 0 ? Escape.__Normal_Contains(ss) : !Escape.__SafeUri_Contains(ss)) { // ../Include/CoreScripts/_escape.js: 41
            snew += ss; // ../Include/CoreScripts/_escape.js: 42
        } // ../Include/CoreScripts/_escape.js: 43
        else { // ../Include/CoreScripts/_escape.js: 44
            ss = s.charCodeAt(i); // ../Include/CoreScripts/_escape.js: 45
            a = "0000" + ss.toString(16).toUpperCase(); // ../Include/CoreScripts/_escape.js: 46
            snew += (safe == 0 ? "$" : Escape.SafeUri_EscapeCharacter) + a.substr(a.length - 4); // ../Include/CoreScripts/_escape.js: 47
        } // ../Include/CoreScripts/_escape.js: 48
    } // ../Include/CoreScripts/_escape.js: 49
    return snew; // ../Include/CoreScripts/_escape.js: 50
} // ../Include/CoreScripts/_escape.js: 51

Escape.__UnEscape = function(s, safe) { // ../Include/CoreScripts/_escape.js: 53
    var snew = ""; // ../Include/CoreScripts/_escape.js: 54
    var bEscape = false; // ../Include/CoreScripts/_escape.js: 55
    for (var i = 0; i < s.length; i++) { // ../Include/CoreScripts/_escape.js: 56
        if (bEscape) { // ../Include/CoreScripts/_escape.js: 57
            ss = s.substr(i, 4); // ../Include/CoreScripts/_escape.js: 58
            snew += String.fromCharCode(parseInt("0x" + ss)); // ../Include/CoreScripts/_escape.js: 59
            i += 3; // ../Include/CoreScripts/_escape.js: 60
            bEscape = false; // ../Include/CoreScripts/_escape.js: 61
        } // ../Include/CoreScripts/_escape.js: 62
        else { // ../Include/CoreScripts/_escape.js: 63
            ss = s.substr(i, 1); // ../Include/CoreScripts/_escape.js: 64
            if (ss == (safe == 0 ? '$' : Escape.SafeUri_EscapeCharacter)) // ../Include/CoreScripts/_escape.js: 65
                bEscape = true; // ../Include/CoreScripts/_escape.js: 66
            else // ../Include/CoreScripts/_escape.js: 67
                snew += ss; // ../Include/CoreScripts/_escape.js: 68
        } // ../Include/CoreScripts/_escape.js: 69
    } // ../Include/CoreScripts/_escape.js: 70
    return snew; // ../Include/CoreScripts/_escape.js: 71
} // ../Include/CoreScripts/_escape.js: 72

Escape.__Normal_Contains = function(s) { // ../Include/CoreScripts/_escape.js: 74
    return ((s >= '0' && s <= '9') || (s >= 'a' && s <= 'z') || (s >= 'A' && s <= 'Z')); // ../Include/CoreScripts/_escape.js: 75
} // ../Include/CoreScripts/_escape.js: 76

Escape.__SafeUri_Contains = function(s) { // ../Include/CoreScripts/_escape.js: 78
    var l = Escape.SafeUri_UnsafeCharacters.length; // ../Include/CoreScripts/_escape.js: 79
    for (var i = 0; i < l; i++) { // ../Include/CoreScripts/_escape.js: 80
        if (s == Escape.SafeUri_UnsafeCharacters[i]) // ../Include/CoreScripts/_escape.js: 81
            return true; // ../Include/CoreScripts/_escape.js: 82
    } // ../Include/CoreScripts/_escape.js: 83
    if (s == Escape.SafeUri_EscapeCharacter) // ../Include/CoreScripts/_escape.js: 84
        return true; // ../Include/CoreScripts/_escape.js: 85
    return false; // ../Include/CoreScripts/_escape.js: 86
} // ../Include/CoreScripts/_escape.js: 87

////////////////////////////////////////////////////////////////////////////////////////
// UrlParser object

/** @constructor */ // ../Include/CoreScripts/_escape.js: 92
function UrlParser() { // ../Include/CoreScripts/_escape.js: 93
    this.params = new Array(); // ../Include/CoreScripts/_escape.js: 94
    this.safemode = false; // ../Include/CoreScripts/_escape.js: 95
} // ../Include/CoreScripts/_escape.js: 96

UrlParser.prototype.Clone = function() { // ../Include/CoreScripts/_escape.js: 98
    var url = new UrlParser(); // ../Include/CoreScripts/_escape.js: 99
    url.params = new Array(); // ../Include/CoreScripts/_escape.js: 100
    url.safemode = this.safemode; // ../Include/CoreScripts/_escape.js: 101
    for (var k in this.params) { // ../Include/CoreScripts/_escape.js: 102
        var v = this.params[k]; // ../Include/CoreScripts/_escape.js: 103
        if (v == null) // ../Include/CoreScripts/_escape.js: 104
            continue; // ../Include/CoreScripts/_escape.js: 105
        url.params[k] = this.params[k]; // ../Include/CoreScripts/_escape.js: 106
    } // ../Include/CoreScripts/_escape.js: 107
    return url; // ../Include/CoreScripts/_escape.js: 108
} // ../Include/CoreScripts/_escape.js: 109

UrlParser.prototype.Parse = function() { // ../Include/CoreScripts/_escape.js: 111
    var strArgs; // ../Include/CoreScripts/_escape.js: 112
    var strArg; // ../Include/CoreScripts/_escape.js: 113
    var ss = document.location.hash.substring(1); // ../Include/CoreScripts/_escape.js: 114
    strArgs = ss.split("&"); // ../Include/CoreScripts/_escape.js: 115
    if (strArgs.length == 0 || strArgs[0] == "") { // ../Include/CoreScripts/_escape.js: 116
        ss = document.location.search.substring(1); // ../Include/CoreScripts/_escape.js: 117
        strArgs = ss.split("&"); // ../Include/CoreScripts/_escape.js: 118
    }; // ../Include/CoreScripts/_escape.js: 119
    if (strArgs.length > 0) { // ../Include/CoreScripts/_escape.js: 120
        if (strArgs[0].toLowerCase().substr(0, 3) == "su=") { // ../Include/CoreScripts/_escape.js: 121
            this.safemode = true; // ../Include/CoreScripts/_escape.js: 122
            strArgs = strArgs[0].substr(3); // ../Include/CoreScripts/_escape.js: 123
            strArgs = Escape.SafeUriUnEscape(strArgs); // ../Include/CoreScripts/_escape.js: 124
            strArgs = strArgs.split("&"); // ../Include/CoreScripts/_escape.js: 125
        } // ../Include/CoreScripts/_escape.js: 126
    } // ../Include/CoreScripts/_escape.js: 127
    for (var i = 0; i < strArgs.length; i++) { // ../Include/CoreScripts/_escape.js: 128
        strArg = (strArgs[i]); // ../Include/CoreScripts/_escape.js: 129
        if (strArg.length == 0) // ../Include/CoreScripts/_escape.js: 130
            continue; // ../Include/CoreScripts/_escape.js: 131
        var param = strArg.split("="); // ../Include/CoreScripts/_escape.js: 132
        if (param.length == 2) { // ../Include/CoreScripts/_escape.js: 133
            this.params[param[0].toLowerCase()] = param[1]; // ../Include/CoreScripts/_escape.js: 134
        } // ../Include/CoreScripts/_escape.js: 135
        else { // ../Include/CoreScripts/_escape.js: 136
            this.params[param[0].toLowerCase()] = ""; // ../Include/CoreScripts/_escape.js: 137
        } // ../Include/CoreScripts/_escape.js: 138
    } // ../Include/CoreScripts/_escape.js: 139
} // ../Include/CoreScripts/_escape.js: 140

UrlParser.prototype.GetSafeMode = function() { // ../Include/CoreScripts/_escape.js: 142
    return this.safemode; // ../Include/CoreScripts/_escape.js: 143
} // ../Include/CoreScripts/_escape.js: 144

UrlParser.prototype.SetSafeMode = function(k) { // ../Include/CoreScripts/_escape.js: 146
    this.safemode = k; // ../Include/CoreScripts/_escape.js: 147
} // ../Include/CoreScripts/_escape.js: 148

UrlParser.prototype.GetParameter = function(s) { // ../Include/CoreScripts/_escape.js: 150
    return this.params[s.toLowerCase()]; // ../Include/CoreScripts/_escape.js: 151
} // ../Include/CoreScripts/_escape.js: 152

UrlParser.prototype.AddParameter = function(s, v) { // ../Include/CoreScripts/_escape.js: 154
    this.params[s.toLowerCase()] = v; // ../Include/CoreScripts/_escape.js: 155
} // ../Include/CoreScripts/_escape.js: 156

UrlParser.prototype.RemoveParameter = function(s) { // ../Include/CoreScripts/_escape.js: 158
    this.params[s.toLowerCase()] = null; // ../Include/CoreScripts/_escape.js: 159
} // ../Include/CoreScripts/_escape.js: 160

UrlParser.prototype.ClearParameterList = function(s) { // ../Include/CoreScripts/_escape.js: 162
    this.params = null; // ../Include/CoreScripts/_escape.js: 163
    this.params = new Array(); // ../Include/CoreScripts/_escape.js: 164
} // ../Include/CoreScripts/_escape.js: 165

UrlParser.prototype.BuildParameterList = function(s) { // ../Include/CoreScripts/_escape.js: 167
    var s = ""; // ../Include/CoreScripts/_escape.js: 168
    var first = true; // ../Include/CoreScripts/_escape.js: 169
    for (var k in this.params) { // ../Include/CoreScripts/_escape.js: 170
        var v = this.params[k]; // ../Include/CoreScripts/_escape.js: 171
        if (v == null) { // ../Include/CoreScripts/_escape.js: 172
            continue; // ../Include/CoreScripts/_escape.js: 173
        } // ../Include/CoreScripts/_escape.js: 174
        if (first == false) { // ../Include/CoreScripts/_escape.js: 175
            s += "&"; // ../Include/CoreScripts/_escape.js: 176
        } // ../Include/CoreScripts/_escape.js: 177
        first = false; // ../Include/CoreScripts/_escape.js: 178
        if (v.length == 0) { // ../Include/CoreScripts/_escape.js: 179
            s += k; // ../Include/CoreScripts/_escape.js: 180
        } // ../Include/CoreScripts/_escape.js: 181
        else { // ../Include/CoreScripts/_escape.js: 182
            s += k + "=" + this.params[k]; // ../Include/CoreScripts/_escape.js: 183
        } // ../Include/CoreScripts/_escape.js: 184
    } // ../Include/CoreScripts/_escape.js: 185
    if (this.safemode) { // ../Include/CoreScripts/_escape.js: 186
        s = "su=" + Escape.MyEscape(s); // ../Include/CoreScripts/_escape.js: 187
    } // ../Include/CoreScripts/_escape.js: 188
    return s; // ../Include/CoreScripts/_escape.js: 189
} // ../Include/CoreScripts/_escape.js: 190

UrlParser.prototype.GetCorrectUrl = function(url) { // ../Include/CoreScripts/_escape.js: 192
    if (!this.safemode) { return url; } // ../Include/CoreScripts/_escape.js: 193
    var strArgs; // ../Include/CoreScripts/_escape.js: 194
    var k = url.indexOf("#"); // ../Include/CoreScripts/_escape.js: 195
    if (k == -1) { k = url.indexOf("?") } // ../Include/CoreScripts/_escape.js: 196
    if (k >= 0) { // ../Include/CoreScripts/_escape.js: 197
        var paramss = url.substring(k + 1); // ../Include/CoreScripts/_escape.js: 198
        strArgs = paramss.split("&"); // ../Include/CoreScripts/_escape.js: 199
        if (strArgs[0].toLowerCase().substr(0, 3) == "su=") { // ../Include/CoreScripts/_escape.js: 200
            return url; // ../Include/CoreScripts/_escape.js: 201
        } // ../Include/CoreScripts/_escape.js: 202
        var ss = url.substring(0, k + 1) + "su=" + Escape.SafeUriEscape(paramss); // ../Include/CoreScripts/_escape.js: 203
        return ss; // ../Include/CoreScripts/_escape.js: 204
    } // ../Include/CoreScripts/_escape.js: 205
    else { // ../Include/CoreScripts/_escape.js: 206
        return url + "?su="; // ../Include/CoreScripts/_escape.js: 207
    } // ../Include/CoreScripts/_escape.js: 208
} // ../Include/CoreScripts/_escape.js: 209


//* <FileEnd path="../Include/CoreScripts/_escape.js"/>

//x //: <end/>

//// Commented out:
//// <reference path="../../../../Core_DotNet/Documents/Content/IMany/Library/Multi/Styles/Common/TopicPlayer/escape.js"/>

//* <FileEnd path="../Include/CoreScripts/Escape.js"/>


//* <FileBegin path="../Include/Common/SearchExpressionNode.js"/>

// Node types and their values as inverse precedence
var SearchExpressionNode = { // ../Include/Common/SearchExpressionNode.js: 3
    Or: 0, // ../Include/Common/SearchExpressionNode.js: 4
    And: 1, // ../Include/Common/SearchExpressionNode.js: 5
    Value: 2, // ../Include/Common/SearchExpressionNode.js: 6
    ValueStar: 3 // ../Include/Common/SearchExpressionNode.js: 7
}; // ../Include/Common/SearchExpressionNode.js: 8

//* <FileEnd path="../Include/Common/SearchExpressionNode.js"/>


Assert('Integrity', SearchExpressionNode.Or == 0, 'SearchExpressionNode.Or == 0'); // ../Include/Common/SearchExpression.js: 6
Assert('Integrity', SearchExpressionNode.And == 1, 'SearchExpressionNode.And == 1'); // ../Include/Common/SearchExpression.js: 7
Assert('Integrity', SearchExpressionNode.Value == 2, 'SearchExpressionNode.Value == 2'); // ../Include/Common/SearchExpression.js: 8
Assert('Integrity', SearchExpressionNode.ValueStar == 3, 'SearchExpressionNode.ValueStar == 3'); // ../Include/Common/SearchExpression.js: 9

var _SearchExpression = { // ../Include/Common/SearchExpression.js: 11
    CreateToken: function(application, node) { // ../Include/Common/SearchExpression.js: 12
        return '\'' + application + '$' + Escape.MyEscape(node) + '\''; // ../Include/Common/SearchExpression.js: 13
    }, // ../Include/Common/SearchExpression.js: 14
    CreateTokenStar: function(application, node, prefixLen) { // ../Include/Common/SearchExpression.js: 15
        return _SearchExpression.CreateToken(application, node) + (application.length + 1 + prefixLen); // ../Include/Common/SearchExpression.js: 16
    }, // ../Include/Common/SearchExpression.js: 17
    GetUniqueTokens: function(application, nodes) { // ../Include/Common/SearchExpression.js: 18
        var hash = {}; // ../Include/Common/SearchExpression.js: 19
        var tokens = []; // ../Include/Common/SearchExpression.js: 20
        for (var i = 1, n = nodes.length; i < n; ++i) { // ../Include/Common/SearchExpression.js: 21
            var token = _SearchExpression.ToString(application, nodes[i]); // ../Include/Common/SearchExpression.js: 22
            if (HashMap.AddNewItem(hash, token, true)) // ../Include/Common/SearchExpression.js: 23
                tokens.push(token); // ../Include/Common/SearchExpression.js: 24
        } // ../Include/Common/SearchExpression.js: 25
        return tokens; // ../Include/Common/SearchExpression.js: 26
    }, // ../Include/Common/SearchExpression.js: 27
    JoinUniqueNodes: function(application, nodes, operator, isRoot) { // ../Include/Common/SearchExpression.js: 28
        var tokens = _SearchExpression.GetUniqueTokens(application, nodes); // ../Include/Common/SearchExpression.js: 29
        if (tokens.length > 1) { // ../Include/Common/SearchExpression.js: 30
            var token = tokens.join(operator); // ../Include/Common/SearchExpression.js: 31
            return (isRoot ? token : '(' + token + ')'); // ../Include/Common/SearchExpression.js: 32
        } // ../Include/Common/SearchExpression.js: 33
        Assert.Length('_SearchExpression.JoinUniqueNodes', tokens, 1, 'tokens'); // ../Include/Common/SearchExpression.js: 34
        return tokens[0]; // ../Include/Common/SearchExpression.js: 35
    }, // ../Include/Common/SearchExpression.js: 36
    ToStringMap: [ // ../Include/Common/SearchExpression.js: 37
        function(application, nodes, isRoot) { // ../Include/Common/SearchExpression.js: 38
            return _SearchExpression.JoinUniqueNodes(application, nodes, '-', isRoot); // ../Include/Common/SearchExpression.js: 39
        }, // ../Include/Common/SearchExpression.js: 40
        function(application, nodes, isRoot) { // ../Include/Common/SearchExpression.js: 41
            return _SearchExpression.JoinUniqueNodes(application, nodes, '+', isRoot); // ../Include/Common/SearchExpression.js: 42
        }, // ../Include/Common/SearchExpression.js: 43
        function(application, nodes) { // ../Include/Common/SearchExpression.js: 44
            Assert.Length('_SearchExpression.ToStringMap.3', nodes, 2, 'nodes'); // ../Include/Common/SearchExpression.js: 45
            Assert.String('_SearchExpression.ToStringMap.3', nodes[1], 'nodes[1]'); // ../Include/Common/SearchExpression.js: 46
            return _SearchExpression.CreateToken(application, nodes[1]); // ../Include/Common/SearchExpression.js: 47
        }, // ../Include/Common/SearchExpression.js: 48
        function(application, nodes) { // ../Include/Common/SearchExpression.js: 49
            Assert.Length('_SearchExpression.ToStringMap.4', nodes, 3, 'nodes'); // ../Include/Common/SearchExpression.js: 50
            Assert.String('_SearchExpression.ToStringMap.4', nodes[1], 'nodes[1]'); // ../Include/Common/SearchExpression.js: 51
            return _SearchExpression.CreateTokenStar(application, nodes[1], nodes[2]); // ../Include/Common/SearchExpression.js: 52
        } // ../Include/Common/SearchExpression.js: 53
    ], // ../Include/Common/SearchExpression.js: 54
    ToString: function(application, nodes, isRoot) { // ../Include/Common/SearchExpression.js: 55
        Assert.MinLength('_SearchExpression.ToString', nodes, 2, 'nodes'); // ../Include/Common/SearchExpression.js: 56
        Assert.ArrayIndex('_SearchExpression.ToString', nodes[0], _SearchExpression.ToStringMap, 'nodes[0]', '_SearchExpression.ToStringMap'); // ../Include/Common/SearchExpression.js: 57
        return _SearchExpression.ToStringMap[nodes[0]](application, nodes, isRoot); // ../Include/Common/SearchExpression.js: 58
    }, // ../Include/Common/SearchExpression.js: 59
    TransformTree: function(application, node) { // ../Include/Common/SearchExpression.js: 60
        var nodeType = node[0]; // ../Include/Common/SearchExpression.js: 61
        if (nodeType == SearchExpressionNode.ValueStar) { // ../Include/Common/SearchExpression.js: 62
            var value = node[1]; // ../Include/Common/SearchExpression.js: 63
            var prefixLen = node[2]; // ../Include/Common/SearchExpression.js: 64
            if (value.substr(prefixLen) == '*') // ../Include/Common/SearchExpression.js: 65
                node = [SearchExpressionNode.Value, value]; // ../Include/Common/SearchExpression.js: 66
            else node = [SearchExpressionNode.Or, [SearchExpressionNode.Value, value], [SearchExpressionNode.Value, value.substr(0, prefixLen) + '*']]; // ../Include/Common/SearchExpression.js: 67
            nodeType = node[0]; // ../Include/Common/SearchExpression.js: 68
        } // ../Include/Common/SearchExpression.js: 69
        if (nodeType == SearchExpressionNode.Value) { // ../Include/Common/SearchExpression.js: 70
            var token = Escape.MyEscape(node[1]); // ../Include/Common/SearchExpression.js: 71
            return ['\'' + token + '\'', [SearchExpressionNode.Value, application + '$' + token]]; // ../Include/Common/SearchExpression.js: 72
        } // ../Include/Common/SearchExpression.js: 73
        var resultNode = [node[0]]; // ../Include/Common/SearchExpression.js: 74
        var resultKeys = []; // ../Include/Common/SearchExpression.js: 75
        var uniqueKeys = {}; // ../Include/Common/SearchExpression.js: 76
        function addItem(compiledObject) { // ../Include/Common/SearchExpression.js: 77
            var key = compiledObject[0]; // ../Include/Common/SearchExpression.js: 78
            if (!uniqueKeys[key]) { // ../Include/Common/SearchExpression.js: 79
                uniqueKeys[key] = true; // ../Include/Common/SearchExpression.js: 80
                resultKeys.push(key); // ../Include/Common/SearchExpression.js: 81
                resultNode.push(compiledObject); // ../Include/Common/SearchExpression.js: 82
            } // ../Include/Common/SearchExpression.js: 83
        } // ../Include/Common/SearchExpression.js: 84
        for (var i = 1; i < node.length; ++i) { // ../Include/Common/SearchExpression.js: 85
            var compiledObject = _SearchExpression.TransformTree(application, node[i]); // ../Include/Common/SearchExpression.js: 86
            var compiledNode = compiledObject[1]; // ../Include/Common/SearchExpression.js: 87
            if (compiledNode[0] == nodeType) { // ../Include/Common/SearchExpression.js: 88
                for (var j = 1; j < compiledNode.length; ++j) // ../Include/Common/SearchExpression.js: 89
                    addItem(compiledNode[j]); // ../Include/Common/SearchExpression.js: 90
            } // ../Include/Common/SearchExpression.js: 91
            else addItem(compiledObject); // ../Include/Common/SearchExpression.js: 92
        } // ../Include/Common/SearchExpression.js: 93
        // Assert.Condition('_SearchExpressionTree.Compile', (resultNode.length >= 2), 'resultNode.length >= 2');
        if (resultNode.length == 2) // ../Include/Common/SearchExpression.js: 95
            return resultNode[1]; // ../Include/Common/SearchExpression.js: 96
        var operator = ((nodeType == SearchExpressionNode.Or) ? '-' : '+'); // ../Include/Common/SearchExpression.js: 97
        return [resultKeys.join(operator), resultNode]; // ../Include/Common/SearchExpression.js: 98
    }, // ../Include/Common/SearchExpression.js: 99
    RemoveTreeLabels: function(labelledTree) { // ../Include/Common/SearchExpression.js: 100
        var node = labelledTree[1]; // ../Include/Common/SearchExpression.js: 101
        if (node[0] != SearchExpressionNode.Value) { // ../Include/Common/SearchExpression.js: 102
            for (var i = 1; i < node.length; ++i) // ../Include/Common/SearchExpression.js: 103
                node[i] = _SearchExpression.RemoveTreeLabels(node[i]); // ../Include/Common/SearchExpression.js: 104
        } // ../Include/Common/SearchExpression.js: 105
        return node; // ../Include/Common/SearchExpression.js: 106
    } // ../Include/Common/SearchExpression.js: 107
}; // ../Include/Common/SearchExpression.js: 108

var SearchExpression = { // ../Include/Common/SearchExpression.js: 110
    CreateTree: function (application, searchExp) { // ../Include/Common/SearchExpression.js: 111
        var labelledTree = _SearchExpression.TransformTree(application, searchExp); // ../Include/Common/SearchExpression.js: 112
        return _SearchExpression.RemoveTreeLabels(labelledTree); // ../Include/Common/SearchExpression.js: 113
    }, // ../Include/Common/SearchExpression.js: 114
    ToString: function(application, searchExp) { // ../Include/Common/SearchExpression.js: 115
        return _SearchExpression.ToString(application, searchExp, true); // ../Include/Common/SearchExpression.js: 116
    } // ../Include/Common/SearchExpression.js: 117
}; // ../Include/Common/SearchExpression.js: 118

//* <FileEnd path="../Include/Common/SearchExpression.js"/>


//* <FileBegin path="../Include/Common/SearchExpressionBuilder.js"/>
//x /// <reference path="../Tools/Base.js"/>
//x /// <reference path="SearchExpressionNode.js"/>

/** @constructor */ // ../Include/Common/SearchExpressionBuilder.js: 4
function SearchExpressionBuilder(nodeType) { // ../Include/Common/SearchExpressionBuilder.js: 5
    this.List = [((nodeType!=null)? nodeType: SearchExpressionNode.Or)]; // ../Include/Common/SearchExpressionBuilder.js: 6
}; // ../Include/Common/SearchExpressionBuilder.js: 7

SearchExpressionBuilder.prototype = { // ../Include/Common/SearchExpressionBuilder.js: 9
    AddValue: function(value) { // ../Include/Common/SearchExpressionBuilder.js: 10
        this.List.push([SearchExpressionNode.Value, value]); // ../Include/Common/SearchExpressionBuilder.js: 11
    }, // ../Include/Common/SearchExpressionBuilder.js: 12
    AddPart: function(part) { // ../Include/Common/SearchExpressionBuilder.js: 13
        this.List.push([SearchExpressionNode.Value, part[0] + part[1]]); // ../Include/Common/SearchExpressionBuilder.js: 14
    }, // ../Include/Common/SearchExpressionBuilder.js: 15
    AddPartStar: function(part) { // ../Include/Common/SearchExpressionBuilder.js: 16
        if (part[1] == '*') // ../Include/Common/SearchExpressionBuilder.js: 17
            this.AddPart(part); // ../Include/Common/SearchExpressionBuilder.js: 18
        else this.List.push([SearchExpressionNode.ValueStar, part[0] + part[1], part[0].length]); // ../Include/Common/SearchExpressionBuilder.js: 19
    }, // ../Include/Common/SearchExpressionBuilder.js: 20
    AddPartValue: function(part) { // ../Include/Common/SearchExpressionBuilder.js: 21
        this.List.push([SearchExpressionNode.Value, part[1]]); // ../Include/Common/SearchExpressionBuilder.js: 22
    }, // ../Include/Common/SearchExpressionBuilder.js: 23
    AddParts: function(parts) { // ../Include/Common/SearchExpressionBuilder.js: 24
        if (parts.length) { // ../Include/Common/SearchExpressionBuilder.js: 25
            var list = [SearchExpressionNode.And]; // ../Include/Common/SearchExpressionBuilder.js: 26
            for (var i = 0, n = parts.length; i < n; ++i) // ../Include/Common/SearchExpressionBuilder.js: 27
                list.push([SearchExpressionNode.Value, parts[i][0] + parts[i][1]]); // ../Include/Common/SearchExpressionBuilder.js: 28
            this.List.push((list.length == 2) ? list[1] : list); // ../Include/Common/SearchExpressionBuilder.js: 29
        } // ../Include/Common/SearchExpressionBuilder.js: 30
    }, // ../Include/Common/SearchExpressionBuilder.js: 31
    AddPartsValue: function(parts) { // ../Include/Common/SearchExpressionBuilder.js: 32
        if (parts.length) { // ../Include/Common/SearchExpressionBuilder.js: 33
            var list = [SearchExpressionNode.And]; // ../Include/Common/SearchExpressionBuilder.js: 34
            for (var i = 0, n = parts.length; i < n; ++i) // ../Include/Common/SearchExpressionBuilder.js: 35
                list.push([SearchExpressionNode.Value, parts[i][1]]); // ../Include/Common/SearchExpressionBuilder.js: 36
            this.List.push((list.length == 2) ? list[1] : list); // ../Include/Common/SearchExpressionBuilder.js: 37
        } // ../Include/Common/SearchExpressionBuilder.js: 38
    }, // ../Include/Common/SearchExpressionBuilder.js: 39
    AddOptionalParts: function(parts) { // ../Include/Common/SearchExpressionBuilder.js: 40
        for (var i = 0, n = parts.length; i < n; ++i) // ../Include/Common/SearchExpressionBuilder.js: 41
            this.List.push([SearchExpressionNode.Value, parts[i][0] + parts[i][1]]); // ../Include/Common/SearchExpressionBuilder.js: 42
    }, // ../Include/Common/SearchExpressionBuilder.js: 43
    ToObject: function() { // ../Include/Common/SearchExpressionBuilder.js: 44
        return ((this.List.length > 1) ? this.List : null); // ../Include/Common/SearchExpressionBuilder.js: 45
    } // ../Include/Common/SearchExpressionBuilder.js: 46
}; // ../Include/Common/SearchExpressionBuilder.js: 47

//Matyi: This is a totally wrong place for this function, an ugly hack to add MA to the search expression!!!
function SearchExpressionBuilder_Add_MA(searchExp, appNsName) { // ../Include/Common/SearchExpressionBuilder.js: 50
    if (!searchExp) // ../Include/Common/SearchExpressionBuilder.js: 51
        return null; // ../Include/Common/SearchExpressionBuilder.js: 52
    if (searchExp.length == 2 && (searchExp[0] == SearchExpressionNode.And || searchExp[0] == SearchExpressionNode.Or)) // ../Include/Common/SearchExpressionBuilder.js: 53
        searchExp = searchExp[1]; // ../Include/Common/SearchExpressionBuilder.js: 54
    var newExpr = [SearchExpressionNode.Value, 'MA' + appNsName]; // ../Include/Common/SearchExpressionBuilder.js: 55
    if (searchExp[0] == SearchExpressionNode.And) // ../Include/Common/SearchExpressionBuilder.js: 56
        searchExp.push(newExpr); // ../Include/Common/SearchExpressionBuilder.js: 57
    else searchExp = [SearchExpressionNode.And, searchExp, newExpr]; // ../Include/Common/SearchExpressionBuilder.js: 58
    return searchExp; // ../Include/Common/SearchExpressionBuilder.js: 59
} // ../Include/Common/SearchExpressionBuilder.js: 60

//* <FileEnd path="../Include/Common/SearchExpressionBuilder.js"/>


//* <FileBegin path="../Include/Common/ContextType.js"/>

var ContextType = { // ../Include/Common/ContextType.js: 2
    NoContext: 0, // ../Include/Common/ContextType.js: 3
    Absolute: 1, // ../Include/Common/ContextType.js: 4
    TopRelative: 2, // ../Include/Common/ContextType.js: 5
    SmartMatch: 3 // ../Include/Common/ContextType.js: 6
}; // ../Include/Common/ContextType.js: 7

//* <FileEnd path="../Include/Common/ContextType.js"/>


//* <FileBegin path="../Include/Common/PartDescriptor.js"/>

/** @constructor */ // ../Include/Common/PartDescriptor.js: 2
function PartDescriptor(name, caption, useNameAsPrefix, searchable, multiPart) { // ../Include/Common/PartDescriptor.js: 3
    this.Name = name; // ../Include/Common/PartDescriptor.js: 4
    this.Caption = caption; // ../Include/Common/PartDescriptor.js: 5
    this.UseNameAsPrefix = useNameAsPrefix; // ../Include/Common/PartDescriptor.js: 6
    this.Searchable = searchable; // ../Include/Common/PartDescriptor.js: 7
    this.MultiPart = multiPart; // ../Include/Common/PartDescriptor.js: 8
} // ../Include/Common/PartDescriptor.js: 9

PartDescriptor.Create = function(part) { // ../Include/Common/PartDescriptor.js: 11
    return new PartDescriptor(part[0], part[1], part[2], part[3], part[4]); // ../Include/Common/PartDescriptor.js: 12
} // ../Include/Common/PartDescriptor.js: 13

//* <FileEnd path="../Include/Common/PartDescriptor.js"/>


//* <FileBegin path="../Include/Common/UpkMeta.js"/>
//x /// <reference path="../Tools/Base.js"/>
//x /// <reference path="../Tools/Array.js" />
//x /// <reference path="../Tools/Url.js" />
//x /// <reference path="../Tools/String.js" />
//x /// <reference path="../Tools/Dom.js" />
//x /// <reference path="../Tools/Window.js" />
//x /// <reference path="../Tools/RawQuery.js" />
//x /// <reference path="ApplicationInfo.js" />

//* <FileBegin path="../Include/Tools/Url.js"/>
//x /// <reference path="Assert.js"/>

var Url = { // ../Include/Tools/Url.js: 3
    DecodeLocationSearch: function(searchStr, caseInsensitive) { // ../Include/Tools/Url.js: 4
        Assert.NonNull('Url.DecodeLocationSearch', searchStr, 'searchStr'); // ../Include/Tools/Url.js: 5
        if (searchStr.length == 0) // ../Include/Tools/Url.js: 6
            return {}; // ../Include/Tools/Url.js: 7
        return Url.DecodeQuery(searchStr.substring(1), caseInsensitive); // ../Include/Tools/Url.js: 8
    }, // ../Include/Tools/Url.js: 9
    DecodeLocationSearchTokens: function(searchStr) { // ../Include/Tools/Url.js: 10
        Assert.NonNull('Url.DecodeLocationSearchTokens', searchStr, 'searchStr'); // ../Include/Tools/Url.js: 11
        if (searchStr.length == 0) // ../Include/Tools/Url.js: 12
            return []; // ../Include/Tools/Url.js: 13
        return Url.DecodeQueryTokens(searchStr.substring(1)); // ../Include/Tools/Url.js: 14
    }, // ../Include/Tools/Url.js: 15
    DecodeQuery: function(queryStr, caseInsensitive) { // ../Include/Tools/Url.js: 16
        Assert.NonNull('Url.DecodeQuery', queryStr, 'queryStr'); // ../Include/Tools/Url.js: 17
        var query = {}; // ../Include/Tools/Url.js: 18
        var tokens = queryStr.split('&'); // ../Include/Tools/Url.js: 19
        var name; // ../Include/Tools/Url.js: 20
        for (var i = 0, n = tokens.length; i < n; ++i) { // ../Include/Tools/Url.js: 21
            var token = tokens[i]; // ../Include/Tools/Url.js: 22
            var eqPos = token.indexOf('='); // ../Include/Tools/Url.js: 23
            if (eqPos == -1) { // ../Include/Tools/Url.js: 24
                name = decodeURIComponent(token); // ../Include/Tools/Url.js: 25
                query[caseInsensitive ? name.toLowerCase() : name] = ''; // ../Include/Tools/Url.js: 26
            } // ../Include/Tools/Url.js: 27
            else { // ../Include/Tools/Url.js: 28
                name = decodeURIComponent(token.substr(0, eqPos)); // ../Include/Tools/Url.js: 29
                query[caseInsensitive ? name.toLowerCase() : name] = decodeURIComponent(token.substr(eqPos + 1)); // ../Include/Tools/Url.js: 30
            } // ../Include/Tools/Url.js: 31
        } // ../Include/Tools/Url.js: 32
        return query; // ../Include/Tools/Url.js: 33
    }, // ../Include/Tools/Url.js: 34
    DecodeQueryTokens: function(queryStr) { // ../Include/Tools/Url.js: 35
        Assert.NonNull('Url.DecodeQueryTokens', queryStr, 'queryStr'); // ../Include/Tools/Url.js: 36
        var tokens = queryStr.split('&'); // ../Include/Tools/Url.js: 37
        for (var i = 0, n = tokens.length; i < n; ++i) // ../Include/Tools/Url.js: 38
            tokens[i] = decodeURIComponent(tokens[i]); // ../Include/Tools/Url.js: 39
        return tokens; // ../Include/Tools/Url.js: 40
    }, // ../Include/Tools/Url.js: 41
    ReplaceLocationHash: function(location, hash) { // ../Include/Tools/Url.js: 42
        var href = location.href; // ../Include/Tools/Url.js: 43
        return (href.substr(0, href.length - location.hash.length) + '#n'); // ../Include/Tools/Url.js: 44
    } // ../Include/Tools/Url.js: 45
}; // ../Include/Tools/Url.js: 46

//* <FileEnd path="../Include/Tools/Url.js"/>


//* <FileBegin path="../Include/Tools/Dom.js"/>
//x /// <reference path="Base.js" />
//x /// <reference path="Main.js" />
//x /// <reference path="Browser.js" />

function GetElementsByTagName(win, tag) { // ../Include/Tools/Dom.js: 5
    var retValue = win.document.getElementsByTagName(tag); // ../Include/Tools/Dom.js: 6
    return retValue; // ../Include/Tools/Dom.js: 7
} // ../Include/Tools/Dom.js: 8

function GetElementsByAttribute(win, attr, value) { // ../Include/Tools/Dom.js: 10
    var ret = []; // ../Include/Tools/Dom.js: 11
    if (attr == 'className') { // ../Include/Tools/Dom.js: 12
        if (!IsIE()) // ../Include/Tools/Dom.js: 13
            attr = "class"; // ../Include/Tools/Dom.js: 14
    } // ../Include/Tools/Dom.js: 15
    var all = win.document.getElementsByTagName('*'); //all
    for (var j = 0, jlength = all.length; j < jlength; j++) { // ../Include/Tools/Dom.js: 17

        if (all[j].getAttribute(attr) == value) // ../Include/Tools/Dom.js: 19
            ret.push(all[j]); // ../Include/Tools/Dom.js: 20
    } // ../Include/Tools/Dom.js: 21
    return ret; // ../Include/Tools/Dom.js: 22
} // ../Include/Tools/Dom.js: 23

function GetComments(win) { // ../Include/Tools/Dom.js: 25
    var coll = []; // ../Include/Tools/Dom.js: 26
    var doc = win.document; // ../Include/Tools/Dom.js: 27
    _GetElementsByNodeType(doc, coll, 8); // ../Include/Tools/Dom.js: 28
    return coll; // ../Include/Tools/Dom.js: 29
} // ../Include/Tools/Dom.js: 30

function _GetElementsByNodeType(node, coll, type) { // ../Include/Tools/Dom.js: 32
    //Gkod.Trace.Write(Gkod.Trace.ID.ODUT, "[ODUTILITY] : Gkod.Utility.Dom._GetElementsByNodeType() type=" + type + " node = " + node.nodeName + " [" + node.nodeValue + "][" + node.nodeType + "]", 3); 
    if (node.nodeType == type) { // ../Include/Tools/Dom.js: 34
        coll.push(node); // ../Include/Tools/Dom.js: 35
    } // ../Include/Tools/Dom.js: 36
    if (node.hasChildNodes()) { // ../Include/Tools/Dom.js: 37
        var children = node.childNodes; // ../Include/Tools/Dom.js: 38
        for (var i = 0, ilength = children.length; i < ilength; i++) { // ../Include/Tools/Dom.js: 39
            _GetElementsByNodeType(children[i], coll, type); // ../Include/Tools/Dom.js: 40
        } // ../Include/Tools/Dom.js: 41
    } // ../Include/Tools/Dom.js: 42
} // ../Include/Tools/Dom.js: 43

function MatchStyleSheetNames(win, styles, match, fullmatch) { // ../Include/Tools/Dom.js: 45
    try { // ../Include/Tools/Dom.js: 46
        var _fullmatch = IsBoolean(fullmatch) ? fullmatch : true; //default is true
        var styleelements = GetElementsByTagName(win, "link"); // ../Include/Tools/Dom.js: 48
        var _match = 0; // ../Include/Tools/Dom.js: 49
        for (var i = 0, ilength = styleelements.length; i < ilength; i++) { // ../Include/Tools/Dom.js: 50
            var _text = styleelements[i].href; // ../Include/Tools/Dom.js: 51
            if (_text != '') { // ../Include/Tools/Dom.js: 52
                var _regexp = new RegExp('.*[/|\\\\]([^/|\\\\]*)\\.[css|jsp]'); // ../Include/Tools/Dom.js: 53
                var _result = _text.match(_regexp); // ../Include/Tools/Dom.js: 54
                if (_result != null && _result.length > 1) { // ../Include/Tools/Dom.js: 55
                    if (_result[1] != null && _result[1].length > 0) { // ../Include/Tools/Dom.js: 56
                        //Gkod.Trace.Write(Gkod.Trace.ID.ODUT, "[ODUTILITY] : Gkod.Utility.Dom._MatchStyleSheetNames() style = " + _result[1] + " " + (fullmatch ? " full" : " partial"), 3);
                        for (var j = 0, jlength = styles.length; j < jlength; j++) { // ../Include/Tools/Dom.js: 58
                            if (!_fullmatch) { // ../Include/Tools/Dom.js: 59
                                var k = _result[1].indexOf(styles[j]); // ../Include/Tools/Dom.js: 60
                                if (k > -1) { // ../Include/Tools/Dom.js: 61
                                    _match++; // ../Include/Tools/Dom.js: 62
                                } // ../Include/Tools/Dom.js: 63
                            } // ../Include/Tools/Dom.js: 64
                            else { // ../Include/Tools/Dom.js: 65
                                if (_result[1] == styles[j]) { // ../Include/Tools/Dom.js: 66
                                    _match++; // ../Include/Tools/Dom.js: 67
                                } // ../Include/Tools/Dom.js: 68
                            } // ../Include/Tools/Dom.js: 69
                        } // ../Include/Tools/Dom.js: 70
                    } // ../Include/Tools/Dom.js: 71
                } // ../Include/Tools/Dom.js: 72
            } // ../Include/Tools/Dom.js: 73
        } // ../Include/Tools/Dom.js: 74
        if (_match >= match) { // ../Include/Tools/Dom.js: 75
            return true; // ../Include/Tools/Dom.js: 76
        } // ../Include/Tools/Dom.js: 77
    } catch (e) { // ../Include/Tools/Dom.js: 78
        //Gkod.Utility.OnError('[ERROR] : Error in calling Gkod.Utility.Dom.MatchStyleSheetNames()', e);
        throw (e); // ../Include/Tools/Dom.js: 80
    } // ../Include/Tools/Dom.js: 81
    return false;     // ../Include/Tools/Dom.js: 82
} // ../Include/Tools/Dom.js: 83

function MatchScriptNames(win, scripts, match, fullmatch) { // ../Include/Tools/Dom.js: 85
    try { // ../Include/Tools/Dom.js: 86
        var _fullmatch = IsBoolean(fullmatch) ? fullmatch : true; //default is true
        var scriptelements = GetElementsByTagName(win, "script"); // ../Include/Tools/Dom.js: 88
        var _match = 0; // ../Include/Tools/Dom.js: 89
        for (var i = 0, ilength = scriptelements.length; i < ilength; i++) { // ../Include/Tools/Dom.js: 90
            var _text = scriptelements[i].src; // ../Include/Tools/Dom.js: 91
            if (_text != '') { // ../Include/Tools/Dom.js: 92
                var _regexp = new RegExp('.*[/|\\\\]([^/|\\\\]*)\\.js'); // ../Include/Tools/Dom.js: 93
                var _result = _text.match(_regexp); // ../Include/Tools/Dom.js: 94
                if (_result != null && _result.length > 1) { // ../Include/Tools/Dom.js: 95
                    if (_result[1] != null && _result[1].length > 0) { // ../Include/Tools/Dom.js: 96
                        //Gkod.Trace.Write(Gkod.Trace.ID.ODUT, "[ODUTILITY] : Gkod.Utility.Dom.MatchScriptNames() script = " + _result[1] + " " + (fullmatch ? " full" : " partial"), 3);
                        for (var j = 0, jlength = scripts.length; j < jlength; j++) { // ../Include/Tools/Dom.js: 98
                            if (!_fullmatch) { // ../Include/Tools/Dom.js: 99
                                var k = _result[1].indexOf(scripts[j]); // ../Include/Tools/Dom.js: 100
                                if (k > -1) { // ../Include/Tools/Dom.js: 101
                                    _match++; // ../Include/Tools/Dom.js: 102
                                } // ../Include/Tools/Dom.js: 103
                            } // ../Include/Tools/Dom.js: 104
                            else { // ../Include/Tools/Dom.js: 105
                                if (_result[1] == scripts[j]) { // ../Include/Tools/Dom.js: 106
                                    _match++; // ../Include/Tools/Dom.js: 107
                                } // ../Include/Tools/Dom.js: 108
                            } // ../Include/Tools/Dom.js: 109
                        } // ../Include/Tools/Dom.js: 110
                    } // ../Include/Tools/Dom.js: 111
                } // ../Include/Tools/Dom.js: 112
            } // ../Include/Tools/Dom.js: 113
        } // ../Include/Tools/Dom.js: 114

        if (_match >= match) { // ../Include/Tools/Dom.js: 116
            return true; // ../Include/Tools/Dom.js: 117
        } // ../Include/Tools/Dom.js: 118
    } catch (e) { // ../Include/Tools/Dom.js: 119
        //Gkod.Utility.OnError('[ERROR] : Error in calling Gkod.Utility.Dom.MatchScriptNames()', e);
        throw (e); // ../Include/Tools/Dom.js: 121
    } // ../Include/Tools/Dom.js: 122
    return false; // ../Include/Tools/Dom.js: 123
} // ../Include/Tools/Dom.js: 124

function MatchAttribute(win, tagname, attr, attributes, match) { // ../Include/Tools/Dom.js: 126
    var _match = 0; // ../Include/Tools/Dom.js: 127
    var x = GetElementsByTagName(win, tagname); // ../Include/Tools/Dom.js: 128
    //Gkod.Trace.Write(Gkod.Trace.ID.ODUT, "[ODUTILITY] : Gkod.Utility.Dom.MatchAttribute2() found " + x.length + ' ' + tagname, 3);
    for (var i = 0; i < attributes.length; i++) { // ../Include/Tools/Dom.js: 130
        for (var j = 0; j < x.length; j++) { // ../Include/Tools/Dom.js: 131
            var z = GetAttribute(x[j], attr); // ../Include/Tools/Dom.js: 132
            //Gkod.Trace.Write(Gkod.Trace.ID.ODUT, "[ODUTILITY] : Gkod.Utility.Dom.MatchAttribute2() " + tagname + '[' + j + ']' + ' ' + attr + '=' + z, 3);
            if (z == attributes[i]) { // ../Include/Tools/Dom.js: 134
                _match++; // ../Include/Tools/Dom.js: 135
                break; // ../Include/Tools/Dom.js: 136
            } // ../Include/Tools/Dom.js: 137
        } // ../Include/Tools/Dom.js: 138
    } // ../Include/Tools/Dom.js: 139
    if (_match >= match) { // ../Include/Tools/Dom.js: 140
        return true; // ../Include/Tools/Dom.js: 141
    } // ../Include/Tools/Dom.js: 142
    return false; // ../Include/Tools/Dom.js: 143
} // ../Include/Tools/Dom.js: 144


function MatchVariables(win, variables, match) { // ../Include/Tools/Dom.js: 147
    var _match = 0; // ../Include/Tools/Dom.js: 148
    for (var i = 0; i < variables.length; i++) { // ../Include/Tools/Dom.js: 149
        if (typeof (win[variables[i]]) != 'undefined') { // ../Include/Tools/Dom.js: 150
            _match++; // ../Include/Tools/Dom.js: 151
        } // ../Include/Tools/Dom.js: 152
    } // ../Include/Tools/Dom.js: 153

    if (_match >= match) { // ../Include/Tools/Dom.js: 155
        return true; // ../Include/Tools/Dom.js: 156
    } // ../Include/Tools/Dom.js: 157
    return false; // ../Include/Tools/Dom.js: 158
} // ../Include/Tools/Dom.js: 159

function MatchWindowNames(win, windownames) { // ../Include/Tools/Dom.js: 161
    for (var i = 0, ilength = windownames.length; i < ilength; i++) { // ../Include/Tools/Dom.js: 162
        //Gkod.Trace.Write(Gkod.Trace.ID.ODUT, "[ODUTILITY] : Gkod.Utility.Dom.MatchWindowNames() _window.name = " + _window.name, 3); 
        if (win.name.indexOf(windownames[i]) > -1) { // ../Include/Tools/Dom.js: 164
            return true; // ../Include/Tools/Dom.js: 165
        } // ../Include/Tools/Dom.js: 166
    } // ../Include/Tools/Dom.js: 167
    return false; // ../Include/Tools/Dom.js: 168
} // ../Include/Tools/Dom.js: 169

function MatchImageNames(win, images, match) { // ../Include/Tools/Dom.js: 171
    var imageelements = GetElementsByTagName(win, "img"); // ../Include/Tools/Dom.js: 172
    var _match = 0; // ../Include/Tools/Dom.js: 173
    for (var i = 0, ilength = imageelements.length; i < ilength; i++) { // ../Include/Tools/Dom.js: 174
        var _text = imageelements[i].src; // ../Include/Tools/Dom.js: 175
        //BHS: _text.substr(0, 5) != 'data:' is needed because of Issue-11723210
        if (_text != '' && _text.substr(0, 5) != 'data:') { // ../Include/Tools/Dom.js: 177
            var _regexp = new RegExp('.*[/|\\\\]([^/|\\\\]*)\\.gif'); // ../Include/Tools/Dom.js: 178
            var _result = _text.match(_regexp); // ../Include/Tools/Dom.js: 179
            if (_result != null && _result.length > 1) { // ../Include/Tools/Dom.js: 180
                if (_result[1] != null && _result[1].length > 0) { // ../Include/Tools/Dom.js: 181
                    //Gkod.Trace.Write(Gkod.Trace.ID.ODUT, "[ODUTILITY] : Gkod.Utility.Dom.MatchImageNames() image = " + _gkod_result[1], 3);
                    for (var j = 0, jlength = images.length; j < jlength; j++) { // ../Include/Tools/Dom.js: 183
                        //var k = _gkod_result[1].indexOf(_gkod_images_temp[j]);
                        //if (k > -1) 
                        if (_result[1] == images[j]) { // ../Include/Tools/Dom.js: 186
                            _match++; // ../Include/Tools/Dom.js: 187
                        } // ../Include/Tools/Dom.js: 188
                    } // ../Include/Tools/Dom.js: 189
                } // ../Include/Tools/Dom.js: 190
            } // ../Include/Tools/Dom.js: 191
        } // ../Include/Tools/Dom.js: 192
    } // ../Include/Tools/Dom.js: 193

    if (_match >= match) { // ../Include/Tools/Dom.js: 195
        return true; // ../Include/Tools/Dom.js: 196
    } // ../Include/Tools/Dom.js: 197
    return false; // ../Include/Tools/Dom.js: 198
} // ../Include/Tools/Dom.js: 199


function GetAttribute(element, attr) { // ../Include/Tools/Dom.js: 202
    if (attr == 'className') { // ../Include/Tools/Dom.js: 203
        if (!IsIE()) // ../Include/Tools/Dom.js: 204
            attr = "class"; // ../Include/Tools/Dom.js: 205
    } // ../Include/Tools/Dom.js: 206

    return element.getAttribute(attr); // ../Include/Tools/Dom.js: 208
} // ../Include/Tools/Dom.js: 209

//Gyuri functions need the window array (.. winArray ..)
function FindFrameByName(winArray, name) { // ../Include/Tools/Dom.js: 212
    var t = winArray; // ../Include/Tools/Dom.js: 213
    //Gkod.Trace.Write(Gkod.Trace.ID.ODUT, "[ODUTILITY] : Gkod.Utility.Dom.FindFrameByName2() ODWINDOWS.length = " + ODWINDOWS.length, 3); 
    if (typeof (t) == 'undefined' || t.length == 0) // ../Include/Tools/Dom.js: 215
        return null; // ../Include/Tools/Dom.js: 216
    for (var i = 0; i < t.length; i++) { // ../Include/Tools/Dom.js: 217
        //Gkod.Trace.Write(Gkod.Trace.ID.ODUT, "[ODUTILITY] : Gkod.Utility.Dom.FindFrameByName2() window.name = [" + t[i].name + "] URL = [" + t[i].location.href + "]", 3);
        if (typeof (t[i].name) == 'string' && t[i].name == name) { // ../Include/Tools/Dom.js: 219
            return t[i].document; // ../Include/Tools/Dom.js: 220
        } // ../Include/Tools/Dom.js: 221
    } // ../Include/Tools/Dom.js: 222
    return null; // ../Include/Tools/Dom.js: 223
} // ../Include/Tools/Dom.js: 224

function _MatchWindowNames(winArray, windownames, match) { // ../Include/Tools/Dom.js: 226
    var t = winArray; // ../Include/Tools/Dom.js: 227
    var _match = 0; // ../Include/Tools/Dom.js: 228
    if (typeof (t) == 'undefined' || t.length == 0) // ../Include/Tools/Dom.js: 229
        return false; // ../Include/Tools/Dom.js: 230

    for (var i = 0; i < t.length; i++) { // ../Include/Tools/Dom.js: 232
        for (var j = 0; j < windownames.length; j++) { // ../Include/Tools/Dom.js: 233
            if (typeof (t[i].name) == 'string' && t[i].name == windownames[j]) { // ../Include/Tools/Dom.js: 234
                _match++; // ../Include/Tools/Dom.js: 235
            } // ../Include/Tools/Dom.js: 236
        } // ../Include/Tools/Dom.js: 237
    } // ../Include/Tools/Dom.js: 238
    if (_match >= match) { // ../Include/Tools/Dom.js: 239
        return true; // ../Include/Tools/Dom.js: 240
    } // ../Include/Tools/Dom.js: 241
    return false; // ../Include/Tools/Dom.js: 242
} // ../Include/Tools/Dom.js: 243

//TODO: Matyi: Should not be used in recognition
function GetFrames(coll, win) { // ../Include/Tools/Dom.js: 246
    if ((typeof (coll)).toLowerCase() == 'object') { // ../Include/Tools/Dom.js: 247
        if ((typeof (win)).toLowerCase() == 'object') { // ../Include/Tools/Dom.js: 248
        
        } // ../Include/Tools/Dom.js: 250

        var _win = window.top; // ../Include/Tools/Dom.js: 252
        if (typeof (top) != 'undefined') { // ../Include/Tools/Dom.js: 253
            if (top == false) // ../Include/Tools/Dom.js: 254
                _win = win; // ../Include/Tools/Dom.js: 255
            if (top == true) // ../Include/Tools/Dom.js: 256
                _win = win.top; // ../Include/Tools/Dom.js: 257
        } // ../Include/Tools/Dom.js: 258
        GetSubFrames(coll, _win); // ../Include/Tools/Dom.js: 259
    } // ../Include/Tools/Dom.js: 260
} // ../Include/Tools/Dom.js: 261

function GetSubFrames(coll, win) { // ../Include/Tools/Dom.js: 263
    if ((typeof (coll)).toLowerCase() == 'object') { // ../Include/Tools/Dom.js: 264
        if ((typeof (win)).toLowerCase() == 'object') { // ../Include/Tools/Dom.js: 265
            coll.push(win); // ../Include/Tools/Dom.js: 266
            var l = win.length; // ../Include/Tools/Dom.js: 267
            for (var i = 0; i < l; i++) { // ../Include/Tools/Dom.js: 268
                GetSubFrames(coll, win.frames[i]); // ../Include/Tools/Dom.js: 269
            } // ../Include/Tools/Dom.js: 270
        } // ../Include/Tools/Dom.js: 271
    } // ../Include/Tools/Dom.js: 272
} // ../Include/Tools/Dom.js: 273

//This should work in IE, Firefox and Opera
function GetParentWindow(_document) { // ../Include/Tools/Dom.js: 276
    return _document.parentWindow ? _document.parentWindow : _document.defaultView; // ../Include/Tools/Dom.js: 277
} // ../Include/Tools/Dom.js: 278

function GetInnerText(_object) { // ../Include/Tools/Dom.js: 280
    return (_object.innerText) ? _object.innerText : (_object.textContent) ? _object.textContent : ""; // ../Include/Tools/Dom.js: 281
} // ../Include/Tools/Dom.js: 282

function GetInnerText2(_object) { // ../Include/Tools/Dom.js: 284
    if (_object.firstChild) // ../Include/Tools/Dom.js: 285
        return _object.firstChild.nodeValue; // ../Include/Tools/Dom.js: 286

    return ""; // ../Include/Tools/Dom.js: 288
} // ../Include/Tools/Dom.js: 289

function IsHiddenFrame(_window) { // ../Include/Tools/Dom.js: 291
    var bhidden = false; // ../Include/Tools/Dom.js: 292
    var l = 0, r = 0, t = 0, b = 0; // ../Include/Tools/Dom.js: 293

    try { // ../Include/Tools/Dom.js: 295
        var pcanvas = null; // ../Include/Tools/Dom.js: 296
        var mode = _window.document.compatMode; // ../Include/Tools/Dom.js: 297
        if (mode == 'CSS1Compat') { // ../Include/Tools/Dom.js: 298
            pcanvas = _window.document.documentElement; // ../Include/Tools/Dom.js: 299
        } // ../Include/Tools/Dom.js: 300
        else { // ../Include/Tools/Dom.js: 301
            pcanvas = _window.document.body; // ../Include/Tools/Dom.js: 302
        } // ../Include/Tools/Dom.js: 303
        if (pcanvas != null) { // ../Include/Tools/Dom.js: 304
            //NA in FF
            //l = pcanvas.getBoundingClientRect().left;
            //r = pcanvas.getBoundingClientRect().right;
            //t = pcanvas.getBoundingClientRect().top;
            //b = pcanvas.getBoundingClientRect().bottom;

            l = pcanvas.offsetLeft; // ../Include/Tools/Dom.js: 311
            r = pcanvas.offsetLeft + pcanvas.offsetWidth; // ../Include/Tools/Dom.js: 312
            t = pcanvas.offsetTop; // ../Include/Tools/Dom.js: 313
            b = pcanvas.offsetTop + pcanvas.offsetHeight; // ../Include/Tools/Dom.js: 314
        } // ../Include/Tools/Dom.js: 315
    } // ../Include/Tools/Dom.js: 316
    catch (e) { // ../Include/Tools/Dom.js: 317
        bhidden = true; // ../Include/Tools/Dom.js: 318
    } // ../Include/Tools/Dom.js: 319

    if (r * b == 0) { // ../Include/Tools/Dom.js: 321
        bhidden = true; // ../Include/Tools/Dom.js: 322
    } // ../Include/Tools/Dom.js: 323
    //Gkod.Trace.Write(Gkod.Trace.ID.DEF, '[ODDEFS] : Gkod.Context.IsHiddenFrame() hidden=' + bhidden + ' window.name = [' + window.name + '] URL = [' + window.location.href + ']');
    return bhidden; // ../Include/Tools/Dom.js: 325
} // ../Include/Tools/Dom.js: 326

function GetPosition(cell) { // ../Include/Tools/Dom.js: 328
    var ret = 0; // ../Include/Tools/Dom.js: 329
    while (cell) { // ../Include/Tools/Dom.js: 330
        ret++; // ../Include/Tools/Dom.js: 331
        var temp = cell; // ../Include/Tools/Dom.js: 332
        temp = cell.previousSibling; // ../Include/Tools/Dom.js: 333
        cell = temp; // ../Include/Tools/Dom.js: 334
    } // ../Include/Tools/Dom.js: 335
    return ret; // ../Include/Tools/Dom.js: 336
} // ../Include/Tools/Dom.js: 337

function GetXthSiblingFromChild(pos, header) { // ../Include/Tools/Dom.js: 339
    //Gkod.Trace.Write(Gkod.Trace.ID.CTX, "Gkod.Application.Sapcrm07.GetXthSiblingFromChild() pos = " + pos + " header = " + header, 3);
    var ret = null; // ../Include/Tools/Dom.js: 341
    var i = 1; // ../Include/Tools/Dom.js: 342
    if (header) { // ../Include/Tools/Dom.js: 343
        var child = header.firstChild; // ../Include/Tools/Dom.js: 344
        if (child) // ../Include/Tools/Dom.js: 345
            ret = child; // ../Include/Tools/Dom.js: 346
        //Gkod.Trace.Write(Gkod.Trace.ID.CTX, "Gkod.Application.Sapcrm07.GetXthSiblingFromChild() child = " + child.tagName, 3);
        while (child && i < pos) { // ../Include/Tools/Dom.js: 348
            var temp = child.nextSibling; // ../Include/Tools/Dom.js: 349
            if (temp) { // ../Include/Tools/Dom.js: 350
                i++; // ../Include/Tools/Dom.js: 351
            } // ../Include/Tools/Dom.js: 352
            child = temp; // ../Include/Tools/Dom.js: 353
            if (child) // ../Include/Tools/Dom.js: 354
                ret = child; // ../Include/Tools/Dom.js: 355
        } // ../Include/Tools/Dom.js: 356
    } // ../Include/Tools/Dom.js: 357
    return ret; // ../Include/Tools/Dom.js: 358
} // ../Include/Tools/Dom.js: 359

// New DOM functions

/*
var it = document.createNodeIterator(document, NodeFilter.SHOW_COMMENT, null, false);
var nodes = [];
while ( (node = it.nextNode()) ) {
    nodes.push(node);
  }
*/ // ../Include/Tools/Dom.js: 369

var Dom = { // ../Include/Tools/Dom.js: 371
    CreateElementWithName: function(doc, tagName, name) { // ../Include/Tools/Dom.js: 372
//x         //: <if xconfig="Browser.IE*"/>
//x         //: <if-not xconfig="Browser.IE9+"/>
//x         if (Browser.IsIE() && (doc['documentMode'] < 9)) {
//x             return doc.createElement('<' + tagName + ' name="' + name + '">');
//x         }
//x         //: <end/>
//x         //: <end/>
        var node = doc.createElement(tagName); // ../Include/Tools/Dom.js: 380
        node.name = name; // ../Include/Tools/Dom.js: 381
        return node; // ../Include/Tools/Dom.js: 382
    }, // ../Include/Tools/Dom.js: 383

    GetElementsByTagName: function(node, tagName) { // ../Include/Tools/Dom.js: 385
        node.getElementsByTagName(tagName); // ../Include/Tools/Dom.js: 386
    }, // ../Include/Tools/Dom.js: 387
    GetElementsByClassName: function(node, className) { // ../Include/Tools/Dom.js: 388
//x         //: <if xconfig="Browser.FF3+"/>
//x         // http://ejohn.org/blog/getelementsbyclassname-speed-comparison/
//x         return node.getElementsByClassName(className);
//x         //: <else/>
        Fail.NotImplemented('Dom.GetElementsByClassName'); // ../Include/Tools/Dom.js: 393
//x         //: <end/>
    }, // ../Include/Tools/Dom.js: 395
    GetElementsByTagAndClassName: function(node, tagName, className) { // ../Include/Tools/Dom.js: 396
//x         //: <if xconfig="Browser.FF3+"/>
//x         // http://ejohn.org/blog/getelementsbyclassname-speed-comparison/
//x         var result = [];
//x         var nodes = node.getElementsByClassName(className);
//x         for (var i = 0, n = nodes.length; i < n; ++i) {
//x             var nodes_i = nodes[i];
//x             if (nodes_i.tagName.toLowerCase() == tagName)
//x                 result.push(nodes_i);
//x         }
//x         //: <else/>
        Fail.NotImplemented('Dom.GetElementsByTagAndClassName'); // ../Include/Tools/Dom.js: 407
//x         //: <end/>
    }, // ../Include/Tools/Dom.js: 409
    IncludeScript: function(doc, src, onReady, timeoutMs) { // ../Include/Tools/Dom.js: 410
        var head = doc.getElementsByTagName('head')[0]; // ../Include/Tools/Dom.js: 411
        var script = doc.createElement('script'); // ../Include/Tools/Dom.js: 412
        script.setAttribute('type', 'text/javascript'); // ../Include/Tools/Dom.js: 413
        script.setAttribute('src', src); // ../Include/Tools/Dom.js: 414
        if (onReady) { // ../Include/Tools/Dom.js: 415
            var completed = false; // ../Include/Tools/Dom.js: 416
            function OnCompleted(result) { // ../Include/Tools/Dom.js: 417
                if (!completed) { // ../Include/Tools/Dom.js: 418
                    completed = true; // ../Include/Tools/Dom.js: 419
                    setTimeout(function() { onReady(result); }, 100); // ../Include/Tools/Dom.js: 420
                } // ../Include/Tools/Dom.js: 421
            } // ../Include/Tools/Dom.js: 422
            function OnSuccess() { // ../Include/Tools/Dom.js: 423
                OnCompleted(true); // ../Include/Tools/Dom.js: 424
            } // ../Include/Tools/Dom.js: 425
            function OnFailed() { // ../Include/Tools/Dom.js: 426
                OnCompleted(false); // ../Include/Tools/Dom.js: 427
            } // ../Include/Tools/Dom.js: 428
            if (Browser.IsIE()) { // ../Include/Tools/Dom.js: 429
                script.onreadystatechange = function() { // ../Include/Tools/Dom.js: 430
                    var readyState = script.readyState; // ../Include/Tools/Dom.js: 431
                    if (readyState == 'complete' || readyState == 'loaded') // ../Include/Tools/Dom.js: 432
                        OnSuccess(); // ../Include/Tools/Dom.js: 433
                } // ../Include/Tools/Dom.js: 434
            } // ../Include/Tools/Dom.js: 435
            else script.onload = OnSuccess; // ../Include/Tools/Dom.js: 436
            if (timeoutMs) // ../Include/Tools/Dom.js: 437
                setTimeout(OnFailed, timeoutMs); // ../Include/Tools/Dom.js: 438
        } // ../Include/Tools/Dom.js: 439
        head.appendChild(script); // ../Include/Tools/Dom.js: 440
    } // ../Include/Tools/Dom.js: 441
}; // ../Include/Tools/Dom.js: 442

/** @constructor */ // ../Include/Tools/Dom.js: 444
var DomObject = function(node) { // ../Include/Tools/Dom.js: 445
  this.Node = node; // ../Include/Tools/Dom.js: 446
}; // ../Include/Tools/Dom.js: 447

DomObject.prototype = { // ../Include/Tools/Dom.js: 449
  GetElementsByTagName: function(tagName) { // ../Include/Tools/Dom.js: 450
    return Dom.GetElementsByTagName(this.Node, tagName); // ../Include/Tools/Dom.js: 451
  }, // ../Include/Tools/Dom.js: 452
  GetElementsByClassName: function(className) { // ../Include/Tools/Dom.js: 453
    return Dom.GetElementsByClassName(this.Node, className); // ../Include/Tools/Dom.js: 454
  }, // ../Include/Tools/Dom.js: 455
  GetElementsByTagAndClassName: function(tagName, className) { // ../Include/Tools/Dom.js: 456
    return Dom.GetElementsByTagAndClassName(this.Node, tagName, className); // ../Include/Tools/Dom.js: 457
  } // ../Include/Tools/Dom.js: 458
}; // ../Include/Tools/Dom.js: 459

//* <FileEnd path="../Include/Tools/Dom.js"/>


//* <FileBegin path="../Include/Tools/Window.js"/>
//x /// <reference path="Base.js"/>
//x /// <reference path="Browser.js"/>

/** @constructor */ // ../Include/Tools/Window.js: 4
function Window(win) { // ../Include/Tools/Window.js: 5
    this.Native = win; // ../Include/Tools/Window.js: 6
}; // ../Include/Tools/Window.js: 7

Window.Unwrap = function(win) { // ../Include/Tools/Window.js: 9
//x     //:<if xconfig="SmartHelp"/>
//x     //:<if xconfig="Browser.FF*"/>
//x     try {
//x         if (window['XPCNativeWrapper'] && window['XPCNativeWrapper']['unwrap'])
//x             win = window['XPCNativeWrapper']['unwrap'](win);
//x     }
//x     catch (xe) {
//x         Trace('Window.Unwrap', 'XPCNativeWrapper.unwrap exception: ' + xe.message);
//x     }
//x     //:<end/>
//x     //:<end/>
    return win; // ../Include/Tools/Window.js: 21
} // ../Include/Tools/Window.js: 22

Window.TryCall = function(win, name, validator) { // ../Include/Tools/Window.js: 24
    Assert.NonNull('Window.TryCall', win, 'win'); // ../Include/Tools/Window.js: 25
    win = Window.Unwrap(win); // ../Include/Tools/Window.js: 26
    try { // ../Include/Tools/Window.js: 27
        if (win[name]) { // ../Include/Tools/Window.js: 28
            var value = win[name].call(win); // ../Include/Tools/Window.js: 29
            return (validator ? validator(value) : value); // ../Include/Tools/Window.js: 30
        } // ../Include/Tools/Window.js: 31
    } catch (xe) { } // ../Include/Tools/Window.js: 32
    return void 0; // ../Include/Tools/Window.js: 33
}; // ../Include/Tools/Window.js: 34

Window.TryCallWithArguments = function(win, name, args, validator) { // ../Include/Tools/Window.js: 36
    win = Window.Unwrap(win); // ../Include/Tools/Window.js: 37
    try { // ../Include/Tools/Window.js: 38
        if (win[name]) { // ../Include/Tools/Window.js: 39
            var value = win[name].apply(win, args); // ../Include/Tools/Window.js: 40
            return (validator ? validator(value) : value); // ../Include/Tools/Window.js: 41
        } // ../Include/Tools/Window.js: 42
    } catch (xe) { } // ../Include/Tools/Window.js: 43
    return void 0; // ../Include/Tools/Window.js: 44
}; // ../Include/Tools/Window.js: 45

Window.TryGet = function(win, name) { // ../Include/Tools/Window.js: 47
    Assert.NonNull('Window.TryGet', win, 'win'); // ../Include/Tools/Window.js: 48
    win = Window.Unwrap(win); // ../Include/Tools/Window.js: 49
    try { // ../Include/Tools/Window.js: 50
        return win[name]; // ../Include/Tools/Window.js: 51
    } catch (xe) { } // ../Include/Tools/Window.js: 52
    return void 0; // ../Include/Tools/Window.js: 53
}; // ../Include/Tools/Window.js: 54

Window.CloseWindow = function(win) { // ../Include/Tools/Window.js: 56
    // Make IE not to display the following message: 
    // The webpage you are viewing is trying to close the window.
    if (Browser.IsIE()) // ../Include/Tools/Window.js: 59
        win.open('', '_parent', ''); // ../Include/Tools/Window.js: 60
    win.close(); // ../Include/Tools/Window.js: 61
}; // ../Include/Tools/Window.js: 62

Window.Focus = function(win) { // ../Include/Tools/Window.js: 64
    win.focus(); // ../Include/Tools/Window.js: 65
}; // ../Include/Tools/Window.js: 66

Window.prototype = { // ../Include/Tools/Window.js: 68
    TryCall: function(name) { // ../Include/Tools/Window.js: 69
        return Window.TryCall(this.Native, name); // ../Include/Tools/Window.js: 70
    }, // ../Include/Tools/Window.js: 71
    TryCallWithArguments: function(name, args) { // ../Include/Tools/Window.js: 72
        return Window.TryCallWithArguments(this.Native, name, args); // ../Include/Tools/Window.js: 73
    } // ../Include/Tools/Window.js: 74
}; // ../Include/Tools/Window.js: 75


//* <FileEnd path="../Include/Tools/Window.js"/>


//* <FileBegin path="../Include/Tools/RawQuery.js"/>
//x /// <reference path="Assert.js"/>

var RawQuery = { // ../Include/Tools/RawQuery.js: 3
    DecodeLocationSearch: function(searchStr, lowercaseNames, valueDecoder) { // ../Include/Tools/RawQuery.js: 4
        Assert.NonNull('RawQuery.DecodeLocationSearch', searchStr, 'searchStr'); // ../Include/Tools/RawQuery.js: 5
        if (searchStr.length == 0) // ../Include/Tools/RawQuery.js: 6
            return {}; // ../Include/Tools/RawQuery.js: 7
        return RawQuery.DecodeString(searchStr.substring(1), lowercaseNames, valueDecoder); // ../Include/Tools/RawQuery.js: 8
    }, // ../Include/Tools/RawQuery.js: 9
    DecodeString: function(queryStr, lowercaseNames, valueDecoder) { // ../Include/Tools/RawQuery.js: 10
        Assert.NonNull('RawQuery.DecodeString', queryStr, 'queryStr'); // ../Include/Tools/RawQuery.js: 11
        var query = {}; // ../Include/Tools/RawQuery.js: 12
        if (queryStr.length > 0) { // ../Include/Tools/RawQuery.js: 13
            var tokens = queryStr.split('&'); // ../Include/Tools/RawQuery.js: 14
            var name; // ../Include/Tools/RawQuery.js: 15
            var value; // ../Include/Tools/RawQuery.js: 16
            for (var i = 0, n = tokens.length; i < n; ++i) { // ../Include/Tools/RawQuery.js: 17
                var token = tokens[i]; // ../Include/Tools/RawQuery.js: 18
                var eqPos = token.indexOf('='); // ../Include/Tools/RawQuery.js: 19
                if (eqPos == -1) { // ../Include/Tools/RawQuery.js: 20
                    name = decodeURIComponent(token); // ../Include/Tools/RawQuery.js: 21
                    value = ''; // ../Include/Tools/RawQuery.js: 22
                } // ../Include/Tools/RawQuery.js: 23
                else { // ../Include/Tools/RawQuery.js: 24
                    name = decodeURIComponent(token.substr(0, eqPos)); // ../Include/Tools/RawQuery.js: 25
                    value = token.substr(eqPos + 1); // ../Include/Tools/RawQuery.js: 26
                } // ../Include/Tools/RawQuery.js: 27
                query[lowercaseNames ? name.toLowerCase() : name] = (valueDecoder ? valueDecoder(value) : value); // ../Include/Tools/RawQuery.js: 28
            } // ../Include/Tools/RawQuery.js: 29
        } // ../Include/Tools/RawQuery.js: 30
        return query; // ../Include/Tools/RawQuery.js: 31
    } // ../Include/Tools/RawQuery.js: 32
}; // ../Include/Tools/RawQuery.js: 33

//* <FileEnd path="../Include/Tools/RawQuery.js"/>


//* <FileBegin path="../Include/Common/ApplicationInfo.js"/>

/** @constructor */ // ../Include/Common/ApplicationInfo.js: 2
function ApplicationInfo(name, nsName, version, language, rawContext, rawTags) { // ../Include/Common/ApplicationInfo.js: 3
    this.Name = name; // ../Include/Common/ApplicationInfo.js: 4
    this.NsName = nsName; // ../Include/Common/ApplicationInfo.js: 5
    this.Version = version; // ../Include/Common/ApplicationInfo.js: 6
    this.Language = language; // ../Include/Common/ApplicationInfo.js: 7
    this.RawContext = rawContext; // ../Include/Common/ApplicationInfo.js: 8
    this.RawTags = rawTags; // ../Include/Common/ApplicationInfo.js: 9
} // ../Include/Common/ApplicationInfo.js: 10

ApplicationInfo.ToObject = function(self) { // ../Include/Common/ApplicationInfo.js: 12
    return (self ? [self.Name, self.NsName, self.Version, self.Language, self.RawContext, self.RawTags] : null); // ../Include/Common/ApplicationInfo.js: 13
} // ../Include/Common/ApplicationInfo.js: 14

ApplicationInfo.FromObject = function(obj) { // ../Include/Common/ApplicationInfo.js: 16
    return (obj ? new ApplicationInfo(obj[0], obj[1], obj[2], obj[3], obj[4], obj[5]) : null); // ../Include/Common/ApplicationInfo.js: 17
} // ../Include/Common/ApplicationInfo.js: 18

//* <FileEnd path="../Include/Common/ApplicationInfo.js"/>


var _UpkMeta = { // ../Include/Common/UpkMeta.js: 10
    ApplicationNameFromNsName: function(nsName) { // ../Include/Common/UpkMeta.js: 11
        if(!nsName) // ../Include/Common/UpkMeta.js: 12
            return nsName; // ../Include/Common/UpkMeta.js: 13
        var dotPos = nsName.indexOf('.'); // ../Include/Common/UpkMeta.js: 14
        return ((dotPos != -1) ? nsName.substr(0, dotPos) : nsName); // ../Include/Common/UpkMeta.js: 15
    }, // ../Include/Common/UpkMeta.js: 16
    CreateInfo: function(ns, rawContext, rawTags) { // ../Include/Common/UpkMeta.js: 17
        var tokens = ArrayPad((ns == null) ? [''] : ns.split(';'), null, 3); // ../Include/Common/UpkMeta.js: 18

        // Parse application name
        var appNsName = Trim(tokens[0]).toUpperCase(); // ../Include/Common/UpkMeta.js: 21
        var appName = _UpkMeta.ApplicationNameFromNsName(appNsName); // ../Include/Common/UpkMeta.js: 22
        tokens.shift(); // ../Include/Common/UpkMeta.js: 23

        // Parse application version if present
        var version = (tokens[0] ? Trim(tokens[0]) : null); // ../Include/Common/UpkMeta.js: 26
        if (!version || /^[0-9@]/.test(version)) // ../Include/Common/UpkMeta.js: 27
            tokens.shift(); // ../Include/Common/UpkMeta.js: 28
        else version = null; // ../Include/Common/UpkMeta.js: 29

        // Parse application language
        var language = (tokens[0] ? Trim(tokens[0]).replace('_', '-').toLowerCase() : null); // ../Include/Common/UpkMeta.js: 32

        return new ApplicationInfo(appName, appNsName, version, language, (rawContext || null), (rawTags || null)); // ../Include/Common/UpkMeta.js: 34
    } // ../Include/Common/UpkMeta.js: 35
}; // ../Include/Common/UpkMeta.js: 36

var UpkMeta = { // ../Include/Common/UpkMeta.js: 38
    ApplicationNameFromNsName: function(nsName) { // ../Include/Common/UpkMeta.js: 39
        return _UpkMeta.ApplicationNameFromNsName(nsName); // ../Include/Common/UpkMeta.js: 40
    }, // ../Include/Common/UpkMeta.js: 41
    ApplicationInfoFromLocationSearch: function(search) { // ../Include/Common/UpkMeta.js: 42
        Assert.NonNull('UpkMeta.ApplicationInfoFromLocationSearch', search, 'search'); // ../Include/Common/UpkMeta.js: 43
        return UpkMeta.ApplicationInfoFromQuery(RawQuery.DecodeLocationSearch(search)); // ../Include/Common/UpkMeta.js: 44
    }, // ../Include/Common/UpkMeta.js: 45
    ApplicationInfoFromQuery: function(query) { // ../Include/Common/UpkMeta.js: 46
        Assert.NonNull('UpkMeta.ApplicationInfoFromQuery', query, 'query'); // ../Include/Common/UpkMeta.js: 47
        var ns = null; // ../Include/Common/UpkMeta.js: 48
        var cx = null; // ../Include/Common/UpkMeta.js: 49
        function _getNamespace(_ns, _member, _value) { // ../Include/Common/UpkMeta.js: 50
            if (_ns) // ../Include/Common/UpkMeta.js: 51
                return _ns; // ../Include/Common/UpkMeta.js: 52
            if (_member == 'namespace') // ../Include/Common/UpkMeta.js: 53
                return _value; // ../Include/Common/UpkMeta.js: 54
            if (_member == 'namespace-p') // ../Include/Common/UpkMeta.js: 55
                return decodeURIComponent(_value); // ../Include/Common/UpkMeta.js: 56
            return null; // ../Include/Common/UpkMeta.js: 57
        } // ../Include/Common/UpkMeta.js: 58
        function _getContext(_cx, _member, _value) { // ../Include/Common/UpkMeta.js: 59
            if (_cx) // ../Include/Common/UpkMeta.js: 60
                return _cx; // ../Include/Common/UpkMeta.js: 61
            if (_member == 'context') // ../Include/Common/UpkMeta.js: 62
                return _value; // ../Include/Common/UpkMeta.js: 63
            if (_member == 'context-p') // ../Include/Common/UpkMeta.js: 64
                return decodeURIComponent(_value); // ../Include/Common/UpkMeta.js: 65
            return null; // ../Include/Common/UpkMeta.js: 66
        } // ../Include/Common/UpkMeta.js: 67
        var member, value; // ../Include/Common/UpkMeta.js: 68
        for (member in query) { // ../Include/Common/UpkMeta.js: 69
            if (!/^upk-/.test(member)) // ../Include/Common/UpkMeta.js: 70
                continue; // ../Include/Common/UpkMeta.js: 71
            value = query[member]; // ../Include/Common/UpkMeta.js: 72
            member = member.substr(4); // ../Include/Common/UpkMeta.js: 73
            ns = _getNamespace(ns, member, value); // ../Include/Common/UpkMeta.js: 74
            cx = _getContext(cx, member, value); // ../Include/Common/UpkMeta.js: 75
            if (ns != null && cx != null) // ../Include/Common/UpkMeta.js: 76
                break; // ../Include/Common/UpkMeta.js: 77
        } // ../Include/Common/UpkMeta.js: 78
        if (ns == null || cx == null) { // ../Include/Common/UpkMeta.js: 79
            for (member in query) { // ../Include/Common/UpkMeta.js: 80
                value = query[member]; // ../Include/Common/UpkMeta.js: 81
                ns = _getNamespace(ns, member, value); // ../Include/Common/UpkMeta.js: 82
                cx = _getContext(cx, member, value); // ../Include/Common/UpkMeta.js: 83
                if (ns != null && cx != null) // ../Include/Common/UpkMeta.js: 84
                    break; // ../Include/Common/UpkMeta.js: 85
            } // ../Include/Common/UpkMeta.js: 86
        } // ../Include/Common/UpkMeta.js: 87
        return ((ns || cx) ? _UpkMeta.CreateInfo(ns, cx) : null); // ../Include/Common/UpkMeta.js: 88
    }, // ../Include/Common/UpkMeta.js: 89
    ApplicationInfoFromWindow: function(win) { // ../Include/Common/UpkMeta.js: 90
        Assert.NonNull('UpkMeta.ApplicationInfoFromWindow', win, 'win'); // ../Include/Common/UpkMeta.js: 91
        var ns = null; // ../Include/Common/UpkMeta.js: 92
        var rawTags = null; // ../Include/Common/UpkMeta.js: 93
        var rawContext = null; // ../Include/Common/UpkMeta.js: 94
        try { // ../Include/Common/UpkMeta.js: 95
            var hasGetNamespace = !!Window.TryGet(win, 'UPK_GetNamespace'); // ../Include/Common/UpkMeta.js: 96
            var hasGetTags = !!Window.TryGet(win, 'UPK_GetTags'); // ../Include/Common/UpkMeta.js: 97
            var hasGetContext = !!Window.TryGet(win, 'UPK_GetContext'); // ../Include/Common/UpkMeta.js: 98

            function stringValidator(value) { // ../Include/Common/UpkMeta.js: 100
                if (value == null) // ../Include/Common/UpkMeta.js: 101
                    return null; // ../Include/Common/UpkMeta.js: 102
                return String(value); // ../Include/Common/UpkMeta.js: 103
            } // ../Include/Common/UpkMeta.js: 104

            ns = (hasGetNamespace && Window.TryCall(win, 'UPK_GetNamespace', stringValidator)) || null; // ../Include/Common/UpkMeta.js: 106
            rawTags = (hasGetTags && Window.TryCall(win, 'UPK_GetTags', stringValidator)) || null; // ../Include/Common/UpkMeta.js: 107

            if (!ns || !rawTags || !hasGetContext) { // ../Include/Common/UpkMeta.js: 109
                var doc = win.document; // ../Include/Common/UpkMeta.js: 110
                var metaElements = doc.getElementsByTagName('meta'); // ../Include/Common/UpkMeta.js: 111
                for (var i = 0, n = metaElements.length; i < n; ++i) { // ../Include/Common/UpkMeta.js: 112
                    var metaName = metaElements[i]['name']; // ../Include/Common/UpkMeta.js: 113
                    if (/^upk-/.test(metaName)) { // ../Include/Common/UpkMeta.js: 114
                        if (ns == null && metaName == 'upk-namespace') { // ../Include/Common/UpkMeta.js: 115
                            ns = metaElements[i]['content']; // ../Include/Common/UpkMeta.js: 116
                        } // ../Include/Common/UpkMeta.js: 117
                        else if (rawTags == null && metaName == 'upk-tags') { // ../Include/Common/UpkMeta.js: 118
                            rawTags = metaElements[i]['content']; // ../Include/Common/UpkMeta.js: 119
                        } // ../Include/Common/UpkMeta.js: 120
                        else if (rawContext == null && metaName == 'upk-context') { // ../Include/Common/UpkMeta.js: 121
                            rawContext = metaElements[i]['content']; // ../Include/Common/UpkMeta.js: 122
                        } // ../Include/Common/UpkMeta.js: 123
                    } // ../Include/Common/UpkMeta.js: 124
                } // ../Include/Common/UpkMeta.js: 125
            } // ../Include/Common/UpkMeta.js: 126
        } // ../Include/Common/UpkMeta.js: 127
        catch (xe) { // ../Include/Common/UpkMeta.js: 128
            Trace.Exception('UpkMeta.ApplicationInfoFromWindow', xe); // ../Include/Common/UpkMeta.js: 129
        } // ../Include/Common/UpkMeta.js: 130
        return ((ns || rawTags || rawContext) ? _UpkMeta.CreateInfo(ns, rawContext, rawTags) : null); // ../Include/Common/UpkMeta.js: 131
    }, // ../Include/Common/UpkMeta.js: 132
    _DecodeDelimitedString: function(rawString) { // ../Include/Common/UpkMeta.js: 133
        var rawValues = rawString.split(';'); // ../Include/Common/UpkMeta.js: 134
        var values = []; // ../Include/Common/UpkMeta.js: 135
        for (var i = 0, n = rawValues.length; i < n; ++i) { // ../Include/Common/UpkMeta.js: 136
            var value = rawValues[i]; // ../Include/Common/UpkMeta.js: 137
            if (value) // ../Include/Common/UpkMeta.js: 138
                values.push(decodeURIComponent(value)); // ../Include/Common/UpkMeta.js: 139
        } // ../Include/Common/UpkMeta.js: 140
        return values; // ../Include/Common/UpkMeta.js: 141
    }, // ../Include/Common/UpkMeta.js: 142
    _DecodeAndSort: function(rawString) { // ../Include/Common/UpkMeta.js: 143
        var values = UpkMeta._DecodeDelimitedString(rawString); // ../Include/Common/UpkMeta.js: 144
        values.sort(); // ../Include/Common/UpkMeta.js: 145
        return values; // ../Include/Common/UpkMeta.js: 146
    }, // ../Include/Common/UpkMeta.js: 147
    DecodeContext: function(rawContext, enableMultiPart) { // ../Include/Common/UpkMeta.js: 148
        Trace('UpkMeta.DecodeContext', 'rawContext=' + rawContext + ', enableMultiPart=' + enableMultiPart); // ../Include/Common/UpkMeta.js: 149
        if (rawContext == null) // ../Include/Common/UpkMeta.js: 150
            return null; // ../Include/Common/UpkMeta.js: 151
        if (!enableMultiPart) // ../Include/Common/UpkMeta.js: 152
            return decodeURIComponent(rawContext); // ../Include/Common/UpkMeta.js: 153
        return UpkMeta._DecodeAndSort(rawContext); // ../Include/Common/UpkMeta.js: 154
    }, // ../Include/Common/UpkMeta.js: 155
    DecodeTags: function(rawTags) { // ../Include/Common/UpkMeta.js: 156
        if (rawTags == null) // ../Include/Common/UpkMeta.js: 157
            return null; // ../Include/Common/UpkMeta.js: 158
        return UpkMeta._DecodeAndSort(rawTags); // ../Include/Common/UpkMeta.js: 159
    } // ../Include/Common/UpkMeta.js: 160
}; // ../Include/Common/UpkMeta.js: 161

//* <FileEnd path="../Include/Common/UpkMeta.js"/>


//* <FileBegin path="../Include/Common/ApplicationFeature.js"/>

var ApplicationFeature = { // ../Include/Common/ApplicationFeature.js: 2
    ExactMatch: 'X', // ../Include/Common/ApplicationFeature.js: 3
    SmartMatch: 'S' // ../Include/Common/ApplicationFeature.js: 4
}; // ../Include/Common/ApplicationFeature.js: 5

//* <FileEnd path="../Include/Common/ApplicationFeature.js"/>


//* <FileBegin path="../Include/Application/ApplicationContext.js"/>
//x /// <reference path="../Tools/Base.js"/>
//x /// <reference path="../Tools/Json.js"/>
//x /// <reference path="../Tools/Html.js"/>

//* <FileBegin path="../Include/Tools/Html.js"/>

var Html = { // ../Include/Tools/Html.js: 2
    Escape: function(str) { // ../Include/Tools/Html.js: 3
        return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;'); // ../Include/Tools/Html.js: 4
    }, // ../Include/Tools/Html.js: 5
    EscapeAttribute: function(str) { // ../Include/Tools/Html.js: 6
        return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;'); // ../Include/Tools/Html.js: 7
    } // ../Include/Tools/Html.js: 8
}; // ../Include/Tools/Html.js: 9

//* <FileEnd path="../Include/Tools/Html.js"/>


var ApplicationContextFormat = { // ../Include/Application/ApplicationContext.js: 5
    JsObject: 0, // ../Include/Application/ApplicationContext.js: 6
    JsonString: 1, // ../Include/Application/ApplicationContext.js: 7
    XmlString: 2 // ../Include/Application/ApplicationContext.js: 8
}; // ../Include/Application/ApplicationContext.js: 9

ApplicationContextFormat.FromString = function(format, def) { // ../Include/Application/ApplicationContext.js: 11
    if (format == 'xml') // ../Include/Application/ApplicationContext.js: 12
        return ApplicationContextFormat.XmlString; // ../Include/Application/ApplicationContext.js: 13
    if (format == 'json') // ../Include/Application/ApplicationContext.js: 14
        return ApplicationContextFormat.JsonString; // ../Include/Application/ApplicationContext.js: 15
    if (format == 'object') // ../Include/Application/ApplicationContext.js: 16
        return ApplicationContextFormat.JsObject; // ../Include/Application/ApplicationContext.js: 17
    Assert.Null('ApplicationContextFormat.FromString', format, 'format'); // ../Include/Application/ApplicationContext.js: 18
    return def; // ../Include/Application/ApplicationContext.js: 19
}; // ../Include/Application/ApplicationContext.js: 20

/** @constructor */ // ../Include/Application/ApplicationContext.js: 22
function ApplicationContext(key, name, nsName, version, language, tagList, parts) { // ../Include/Application/ApplicationContext.js: 23
    this.Key = key || null; // ../Include/Application/ApplicationContext.js: 24
    this.Name = name || null; // ../Include/Application/ApplicationContext.js: 25
    this.NsName = nsName || null; // ../Include/Application/ApplicationContext.js: 26
    this.Version = version || null; // ../Include/Application/ApplicationContext.js: 27
    this.Language = language || null; // ../Include/Application/ApplicationContext.js: 28
    this.TagList = tagList || null; // ../Include/Application/ApplicationContext.js: 29
    this.Parts = parts || null; // ../Include/Application/ApplicationContext.js: 30
} // ../Include/Application/ApplicationContext.js: 31

ApplicationContext.ClassId = 'OraUpk.ApplicationContext;2'; // ../Include/Application/ApplicationContext.js: 33

ApplicationContext.FromObject = function(obj) { // ../Include/Application/ApplicationContext.js: 35
    Assert.Condition('ApplicationContext.FromObject', (obj['ClassId'] == ApplicationContext.ClassId), 'obj["ClassId"] == ' + NameOf(ApplicationContext.ClassId)); // ../Include/Application/ApplicationContext.js: 36
    return new ApplicationContext(obj['Key'], obj['Name'], obj['NsName'], obj['Version'], obj['Language'], obj['TagList'], obj['Parts']); // ../Include/Application/ApplicationContext.js: 37
}; // ../Include/Application/ApplicationContext.js: 38

ApplicationContext.FromJson = function(json) { // ../Include/Application/ApplicationContext.js: 40
    return ApplicationContext.FromObject(Json.DecodeObject(json)); // ../Include/Application/ApplicationContext.js: 41
}; // ../Include/Application/ApplicationContext.js: 42

ApplicationContext.prototype = { // ../Include/Application/ApplicationContext.js: 44
    AddPart: function(name, value) { // ../Include/Application/ApplicationContext.js: 45
        if (value && value.length) // ../Include/Application/ApplicationContext.js: 46
            this.Parts.push([name, value]); // ../Include/Application/ApplicationContext.js: 47
    }, // ../Include/Application/ApplicationContext.js: 48
    ToObject: function() { // ../Include/Application/ApplicationContext.js: 49
        var obj = { // ../Include/Application/ApplicationContext.js: 50
            'ClassId': ApplicationContext.ClassId, // ../Include/Application/ApplicationContext.js: 51
            'Key': this.Key, // ../Include/Application/ApplicationContext.js: 52
            'Name': this.Name, // ../Include/Application/ApplicationContext.js: 53
            'NsName': this.NsName, // ../Include/Application/ApplicationContext.js: 54
            'Language': this.Language, // ../Include/Application/ApplicationContext.js: 55
            'Version': this.Version, // ../Include/Application/ApplicationContext.js: 56
            'TagList': this.TagList, // ../Include/Application/ApplicationContext.js: 57
            'Parts': this.Parts // ../Include/Application/ApplicationContext.js: 58
        }; // ../Include/Application/ApplicationContext.js: 59
        return obj; // ../Include/Application/ApplicationContext.js: 60
    }, // ../Include/Application/ApplicationContext.js: 61
    ToJson: function() { // ../Include/Application/ApplicationContext.js: 62
        return Json.EncodeObject(this.ToObject()); // ../Include/Application/ApplicationContext.js: 63
    }, // ../Include/Application/ApplicationContext.js: 64
    ToXml: function(appHandler) { // ../Include/Application/ApplicationContext.js: 65
        function tokens_AddPart(container, name, value, caption, useNameAsPrefix, searchable) { // ../Include/Application/ApplicationContext.js: 66
            container.push('<property name="' + name + '" caption="' + caption + '" usenameasprefix="' + useNameAsPrefix + '" searchable="' + searchable + '">'); // ../Include/Application/ApplicationContext.js: 67
            container.push('<prop_string>' + Html.Escape(value) + '</prop_string>'); // ../Include/Application/ApplicationContext.js: 68
            container.push('</property>'); // ../Include/Application/ApplicationContext.js: 69
        } // ../Include/Application/ApplicationContext.js: 70
        var tokens = ['<?xml version="1.0"?><propertyset>']; // ../Include/Application/ApplicationContext.js: 71
        var contextInfo = this.Name; // ../Include/Application/ApplicationContext.js: 72
        if (appHandler) { // ../Include/Application/ApplicationContext.js: 73
            contextInfo += ';V' + appHandler.ContextVersion; // ../Include/Application/ApplicationContext.js: 74
            var partMap = appHandler.PartMap; // ../Include/Application/ApplicationContext.js: 75
            var parts = this.Parts; // ../Include/Application/ApplicationContext.js: 76
            if (parts) { // ../Include/Application/ApplicationContext.js: 77
                for (var i = 0, n = parts.length; i < n; ++i) { // ../Include/Application/ApplicationContext.js: 78
                    var part_i = parts[i]; // ../Include/Application/ApplicationContext.js: 79
                    var part_i_name = part_i[0]; // ../Include/Application/ApplicationContext.js: 80
                    var partDesc = partMap[part_i_name]; // ../Include/Application/ApplicationContext.js: 81
                    Assert('ApplicationContext.ToXml', (partDesc != null), 'Invalid part ' + NameOf(part_i[0]) + ' in ' + NameOf(this.Key) + ' context.'); // ../Include/Application/ApplicationContext.js: 82
                    if (/^MC\./.test(part_i_name)) // ../Include/Application/ApplicationContext.js: 83
                        contextInfo += ';' + partDesc.Caption + part_i[1]; // ../Include/Application/ApplicationContext.js: 84
                    else tokens_AddPart(tokens, part_i[0], part_i[1], partDesc.Caption, partDesc.UseNameAsPrefix, partDesc.Searchable); // ../Include/Application/ApplicationContext.js: 85
                } // ../Include/Application/ApplicationContext.js: 86
            } // ../Include/Application/ApplicationContext.js: 87
        } // ../Include/Application/ApplicationContext.js: 88
        if ((this.NsName != null) && (this.NsName.indexOf('.') != -1)) // ../Include/Application/ApplicationContext.js: 89
            tokens_AddPart(tokens, 'MA', this.NsName, 'Application Name', true, true); // ../Include/Application/ApplicationContext.js: 90
        tokens_AddPart(tokens, 'MC', contextInfo, 'Context Info', true, false); // ../Include/Application/ApplicationContext.js: 91
        if (this.Version != null) // ../Include/Application/ApplicationContext.js: 92
            tokens_AddPart(tokens, 'MV', this.Version, 'Application Version', true, false); // ../Include/Application/ApplicationContext.js: 93
        if (this.TagList != null) { // ../Include/Application/ApplicationContext.js: 94
            var tagList = this.TagList; // ../Include/Application/ApplicationContext.js: 95
            for (var i = 0, n = tagList.length; i < n; ++i) // ../Include/Application/ApplicationContext.js: 96
                tokens_AddPart(tokens, 'MT', tagList[i], 'Application Tag', true, true); // ../Include/Application/ApplicationContext.js: 97
        } // ../Include/Application/ApplicationContext.js: 98
        tokens.push('</propertyset>'); // ../Include/Application/ApplicationContext.js: 99
        return tokens.join(''); // ../Include/Application/ApplicationContext.js: 100
    } // ../Include/Application/ApplicationContext.js: 101
} // ../Include/Application/ApplicationContext.js: 102

//* <FileEnd path="../Include/Application/ApplicationContext.js"/>


//* <FileBegin path="../Include/Application/ApplicationType.js"/>

var ApplicationType = { // ../Include/Application/ApplicationType.js: 2
    None: 0, // ../Include/Application/ApplicationType.js: 3
    StandaloneFlag: 1, // ../Include/Application/ApplicationType.js: 4
    PortalFlag: 2, // ../Include/Application/ApplicationType.js: 5
    Standalone: 1, // ../Include/Application/ApplicationType.js: 6
    Portal: 2 // ../Include/Application/ApplicationType.js: 7
}; // ../Include/Application/ApplicationType.js: 8

//* <FileEnd path="../Include/Application/ApplicationType.js"/>


/** @constructor */ // ../Include/Application/ApplicationBase.js: 13
function ApplicationBase() { // ../Include/Application/ApplicationBase.js: 14
}; // ../Include/Application/ApplicationBase.js: 15

ApplicationBase.prototype = { // ../Include/Application/ApplicationBase.js: 17
    Key: null, // ../Include/Application/ApplicationBase.js: 18
    Name: '$UNKNOWN', // ../Include/Application/ApplicationBase.js: 19

//x     //: <if xconfig="Playback"/>
    ConfigDefaults: { // ../Include/Application/ApplicationBase.js: 22
        'IgnoreContext': 0, // ../Include/Application/ApplicationBase.js: 23
        'ContentMapType': '', // ../Include/Application/ApplicationBase.js: 24
        'ContentMap': [], // ../Include/Application/ApplicationBase.js: 25
        'GatewayTitle': 'Main Player',              // String (100)	the title of the gateway page	"Main Player"
        'GatewayLinksTitle': 'Linked Resources',    // String (100)	the title of gateway links 	"Linked Resources"
        'GatewayLinks': [],                         // Array<Resource>	an array of gateway links	[]
        'GatewayPages': [],                         // Array<Resource>	an array of gateway pages	[]
        'GatewayRememberTab': 1                     // Integer	1 to keep the last tab selected	or 0 otherwise
    }, // ../Include/Application/ApplicationBase.js: 31
    RemoteGateway: false, // ../Include/Application/ApplicationBase.js: 32
//x     //: <end/>

    SupportedFeatures: ApplicationFeature.ExactMatch, // ../Include/Application/ApplicationBase.js: 35
    ContextType: ContextType.Absolute, // ../Include/Application/ApplicationBase.js: 36
    ContextDiscovery: false, // ../Include/Application/ApplicationBase.js: 37
    ContextVersion: 0, // ../Include/Application/ApplicationBase.js: 38
    ContextParts: [ // ../Include/Application/ApplicationBase.js: 39
        ContextPart.CreateValue('C', 'Context ID') // ../Include/Application/ApplicationBase.js: 40
    ], // ../Include/Application/ApplicationBase.js: 41
    ContextStdPartsMap: { // ../Include/Application/ApplicationBase.js: 42
        'MA': ContextPart.CreateValue('MA', 'Application Name') // ../Include/Application/ApplicationBase.js: 43
    }, // ../Include/Application/ApplicationBase.js: 44
    PartMap: null, // ../Include/Application/ApplicationBase.js: 45
    //TODO: Matyi: Commented out, too complicated for an unknown scope
    /*
    ContextStdParts: null,
    ContextValueExtactorMap: {
    'MA': function(appInfo) {
    if ((appInfo.NsName != null) && (appInfo.NsName.indexOf('.') != -1))
    return appInfo.NsName;
    return null;
    }
    },
    CreateStdParts: function(appInfo) {
    if (this.ContextStdParts == null)
    return null;
    var partMap = this.PartMap;
    var extractorMap = this.ContextExtactorMap;
    var contextParts = this.ContextStdParts;
    var parts = [];
    for (var i = 0, n = contextParts.length; i < n; ++i) {
    Assert.NonNull('ApplicationBase.CreateStdParts', contextParts[i], 'contextParts[' + i + ']');
    var partName = contextParts[i];
    var extractorFn = extractorMap[partName];
    var value = extractorFn(appInfo);
    if (value != null)
    parts.push([partName, value]);
    }
    return (parts.length ? parts : null);
    },
    */ // ../Include/Application/ApplicationBase.js: 73
    CreatePartsFromValues: function(values) { // ../Include/Application/ApplicationBase.js: 74
        var contextParts = this.ContextParts; // ../Include/Application/ApplicationBase.js: 75
        Assert.Condition('ApplicationBase.CreatePartsFromValues', (values.length <= contextParts.length), '(values.length <= contextParts.length)'); // ../Include/Application/ApplicationBase.js: 76
        var parts = []; // ../Include/Application/ApplicationBase.js: 77
        if (values) { // ../Include/Application/ApplicationBase.js: 78
            var i, n; // ../Include/Application/ApplicationBase.js: 79
            for (i = 0, n = values.length; i < n; ++i) { // ../Include/Application/ApplicationBase.js: 80
                var value = values[i]; // ../Include/Application/ApplicationBase.js: 81
                if (value != null) { // ../Include/Application/ApplicationBase.js: 82
                    if (ContextPart.HasMultipleParts(contextParts[i])) { // ../Include/Application/ApplicationBase.js: 83
                        Assert.Array('ApplicationBase.CreatePartsFromValues', value, 'values[' + i + ']'); // ../Include/Application/ApplicationBase.js: 84
                        if (value.length != 0) { // ../Include/Application/ApplicationBase.js: 85
                            for (var iValue = 0; iValue < value.length; ++iValue) { // ../Include/Application/ApplicationBase.js: 86
                                parts.push([contextParts[i][0], value[iValue]]); // ../Include/Application/ApplicationBase.js: 87
                            } // ../Include/Application/ApplicationBase.js: 88
                        } // ../Include/Application/ApplicationBase.js: 89
                    } // ../Include/Application/ApplicationBase.js: 90
                    else { // ../Include/Application/ApplicationBase.js: 91
                        if (value != '') // ../Include/Application/ApplicationBase.js: 92
                            parts.push([contextParts[i][0], value]); // ../Include/Application/ApplicationBase.js: 93
                    } // ../Include/Application/ApplicationBase.js: 94
                } // ../Include/Application/ApplicationBase.js: 95
            } // ../Include/Application/ApplicationBase.js: 96
//x             //: <if xconfig="Debug,Trace"/>
            var missingParts = []; // ../Include/Application/ApplicationBase.js: 98
            for (n = contextParts.length; i < n; ++i) { // ../Include/Application/ApplicationBase.js: 99
                if (contextParts[i][3]) // ../Include/Application/ApplicationBase.js: 100
                    missingParts.push(contextParts[i][0] + ': ' + contextParts[i][0]); // ../Include/Application/ApplicationBase.js: 101
            } // ../Include/Application/ApplicationBase.js: 102
            Assert('ApplicationBase.CreatePartsFromValues', !missingParts.length, 'The following searchable parts were not specified: ' + missingParts.join(', ')); // ../Include/Application/ApplicationBase.js: 103
//x             //: <end/>
        } // ../Include/Application/ApplicationBase.js: 105
        return parts; // ../Include/Application/ApplicationBase.js: 106
    }, // ../Include/Application/ApplicationBase.js: 107

//x     //: <if xconfig="Recognition"/>
//x     ApplicationType: ApplicationType.Portal,
//x     EnableSmartMatch: false,
//x     EnableUpkMeta: false,
//x     EnableIdentify: false,
//x     EnablePartsCache: false,
//x     IdentifyTopWindowOnly: false,
//x     RequiredFrames: null,
//x     OptionalFrames: null,
//x     OptionalFramesNeeded: 0,
//x     IdentifyFrames: null, // function(framesByName)
//x     Identify: null, // function(frameDesc)
//x     IdentifyFast: null, // function(frameDesc)
//x     GetPartValuesWrapper: null, // wrapper that calls the right GetPartValues, initialized in Initialize()
//x     GetPartValues: null, // function(frameDesc)
//x     GetPartValues_Default: function(frameDesc) {
//x         Assert.MustOverride('ApplicationBase.GetPartValues_UpkMeta,App.' + this.Key);
//x         return null;
//x     },
//x     GetPartValues_UpkMeta: function(frameDesc) {
//x         Trace('ApplicationBase.GetPartValues_UpkMeta,App.' + this.Key, 'frameDesc.FrameIndex = ' + frameDesc.FrameIndex);
//x         Assert.NonNull('ApplicationBase.GetPartValues_UpkMeta,App.' + this.Key, frameDesc.NativeWindow, 'frameDesc.NativeWindow');
//x         var win = frameDesc.NativeWindow;
//x         var rawContext = Window.TryCall(win, 'UPK_GetContext');
//x         Trace('ApplicationBase.GetPartValues_UpkMeta,App.' + this.Key, 'rawContext = ' + rawContext);
//x         Trace('ApplicationBase.GetPartValues_UpkMeta,App.' + this.Key, 'frameDesc.AppDesc = ' + Json.EncodeObject(frameDesc.AppDesc));
//x 
//x         return ((rawContext != null) ? [UpkMeta.DecodeContext(rawContext, ContextPart.HasMultipleParts(this.ContextParts[0]))] : null);
//x     },
//x     GetPartValues_Both: function(frameDesc) {
//x         return (this.GetPartValues_UpkMeta(frameDesc) || this.GetPartValues(frameDesc));
//x     },
//x     GetParts: function(frameDesc) {
//x         var values = this.GetPartValuesWrapper(frameDesc);
//x         return (values ? this.CreatePartsFromValues(values) : null);
//x     },
//x     //: <end/>
//x     //: <if xconfig="Playback"/>
    SearchType: EcidSearch.All, // ../Include/Application/ApplicationBase.js: 147
    FilterSearchableParts: function(parts) { // ../Include/Application/ApplicationBase.js: 148
        var searchableParts = []; // ../Include/Application/ApplicationBase.js: 149
        var partMap = this.PartMap; // ../Include/Application/ApplicationBase.js: 150
        for (var i = 0, n = parts.length; i < n; ++i) { // ../Include/Application/ApplicationBase.js: 151
            var part = parts[i]; // ../Include/Application/ApplicationBase.js: 152
            if (partMap[part[0]].Searchable) // ../Include/Application/ApplicationBase.js: 153
                searchableParts.push(part); // ../Include/Application/ApplicationBase.js: 154
        } // ../Include/Application/ApplicationBase.js: 155
        return searchableParts; // ../Include/Application/ApplicationBase.js: 156
    }, // ../Include/Application/ApplicationBase.js: 157
    CreateSearchExpression: function(values) { // ../Include/Application/ApplicationBase.js: 158
        var parts = this.CreatePartsFromValues(values); // ../Include/Application/ApplicationBase.js: 159
        return (parts ? this.CreateSearchExpressionFromParts(parts) : null); // ../Include/Application/ApplicationBase.js: 160
    }, // ../Include/Application/ApplicationBase.js: 161
    CreateSearchExpressionFromParts: function(parts) { // ../Include/Application/ApplicationBase.js: 162
        Assert.NonNull('ApplicationBase.CreateSearchExpressionFromParts,App.' + this.Key, parts, 'parts'); // ../Include/Application/ApplicationBase.js: 163
        Trace.Object('CreateSearchExpressionFromParts', parts, 'parts'); // ../Include/Application/ApplicationBase.js: 164
        parts = this.FilterSearchableParts(parts); // ../Include/Application/ApplicationBase.js: 165
        Trace.Object('CreateSearchExpressionFromParts', parts, 'parts'); // ../Include/Application/ApplicationBase.js: 166
        var builder = new SearchExpressionBuilder(); // ../Include/Application/ApplicationBase.js: 167
        var searchType = this.SearchType; // ../Include/Application/ApplicationBase.js: 168
        if (searchType == EcidSearch.All) { // ../Include/Application/ApplicationBase.js: 169
            builder.AddParts(parts); // ../Include/Application/ApplicationBase.js: 170
        } // ../Include/Application/ApplicationBase.js: 171
        else if (searchType == EcidSearch.AnyPart) { // ../Include/Application/ApplicationBase.js: 172
            builder.AddOptionalParts(parts); // ../Include/Application/ApplicationBase.js: 173
        } // ../Include/Application/ApplicationBase.js: 174
        else if (searchType == EcidSearch.WithOrWithoutPrefix) { // ../Include/Application/ApplicationBase.js: 175
            builder.AddParts(parts); // ../Include/Application/ApplicationBase.js: 176
            builder.AddPartsValue(parts); // ../Include/Application/ApplicationBase.js: 177
        } // ../Include/Application/ApplicationBase.js: 178
        else if (searchType == EcidSearch.WithoutPrefix) { // ../Include/Application/ApplicationBase.js: 179
            builder.AddPartsValue(parts); // ../Include/Application/ApplicationBase.js: 180
        } // ../Include/Application/ApplicationBase.js: 181
        return builder.ToObject(); // ../Include/Application/ApplicationBase.js: 182
    }, // ../Include/Application/ApplicationBase.js: 183
    GetConfigDefaults: function() { // ../Include/Application/ApplicationBase.js: 184
        return null; // ../Include/Application/ApplicationBase.js: 185
    }, // ../Include/Application/ApplicationBase.js: 186
//x     //: <end/>

    Initialize: function() { // ../Include/Application/ApplicationBase.js: 189
        if (!this.Key) // ../Include/Application/ApplicationBase.js: 190
            this.Key = this.Name + ':' + this.SupportedFeatures; // ../Include/Application/ApplicationBase.js: 191

//x         //: <if xconfig="Recognition"/>
//x         Assert.NonNull('App.' + this.Key + ',ApplicationBase.Initialize', !this.EnableIdentify || this.Identify, '!this.EnableIdentify || this.Identify');
//x         if (this.EnableIdentify && !this.IdentifyFast)
//x             this.IdentifyFast = this.Identify;
//x         if (!this.GetPartValues)
//x             this.GetPartValuesWrapper = this.EnableUpkMeta ? this.GetPartValues_UpkMeta : this.GetPartValues_Default;
//x         else this.GetPartValuesWrapper = this.EnableUpkMeta ? this.GetPartValues_Both : this.GetPartValues;
//x         //: <end/>

        var partMap = {}; // ../Include/Application/ApplicationBase.js: 202
        var i, n, part; // ../Include/Application/ApplicationBase.js: 203
        var contextParts = this.ContextParts; // ../Include/Application/ApplicationBase.js: 204
        for (i = 0, n = contextParts.length; i < n; ++i) { // ../Include/Application/ApplicationBase.js: 205
            part = contextParts[i]; // ../Include/Application/ApplicationBase.js: 206
            partMap[part[0]] = PartDescriptor.Create(part); // ../Include/Application/ApplicationBase.js: 207
        } // ../Include/Application/ApplicationBase.js: 208

        var contextPartsMap = this.ContextStdPartsMap; // ../Include/Application/ApplicationBase.js: 210
        for (var partName in contextPartsMap) { // ../Include/Application/ApplicationBase.js: 211
            part = contextPartsMap[partName]; // ../Include/Application/ApplicationBase.js: 212
            partMap[part[0]] = PartDescriptor.Create(part); // ../Include/Application/ApplicationBase.js: 213
        } // ../Include/Application/ApplicationBase.js: 214

        this.PartMap = partMap; // ../Include/Application/ApplicationBase.js: 216
    } // ../Include/Application/ApplicationBase.js: 217
}; // ../Include/Application/ApplicationBase.js: 218

//* <FileEnd path="../Include/Application/ApplicationBase.js"/>


var ApplicationMap = { // ../Include/Application/ApplicationMap.js: 4
    Keys: [], // ../Include/Application/ApplicationMap.js: 5
    Names: [], // ../Include/Application/ApplicationMap.js: 6
    AppByKey: {}, // ../Include/Application/ApplicationMap.js: 7
    AppsByName: {}, // ../Include/Application/ApplicationMap.js: 8
    Register: function(app) { // ../Include/Application/ApplicationMap.js: 9
        Assert.NonNull('ApplicationMap.Register', app, 'app'); // ../Include/Application/ApplicationMap.js: 10
        app.Initialize(); // ../Include/Application/ApplicationMap.js: 11
        var appKey = app.Key; // ../Include/Application/ApplicationMap.js: 12
        Assert.Undefined('ApplicationMap.Register', ApplicationMap.AppByKey[appKey], 'ApplicationMap.AppByKey[' + NameOf(appKey) + ']'); // ../Include/Application/ApplicationMap.js: 13
        ApplicationMap.AppByKey[appKey] = app; // ../Include/Application/ApplicationMap.js: 14
        ApplicationMap.Keys.push(appKey); // ../Include/Application/ApplicationMap.js: 15
        var appName = app.Name; // ../Include/Application/ApplicationMap.js: 16
        var apps = ApplicationMap.AppsByName[appName]; // ../Include/Application/ApplicationMap.js: 17
        if (apps) // ../Include/Application/ApplicationMap.js: 18
            apps.push(app); // ../Include/Application/ApplicationMap.js: 19
        else { // ../Include/Application/ApplicationMap.js: 20
            ApplicationMap.Names.push(appName); // ../Include/Application/ApplicationMap.js: 21
            ApplicationMap.AppsByName[appName] = [app]; // ../Include/Application/ApplicationMap.js: 22
        } // ../Include/Application/ApplicationMap.js: 23
    }, // ../Include/Application/ApplicationMap.js: 24
    TryGetApplicationByKey: function(appKey) { // ../Include/Application/ApplicationMap.js: 25
        return (ApplicationMap.AppByKey[appKey] || null); // ../Include/Application/ApplicationMap.js: 26
    }, // ../Include/Application/ApplicationMap.js: 27
    TryGetApplicationsByName: function(appName) { // ../Include/Application/ApplicationMap.js: 28
        return (ApplicationMap.AppsByName[appName] || null); // ../Include/Application/ApplicationMap.js: 29
    }, // ../Include/Application/ApplicationMap.js: 30
    TryGetApplication: function(appName) { // ../Include/Application/ApplicationMap.js: 31
        var apps = (ApplicationMap.AppsByName[appName] || null); // ../Include/Application/ApplicationMap.js: 32
        return (apps ? apps[0] : null); // ../Include/Application/ApplicationMap.js: 33
    }, // ../Include/Application/ApplicationMap.js: 34
    TryGetApplicationDefaults: function(appName) { // ../Include/Application/ApplicationMap.js: 35
        var appHandler = ApplicationMap.TryGetApplication(appName); // ../Include/Application/ApplicationMap.js: 36
        return (appHandler ? appHandler.ConfigDefaults : ApplicationBase.prototype.ConfigDefaults); // ../Include/Application/ApplicationMap.js: 37
    }, // ../Include/Application/ApplicationMap.js: 38
    GetApplication: function(appName, featureList) { // ../Include/Application/ApplicationMap.js: 39
        var result; // ../Include/Application/ApplicationMap.js: 40
        if (featureList) { // ../Include/Application/ApplicationMap.js: 41
            var appKey = ApplicationMap.GetApplicationKey(appName, featureList); // ../Include/Application/ApplicationMap.js: 42
            result = (appKey? ApplicationMap.TryGetApplicationByKey(appKey): null); // ../Include/Application/ApplicationMap.js: 43
            Assert.NonNull('ApplicationMap.GetApplication', result, 'ApplicationMap.AppsByName[' + NameOf(appName) + '] with ' + Json.EncodeObject(featureList)); // ../Include/Application/ApplicationMap.js: 44
        } // ../Include/Application/ApplicationMap.js: 45
        else { // ../Include/Application/ApplicationMap.js: 46
            result = ApplicationMap.TryGetApplication(appName); // ../Include/Application/ApplicationMap.js: 47
            Assert.NonNull('ApplicationMap.GetApplication', result, 'ApplicationMap.AppsByName[' + NameOf(appName) + ']'); // ../Include/Application/ApplicationMap.js: 48
        } // ../Include/Application/ApplicationMap.js: 49
        return result; // ../Include/Application/ApplicationMap.js: 50
    }, // ../Include/Application/ApplicationMap.js: 51
    GetApplicationName: function(appKey) { // ../Include/Application/ApplicationMap.js: 52
        if (!appKey) // ../Include/Application/ApplicationMap.js: 53
            return ''; // ../Include/Application/ApplicationMap.js: 54
        return (appKey.split(':'))[0]; // ../Include/Application/ApplicationMap.js: 55
    }, // ../Include/Application/ApplicationMap.js: 56
    GetApplicationKey: function(appName, featureList) { // ../Include/Application/ApplicationMap.js: 57
        var apps = ApplicationMap.TryGetApplicationsByName(appName); // ../Include/Application/ApplicationMap.js: 58
        if (!apps) // ../Include/Application/ApplicationMap.js: 59
            return null; // ../Include/Application/ApplicationMap.js: 60
        if (!featureList) // ../Include/Application/ApplicationMap.js: 61
            return apps[0]; // ../Include/Application/ApplicationMap.js: 62
        for (var appIndex = 0; appIndex < apps.length; ++appIndex) { // ../Include/Application/ApplicationMap.js: 63
            var app = apps[appIndex]; // ../Include/Application/ApplicationMap.js: 64
            var i; // ../Include/Application/ApplicationMap.js: 65
            var n = featureList.length; // ../Include/Application/ApplicationMap.js: 66
            for (i = 0; i < n; ++i) { // ../Include/Application/ApplicationMap.js: 67
                if (app.SupportedFeatures.indexOf(featureList[i]) == -1) // ../Include/Application/ApplicationMap.js: 68
                    break; // ../Include/Application/ApplicationMap.js: 69
            } // ../Include/Application/ApplicationMap.js: 70
            if (i == n) // ../Include/Application/ApplicationMap.js: 71
                return app.Key; // ../Include/Application/ApplicationMap.js: 72
        } // ../Include/Application/ApplicationMap.js: 73
        return null; // ../Include/Application/ApplicationMap.js: 74
    } // ../Include/Application/ApplicationMap.js: 75
}; // ../Include/Application/ApplicationMap.js: 76


//* <FileEnd path="../Include/Application/ApplicationMap.js"/>


var _ConfigData = { // ../Include/Common/ConfigData.js: 9
    ContentUrl: null, // ../Include/Common/ConfigData.js: 10
    Root: null, // ../Include/Common/ConfigData.js: 11
    RootLoaded: false, // ../Include/Common/ConfigData.js: 12
    PublishDataLoaded: false, // ../Include/Common/ConfigData.js: 13
    _Cache: null, // ../Include/Common/ConfigData.js: 14
    Reset: function() { // ../Include/Common/ConfigData.js: 15
        Trace('_ConfigData.Reset'); // ../Include/Common/ConfigData.js: 16
        _ConfigData.ContentUrl = null; // ../Include/Common/ConfigData.js: 17
        _ConfigData.Root = new ConfigNode({}); // ../Include/Common/ConfigData.js: 18
        _ConfigData.RootLoaded = false; // ../Include/Common/ConfigData.js: 19
        _ConfigData.PublishDataLoaded = false; // ../Include/Common/ConfigData.js: 20
        _ConfigData._Cache = {}; // ../Include/Common/ConfigData.js: 21
    }, // ../Include/Common/ConfigData.js: 22
    Load: function(url) { // ../Include/Common/ConfigData.js: 23
        Trace('_ConfigData.Load', _ConfigData.ContentUrl + url); // ../Include/Common/ConfigData.js: 24
        var data = AjaxRequest.LoadJson(_ConfigData.ContentUrl + url); // ../Include/Common/ConfigData.js: 25
        Trace.Object('_ConfigData.Load', data, 'data'); // ../Include/Common/ConfigData.js: 26
        return data; // ../Include/Common/ConfigData.js: 27
    }, // ../Include/Common/ConfigData.js: 28
    LoadAndCache: function(url) { // ../Include/Common/ConfigData.js: 29
        var data = _ConfigData._Cache[url]; // ../Include/Common/ConfigData.js: 30
        if (data === void 0) { // ../Include/Common/ConfigData.js: 31
            data = _ConfigData.Load(url); // ../Include/Common/ConfigData.js: 32
            _ConfigData._Cache[url] = data || null; // ../Include/Common/ConfigData.js: 33
        } // ../Include/Common/ConfigData.js: 34
        return data; // ../Include/Common/ConfigData.js: 35
    } // ../Include/Common/ConfigData.js: 36
}; // ../Include/Common/ConfigData.js: 37

var ConfigData = { // ../Include/Common/ConfigData.js: 39
    GetPublishDataLocation: function() { // ../Include/Common/ConfigData.js: 40
        return 'publishdata.json.js'; // ../Include/Common/ConfigData.js: 41
    }, // ../Include/Common/ConfigData.js: 42
    GetRootConfigDataLocation: function() { // ../Include/Common/ConfigData.js: 43
        return 'stdhemi/configdata.json.js'; // ../Include/Common/ConfigData.js: 44
    }, // ../Include/Common/ConfigData.js: 45
    GetApplicationConfigDataLocation: function(appName) { // ../Include/Common/ConfigData.js: 46
        return appName.toLowerCase() + '/hemi/configdata.json.js'; // ../Include/Common/ConfigData.js: 47
    }, // ../Include/Common/ConfigData.js: 48
    GetApplicationKey: function(appName) { // ../Include/Common/ConfigData.js: 49
        return 'Applications.' + appName; // ../Include/Common/ConfigData.js: 50
    }, // ../Include/Common/ConfigData.js: 51
    SetContentUrl: function(contentUrl) { // ../Include/Common/ConfigData.js: 52
        Trace('ConfigData.SetContentUrl', Called({ 'contentUrl': contentUrl })); // ../Include/Common/ConfigData.js: 53
        _ConfigData.Reset(); // ../Include/Common/ConfigData.js: 54
        _ConfigData.ContentUrl = contentUrl; // ../Include/Common/ConfigData.js: 55
    }, // ../Include/Common/ConfigData.js: 56
    LoadPublishData: function() { // ../Include/Common/ConfigData.js: 57
        return _ConfigData.Load(ConfigData.GetPublishDataLocation()); // ../Include/Common/ConfigData.js: 58
    }, // ../Include/Common/ConfigData.js: 59
    LoadRootConfigData: function() { // ../Include/Common/ConfigData.js: 60
        return _ConfigData.Load(ConfigData.GetRootConfigDataLocation()); // ../Include/Common/ConfigData.js: 61
    }, // ../Include/Common/ConfigData.js: 62
    LoadApplicationConfigData: function(appName) { // ../Include/Common/ConfigData.js: 63
        return _ConfigData.Load(ConfigData.GetApplicationConfigDataLocation(appName)); // ../Include/Common/ConfigData.js: 64
    }, // ../Include/Common/ConfigData.js: 65
    GetValueByKey: function(key) { // ../Include/Common/ConfigData.js: 66
        Assert('ConfigData.GetValueByKey', _ConfigData.ContentUrl != null, 'ContentUrl was not set'); // ../Include/Common/ConfigData.js: 67
        Assert.String('ConfigData.GetValueByKey', key, 'key'); // ../Include/Common/ConfigData.js: 68

        var value = _ConfigData.Root.TryGetValueByKey(key); // ../Include/Common/ConfigData.js: 70
        if (value === void 0) { // ../Include/Common/ConfigData.js: 71
            var configNode = ConfigData.OpenKey(key); // ../Include/Common/ConfigData.js: 72
            return (configNode ? configNode.Node : void 0); // ../Include/Common/ConfigData.js: 73
        } // ../Include/Common/ConfigData.js: 74
        return value; // ../Include/Common/ConfigData.js: 75
    }, // ../Include/Common/ConfigData.js: 76
    OpenKey: function(key) { // ../Include/Common/ConfigData.js: 77
        Assert('ConfigData.OpenKey', _ConfigData.ContentUrl != null, 'ContentUrl was not set'); // ../Include/Common/ConfigData.js: 78
        Assert.String('ConfigData.OpenKey', key, 'key'); // ../Include/Common/ConfigData.js: 79

        return (_ConfigData.Root.TryOpenKey(key) || ConfigData._LoadKey(key)); // ../Include/Common/ConfigData.js: 81
    }, // ../Include/Common/ConfigData.js: 82
    GetApplicationDefaults: function(appName) { // ../Include/Common/ConfigData.js: 83
        Assert.String('ConfigData.GetApplicationDefaults', appName, 'appName'); // ../Include/Common/ConfigData.js: 84

        var appHandler = ApplicationMap.GetApplication(appName); // ../Include/Common/ConfigData.js: 86
        return (appHandler ? appHandler.ConfigDefaults : ApplicationBase.prototype.ConfigDefaults); // ../Include/Common/ConfigData.js: 87
    }, // ../Include/Common/ConfigData.js: 88
    GetApplicationConfig: function(appName, url) { // ../Include/Common/ConfigData.js: 89
        Assert.String('ConfigData.GetApplicationConfig', appName, 'appName'); // ../Include/Common/ConfigData.js: 90
        Assert('ConfigData.GetApplicationConfig', _ConfigData.ContentUrl != null, 'ContentUrl was not set'); // ../Include/Common/ConfigData.js: 91

        var configNode = (_ConfigData.Root.TryOpenKey(ConfigData.GetApplicationKey(appName)) || ConfigData._LoadAndCacheApplicationConfig(appName, url)); // ../Include/Common/ConfigData.js: 93
        Trace.Object('ConfigData.GetApplicationConfig', configNode, 'configNode'); // ../Include/Common/ConfigData.js: 94
        return configNode; // ../Include/Common/ConfigData.js: 95
    }, // ../Include/Common/ConfigData.js: 96
    GetApplicationList: function() { // ../Include/Common/ConfigData.js: 97
        var appHash = ConfigData.GetValueByKey('PublishData.Applications'); // ../Include/Common/ConfigData.js: 98
        if (appHash) // ../Include/Common/ConfigData.js: 99
            return HashMap.GetKeys(appHash); // ../Include/Common/ConfigData.js: 100
        return []; // ../Include/Common/ConfigData.js: 101
    }, // ../Include/Common/ConfigData.js: 102
    GetDisabledApplicationList: function() { // ../Include/Common/ConfigData.js: 103
        var apps = []; // ../Include/Common/ConfigData.js: 104
        var appHash = ConfigData.GetValueByKey('PublishData.Applications'); // ../Include/Common/ConfigData.js: 105
        if (appHash) { // ../Include/Common/ConfigData.js: 106
            for (var appName in appHash) { // ../Include/Common/ConfigData.js: 107
                var appInfo = appHash[appName]; // ../Include/Common/ConfigData.js: 108
                var enabled = appInfo['Enabled']; // ../Include/Common/ConfigData.js: 109
                if ((enabled !== void 0) && !enabled) // ../Include/Common/ConfigData.js: 110
                    apps.push(appName); // ../Include/Common/ConfigData.js: 111
            } // ../Include/Common/ConfigData.js: 112
        } // ../Include/Common/ConfigData.js: 113
        return apps; // ../Include/Common/ConfigData.js: 114
    }, // ../Include/Common/ConfigData.js: 115
    GetSmartHelpApplicationList: function() { // ../Include/Common/ConfigData.js: 116
        var uList = []; // ../Include/Common/ConfigData.js: 117
        var uHash = {}; // ../Include/Common/ConfigData.js: 118
        var appHash = ConfigData.GetValueByKey('PublishData.Applications'); // ../Include/Common/ConfigData.js: 119
        if (appHash) { // ../Include/Common/ConfigData.js: 120
            for (var appName in appHash) { // ../Include/Common/ConfigData.js: 121
                var appInfo = appHash[appName]; // ../Include/Common/ConfigData.js: 122
                if (appInfo['Published'] && appInfo['Enabled'] && HashMap.AddNewItem(uHash, appName, true)) // ../Include/Common/ConfigData.js: 123
                    uList.push(appName); // ../Include/Common/ConfigData.js: 124
            } // ../Include/Common/ConfigData.js: 125
        } // ../Include/Common/ConfigData.js: 126
        var contentMap = ConfigData.GetValueByKey('SmartHelp.ContentMap'); // ../Include/Common/ConfigData.js: 127
        if (contentMap && contentMap.length) { // ../Include/Common/ConfigData.js: 128
            for (var i = 0, n = contentMap.length; i < n; ++i) { // ../Include/Common/ConfigData.js: 129
                var mapping = contentMap[i]; // ../Include/Common/ConfigData.js: 130
                var appName = mapping['Application']; // ../Include/Common/ConfigData.js: 131
                if (appName && HashMap.AddNewItem(uHash, appName, true)) // ../Include/Common/ConfigData.js: 132
                    uList.push(appName); // ../Include/Common/ConfigData.js: 133
            } // ../Include/Common/ConfigData.js: 134
        } // ../Include/Common/ConfigData.js: 135
        return uList; // ../Include/Common/ConfigData.js: 136
    }, // ../Include/Common/ConfigData.js: 137
    Reset: function() { // ../Include/Common/ConfigData.js: 138
        _ConfigData.Reset(); // ../Include/Common/ConfigData.js: 139
    }, // ../Include/Common/ConfigData.js: 140
    _LoadKey: function(key) { // ../Include/Common/ConfigData.js: 141
        if (/^Applications\./.test(key)) { // ../Include/Common/ConfigData.js: 142
            var nameList = key.split('.'); // ../Include/Common/ConfigData.js: 143
            var appName = nameList[1]; // ../Include/Common/ConfigData.js: 144
            Assert('ConfigData._LoadKey', appName.length && (appName.toUpperCase() == appName), 'appName must be a non-empty uppercase string'); // ../Include/Common/ConfigData.js: 145
            ConfigData._LoadAndCacheApplicationConfig(appName); // ../Include/Common/ConfigData.js: 146
        } // ../Include/Common/ConfigData.js: 147
        else if (/^SmartHelp(?:\..+)?$/.test(key)) { // ../Include/Common/ConfigData.js: 148
            ConfigData._LoadAndCacheRootConfig(); // ../Include/Common/ConfigData.js: 149
        } // ../Include/Common/ConfigData.js: 150
        else if (/^PublishData(?:\..+)?$/.test(key)) { // ../Include/Common/ConfigData.js: 151
            ConfigData._LoadAndCachePublishData(); // ../Include/Common/ConfigData.js: 152
        } // ../Include/Common/ConfigData.js: 153
        else { // ../Include/Common/ConfigData.js: 154
            Assert('ConfigData._LoadKey', false, 'Invalid ConfigData key: ' + NameOf(key)); // ../Include/Common/ConfigData.js: 155
            return null; // ../Include/Common/ConfigData.js: 156
        } // ../Include/Common/ConfigData.js: 157
        var configNode = _ConfigData.Root.TryOpenKey(key); // ../Include/Common/ConfigData.js: 158
        TraceIf.Warning(!configNode, 'ConfigData._LoadKey', 'ConfigData key not found: ' + NameOf(key)); // ../Include/Common/ConfigData.js: 159
        return configNode; // ../Include/Common/ConfigData.js: 160
    }, // ../Include/Common/ConfigData.js: 161
    _LoadAndCachePublishData: function() { // ../Include/Common/ConfigData.js: 162
        ConfigData._LoadAndCacheRootConfig(); // ../Include/Common/ConfigData.js: 163
        if (_ConfigData.PublishDataLoaded) // ../Include/Common/ConfigData.js: 164
            return true; // ../Include/Common/ConfigData.js: 165

        _ConfigData.PublishDataLoaded = true; // ../Include/Common/ConfigData.js: 167
        var data = _ConfigData.LoadAndCache(ConfigData.GetPublishDataLocation()); // ../Include/Common/ConfigData.js: 168
        if (data) // ../Include/Common/ConfigData.js: 169
            _ConfigData.Root.CreateKey('PublishData').Extend(data); // ../Include/Common/ConfigData.js: 170
    }, // ../Include/Common/ConfigData.js: 171
    _LoadAndCacheRootConfig: function() { // ../Include/Common/ConfigData.js: 172
        if (_ConfigData.RootLoaded) // ../Include/Common/ConfigData.js: 173
            return true; // ../Include/Common/ConfigData.js: 174

        _ConfigData.RootLoaded = true; // ../Include/Common/ConfigData.js: 176
        var configNode = _ConfigData.Root; // ../Include/Common/ConfigData.js: 177
        configNode.Extend(ConfigDefaults); // ../Include/Common/ConfigData.js: 178
        var data = _ConfigData.LoadAndCache(ConfigData.GetRootConfigDataLocation()); // ../Include/Common/ConfigData.js: 179
        if (data) { // ../Include/Common/ConfigData.js: 180
            _ConfigData.PublishDataLoaded = true; // we don't need PublishData if rootconfig is loaded
            configNode.Extend(data); // ../Include/Common/ConfigData.js: 182
            configNode.Delete('Info'); // ../Include/Common/ConfigData.js: 183
        } // ../Include/Common/ConfigData.js: 184
    }, // ../Include/Common/ConfigData.js: 185
    _LoadAndCacheApplicationConfig: function(appName, url) { // ../Include/Common/ConfigData.js: 186
        var configKey = ConfigData.GetApplicationKey(appName); // ../Include/Common/ConfigData.js: 187
        var configNode = _ConfigData.Root.CreateKey(configKey); // ../Include/Common/ConfigData.js: 188

        var appHandler = ApplicationMap.GetApplication(appName); // ../Include/Common/ConfigData.js: 190
        var configDefaults = appHandler ? appHandler.ConfigDefaults : ApplicationBase.prototype.ConfigDefaults; // ../Include/Common/ConfigData.js: 191

        Trace.Object('ConfigData.GetApplicationConfig', configDefaults, 'configDefaults'); // ../Include/Common/ConfigData.js: 193
        configNode.Extend(configDefaults); // ../Include/Common/ConfigData.js: 194
        Trace.Object('ConfigData.GetApplicationConfig', configNode, 'configNode'); // ../Include/Common/ConfigData.js: 195

        url = ((url != null) ? url + 'configdata.json.js' : ConfigData.GetApplicationConfigDataLocation(appName)); // ../Include/Common/ConfigData.js: 197
        var data = _ConfigData.LoadAndCache(url); // ../Include/Common/ConfigData.js: 198
        if (data) { // ../Include/Common/ConfigData.js: 199
            var node = ConfigNode.FindKey(data, configKey); // ../Include/Common/ConfigData.js: 200
            if (node) // ../Include/Common/ConfigData.js: 201
                configNode.Extend(node); // ../Include/Common/ConfigData.js: 202
        } // ../Include/Common/ConfigData.js: 203
        return configNode; // ../Include/Common/ConfigData.js: 204
    } // ../Include/Common/ConfigData.js: 205
}; // ../Include/Common/ConfigData.js: 206


//* <FileEnd path="../Include/Common/ConfigData.js"/>


//* <FileBegin path="stdhemi/smarthelp/common.js"/>
//x /// <reference path="smarthelpversions.js"/>

//* <FileBegin path="stdhemi/smarthelp/smarthelpversions.js"/>

var smarthelpie_version = '11,1,0,10'; // stdhemi/smarthelp/smarthelpversions.js: 2
var smarthelpff_version = '11.1.0.19'; // stdhemi/smarthelp/smarthelpversions.js: 3
var smarthelpie_version_ms = '12,0,0,3'; // stdhemi/smarthelp/smarthelpversions.js: 4
var smarthelpff_version_ms = '12.0.0.14'; // stdhemi/smarthelp/smarthelpversions.js: 5

//* <FileEnd path="stdhemi/smarthelp/smarthelpversions.js"/>


function WriteTitleText(text) { // stdhemi/smarthelp/common.js: 3
    document.getElementById("page_title").innerHTML = text; // stdhemi/smarthelp/common.js: 4
} // stdhemi/smarthelp/common.js: 5

function WriteText(id, text) { // stdhemi/smarthelp/common.js: 7
    var z = document.getElementById(id); // stdhemi/smarthelp/common.js: 8
    if (z) { // stdhemi/smarthelp/common.js: 9
        z.innerHTML = text; // stdhemi/smarthelp/common.js: 10
    } // stdhemi/smarthelp/common.js: 11
} // stdhemi/smarthelp/common.js: 12

function WriteStatusText(text, remove) { // stdhemi/smarthelp/common.js: 14
    if (remove == 1) { // stdhemi/smarthelp/common.js: 15
        document.getElementById("Content").innerHTML = ''; // stdhemi/smarthelp/common.js: 16
    } // stdhemi/smarthelp/common.js: 17
    document.getElementById("Content").innerHTML += "<span>" + text + "</span><br /><br />"; // stdhemi/smarthelp/common.js: 18
} // stdhemi/smarthelp/common.js: 19

function QueryData(data) { // stdhemi/smarthelp/common.js: 21
    Trace('QueryData', data); // stdhemi/smarthelp/common.js: 22
    WriteTitleText(ResourceManager.GetResource('SETUP_DATA')); // stdhemi/smarthelp/common.js: 23
    var text1 = "N/A", text2 = ""; // stdhemi/smarthelp/common.js: 24
    //sort
    var a = [], i = 0; // stdhemi/smarthelp/common.js: 26
    var queryResult = Json.DecodeObject(data); // stdhemi/smarthelp/common.js: 27
    for (var key in queryResult) { // stdhemi/smarthelp/common.js: 28
        if (key == 'LocationList') { // stdhemi/smarthelp/common.js: 29
            continue; // stdhemi/smarthelp/common.js: 30
        } // stdhemi/smarthelp/common.js: 31
        a[i] = []; // stdhemi/smarthelp/common.js: 32
        a[i][0] = key; // stdhemi/smarthelp/common.js: 33
        a[i][1] = queryResult[key]; // stdhemi/smarthelp/common.js: 34
        i++; // stdhemi/smarthelp/common.js: 35
    } // stdhemi/smarthelp/common.js: 36
    a.sort(CompareAlpha); // stdhemi/smarthelp/common.js: 37
    for (var k = 0; k < a.length; k++) { // stdhemi/smarthelp/common.js: 38
        text2 += '<tr><td>' + a[k][0] + '</td><td>' + a[k][1] + '</td></tr>'; // stdhemi/smarthelp/common.js: 39
    } // stdhemi/smarthelp/common.js: 40

    if (text2.length > 0) { // stdhemi/smarthelp/common.js: 42
        text1 = "<table>" + text2 + "</table>" // stdhemi/smarthelp/common.js: 43
    } // stdhemi/smarthelp/common.js: 44
    WriteStatusText(text1, 1); // stdhemi/smarthelp/common.js: 45
} // stdhemi/smarthelp/common.js: 46

function CompareAlpha(a, b) { // stdhemi/smarthelp/common.js: 48
    if (a[0] < b[0]) { return -1; } // stdhemi/smarthelp/common.js: 49
    if (a[0] > b[0]) { return 1; } // stdhemi/smarthelp/common.js: 50
    return 0; // stdhemi/smarthelp/common.js: 51
} // stdhemi/smarthelp/common.js: 52

var ConfigReader = { // stdhemi/smarthelp/common.js: 54
    Url: null, // stdhemi/smarthelp/common.js: 55
    SetUrl: function(url) { // stdhemi/smarthelp/common.js: 56
        ConfigReader.Url = url; // stdhemi/smarthelp/common.js: 57
    }, // stdhemi/smarthelp/common.js: 58
    GetValue: function(node, key) { // stdhemi/smarthelp/common.js: 59
        if (ConfigReader.Url != null) { // stdhemi/smarthelp/common.js: 60
            ConfigData.SetContentUrl(ConfigReader.Url); // stdhemi/smarthelp/common.js: 61
            var configNode = ConfigData.OpenKey(node); // stdhemi/smarthelp/common.js: 62
            if (configNode) { // stdhemi/smarthelp/common.js: 63
                return configNode.GetValueByKey(key); // stdhemi/smarthelp/common.js: 64
            } // stdhemi/smarthelp/common.js: 65
            return ''; // stdhemi/smarthelp/common.js: 66

        } // stdhemi/smarthelp/common.js: 68
    }, // stdhemi/smarthelp/common.js: 69
    GetData: function() { // stdhemi/smarthelp/common.js: 70
        var result = ''; // stdhemi/smarthelp/common.js: 71
        if (ConfigReader.Url != null) { // stdhemi/smarthelp/common.js: 72
            ConfigData.SetContentUrl(ConfigReader.Url); // stdhemi/smarthelp/common.js: 73
            var z = ConfigData.GetValueByKey('PublishData.Applications'); // stdhemi/smarthelp/common.js: 74
            for (i in z) { // stdhemi/smarthelp/common.js: 75
                if (result != '') { // stdhemi/smarthelp/common.js: 76
                    result += ';'; // stdhemi/smarthelp/common.js: 77
                } // stdhemi/smarthelp/common.js: 78
                result += i; // stdhemi/smarthelp/common.js: 79
                for (j in z[i]) { // stdhemi/smarthelp/common.js: 80
                    if (j == 'Title') { // stdhemi/smarthelp/common.js: 81
                        result += ',' + z[i].Title; // stdhemi/smarthelp/common.js: 82
                    } // stdhemi/smarthelp/common.js: 83
                } // stdhemi/smarthelp/common.js: 84
            } // stdhemi/smarthelp/common.js: 85
        } // stdhemi/smarthelp/common.js: 86
        return result; // stdhemi/smarthelp/common.js: 87
    } // stdhemi/smarthelp/common.js: 88
} // stdhemi/smarthelp/common.js: 89

function Upgrade() { // stdhemi/smarthelp/common.js: 91
    WriteStatusText(ResourceManager.GetResource('SETUP_REMOVE_THEN_UPGRADE'), 1); // stdhemi/smarthelp/common.js: 92
    WriteStatusText(ResourceManager.GetResource('SETUP_REMOVE')); // stdhemi/smarthelp/common.js: 93
} // stdhemi/smarthelp/common.js: 94

function Downgrade() { // stdhemi/smarthelp/common.js: 96
    WriteStatusText(ResourceManager.GetResource('SETUP_REMOVE_BEFORE_DOWNGRAGE'), 1); // stdhemi/smarthelp/common.js: 97
    WriteStatusText(ResourceManager.GetResource('SETUP_REMOVE')); // stdhemi/smarthelp/common.js: 98

} // stdhemi/smarthelp/common.js: 100

function Wait() { // stdhemi/smarthelp/common.js: 102
    WriteStatusText(ResourceManager.GetResource('SETUP_WAIT')); // stdhemi/smarthelp/common.js: 103
} // stdhemi/smarthelp/common.js: 104

function SetTitle() { // stdhemi/smarthelp/common.js: 106
    document.title = ResourceManager.GetResource('SETUP_TITLE'); // stdhemi/smarthelp/common.js: 107
} // stdhemi/smarthelp/common.js: 108

function Succeeded() { // stdhemi/smarthelp/common.js: 110
    WriteStatusText(ResourceManager.GetResource('SETUP_CONFIGURATION_SUCCESS'), 1); // stdhemi/smarthelp/common.js: 111
    WriteStatusText(ResourceManager.GetResource('SETUP_RESTART')); // stdhemi/smarthelp/common.js: 112
    WriteStatusText(ResourceManager.GetResource('SETUP_BUTTONVISIBLITYWARNING')); // stdhemi/smarthelp/common.js: 113
    WriteStatusText(ResourceManager.GetResource('SETUP_POPUPBLOCKER')); // stdhemi/smarthelp/common.js: 114
} // stdhemi/smarthelp/common.js: 115

function Failed(z) { // stdhemi/smarthelp/common.js: 117
    WriteStatusText(ResourceManager.GetResource('SETUP_CONFIGURATION_FAILED'), 1); // stdhemi/smarthelp/common.js: 118
    WriteStatusText(ResourceManager.GetResource('ERROR')); // stdhemi/smarthelp/common.js: 119
    WriteStatusText('(' + ResourceManager.GetResource('ERROR_CODE') + ' ' + z + ')'); // stdhemi/smarthelp/common.js: 120
} // stdhemi/smarthelp/common.js: 121

function Install() { // stdhemi/smarthelp/common.js: 123
    var x = document.getElementById('upk_content'); // stdhemi/smarthelp/common.js: 124
    if (x) { // stdhemi/smarthelp/common.js: 125
        x.innerHTML = '<br /><a href="' + downloadurl + '">' + ResourceManager.GetResource('SETUP_INSTALL') + '</a><br /><br />'; // stdhemi/smarthelp/common.js: 126
    } // stdhemi/smarthelp/common.js: 127
} // stdhemi/smarthelp/common.js: 128

function UpgradeSH() { // stdhemi/smarthelp/common.js: 130
    var x = document.getElementById('upk_content'); // stdhemi/smarthelp/common.js: 131
    if (x) { // stdhemi/smarthelp/common.js: 132
        x.innerHTML = ResourceManager.GetResource('SETUP_DETECTED') + '<br /><br />' + ResourceManager.GetResource('SETUP_UPGRADE_TEXT') + '<br /><br /><a href="' + downloadurl + '">' + ResourceManager.GetResource('SETUP_UPGRADE') + '</a><br /><br />'; // stdhemi/smarthelp/common.js: 133
    } // stdhemi/smarthelp/common.js: 134
} // stdhemi/smarthelp/common.js: 135

function Status() { // stdhemi/smarthelp/common.js: 137
    var x = document.getElementById('upk_versions'); // stdhemi/smarthelp/common.js: 138
    if (x) { // stdhemi/smarthelp/common.js: 139
        x.innerHTML = '<hr /><br /><span>' + ResourceManager.GetResource('SETUP_INSTALLEDVERSION') + installed_version + '</span><br /><br />' + // stdhemi/smarthelp/common.js: 140
                '<span>' + ResourceManager.GetResource('SETUP_CURRENTVERSION') + GetCurrentVersion() + '</span><hr />'; // stdhemi/smarthelp/common.js: 141
    } // stdhemi/smarthelp/common.js: 142
} // stdhemi/smarthelp/common.js: 143

function UpToDate() { // stdhemi/smarthelp/common.js: 145
    var x = document.getElementById('upk_content'); // stdhemi/smarthelp/common.js: 146
    if (x) { // stdhemi/smarthelp/common.js: 147
        x.innerHTML = '<br /><span>' + ResourceManager.GetResource('SETUP_UPTODATE') + '</span><br /><br />'; // stdhemi/smarthelp/common.js: 148
    } // stdhemi/smarthelp/common.js: 149
} // stdhemi/smarthelp/common.js: 150

var installed_version = -1; // stdhemi/smarthelp/common.js: 152

function Normalize(x) { // stdhemi/smarthelp/common.js: 154
    if (x.indexOf(',') != -1) { // stdhemi/smarthelp/common.js: 155
        return x.replace(/\,/g, ''); // stdhemi/smarthelp/common.js: 156
    } // stdhemi/smarthelp/common.js: 157
    else if (x.indexOf('.') != -1) { // stdhemi/smarthelp/common.js: 158
        return x.replace(/\./g, ''); // stdhemi/smarthelp/common.js: 159
    } // stdhemi/smarthelp/common.js: 160
    return x; // stdhemi/smarthelp/common.js: 161
} // stdhemi/smarthelp/common.js: 162

function Standardize(x) { // stdhemi/smarthelp/common.js: 164
    if (x.indexOf(',') != -1) { // stdhemi/smarthelp/common.js: 165
        return x.replace(/\,/g, '.'); // stdhemi/smarthelp/common.js: 166
    } // stdhemi/smarthelp/common.js: 167
    return x; // stdhemi/smarthelp/common.js: 168
} // stdhemi/smarthelp/common.js: 169

var COMP_EQUAL = 0; // stdhemi/smarthelp/common.js: 171
var COMP_HIGHER = 1; // stdhemi/smarthelp/common.js: 172
var COMP_LOWER = 2; // stdhemi/smarthelp/common.js: 173

function Compare(a, b) { // stdhemi/smarthelp/common.js: 175
    if (Normalize(a) > Normalize(b)) { // stdhemi/smarthelp/common.js: 176
        return COMP_HIGHER; // stdhemi/smarthelp/common.js: 177
    } // stdhemi/smarthelp/common.js: 178
    else if (Normalize(a) < Normalize(b)) { // stdhemi/smarthelp/common.js: 179
        return COMP_LOWER; // stdhemi/smarthelp/common.js: 180
    } // stdhemi/smarthelp/common.js: 181

    return COMP_EQUAL; // stdhemi/smarthelp/common.js: 183
} // stdhemi/smarthelp/common.js: 184

function GetCurrentVersion() { // stdhemi/smarthelp/common.js: 186
    if (IsIE()) { // stdhemi/smarthelp/common.js: 187
        return Standardize(smarthelpie_version); // stdhemi/smarthelp/common.js: 188
    } // stdhemi/smarthelp/common.js: 189
    else if (IsFF()) { // stdhemi/smarthelp/common.js: 190
        return Standardize(smarthelpff_version); // stdhemi/smarthelp/common.js: 191
    } // stdhemi/smarthelp/common.js: 192

    return -1; // stdhemi/smarthelp/common.js: 194
} // stdhemi/smarthelp/common.js: 195
//* <FileEnd path="stdhemi/smarthelp/common.js"/>


function SetQueryResult(jsonData) { // stdhemi/smarthelpie/smarthelpie.js: 9
    var result = (jsonData? Json.DecodeObject(jsonData): null); // stdhemi/smarthelpie/smarthelpie.js: 10
    window['QueryResult'] = result; // stdhemi/smarthelpie/smarthelpie.js: 11
    window['ErrorResult'] = (result ? 0 : 1); // stdhemi/smarthelpie/smarthelpie.js: 12
} // stdhemi/smarthelpie/smarthelpie.js: 13

//* <FileEnd path="stdhemi/smarthelpie/smarthelpie.js"/>
