Template:2009/Donate-now-no-creditcard

 function validateForm( form ) {

var minimums = { 'USD' : 1, 'GBP' : 1, // $1.26 'EUR' : 1, // $1.26 'AUD' : 2, // $1.35 'CAD' : 1, // $0.84 'CHF' : 1, // $0.85 'CZK' : 20, // $1.03 'DKK' : 5, // $0.85 'HKD' : 10, // $1.29 'HUF' : 200, // $0.97 'JPY' : 100, // $1 'NZD' : 2, // $1.18 'NOK' : 10, // $1.44 'PLN' : 5, // $1.78 'SGD' : 2, // $1.35 'SEK' : 10, // $1.28 };

var error = true;

// Get amount selection var amount = null; for ( var i = 0; i < form.amount.length; i++ ) { if ( form.amount[i].checked ) { amount = form.amount[i].value; } }  if ( form.amountGiven.value != "" ) { amount = form.amountGiven.value; } // Check amount is a real number error = ( amount == null || isNaN( amount ) || amount.value <= 0 ); if ( error ) { alert( ' ' ); }

// Check amount is at least the minimum var currency = form.currency_code[form.currency_code.selectedIndex].value; if ( typeof( minimums[currency] ) == 'undefined' ) { minimums[currency] = 1; } if ( amount < minimums[currency] ) { alert( ' '.replace('$1', minimums[currency] + ' ' + currency ) ); error = true; } return !error; }

function redirectPayment(i) { if (i==1) {document.paypalcontribution.action="https://payments.wikimedia.org/index.php?title=Special:PayflowProGateway"; document.paypalcontribution.submit;} if (i==2) {document.paypalcontribution.action=" ";document.paypalcontribution.submit;} }        

      <label for="input_amount_1"> <input type="radio" name="amount" id="input_amount_0" onclick="document.paypalcontribution. amountGiven.value = ''" value=" "> <label for="input_amount_0">

<input type="radio" name="amount" id="input_amount_other" value="Other"><label for="input_amount_other"> <input type="text" name="amountGiven" size="3" onfocus="this.form.input_amount_other.checked=true;"> <select name="currency_code" id="input_currency_code" size="1" style="width:5em;"><option value=" " selected>  – <option value="XXX">--- <option value="GBP">GBP – £ <option value="EUR">EUR – € <option value="USD">USD - $ <option value="AUD">AUD – $ <option value="CAD">CAD – $

<option value="CHF">CHF – <option value="CZK">CZK – Kč <option value="DKK">DKK – kr <option value="EUR">EUR – € <option value="HKD">HKD – HK$ <option value="HUF">HUF – Ft <option value="GBP">GBP – £ <option value="JPY">JPY – ¥ <option value="NZD">NZD – NZ$

<option value="NOK">NOK – kr <option value="PLN">PLN – zł <option value="SGD">SGD – S$ <option value="SEK">SEK – kr <option value="ILS">ILS - ₪ <option value="USD">USD – $ <p style="font-weight: normal;">

<p style="font-weight: bold;">

<p style="font-style: italic; font-weight: normal;">

<input type="text" name="comment" size="30" maxlength="200" style="width:70%;" />

<input type="checkbox" name="comment-option" id="input_comment-option" value="comment" checked="checked" /> <label for="input_comment-option"> <input type="checkbox" style="margin:0;" name="email" id="input_email" value="email" checked="checked" /> <label for="input_email">

<input type="button" value=" " class="input-button  " onClick="redirectPayment(2)"/>