Site.prototype.registerExpress = function(){
	$.ajax({
		data:{
			action:'userExpressRegister',
			username: this._getValue("userUsername") ,
			password: this._getValue("userPassword"),
			retype_password: this._getValue("userRetypePassword"),
			email:this._getValue("userEmail"),
			confirm_email:this._getValue("userConfirmEmail"),
			gender:$("#userGender_male").attr("checked")? "male" : "female",
			dob:this._getValue("userDob_year")+"-"+this._getValue("userDob_month")+"-"+this._getValue("userDob_day"),
			first_name:this._getValue("userFirstName"),
			last_name:this._getValue("userLastName"),
			landline_number:this._getValue("userLandlineNumber"),
			mobile_number:this._getValue("userMobileNumber"),
			fax_number:this._getValue("userFaxNumber"),
			user_security_question_id:this._getValue("userUserSecurityQuestionId"),
			security_question_answer:this._getValue("userSecurityQuestionAnswer"),

			company_name:this._getValue("userCompanyName"),
			contact_name:this._getValue("userFirstName")+" "+this._getValue("userLastName"),
			address_line_1:this._getValue("userAddressAddressLine1"),
			address_line_2:this._getValue("userAddressAddressLine2"),
			address_line_3:this._getValue("userAddressAddressLine3"),
			city:this._getValue("userAddressCity"),
			postcode:this._getValue("userAddressPostcode"),
			country_id:this._getValue("userAddressCountryId"),

			preferred_contact_time: this._getValue("userPreferredContactTime"),
			user_preferred_language_id: this._getValue("userUserPreferredLanguageId"),

			is_informed:($("#userIsInformed").attr("checked") ? 1 : 0),
			terms_accepted:($("#acceptTermsAndConditions").attr("checked") ? 1 : 0)

		}
	});
}



Site.prototype.userInsert = function(){
	$.ajax({
		data:{
			action:'userInsert'
		}
	});
}

Site.prototype.displayOrHideOptionalMessage = function(){
  	if($("#checkoptionalmessage").attr("checked")) {
	   $("#optionalmessage").show();
	} else{
		$("#optionalmessage").hide();
	}
}

Site.prototype.checkUsername = function(){
	$.ajax({
		data:{
			action:'userCheckUsername',
			username: this._getValue("userUsername")
		}
	});
	site.load(' ',1);
}
