+% }
+
+% if ( $surcharge_percentage || $surcharge_flatfee ) {
+ var surcharge_cell = document.getElementById('ajax_surcharge_cell');
+ var amount = what.value;
+ if (document.getElementById('processing_fee').checked == true) {
+ amount = (what.value - <% $processing_fee %>);
+ }
+ var surcharge = ((what.value - <% $surcharge_flatfee %>) * <% $surcharge_percentage %>) + <% $surcharge_flatfee %>;
+ surcharge_cell.innerHTML = '<FONT SIZE="+1">A credit card surcharge of ' + surcharge.toFixed(2) + ' is included in this payment</FONT>';
+% }