// Form restrictions
var _VALID_DEF		= new Array();

// Set validation parameters

// 'minLength':        the min text length for this field
// 'maxLength':       the max text length for this field
// 'alpha':               text should be alpha or not
// 'numeric':           text should be numeric or not
// 'other':               regular expression to check text format
// 'optional':           the field is optional or not (mandatory)
// 'anonymous':      whether display this field for anonymous caller
// 'showOnPage':   whether display this field on page, please don't set 'showOnPage' with 'false' when 'optional' is 'false'

// Caller information

_VALID_DEF['frmFirstName'] = new Array();
_VALID_DEF['frmFirstName']['minLength'] = 1;
_VALID_DEF['frmFirstName']['maxLength'] = 50;
_VALID_DEF['frmFirstName']['alpha'] = true;
_VALID_DEF['frmFirstName']['numeric'] = false;
_VALID_DEF['frmFirstName']['other'] = null;
_VALID_DEF['frmFirstName']['optional'] = false; // this field is mandatory, please don't set 'true'
_VALID_DEF['frmFirstName']['anonymous'] = false; // this field is for non-anonymous caller, please don't set 'true'
_VALID_DEF['frmFirstName']['showOnPage'] = true; // this field is mandatory, please don't set 'false'

_VALID_DEF['frmLastName'] = new Array();
_VALID_DEF['frmLastName']['minLength'] = 1;
_VALID_DEF['frmLastName']['maxLength'] = 50;
_VALID_DEF['frmLastName']['alpha'] = true;
_VALID_DEF['frmLastName']['numeric'] = false;
_VALID_DEF['frmLastName']['other'] = null;
_VALID_DEF['frmLastName']['optional'] = false; // this field is mandatory, please don't set 'true'
_VALID_DEF['frmLastName']['anonymous'] = false; // this field is for non-anonymous caller, please don't set 'true'
_VALID_DEF['frmLastName']['showOnPage'] = true; // this field is mandatory, please don't set 'false'

_VALID_DEF['frmEmail'] = new Array();
_VALID_DEF['frmEmail']['minLength'] = 1;
_VALID_DEF['frmEmail']['maxLength'] = 50;
_VALID_DEF['frmEmail']['alpha'] = false;
_VALID_DEF['frmEmail']['numeric'] = false;
_VALID_DEF['frmEmail']['other'] = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
_VALID_DEF['frmEmail']['optional'] = false; // this field is mandatory, please don't set 'true'
_VALID_DEF['frmEmail']['anonymous'] = false; // this field is for non-anonymous caller, please don't set 'true'
_VALID_DEF['frmEmail']['showOnPage'] = true; // this field is mandatory, please don't set 'false'

_VALID_DEF['frmOrganization'] = new Array();
_VALID_DEF['frmOrganization']['minLength'] = 0;
_VALID_DEF['frmOrganization']['maxLength'] = 70;
_VALID_DEF['frmOrganization']['alpha'] = true;
_VALID_DEF['frmOrganization']['numeric'] = true;
_VALID_DEF['frmOrganization']['other'] = null;
_VALID_DEF['frmOrganization']['optional'] = true;
_VALID_DEF['frmOrganization']['anonymous'] = false;
_VALID_DEF['frmOrganization']['showOnPage'] = true; 

_VALID_DEF['frmTelephone'] = new Array();
_VALID_DEF['frmTelephone']['minLength'] = 0;
_VALID_DEF['frmTelephone']['maxLength'] = 14;
_VALID_DEF['frmTelephone']['alpha'] = false;
_VALID_DEF['frmTelephone']['numeric'] = false;
_VALID_DEF['frmTelephone']['other'] = /^[01]?[- .]?\(?[2-9]\d{2}\)?[- .]?\d{3}[- .]?\d{4}$/
_VALID_DEF['frmTelephone']['optional'] = true;
_VALID_DEF['frmTelephone']['anonymous'] = false;
_VALID_DEF['frmTelephone']['showOnPage'] = true; 

