function ticket_book_form_onsubmit(form, old_total)
{
	var new_total = (parseInt(form.elements['ticket_request[standard_tickets]'].value) +
			 parseInt(form.elements['ticket_request[concession_tickets]'].value) +
			 parseInt(form.elements['ticket_request[member_tickets]'].value))
	if (new_total < old_total) {
		if (new_total == 0) {
			return confirm('You have chosen to book 0 tickets.  This will cancel'
					+' your booking.  Are you sure?');
		} else {
			return confirm('You have chosen to reduce your booking from '+old_total+
					' to '+new_total+' tickets.  Are you sure?');
		}
	} else {
		return true;
	}
}

function ticket_config_form_onsubmit(form, total_reserved)
{
	if (total_reserved > 0 && !form.has_ticket_config.checked) {
		return confirm('This will delete '+total_reserved+' bookings for this concert.'
			       +'  Are you sure?');
	}
}
