/*
initialPassField: 'minrange' // id of the initial pay range field
        if (field.initialPassField) {
            var minrenum = Ext.getCmp(field.initialPassField);
            return (val > minrenum.getValue());
        }

*/
Ext.apply(Ext.form.VTypes, {
	    PhoneNum:  function(v) {
	        return /^[0-9]{10}$|^\(0[2,3,7,8]{1}\)[0-9]{8}$|^\(0[2,3,7,8]{1}\)[ ][0-9]{4}[ ][0-9]{4}$|^\+61[2,3,7,8]{1}[0-9]{8}$|^\+61[ ][2,3,7,8]{1}[ ][0-9]{4}[ ][0-9]{4}$|^\+([0-57-9]|6[02-9])[0-9]+$/.test(v);
		},
		
		password : function(val, field) {
        if (field.initialPassField) {
            var pwd = Ext.getCmp(field.initialPassField);
            return (val == pwd.getValue());
        }
        return true;
    },
    	payrange : function(val, field) {
    	
        return true;
    },
    
		PhoneNumText : 'The phone number field needs to be in the format "(02) 1234 5678"',
    	passwordText : 'Passwords do not match',
    	payrangeText : 'The min pay must be less than the max.'
	});

var countries = new Ext.data.SimpleStore({
        fields: ['abbr', 'country'],
        data : 	[
			       ['AU', 'Australia'], 		
					['NZ', 'New Zealand'], 		
					['GB', 'United Kingdom'], 	
					['US', 'United States'] 		
			    ]
    });

var sectors = new Ext.data.SimpleStore({
        fields: ['abbr', 'sector'],
        data : 	[
			       ['AF', 'Recruitment'], 		
					['AL', '--Civil Engineering--'], 			
					['DZ', 'Civil Design'], 			
					['AS', 'Environmental'], 	
					['AD', 'Geotechnical'], 			
					['AO', 'Structural'], 			
					['AI', 'Traffic and Transportation'], 		
					['AQ', 'Water'], 		
					['AG', '--Civil Construction--'],
					['AL', 'Buildings'], 			
					['DZ', 'Highways, Bridges & Tunnels'], 			
					['AS', 'Pipelines & Infrastructure'], 	
					['AD', '--Mining--'], 			
					['AO', 'Mineral'], 			
					['AI', 'Oil & Gas']
				]
    });