_VALID_DEF['frmWork'] = new Array();
_VALID_DEF['frmWork']['minLength'] = 0;
_VALID_DEF['frmWork']['maxLength'] = 14;
_VALID_DEF['frmWork']['alpha'] = false;
_VALID_DEF['frmWork']['numeric'] = false;
_VALID_DEF['frmWork']['other'] = /^[01]?[- .]?\(?[2-9]\d{2}\)?[- .]?\d{3}[- .]?\d{4}$/
_VALID_DEF['frmWork']['optional'] = true;
_VALID_DEF['frmWork']['anonymous'] = false;
_VALID_DEF['frmWork']['showOnPage'] = true; 

_VALID_DEF['frmFax'] = new Array();
_VALID_DEF['frmFax']['minLength'] = 0;
_VALID_DEF['frmFax']['maxLength'] = 14;
_VALID_DEF['frmFax']['alpha'] = false;
_VALID_DEF['frmFax']['numeric'] = false;
_VALID_DEF['frmFax']['other'] = /^[01]?[- .]?\(?[2-9]\d{2}\)?[- .]?\d{3}[- .]?\d{4}$/
_VALID_DEF['frmFax']['optional'] = true;
_VALID_DEF['frmFax']['anonymous'] = false;
_VALID_DEF['frmFax']['showOnPage'] = true; 

_VALID_DEF['frmMobile'] = new Array();
_VALID_DEF['frmMobile']['minLength'] = 0;
_VALID_DEF['frmMobile']['maxLength'] = 14;
_VALID_DEF['frmMobile']['alpha'] = false;
_VALID_DEF['frmMobile']['numeric'] = false;
_VALID_DEF['frmMobile']['other'] = /^[01]?[- .]?\(?[2-9]\d{2}\)?[- .]?\d{3}[- .]?\d{4}$/
_VALID_DEF['frmMobile']['optional'] = true;
_VALID_DEF['frmMobile']['anonymous'] = false;
_VALID_DEF['frmMobile']['showOnPage'] = true; 

_VALID_DEF['frmStreetNumber'] = new Array();
_VALID_DEF['frmStreetNumber']['minLength'] = 0;
_VALID_DEF['frmStreetNumber']['maxLength'] = 10;
_VALID_DEF['frmStreetNumber']['alpha'] = true;
_VALID_DEF['frmStreetNumber']['numeric'] = true;
_VALID_DEF['frmStreetNumber']['other'] = null;
_VALID_DEF['frmStreetNumber']['optional'] = true;
_VALID_DEF['frmStreetNumber']['anonymous'] = false;
_VALID_DEF['frmStreetNumber']['showOnPage'] = true; 

_VALID_DEF['frmStreetName'] = new Array();
_VALID_DEF['frmStreetName']['minLength'] = 0;
_VALID_DEF['frmStreetName']['maxLength'] = 100;
_VALID_DEF['frmStreetName']['alpha'] = true;
_VALID_DEF['frmStreetName']['numeric'] = true;
_VALID_DEF['frmStreetName']['other'] = null;
_VALID_DEF['frmStreetName']['optional'] = true;
_VALID_DEF['frmStreetName']['anonymous'] = false;
_VALID_DEF['frmStreetName']['showOnPage'] = true; 

_VALID_DEF['frmUnitNumber'] = new Array();
_VALID_DEF['frmUnitNumber']['minLength'] = 0;
_VALID_DEF['frmUnitNumber']['maxLength'] = 10;
_VALID_DEF['frmUnitNumber']['alpha'] = true;
_VALID_DEF['frmUnitNumber']['numeric'] = true;
_VALID_DEF['frmUnitNumber']['other'] = null;
_VALID_DEF['frmUnitNumber']['optional'] = true;
_VALID_DEF['frmUnitNumber']['anonymous'] = false;
_VALID_DEF['frmUnitNumber']['showOnPage'] = true; 

_VALID_DEF['frmCity'] = new Array();
_VALID_DEF['frmCity']['minLength'] = 0;
_VALID_DEF['frmCity']['maxLength'] = 100;
_VALID_DEF['frmCity']['alpha'] = true;
_VALID_DEF['frmCity']['numeric'] = false;
_VALID_DEF['frmCity']['other'] = null;
_VALID_DEF['frmCity']['optional'] = true;
_VALID_DEF['frmCity']['anonymous'] = false;
_VALID_DEF['frmCity']['showOnPage'] = true; 

