SCC = {
    SERVER: {
        COMPANIES: "http://stockcharts.com/j-ci/ci",
        MEMBERS: "http://stockcharts.com/j-mi/mi",
        QUOTES: "http://stockcharts.com/j-qi/qi"
    },
    KEY: {
        UP: 38,
        DOWN: 40,
        DEL: 46,
        TAB: 9,
        RETURN: 13,
        ESC: 27,
        COMMA: 188,
        PAGEUP: 33,
        PAGEDOWN: 34,
        BACKSPACE: 8,
        CTRL: 224,
        SPACE: 32,
        LEFTARROW: 37,
        UPARROW: 38,
        RIGHTARROW: 39,
        DOWNARROW: 40
    }
};
SCC.ajax = {
    get: function(b, c, d) {
        if (d != undefined) {
            $.ajax({
                url: b,
                type: "GET",
                data: c,
                dataType: "json",
                timeout: 10000,
                async: true,
                error: function() {},
                success: d
            });
            return null
        } else {
            var a = {};
            $.ajax({
                url: b,
                type: "GET",
                data: c,
                dataType: "json",
                timeout: 10000,
                async: false,
                error: function() {},
                success: function(e) {
                    a = e
                }
            });
            return a
        }
    },
    post: function(b, c, d) {
        if (d != undefined) {
            $.ajax({
                url: b,
                type: "POST",
                data: c,
                dataType: "json",
                timeout: 5000,
                async: true,
                error: function() {},
                success: d
            });
            return null
        } else {
            var a = {};
            $.ajax({
                url: b,
                type: "POST",
                data: c,
                dataType: "json",
                timeout: 5000,
                async: false,
                error: function() {},
                success: function(e) {
                    a = e
                }
            });
            return a
        }
    }
};
SCC.cookie = {
    write: function(d, e, c) {
        if (c) {
            var b = new Date();
            var a = new Date(b.getTime() + c * 24 * 60 * 60 * 1000);
            document.cookie = d + "=" + encodeURIComponent(e) + "; expires=" + a.toGMTString()
        } else {
            document.cookie = d + "=" + encodeURIComponent(e)
        }
    },
    read: function(a) {
        var b = document.cookie.match("(?:^|;)\\s*" + a.escapeRegExp() + "=([^;]*)");
        return (b) ? decodeURIComponent(b[1]) : null
    },
    dispose: function(a) {
        document.cookie = a + "=; expires=Thu, 01-Jan-1970 00:00:01 GMT"
    }
};
SCC.util = {
    getTopZIndex: function(a) {
        var b = $(a);
        var c = 0;
        b.children().each(function() {
            var d = parseInt($(this).css("z-index"));
            if (d >= c) {
                c = d
            }
        });
        return c
    },
    parseDate: function(d) {
        var g = d.split(/\s+/);
        var b = "";
        var f = "";
        if (g.length == 2) {
            b = g[0];
            f = g[1]
        } else {
            var a = new Date();
            if (g[0].indexOf(":") != -1) {
                b = a.getFullYear() + "_" + a.getMonth() + "-" + a.getDate();
                f = g[0]
            } else {
                b = g[0];
                f = "0:0:0"
            }
        }
        var e = b.split("-");
        var c = f.split(":");
        return new Date(e[0], e[1], e[2], c[0], c[1], c[2], 0)
    }
};
String.prototype.startsWith = function(a) {
    return this.indexOf(a) == 0
};
String.prototype.startsWithIgnoreCase = function(a) {
    return this.toLowerCase().indexOf(a.toLowerCase()) == 0
};
String.prototype.trim = function() {
    return this.replace(/^\s+|\s+$/g, "")
};
String.prototype.escapeRegExp = function() {
    return this.replace(/([-.*+?^${}()|[\]\/\\])/g, "\\$1")
};
Number.prototype.addCommas = function() {
    var e = this + "";
    var a = e.split(".");
    var d = a[0];
    var b = a.length > 1 ? "." + a[1] : "";
    var c = /(\d+)(\d{3})/;
    while (c.test(d)) {
        d = d.replace(c, "$1,$2")
    }
    return d + b
};
Date.prototype.isDst = function() {
    var a = new Date(this.getFullYear(), 0, 1);
    var c = new Date(this.getFullYear(), 6, 1);
    var b = Math.max(a.getTimezoneOffset(), c.getTimezoneOffset());
    return this.getTimezoneOffset() < b
};
