
function calc() {
	
	if (document.grant.calcCurrentComputers != null) { // to avoid errors on the other grant_application pages
		var oExisting, oProjected;
		var iExisting, iProjected, t, v;
		
		oExisting = document.grant.calcCurrentComputers;
		oProjected = document.grant.calcProjectedComputers;
		
		iExisting = (oExisting.value != null)	? parseInt(oExisting.value) : 0;
		iProjected = (oProjected.value != null)	? parseInt(oProjected.value) : 0;
		
		if (isNaN(iExisting))
			iExisting = 0;
			
		if (isNaN(iProjected))
			iProjected = 0;
		
		t = iExisting + iProjected;
		v = t * 1250;
		
		document.grant.calcTotalComputers.value = t;
		document.grant.calcGrantValue.value = v;
	}
	
	return true;
}