_VALID_DEF['frmState'] = new Array();
_VALID_DEF['frmState']['minLength'] = 0;
_VALID_DEF['frmState']['maxLength'] = 100;
_VALID_DEF['frmState']['alpha'] = true;
_VALID_DEF['frmState']['numeric'] = false;
_VALID_DEF['frmState']['other'] = null;
_VALID_DEF['frmState']['optional'] = true;
_VALID_DEF['frmState']['anonymous'] = false;
_VALID_DEF['frmState']['showOnPage'] = true; 

_VALID_DEF['frmCountry'] = new Array();
_VALID_DEF['frmCountry']['minLength'] = 0;
_VALID_DEF['frmCountry']['maxLength'] = 25;
_VALID_DEF['frmCountry']['alpha'] = true;
_VALID_DEF['frmCountry']['numeric'] = false;
_VALID_DEF['frmCountry']['other'] = null;
_VALID_DEF['frmCountry']['optional'] = true;
_VALID_DEF['frmCountry']['anonymous'] = false;
_VALID_DEF['frmCountry']['showOnPage'] = true; 

_VALID_DEF['frmPostal'] = new Array();
_VALID_DEF['frmPostal']['minLength'] = 0;
_VALID_DEF['frmPostal']['maxLength'] = 6;
_VALID_DEF['frmPostal']['alpha'] = true;
_VALID_DEF['frmPostal']['numeric'] = true;
_VALID_DEF['frmPostal']['other'] = null;
_VALID_DEF['frmPostal']['optional'] = true;
_VALID_DEF['frmPostal']['anonymous'] = false;
_VALID_DEF['frmPostal']['showOnPage'] = true; 


// incident information
_VALID_DEF['frmIncTitle'] = new Array();
_VALID_DEF['frmIncTitle']['minLength'] = 1;
_VALID_DEF['frmIncTitle']['maxLength'] = 200;
_VALID_DEF['frmIncTitle']['alpha'] = false;
_VALID_DEF['frmIncTitle']['numeric'] = false;
_VALID_DEF['frmIncTitle']['other'] = null;
_VALID_DEF['frmIncTitle']['optional'] = false; // this field is mandatory, please don't set 'true'
_VALID_DEF['frmIncTitle']['anonymous'] = true; // this field is required for anonymous incident, please don't set 'false'
_VALID_DEF['frmIncTitle']['showOnPage'] = true; // this field is mandatory, please don't set 'false'

_VALID_DEF['frmIncDescription'] = new Array();
_VALID_DEF['frmIncDescription']['minLength'] = 1;
_VALID_DEF['frmIncDescription']['maxLength'] = 2000;
_VALID_DEF['frmIncDescription']['alpha'] = false;
_VALID_DEF['frmIncDescription']['numeric'] = false;
_VALID_DEF['frmIncDescription']['other'] = null;
_VALID_DEF['frmIncDescription']['optional'] = false; // this field is mandatory, please don't set 'true'
_VALID_DEF['frmIncDescription']['anonymous'] = true; // this field is required for anonymous incident, please don't set 'false'
_VALID_DEF['frmIncDescription']['showOnPage'] = true; // this field is mandatory, please don't set 'false'

_VALID_DEF['frmIncAttachment'] = new Array();
_VALID_DEF['frmIncAttachment']['minLength'] = 0;
_VALID_DEF['frmIncAttachment']['maxLength'] = 200;
_VALID_DEF['frmIncAttachment']['alpha'] = false;
_VALID_DEF['frmIncAttachment']['numeric'] = false;
_VALID_DEF['frmIncAttachment']['other'] = null;
_VALID_DEF['frmIncAttachment']['optional'] = true; // this field should be optional, please don't set 'false'
_VALID_DEF['frmIncAttachment']['anonymous'] = true; // this field is required for anonymous incident, please don't set 'false'
_VALID_DEF['frmIncAttachment']['showOnPage'] = true;

