function calculateTotal() {
	fees = $(':input.fee-input');
	var total = 0.0;
	for(var i=0; i<fees.length; i++){
		qty = parseInt(fees.get(i).value);
		price = parseFloat($('#'+fees.get(i).id+'-fee').html());
		
		if(isNaN(qty)) qty = 0;
		
		total += qty*price;
	}
	opt_fees = $('input.payment-input');
	for(var i=0; i<opt_fees.length; i++){
		if(opt_fees.get(i).id == $('#payment-total').val()) continue;
		
		amount=parseFloat(opt_fees.get(i).value);
		if(isNaN(amount)) amount = 0;
		
		total += amount;
	}
	$('#'+$('#payment-total').val()).val(total.toFixed(2));
}
