function gradeACalculator() {
		var total = 0
		total += document.calc.a1.value * 1008.58
		total += document.calc.a2.value * 1008.58
		total += document.calc.a3.value * 1008.58
		total += document.calc.a4.value * 1008.58
		total += document.calc.a5.value * 1008.58
		total += document.calc.a6.value * 1008.58
		total += document.calc.a7.value * 1363.33
		total += document.calc.a8.value * 1017.91
		total += document.calc.a9.value * 1017.91
		total += document.calc.a10.value * 1017.91
		total += document.calc.a11.value * 1017.91
		total += document.calc.a12.value * 1017.91
		total += document.calc.a13.value * 1017.91
		total += document.calc.a14.value * 1372.67
		document.calc.gradeA.value = Math.round(total*100)/100
		
		totalsCalculator() 
	}
	
	function gradeBCalculator() {
		var total = 0
		total += document.calc.b1.value * 837.77
		total += document.calc.b2.value * 837.77
		total += document.calc.b3.value * 837.77
		total += document.calc.b4.value * 837.77
		total += document.calc.b5.value * 837.77
		total += document.calc.b6.value * 837.77
		total += document.calc.b7.value * 1132.17
		total += document.calc.b8.value * 847.11
		total += document.calc.b9.value * 847.11
		total += document.calc.b10.value * 847.11
		total += document.calc.b11.value * 847.11
		total += document.calc.b12.value * 847.11
		total += document.calc.b13.value * 847.11
		total += document.calc.b14.value * 1141.50
		document.calc.gradeB.value = Math.round(total*100)/100
		
		totalsCalculator()
	}
	
	function gradeCCalculator() {
		var total = 0
		total += document.calc.c1.value * 642.78
		total += document.calc.c2.value * 642.78
		total += document.calc.c3.value * 642.78
		total += document.calc.c4.value * 642.78
		total += document.calc.c5.value * 642.78
		total += document.calc.c6.value * 642.78
		total += document.calc.c7.value * 865.90
		total += document.calc.c8.value * 652.11
		total += document.calc.c9.value * 652.11
		total += document.calc.c10.value * 652.11
		total += document.calc.c11.value * 652.11
		total += document.calc.c12.value * 652.11
		total += document.calc.c13.value * 652.11
		total += document.calc.c14.value * 875.23
		document.calc.gradeC.value = Math.round(total*100)/100
		
		totalsCalculator()
	}
	
	function gradeDCalculator() {
		var total = 0
		total += document.calc.d1.value * 579.50
		total += document.calc.d2.value * 579.50
		total += document.calc.d3.value * 579.50
		total += document.calc.d4.value * 579.50
		total += document.calc.d5.value * 579.50
		total += document.calc.d6.value * 579.50
		total += document.calc.d7.value * 779.85
		total += document.calc.d8.value * 588.84
		total += document.calc.d9.value * 588.84
		total += document.calc.d10.value * 588.84
		total += document.calc.d11.value * 588.84
		total += document.calc.d12.value * 588.84
		total += document.calc.d13.value * 588.84
		total += document.calc.d14.value * 789.19
		document.calc.gradeD.value = Math.round(total*100)/100
		
		totalsCalculator()
	}
	
	function gradeECalculator() {
		var total = 0
		total += document.calc.e1.value * 546.93
		total += document.calc.e2.value * 546.93
		total += document.calc.e3.value * 546.93
		total += document.calc.e4.value * 546.93
		total += document.calc.e5.value * 546.93
		total += document.calc.e6.value * 546.93
		total += document.calc.e7.value * 735.56
		total += document.calc.e8.value * 556.26
		total += document.calc.e9.value * 556.26
		total += document.calc.e10.value * 556.26
		total += document.calc.e11.value * 556.26
		total += document.calc.e12.value * 556.26
		total += document.calc.e13.value * 556.26
		total += document.calc.e14.value * 744.89
		document.calc.gradeE.value = Math.round(total*100)/100
		
		totalsCalculator()
	}
	
	function totalsCalculator() {
		var total = (document.calc.gradeA.value - 0)
		total += (document.calc.gradeB.value - 0)
		total += (document.calc.gradeC.value - 0)
		total += (document.calc.gradeD.value - 0)
		total += (document.calc.gradeE.value - 0)
		
		var overheads = (total*0.2)/3
		var gross = overheads * 2
		var total2 = overheads + gross + total
		var vat = total2 * 0.14
		var total3 = total2 * 1.14
		
		document.calc.total1.value = Math.round(total*100)/100
		document.calc.overheads.value = Math.round(overheads*100)/100
		document.calc.gross.value = Math.round(gross*100)/100		
		document.calc.total2.value = Math.round(total2*100)/100		
		document.calc.vat.value = Math.round(vat*100)/100
		document.calc.total3.value = Math.round(total3*100)/100
	}