/*

This is used on product_info.php and checkout_confirmation.php
to prevent dup. form submits from being processed.

Only saves the day when users have JS enabled - however most users
who would double click will be using the default settings, JS enabled

To use, include this script in your <head> and use

    onClick="return safeSubmit(this.form);"

in your <input> submit



Thank you to PayPal.com for providing the functions below

/* ------------------------------------------------------------------------------- 
09/23/03 - jgould
Function for preventing multiple submit.
It both submits the form and ensures the form can not be submit again
by reassigning the funciton to a function that does nothing.
It also disables the buttons (this part only works in IE).
f - the form the buttons are in
------------------------------------------------------------------------------- */
function safeSubmit(f) {
for (i=1; i<f.elements.length; i++) {
if (f.elements[i].type == 'submit') {
f.elements[i].disabled = true;
}
}
f.submit();
safeSubmit = blockIt;
return false;
}

/* ------------------------------------------------------------------------------- 
09/23/03 - jgould
Dummy function that is used in conjunciton with safeSubmit(f) to prevent 
multiple submits.
------------------------------------------------------------------------------- */
function blockIt(f) {
return false;
}