// --------------------------------------------
//This is used on WebPayment form to show and hide the Invoice Number or Other Service boxes as appropriate 
function show(a,b) {
document.getElementById(a).style.display = "block";
document.getElementById(b).style.display = "none";
}
function hide(a,b) {
document.getElementById(a).style.display = "none";
document.getElementById(b).style.display = "none";
}
// --------------------------------------------
//This is used on WebPayment form to show and hide the contents of the 'not applicable' boxes 
 function clearIt(what)
{if(what.value == what.defaultValue) what.value = '';}
function setIt(what)
{if(what.value == '') what.value = what.defaultValue;}
// --------------------------------------------
<!-- This formats the currency in the Payment Form -->
<!-- Original:  Cyanide_7 (leo7278@hotmail.com) -->
<!-- Web Site:  http://www7.ewebcity.com/cyanide7 -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

function formatCurrency(num) {
num = num.toString().replace(/\£|\,/g,'');
if(isNaN(num))
num = "0";
sign = (num == (num = Math.abs(num)));
num = Math.floor(num*100+0.50000000001);
pence = num%100;
num = Math.floor(num/100).toString();
if(pence<10)
pence = "0" + pence;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4*i+3))+','+
num.substring(num.length-(4*i+3));
return (((sign)?'':'-') + num + '.' + pence);
}





