/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Jim Stiles | www.jdstiles.com */
function startCalc(){
  interval = setInterval("calc()",1);
}
function calc(){
	var numericExpression = /^[0-9]+$/;
	var box = document.form1.Donation;	
	if(box.value.match(numericExpression))
		{
	  	two = document.form1.ExtraFees.value; 
  		three = document.form1.ExtraMaterials.value;   
  		four = document.form1.Donation.value;  
  		document.form1.ExtraFeesAmount.value = (two * 125);  
  		document.form1.ExtraMaterialsAmount.value = (three * 25);
  		document.form1.Donation.value = (four * 1);  
  		document.form1.TotalAmount.value = (250) + (two * 125) + (three * 25) + (four * 1) ;
		return true;
		}
	else
		{
		alert('Donation amount must be numeric!');
  		document.form1.Donation.value = 0; 		
		box.focus();
		return false;
		}
}
function stopCalc(){
  clearInterval(interval);
}
