//*** Functions and variables which work with jquery.validationEngine.js ***//

//***  Sets the defaults validation variables ***//
// set the position of the error notifications //
strPromptPos = "custom"
				
// Default blanks //
// Password
strPasswordAlertText = ""
strPasswordRegEx = ""
// Email
strEmailAlertText = ""
strEmailRegEx = ""
// Required
strRequiredRegEx = ""
strRequiredAlertText = ""
strRequiredCheckboxMultipleAlertText = ""
strRequiredCheckboxAlertText = ""
strRequiredCheckboxMultipleRegEx = ""
strRequiredCheckboxRegEx = ""
// Telephone
strTelephoneRegEx = ""
strTelephoneAlertText = ""
// Payment
strPaymentAlertText = ""
strPaymentRegEx = ""
// Length
strLengthRegEx = ""
strLengthAlertText = ""
strLengthAlertText2 = ""
strLengthAlertText3 = ""
// MaxCheckBox
strmaxCheckBoxRegEx = ""
strmaxCheckBoxAlertText = ""
// MinCheckBox
strminCheckBoxRegEx = ""
strminCheckBoxAlertText = ""
strminCheckBoxAlertText2 = ""
// Confirm
strConfirmRegEx = ""
strConfirmAlertText = ""
// Date
strDateRegEx = ""
strDateAlertText = ""
// OnlyNumber
strOnlyNumberRegEx = ""
strOnlyNumberAlertText = ""
// OnlyNumbersNoSpaces
strOnlyNumberNoSpacesRegEx = ""
strOnlyNumberNoSpacesAlertText = ""
// OnlyFloat
strOnlyFloatRegEx= ""
strOnlyFloatAlertText = ""
strValOnlyFloatRegEx= ""

// NoSpecialCharacters
strNoSpecialCharactersRegEx = ""
strNoSpecialCharactersAlertText = ""
// OnlyAlphaNumSpacePlusMinus
strOnlyAlphaNumSpacePlusMinusRegEx = ""
strOnlyAlphaNumSpacePlusMinusAlertText = ""
//OnlyLetter
strOnlyLetterRegEx = ""
strOnlyLetterAlertText = ""

// buyer code checking -style
strBadBuyerCodeBackColour = "#ED1600"
strGoodBuyerCodeBackColour = "#268815"
strBadBuyerCodeFontColour = "#FFFFFF"
strGoodBuyerCodeFontColour = "#FFFFFF"	
strBuyerCodeWidth = "180px"
strBuyerCodeFont = "Arial"
strBuyerCodeFontSize = "10pt"
strBuyerCodeFontWeight = "normal"
strBuyerCodePadding = "4px"
strBuyerCodeTextAlign = "center"


function LoadValTextVars(str,type){

if (str) {
		switch(type){
				case 'required':
					strRequiredAlertText = str					
					break
				case 'required_CheckBox':
					strRequiredCheckboxAlertText = str
					break
				case 'required_CheckBoxMultiple':
					strRequiredCheckboxMultipleAlertText = str
					break
				case 'email':
					strEmailAlertText = str
					break
				case 'password':
					strPasswordAlertText = str
					break
				case 'paymentcard':
					strPaymentAlertText = str					
					break	
				case 'telephone':					
					strTelephoneAlertText = str
					break
				case 'buyercodecheck_bad':
					strBadBuyerCodeResult = str
					break
				case 'buyercodecheck_good':
					strGoodBuyerCodeResult = str
					break
				case 'length':
					strLengthAlertText = str
					break
				case 'length_2':
					strLengthAlertText2 = str
					break
				case 'length_3':
					strLengthAlertText3 = str
					break					
					
				case 'maxCheckbox':
					strmaxCheckBoxAlertText = str
					break
				case 'minCheckbox':
					strminCheckBoxAlertText = str
					break
				case 'minCheckbox_2':
					strminCheckBoxAlertText2 = str
					break
				case 'confirm':
					// at time of compiling a different mechanism is being adopted for confirm
					strConfirmAlertText = str
					break
				case 'date':
					strDateAlertText = str
					break
				case 'onlyNumber':
					strOnlyNumberAlertText = str
					break
				case 'onlyNumberNoSpaces':
					strOnlyNumberNoSpacesAlertText = str					
					break
				case 'onlyFloat':
					strOnlyFloatAlertText = str					
					break
				case 'NoSpecialCharactersAlertText':
					strNoSpecialCharactersAlertText = str
					break
				case 'onlyAlphaNumSpacePlusMinus':
					strOnlyAlphaNumSpacePlusMinusAlertText = str
					break
				case 'onlyLetter':
					strOnlyLetterAlertText = str
					break				
			}
	}
}

//*** Loads the Regular Expression into variables ***//
function LoadValRegExVars(str,type){

if (str) {
		// type
		switch(type){
			case 'email':
				strEmailRegEx = str
				break
			case 'password':
				strPasswordRegEx = str
				break	
			case 'paymentcard':
				strPaymentRegEx = str
				break
			case 'telephone':
				strTelephoneRegEx = str
				break
			case 'date':
				strDateRegEx = str
				break
			case 'onlyNumber':
				strOnlyNumberRegEx = str
				break
			case 'onlyNumberNoSpaces':
				strOnlyNumberNoSpacesRegEx = str
				break
			case 'onlyFloat':
				strOnlyFloatRegEx = str
				break
			case 'noSpecialCharacters':
				strNoSpecialCharactersRegEx = str
				break
			case 'onlyAlphaNumSpacePlusMinus':
				strOnlyAlphaNumSpacePlusMinus = str
				break
			case 'onlyLetter':
				strOnlyLetterRegEx = str
				break		
				
		}
	}
}

// ***  example password RegEx
// ***  "regex":"/(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{6,15})$/",
// ***  "alertText":"* password must be alphanumeric with at least one number, one letter, and be between 6-15 character in length."}
		