_VALID_DEF['frmIncHouseNo'] = new Array();
_VALID_DEF['frmIncHouseNo']['minLength'] = 1;
_VALID_DEF['frmIncHouseNo']['maxLength'] = 10;
_VALID_DEF['frmIncHouseNo']['alpha'] = true;
_VALID_DEF['frmIncHouseNo']['numeric'] = true;
_VALID_DEF['frmIncHouseNo']['other'] = null;
_VALID_DEF['frmIncHouseNo']['optional'] = false; // this field is mandatory, please don't set 'true'
_VALID_DEF['frmIncHouseNo']['anonymous'] = true; // this field is required for anonymous incident, please don't set 'false'
_VALID_DEF['frmIncHouseNo']['showOnPage'] = true; // this field is mandatory, please don't set 'false'

_VALID_DEF['frmIncStreetName'] = new Array();
_VALID_DEF['frmIncStreetName']['minLength'] = 1;
_VALID_DEF['frmIncStreetName']['maxLength'] = 100;
_VALID_DEF['frmIncStreetName']['alpha'] = true;
_VALID_DEF['frmIncStreetName']['numeric'] = true;
_VALID_DEF['frmIncStreetName']['other'] = null;
_VALID_DEF['frmIncStreetName']['optional'] = false; // this field is mandatory, please don't set 'true'
_VALID_DEF['frmIncStreetName']['anonymous'] = true; // this field is required for anonymous incident, please don't set 'false'
_VALID_DEF['frmIncStreetName']['showOnPage'] = true; // this field is mandatory, please don't set 'false'

_VALID_DEF['frmIncUnit'] = new Array();
_VALID_DEF['frmIncUnit']['minLength'] = 0;
_VALID_DEF['frmIncUnit']['maxLength'] = 10;
_VALID_DEF['frmIncUnit']['alpha'] = true;
_VALID_DEF['frmIncUnit']['numeric'] = true;
_VALID_DEF['frmIncUnit']['other'] = null;
_VALID_DEF['frmIncUnit']['optional'] = true;
_VALID_DEF['frmIncUnit']['anonymous'] = true; // this field is required for anonymous incident, please don't set 'false'
_VALID_DEF['frmIncUnit']['showOnPage'] = true;

_VALID_DEF['frmIncStreet1'] = new Array();
_VALID_DEF['frmIncStreet1']['minLength'] = 1;
_VALID_DEF['frmIncStreet1']['maxLength'] = 100;
_VALID_DEF['frmIncStreet1']['alpha'] = true;
_VALID_DEF['frmIncStreet1']['numeric'] = true;
_VALID_DEF['frmIncStreet1']['other'] = null;
_VALID_DEF['frmIncStreet1']['optional'] = false; // this field is mandatory, please don't set 'true'
_VALID_DEF['frmIncStreet1']['anonymous'] = true; // this field is required for anonymous incident, please don't set 'false'
_VALID_DEF['frmIncStreet1']['showOnPage'] = true; // this field is mandatory, please don't set 'false'

_VALID_DEF['frmIncStreet2'] = new Array();
_VALID_DEF['frmIncStreet2']['minLength'] = 1;
_VALID_DEF['frmIncStreet2']['maxLength'] = 100;
_VALID_DEF['frmIncStreet2']['alpha'] = true;
_VALID_DEF['frmIncStreet2']['numeric'] = true;
_VALID_DEF['frmIncStreet2']['other'] = null;
_VALID_DEF['frmIncStreet2']['optional'] = false; // this field is mandatory, please don't set 'true'
_VALID_DEF['frmIncStreet2']['anonymous'] = true; // this field is required for anonymous incident, please don't set 'false'
_VALID_DEF['frmIncStreet2']['showOnPage'] = true; // this field is mandatory, please don't set 'false'

_VALID_DEF['frmIncLocationDescription'] = new Array();
_VALID_DEF['frmIncLocationDescription']['minLength'] = 1;
_VALID_DEF['frmIncLocationDescription']['maxLength'] = 512;
_VALID_DEF['frmIncLocationDescription']['alpha'] = true;
_VALID_DEF['frmIncLocationDescription']['numeric'] = true;
_VALID_DEF['frmIncLocationDescription']['other'] = null;
_VALID_DEF['frmIncLocationDescription']['optional'] = false; // this field is mandatory, please don't set 'true'
_VALID_DEF['frmIncLocationDescription']['anonymous'] = true; // this field is required for anonymous incident, please don't set 'false'
_VALID_DEF['frmIncLocationDescription']['showOnPage'] = true; // this field is mandatory, please don't set 'false'