function calculate_services () {

	// handle the display of the proper services block
	if ($('AppointmentVehicle').value == 'addnew') {
		if ($('VehicleType').value == 'SUV') {
			$('services-list-car').hide();
			$('services-list-suv').show();
			$('membership-checkbox').show();
			$('AppointmentVehicleType').writeAttribute('value', 'SUV');
		} else {
			$('services-list-car').show();
			$('services-list-suv').hide();
			$('membership-checkbox').show();
			$('AppointmentVehicleType').writeAttribute('value', 'Car');
		}
	} else if ($('AppointmentVehicle').value != '') {
		if ($('AppointmentVehicle').value in suvarray) {
			$('services-list-car').hide();
			$('services-list-suv').show();
			$('membership-checkbox').show();
			$('AppointmentVehicleType').writeAttribute('value', 'SUV');
		} else {
			$('services-list-car').show();
			$('services-list-suv').hide();
			$('membership-checkbox').show();
			$('AppointmentVehicleType').writeAttribute('value', 'Car');
		}
	} else {
		$('services-list-car').hide();
		$('services-list-suv').hide();
		$('membership-checkbox').hide();
		$('membership-options').hide();
		$('AppointmentVehicleType').writeAttribute('value', 'Car');
	}
	
	if ($('AppointmentMembership') != undefined && $('AppointmentMembership').checked == true && $('membership-checkbox').visible() == true) {
		$('membership-options').show();
	} else {
		$('membership-options').hide();
	}
	
	// show/hide the add new vehicle form
	if ($('AppointmentVehicle').value=="addnew") {
		$("add-new-vehicle").show(); 
	} else {
		$("add-new-vehicle").hide();
	} 
	
	// show/hide the add new location form
	if ($('AppointmentLocation').value=="addnew") {
		$("add-new-location").show(); 
	} else {
		$("add-new-location").hide();
	}
	
	// show/hide location block
	if ($('AppointmentTypePickup').checked == true || $('AppointmentTypeTrailer').checked == true){
		$("location-select").show(); 
	} else { 
		$("location-select").hide();
	}
}

function calculate_payment () {
	// show/hide location block
	if ($('AppointmentPaymentPaynow').checked == true || $('AppointmentPaymentRequired').value != 0){
		$("payment-details").show(); 
	} else { 
		$("payment-details").hide();
	}
}