function recalculate() {
	// a number of coolers - integer
	var a_ct = parseInt( document.getElementById('a_cooler_ct').value );
	if( isNaN(a_ct) ) {
		alert( 'please enter an integer in Number of Coolers - not '+document.getElementById('a_cooler_ct').value );
		document.getElementById('a_cooler_ct').value = '';
		return false;
	}
		// b number of coolers - integer
	var b_ct = parseInt( document.getElementById('b_cooler_ct').value );
	if( isNaN(b_ct) ) {
		alert( 'please enter an integer in Number of Coolers - not '+document.getElementById('b_cooler_ct').value );
		document.getElementById('b_cooler_ct').value = '';
		return false;
	}
	// a cost of cooler - float
	var a_cost = parseFloat( document.getElementById('a_cooler_cost').value );
	if( isNaN(a_cost) ) {
		alert( 'please enter an number in Cooler Cost - not '+document.getElementById('a_cooler_cost').value );
		document.getElementById('a_cooler_cost').value = '';
		return false;
	}
	document.getElementById('a_cooler_cost').value = a_cost.toFixed(2); 
		// b cost of cooler - float
	var b_cost = parseFloat( document.getElementById('b_cooler_cost').value );
	if( isNaN(b_cost) ) {
		alert( 'please enter an number in Cooler Cost - not '+document.getElementById('b_cooler_cost').value );
		document.getElementById('b_cooler_cost').value = '';
		return false;
	}
	document.getElementById('b_cooler_cost').value = b_cost.toFixed(2); 
	// bottles per month - integer
	var a_bottle_mon = parseInt( document.getElementById('a_bottle_mon').value );
	if( isNaN(a_bottle_mon) ) {
		alert( 'please enter an integer in Number of Coolers - not '+document.getElementById('a_bottle_mon').value );
		document.getElementById('a_bottle_mon').value = '';
		return false;
	}
	// bottle cost - float
	var a_bottle_cost = parseFloat( document.getElementById('a_bottle_cost').value );
	if( isNaN(a_bottle_cost) ) {
		alert( 'please enter an number in Bottle Cost - not '+document.getElementById('a_bottle_cost').value );
		document.getElementById('a_bottle_cost').value = '';
		return false;
	}
	document.getElementById('a_bottle_cost').value = a_bottle_cost.toFixed(2); 
	// indirect cost - float
	var a_indirect_cost = parseFloat( document.getElementById('a_indirect_cost').value );
	if( isNaN(a_indirect_cost) ) {
		alert( 'please enter an number in Cooler Cost - not '+document.getElementById('a_indirect_cost').value );
		document.getElementById('a_indirect_cost').value = '';
		return false;
	}
	document.getElementById('a_indirect_cost').value = a_indirect_cost.toFixed(2); 

	// calc
	var a_total_cost = (((a_ct * a_cost) + (a_bottle_mon * a_bottle_cost)) + a_indirect_cost );
	document.getElementById('a_total_cost').innerHTML = "$ " + a_total_cost.toFixed(2); 

	var b_total_cost = b_ct * b_cost;
	document.getElementById('b_total_cost').innerHTML = "$ " + b_total_cost.toFixed(2); 

	var b_saving_mon = a_total_cost - b_total_cost;
	document.getElementById('b_saving_mon').value = b_saving_mon.toFixed(2);
	
	var b_saving_year = (a_total_cost - b_total_cost) * 12;
	document.getElementById('b_saving_year').value = b_saving_year.toFixed(2);
}
