ThinkCo.namespace ('ThinkCo.util');
ThinkCo.util.Cookie = function ( name ) {
    this.name    = name,
    /**
     * @function    --
     * @description    --
     * @param        {Object} x
     * @param        {Object} x
     * @param        {Object} x
     */
    this.get = function ( ) {
        var start    = document.cookie.indexOf (this.name + '=');
        var len        = start + this.name.length + 1;
        if (!start && this.name != document.cookie.substring (0, this.name.length)) {
            return null;
        };
        if (start == -1) {
            return null;
        };
        var end        = document.cookie.indexOf (';', len);
        if (end == -1) {
            end        = document.cookie.length;
        };
        return unescape (document.cookie.substring (len,end));
    },
    /**
     * @function    --
     * @description    --
     * @param        {Object} x
     * @param        {Object} x
     * @param        {Object} x
     */
    this.set = function ( value, days, path ) {
        var today    = new Date ();
        var expire    = new Date ();
        if (days == null || days == 0) {
            days    = 1;
        };
        if (!path) {
            path    = '';
        } else {
            path    = ';path=' + path;
        };
        expire.setTime (today.getTime () + 360000 * 24 * days);
        document.cookie = this.name + "=" + escape (value) + ";expires=" + expire.toGMTString () + path;
    }
};