swap out the alert for whatever function you want it to call... pretty simple. You can put any function as the final parameter of the confirm function.

Code:
confirm(
	'Accept Paypal Surcharge?', 
	'<p>There will be a ' + rate + '% surcharge for using PayPal.</p><p><span class="keepTogether"><b>Product Total:</b> $' + total.toFixed(2) + '</span> &bull; <span class="keepTogether"><b>Total Charge:</b> $' + (total * (rate + 100) / 100).toFixed(2) + '</b></span></p><p>Please click the Accept button to authorize this charge.<br />Otherwise click the Decline button.</p>',
	alert
);
Just replace 'alert' with whatever function you want to handle the result. Because of how it (or window.open if you went that route) works, you can' t simply 'wait for a result'; the joys of event driven programming.