ONEGEEK.forms.GValidator.options={
reqShow:true,
reqChar:"*",
reqPlacement:"before",
autoFocus:true,
supressAlert:false,
highlightFields:"highlight",
eMsgFormat:"compact"
,eMsgEventOn:"mouseover",
eMsgEventOff:"mouseout",
fMsgFormat:'null',
fMsg:"Please correct the highlighted errors!",
icons:{ok:"assets/images/icons/tick.png",
       info:"assets/images/icons/help.png",
       error:"assets/images/icons/icon_alert.gif"}	   
};

ONEGEEK.forms.GValidator.plugins={
	confirmEmail:{
		_extends:"GenericTextField",
		regex:/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g,
		cleanRegex:/[^0-9\.]/g,
		contextMsg:"Please re-enter an email address",
		errorMsg:"The email addresses are not the same, please check",
		successMsg:"Completed correctly",
		validate:function(){
			
			var confirm = document.getElementById('cfEmail');
			var validated = false;

        	
			if(this.field.value != confirm.value) {
        		validated = false;
                this.setState(ONEGEEK.forms.FIELD_STATUS_ERROR);				
        	} else if ( (this.field.value == confirm.value) && confirm.value != '') {
			  this.setState(ONEGEEK.forms.FIELD_STATUS_OK);	
			}
			
			}
			
			
			
			},
    imgfile: {
        _extends:     'GenericTextField',
        regex:        /^.*\.(jpg|gif|png)$/i,
        cleanRegex:   /[^0-9\.]/g,
        contextMsg: 'Please upload a valid image file eg JPG, GIF, PNG',
        errorMsg: 'Please enter a valid image format',   
        successMsg: 'Thanks',
        validate: function() {
			
           this.pattern = new RegExp(this.regex);
           var validated = this.pattern.test(this.field.value);
		   
		   if (this.field.value!='') {
			   if (validated) {
			   	 this.setState(ONEGEEK.forms.FIELD_STATUS_OK);
			   } else {
			   	 this.setState(ONEGEEK.forms.FIELD_STATUS_ERROR);	
			   }		   	
		   }
		   		
        }
            
    }   
		
};