
				function calcPrice() {

					// get the price entered by the user
					var price=document.frmMain.amount.value;
					
					// check that the dollar figure entered is valid (i.e. it doesn't contain non-numeric characters)
					price = formatCurrency(price)
					
					if (price != "$0.00") {

						// remove the leading "$" if there is one (can't do math with that character there)
						price = price.replace('$','');
						
						// remove any commas if there are some
						price = price.replace(',','');
						
						// multiply price by 1.042
						price=(parseFloat(price)*1.04166);
						
						// format price with two decimal places
						price = price.toFixed(2); 
						
						// assign price to hidden variable
						document.frmMain.amount.value=price;
						
						// submit the form
						//document.frmMain.submit();

					} else {
						alert("The dollar figure you entered was invalid - please re-enter it."); 
					}
					
				}

				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);
					cents = num%100;
					num = Math.floor(num/100).toString();
					if(cents<10)
					cents = "0" + cents;
					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 + '.' + cents);
				}
				
			// end of coded added by MNS 23/10/06	
			

