// JavaScript Document for reservation
// form fields description structure
var a_fields = {
	'areas': {
		'l': 'Areas of Interest',  // label
		'r': false,    // required
//		'f': 'alphanum',  // format (see below)
		't': 't_areas',// id of the element to highlight if input not validated
		
		'm': null,     // must match specified form field
		'mn': 2,       // minimum length
		'mx': 100       // maximum length
	},
	'certified':{'l':'Certified Diver','r':false,'t':'t_certified'},
    'certifiedlevel':{'l':'Certified Level','r':false,'t':'t_certifiedlevel'},
	'lasttimedive':{'l':'Last Time Dive','r':false,'t':'t_lasttimedive'},
	'wherelastdive':{'l':'Last Dive Place','r': false,'t':'t_wherelastdive'},
	'arrivaldate':{'l':'Arrival Date','r':false,'t':'t_arrivaldate'},
	'wherewillstay':{'l':'Where Will Stay','r':false,'t':'t_wherewillstay'},
	'hotel':{'l':'Hotel','r':false,'t':'t_hotel'},
	'hotelpricerange':{'l':'Hotel Price Range','r':false,'t':'t_hotelpricerange'},
	'datesdiving':{'l':'Dates Diving','r':false,'t':'t_datesdiving'},
	'activities':{'l':'Activities','r':false,'t':'t_activities'},
	
	'name':{'l':'Name','r':true,'t':'t_name'},
	'address':{'l':'Address','r':false,'t':'t_address'},
	'phone':{'l':'Telephone Number','r':false,'t':'t_phone'},
	'fax':{'l':'Fax','r':false,'t':'t_fax'},
	'email':{'l':'Email','r':true,'f':'email','t':'t_email'},
	'comment':{'l':'Comment','r':false,'t':'t_comment'}

},

o_config = {
	'to_disable' : ['Submit', 'Reset'],
	'alert' : 1
}

// validator constructor call
var v = new validator('reservation', a_fields, o_config);