/* 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/configurator/saver.js" time="2012-01-13T11:50:27"/>
//* <FileRef type="reference" path="../Include/Tools/Url.js" time="2012-01-13T11:50:47"/>
//* <FileRef type="reference" path="../Include/Tools/Assert.js" time="2012-01-13T11:50:45"/>
//* <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"/>


//* <FileBegin path="stdhemi/configurator/saver.js"/>
//x /// <reference path="../../../Include/Tools/Url.js"/>

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

//* <FileBegin path="../Include/Tools/Assert.js"/>
//x //: <if xconfig="Debug,Trace"/>
//x /// <reference path="Fail.js"/>
//x /// <reference path="Main.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"/>


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


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


var save = function() { // stdhemi/configurator/saver.js: 3
    var w = window.parent; // stdhemi/configurator/saver.js: 4
    Assert('saver.save', (w && w.GkodConfig && w.GkodConfig.Page && w.GkodConfig.Page.saveit_c !== void 0 && w.GkodConfig.Page.saveit_f !== void 0), '(w && w.GkodConfig && w.GkodConfig.Page && w.GkodConfig.Page.saveit_c !== void 0 && w.GkodConfig.Page.saveit_f !== void 0)'); // stdhemi/configurator/saver.js: 5
    if (!w || !w.GkodConfig || !w.GkodConfig.Page || w.GkodConfig.Page.saveit_c === (void 0) || w.GkodConfig.Page.saveit_f === (void 0)) // stdhemi/configurator/saver.js: 6
        return; // stdhemi/configurator/saver.js: 7
    var form = document.forms['saveit']; // stdhemi/configurator/saver.js: 8
    var params = Url.DecodeLocationSearch(location.search); // stdhemi/configurator/saver.js: 9
    form.action = params['use'] || 'saveit.with'; // stdhemi/configurator/saver.js: 10
    form.saveit_c.value = w.GkodConfig.Page.saveit_c; // stdhemi/configurator/saver.js: 11
    form.saveit_f.value = w.GkodConfig.Page.saveit_f; // stdhemi/configurator/saver.js: 12
    form.submit(); // stdhemi/configurator/saver.js: 13
} // stdhemi/configurator/saver.js: 14

setTimeout(function(){save();},200); // stdhemi/configurator/saver.js: 16

//* <FileEnd path="stdhemi/configurator/saver.js"/>
