// define the namespace if necessary
if ( Jensen == undefined )
	var Jensen = { };
	
if ( Jensen.ContactUs == undefined )
	Jensen.ContactUs = { };
	
	
Jensen.ContactUs.FormData = function() {
	this.initialize();
}

Jensen.ContactUs.FormData.prototype = {
	// public properties
	fullName            : null,
	phoneNumber         : null,
	address             : null,
	city                : null,
	state               : null,
	zip                 : null,
	email               : null,
	contactMorning      : false, 
	contactMidday       : false, 
	contactAfternoon    : false, 
	serviceWellDrilling : false, 
	serviceMaintenance  : false, 
	serviceWaterSystems : false, 
	serviceGeoThermal   : false, 
	comments            : null,

	// constructor
	initialize: function() {
		this.collectData();
	},
	
	// methods
	collectData: function() {
		this.fullName = Lutz.DomUtil.getFormFieldValue( "txtFullName" );
		this.phoneNumber = Lutz.DomUtil.getFormFieldValue( "txtPhoneNumber" );
		this.address = Lutz.DomUtil.getFormFieldValue( "txtAddress" );
		this.city = Lutz.DomUtil.getFormFieldValue( "txtCity" );
		this.state = Lutz.DomUtil.getFormFieldValue( "txtState" );
		this.zip = Lutz.DomUtil.getFormFieldValue( "txtZip" );
		this.email = Lutz.DomUtil.getFormFieldValue( "txtEmail" );
		this.contactMorning = Lutz.DomUtil.getFormFieldValue( "chkContactMorning" );
		this.contactMidday = Lutz.DomUtil.getFormFieldValue( "chkContactMidday" );
		this.contactAfternoon = Lutz.DomUtil.getFormFieldValue( "chkContactAfternoon" );
		this.serviceWellDrilling = Lutz.DomUtil.getFormFieldValue( "chkServiceWellDrilling" );
		this.serviceMaintenance = Lutz.DomUtil.getFormFieldValue( "chkServiceMaintenance" );
		this.serviceWaterSystems = Lutz.DomUtil.getFormFieldValue( "chkServiceWaterSystems" );
		this.serviceGeoThermal = Lutz.DomUtil.getFormFieldValue( "chkServiceGeoThermal" );
		this.comments = Lutz.DomUtil.getFormFieldValue( "txtComments" );
		
		// filter out default values
		if ( this.fullName == "Full Name" ) 
			this.fullName = null;
			
		if ( this.phoneNumber == "Phone Number" ) 
			this.phoneNumber = null;
			
		if ( this.address == "Address" ) 
			this.address = null;
			
		if ( this.city == "City" ) 
			this.city = null;
			
		if ( this.state == "ST" ) 
			this.state = null;
			
		if ( this.zip == "Zip" ) 
			this.zip = null;
			
		if ( this.email == "Email" ) 
			this.email = null;
	}
}
