general.namespace('SW');

(function () {

    var UserPrefs = SW.UserPrefs = function(uom, timeFormat, enableScrollZoom, homeRegion, isUserLoggedIn){
        /// <summary></summary>
        /// <param name=""></param>
        /// <returns></returns>
        
        // set defaults
        this.uom = UserPrefs.UOM.FEET;
        this.timeFormat = UserPrefs.TIME_FORMAT.STANDARD;
        this.enableScrollZoom = enableScrollZoom || false;
        this.homeRegion = homeRegion;
        this.isUserLoggedIn = isUserLoggedIn || false;
                
        // make sure the values are valid
        for (var i in UserPrefs.UOM) {
            if (UserPrefs.UOM[i] == uom) this.uom = uom;
        }
        for (var i in UserPrefs.TIME_FORMAT) {
            if (UserPrefs.TIME_FORMAT[i] == timeFormat) this.timeFormat = timeFormat;
        }
    };
    UserPrefs.prototype.constructor = UserPrefs;
    
    // public "constants"
    UserPrefs.UOM = {FEET: "feet", METERS: "met"};
    UserPrefs.TIME_FORMAT = {STANDARD: "12", MILITARY: "24"};
})();