+ $('#payment_option_row').<% $payment_option_row %>();
+ $('#payment_amount_row').<% $payment_amount_row %>();
+
+ if($('#payment_amount_row').is(':visible')) {
+ var surcharge;
+ var amount = document.getElementById('amount').value;
+
+ if ((document.getElementById('surcharge_percentage') || document.getElementById('surcharge_flatfee')) && amount > 0) {
+ surcharge = (+amount * +document.getElementById('surcharge_percentage').value) + +document.getElementById('surcharge_flatfee').value;
+ }
+ else { surcharge = 0; }
+ if (document.getElementById('ajax_surcharge_cell')) {
+ document.getElementById('ajax_surcharge_cell').innerHTML = '<FONT SIZE="+1">A credit card surcharge of <% $money_char %>' + surcharge.toFixed(2) + ' is included in this payment</FONT>';
+ }
+ }
+