
function calcTotal(frm) {
  var order_total = 0;

    // Run through all the form fields
    for (var i=0; i < frm.elements.length; ++i)
    {
        form_field = frm.elements[i];	// Get the current field
        form_name = form_field.name;	// Get the field's name
        form_value = form_field.value;	// Get the field's value
        if (form_name.substring(0,3) == "FEE")	// Is it a "fee" field?
        {
        	/*if (form_field.type == "radio")	// Is it a radio button?
        	{
			//alert(form_field.length);	
        		for (var z=0; z < form_field.length; z++)	// Run through buttons in group
        		{
			//alert(form_name[z]);	
        			if (form_name[z].checked)	// Is it checked?
        			{			
        				item_price = parseFloat(form_value.substring(form_value.lastIndexOf("=") + 1));	// If so, extract price from value
          	   			// Update the order total
               			order_total += item_price;
               		}
               	}
            }		*/					// End run through radio buttons
			if(form_field.type == "radio")
			{
        	if (form_field.checked)
        	{
        	 // If so, extract the price from the name
          		item_price = parseFloat(form_value.substring(form_value.lastIndexOf("=") + 1));
		  //item_price = frm.donationAmt.value;
          	   // Update the order total
               order_total += item_price;
             } 
			}
			 
			 if (form_field.type == "text")
        	// Is a checkbox checked? In this case specifically the donation checkbox as it's the only one
			{
				if(form_field.value != "")
				{
					item_price2 = parseFloat(frm.FEEdonationAmt.value);
					order_total += item_price2;
				}
			}
		
         }
     }
	 
     // Display the new total
//     frm.TOTAL.value = order_total;
     frm.chargetotal.value = order_total;
}