
var Config = {
	// Values must match config.h
	// Naming with CONFIG_ prefix is redundant but want to match exact screen to those in config.h, which are scopeless

	SETTINGS_GROUP_TITO_GENERAL:	0,
	SETTINGS_GROUP_GENERAL_PRODUCT: 0,

	SETTINGS_TYPE_GENERAL:	0,
	SETTINGS_TYPE_TITO:		1,
	

	SETTING_TITO_HIDE_EMPTY_SECTIONS: 1,
	SETTING_TITO_GROUP_BY: 2,

	SETTING_GENERAL_SHOW_SIGNATURES: 3,

	SETTING_VALUE_TITO_GROUP_BY_DAY:		0,
	SETTING_VALUE_TITO_GROUP_BY_WEEK:		1,
	SETTING_VALUE_TITO_GROUP_BY_PROJECT:	2,
	SETTING_VALUE_TITO_GROUP_BY_STATUS:		3,

	/*get: function(settingid) {
	},*/
	set: function(group, settingtype, settingid, value) {
		//only change config if ajax is available, otherwise change config ajax call will change the frame
		if (Ajax.ajaxAvailable()) {
			Ajax.send({
				silent: true,
				type: 'post',
				relativeUrl: '?SetData',
				data: {
					tokenid: DocumentData.tokenid,
					command: 'Config',
					group:	group,
					type:	settingtype,
					settingid: settingid,
					value: value
				},
				afterOnError: function() {
					// Notify user?
				}
			});
		}
	}
}
