// JAVASCRIPT FILE  - ENUMS


// eDBSchema
var eDBSchema = {
	Tiger: 1,
	ExpoReg: 2,
	PrintManagement: 3
}


// eDataEntryStyle - type of control used to enter data
var eDataEntryStyle = {
	Text: 1,
	Listbox: 2,
	Radio: 3,
	Checkbox: 4,
	DateRange: 5
}

// eFieldType - Tiger field type
var eFieldType = {
	Contact: 1,
	OtherText: 2,
	Hidden: 3,
	File: 4,
	FreeText: 5,
	Demog: 10,
	DPA: 11
}


// eMatchType - Filter match types
var eMatchType = {
	NoFilter: 1,
	NoValue: 2,
	Is: 3,
	IsNot: 4,
	IsOneOf: 5,
	IsNoneOf: 6,
	Equals: 7,
	StartsWith: 8,
	Contains: 9,
	NotEquals: 10,
	NotStartsWith: 11,
	NotContains: 12,
	HasValue: 13,
	Between: 14,
  LessThan: 15,
  MoreThan: 16,
	EverythingToValue:17,
	EverythingFromValue:18
}

// eDisplayStatus - three states: Usable, unusable, and invisible
var eDisplayStatus = {
	Normal: 0,
	Disabled: 1,
	Hidden: 2
}

// eDataStoreMode - for hidden field types, how/when to store the data
var eDataStoreMode = {
	DontStore: 0,
	OnlyIfEmpty: 1,
	Overwrite: 2,
	Append: 3
}


// eShowCompulsoryMarks
var eShowCompulsoryMarks = {
	UseDefault: -1,
	None: 0,
	BeforeLabel: 1,
	AfterLabel: 2,
	WithValidSign: 3
}

// eLayoutStyle - how the control with its label etc is laid out in HTML.
// this will be expanded as demand grows
var eLayoutStyle = {
	Standard: 1,
	TwoColTableRow: 2,
	ThreeColTableRow: 3,
	OtherText: 4,
	Standard_LabelAfter: 11,
	TwoColTableRow_LabelAfter: 12,
	ThreeColTableRow_LabelAfter: 13
}


// eColleagueLayoutStyle - how the control with its label etc is laid out in HTML.
// this will be expanded as demand grows
var eColleagueLayoutStyle = {
	None: 0,
	List: 1,
	ListWithTwoColTable: 2,
	ListWithThreeColTable: 3,
	Table: 4
}
	
var eButtonTypes = {
	Button: 1,
	Link: 2
}


	
// eIssueLevel - when a field is validated, if there is a problem it can be
// set to any of three levels of seriousness. 
var eIssueLevel = {
	None: 0,	// No issue
	Query: 1,	// Probably not an issue, but worth pointing out to the user so they can double check
	Warning: 2,	// Data doesn't look right. User should be warned before continuing, but they shouldn't be prevented from doing so
	Error: 3	// Unacceptable error in the data. Cannot proceed until it has been corrected.
}

// eElementType - each 'field' has a whole block of connected HTML, including the control(s) itself, 
// any label, validation mark, table cells etc. They are assigned a 'type' so that the appropriate
// classes can be applied when necessary, and so that some specific actions can be taken
var eElementType = {
	Field: 0,
	Textbox: 1,
	Listbox: 2,
	TickGroup: 3,
	Radio: 4,
	Checkbox: 6,
	WholeField: 7,
	Label: 8,
	LabelCell: 9,
	FieldCell: 10,
	OptionLabel: 11,
	OtherLabel: 12,
	OtherTextbox: 13,
	ValidSign: 14,
	DPACheckbox: 15,
	DPALabel: 16,
	SubLabel: 17
}

// eConditionType - types of conditions used for conditional rules
var eConditionType = {
	Empty: 1,		// Only activate the target if the source value is empty
	NotEmpty: 2,	// Only activate the target if the source value has something in it (default)
	InValueList: 3,	// Only activate the target if the source value is/contains a value from this list
	NotInValueList: 4,	// Only activate the target if the source value is not/does not contain a value from this list
	InRange: 5,		// Only activate the target if the source value is within the specified range
	NotInRange: 6	// Only activate the target if the source value is not within the specified range
}

// eFormatType - ways to format text data
var eFormatType = {
	None: 0,		// no formatting applied
	Uppercase: 1,	// Upper case
	Lowercase: 2,	// Lower case
	Titlecase: 3,	// Title case - subtype defined using eFormatTitleType
	Phone: 4,		// Phone number, spaced appropriately and in international format
	Email: 5,		// Email address, cased appropriately
	Postcode: 6,	// Postcode, spaced appropriately
	NumericPostcode: 13,	
	Number: 7,
	Money: 8,
	Years: 9,
	Date: 10,
	DateTime: 11,
	Time: 12,
	Username: 14
}

// eFormatType - ways to format text data using title case. Customises the algorithm with specifics suited to the
// particular data type
var eFormatTitleType = {
	Standard: 0,
	Firstname: 1,	
	Lastname: 2,
	Job: 3,
	Company: 4,
	Address: 5,
	Sentence: 6
}


//eDupeHandling - for setting the dupe records constants
var eDupeHandling = {
		NoDupeChecking: 0,
		UpdateRecordAutoLogin: 1,
		UpdateRecordDontLogin: 2,
		DontUpdateRecordDontLogin: 3,
		DontUpdateRecordDontLoginUnlessNoEmail: 5
	
	}

// eFormatMode - for setting how to format title-case text based on what the user actually types
var eFormatMode = {
	NotSet: 0,			// not yet decided - if 'Smart Typing Test' is used, it will be set after the first entry
	Never: 1,			// Leave all 'titlecase' formatting to the user. What they type, goes
	OnlyIfLower: 2,		// If they type the whole thing in lower case, then title-case it
	OnlyIfSameCase: 3,	// If they type the whole thing in just lower OR just upper, then title-case it
	Always: 4			// Ignore any casing they specify; start from scratch and titlecase regardless
}

// eValidType - for specifying which set of rules to use to validate a particular field, suited to the 
// particular data type
var eValidType = {
	NoValidation: 0,
	Firstname: 1,
	Lastname: 2,
	Job: 3,
	Company: 4,
	Address: 5,
	Postcode: 6,
	Phone: 7,
	Email: 8,
	Text: 9,
	Money: 10,
	Date: 11,
	Time: 12,
	Integer: 13,
	CreditCardNumber: 14
}


var eRole = {
	ClientReadOnly: 100,
	OnsiteUser: 200,
	OfficeUser: 300,
	ClientUser: 400,
	OnsiteSupervisor: 500,
	ClientAdmin: 600,
	OnsiteAdmin: 700,
	OfficeAdmin: 800,
	Developer: 900
}



// Message Types
var eMessageType = {
	Email: 1,
	SMS: 2
}

// LocationTypes
var eLocationType = {
	eLocationType_MeetingRoom: 1,
	eLocationType_Table: 2,
	eLocationType_Vehicle: 3
}
