<SCRIPT language="JavaScript">//start of calculation function for Brazillian
function calculate(){
var f = document.myForm;
var first = f.brazillianBeans.value;
var second = f.brazillianFilter.value;
var third = f.brazillianPlunger.value;
var fourth = f.brazillianEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5.value = five;
f.totalPrice1.value = (five * 18.95) .toFixed(2);
}//end of calculation function for Brazillian
//start of calculation function for bluemountain
function calculate2(){
var f = document.myForm;
var first = f.bluemountainBeans.value;
var second = f.bluemountainFilter.value;
var third = f.bluemountainPlunger.value;
var fourth = f.bluemountainEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5a.value = five;
f.totalPrice2.value = (five * 18.95) .toFixed(2);
}//end of calculation function for bluemountain
//start of calculation function for Columbian
function calculate3(){
var f = document.myForm;
var first = f.columbianBeans.value;
var second = f.columbianFilter.value;
var third = f.columbianPlunger.value;
var fourth = f.columbianEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5b.value = five;
f.totalPrice3.value = (five * 18.95) .toFixed(2);
}//end of calculation function for columbian
//start of calculation function for Costa Rica
function calculate4(){
var f = document.myForm;
var first = f.costaricaBeans.value;
var second = f.costaricaFilter.value;
var third = f.costaricaPlunger.value;
var fourth = f.costaricaEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5c.value = five;
f.totalPrice4.value = (five * 18.95) .toFixed(2);
}//end of calculation function for Costa Rica
//start of calculation function for Espresso
function calculate5(){
var f = document.myForm;
var first = f.espressoBeans.value;
var second = f.espressoFilter.value;
var third = f.espressoPlunger.value;
var fourth = f.espressoEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5d.value = five;
f.totalPrice5.value = (five * 18.95) .toFixed(2);
}//end of calculation function for Espresso
//start of calculation function for Kenya
function calculate6(){
var f = document.myForm;
var first = f.kenyaBeans.value;
var second = f.kenyaFilter.value;
var third = f.kenyaPlunger.value;
var fourth = f.kenyaEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5e.value = five;
f.totalPrice6.value = (five * 18.95) .toFixed(2);
}//end of calculation function for Kenya
//start of calculation function for New Guinea
function calculate7(){
var f = document.myForm;
var first = f.newguineaBeans.value;
var second = f.newguineaFilter.value;
var third = f.newguineaPlunger.value;
var fourth = f.newguineaEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5f.value = five;
f.totalPrice7.value = (five * 18.95) .toFixed(2);
}//end of calculation function for New Guinea
//start of calculation function for Decaffeinated
function calculate8(){
var f = document.myForm;
var first = f.decaffeinatedBeans.value;
var second = f.decaffeinatedFilter.value;
var third = f.decaffeinatedPlunger.value;
var fourth = f.decaffeinatedEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5g.value = five;
f.totalPrice8.value = (five * 22.95) .toFixed(2);
}//end of calculation function for Decaffeinated
//start of calculation function for Organic
function calculate9(){
var f = document.myForm;
var first = f.organicBeans.value;
var second = f.organicFilter.value;
var third = f.organicPlunger.value;
var fourth = f.organicEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5h.value = five;
f.totalPrice9.value = (five * 22.95) .toFixed(2);
}//end of calculation function for Organic
//start of calculation function for Maxwell House
function calculate10(){
var f = document.myForm;
var one = f.maxwellHouse.value;
f.totalPrice10.value = (one * 19.95) .toFixed(2);
}//end of calculation function for Maxwell House
//start of calculation function for Williams Premium Blended Tea
function calculate11(){
var f = document.myForm;
var one = f.williamspremiumblendedTea.value;
f.totalPrice11.value = (one * 2.95) .toFixed(2);
}//end of calculation function for Williams Premium Blended Tea
//start of calculation function for Milo
function calculate12(){
var f = document.myForm;
var one = f.miLo.value;
f.totalPrice12.value = (one * 11.65) .toFixed(2);
}//end of calculation function for Milo
//start of Total calculation
function calculateTotal(){
var f = document.myForm;
var first = f.totalPrice1.value;
var second = f.totalPrice2.value;
var third = f.totalPrice3.value;
var fourth = f.totalPrice4.value
var fifth = f.totalPrice5.value;
var sixth = f.totalPrice6.value;
var seventh = f.totalPrice7.value;
var eighth = f.totalPrice8.value;
var ninth = f.totalPrice9.value
var tenth = f.totalPrice10.value;
var eleventh = f.totalPrice11.value
var twelth = f.totalPrice12.value;
var thirteen = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth) + parseFloat(fifth) + parseFloat(sixth) + parseFloat(seventh) + parseFloat(eighth) + parseFloat(ninth) + parseFloat(tenth) + parseFloat(eleventh) + parseFloat(twelth);
f.totalValue.value = thirteen;
}//end of Total calculation
----------------------------------------------------------
//I would like to add all functions above to get a final
out put below but keep getting a NaN//
<td>$=</td>
<td><INPUT type="text" name="totalValue" onFocus="document.myForm.totalValue.blur()" readonly="true"value="0"size="5"></td>
<TD>
<INPUT type="button" value="calculateTotal" onMouseover="MM_validateForm('t5','','NisNum','totalValue','','NisNum');return calculateTotal();return document.MM_returnValue">
</TD>
function calculate(){
var f = document.myForm;
var first = f.brazillianBeans.value;
var second = f.brazillianFilter.value;
var third = f.brazillianPlunger.value;
var fourth = f.brazillianEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5.value = five;
f.totalPrice1.value = (five * 18.95) .toFixed(2);
}//end of calculation function for Brazillian
//start of calculation function for bluemountain
function calculate2(){
var f = document.myForm;
var first = f.bluemountainBeans.value;
var second = f.bluemountainFilter.value;
var third = f.bluemountainPlunger.value;
var fourth = f.bluemountainEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5a.value = five;
f.totalPrice2.value = (five * 18.95) .toFixed(2);
}//end of calculation function for bluemountain
//start of calculation function for Columbian
function calculate3(){
var f = document.myForm;
var first = f.columbianBeans.value;
var second = f.columbianFilter.value;
var third = f.columbianPlunger.value;
var fourth = f.columbianEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5b.value = five;
f.totalPrice3.value = (five * 18.95) .toFixed(2);
}//end of calculation function for columbian
//start of calculation function for Costa Rica
function calculate4(){
var f = document.myForm;
var first = f.costaricaBeans.value;
var second = f.costaricaFilter.value;
var third = f.costaricaPlunger.value;
var fourth = f.costaricaEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5c.value = five;
f.totalPrice4.value = (five * 18.95) .toFixed(2);
}//end of calculation function for Costa Rica
//start of calculation function for Espresso
function calculate5(){
var f = document.myForm;
var first = f.espressoBeans.value;
var second = f.espressoFilter.value;
var third = f.espressoPlunger.value;
var fourth = f.espressoEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5d.value = five;
f.totalPrice5.value = (five * 18.95) .toFixed(2);
}//end of calculation function for Espresso
//start of calculation function for Kenya
function calculate6(){
var f = document.myForm;
var first = f.kenyaBeans.value;
var second = f.kenyaFilter.value;
var third = f.kenyaPlunger.value;
var fourth = f.kenyaEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5e.value = five;
f.totalPrice6.value = (five * 18.95) .toFixed(2);
}//end of calculation function for Kenya
//start of calculation function for New Guinea
function calculate7(){
var f = document.myForm;
var first = f.newguineaBeans.value;
var second = f.newguineaFilter.value;
var third = f.newguineaPlunger.value;
var fourth = f.newguineaEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5f.value = five;
f.totalPrice7.value = (five * 18.95) .toFixed(2);
}//end of calculation function for New Guinea
//start of calculation function for Decaffeinated
function calculate8(){
var f = document.myForm;
var first = f.decaffeinatedBeans.value;
var second = f.decaffeinatedFilter.value;
var third = f.decaffeinatedPlunger.value;
var fourth = f.decaffeinatedEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5g.value = five;
f.totalPrice8.value = (five * 22.95) .toFixed(2);
}//end of calculation function for Decaffeinated
//start of calculation function for Organic
function calculate9(){
var f = document.myForm;
var first = f.organicBeans.value;
var second = f.organicFilter.value;
var third = f.organicPlunger.value;
var fourth = f.organicEspresso.value;
var five = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth);
f.t5h.value = five;
f.totalPrice9.value = (five * 22.95) .toFixed(2);
}//end of calculation function for Organic
//start of calculation function for Maxwell House
function calculate10(){
var f = document.myForm;
var one = f.maxwellHouse.value;
f.totalPrice10.value = (one * 19.95) .toFixed(2);
}//end of calculation function for Maxwell House
//start of calculation function for Williams Premium Blended Tea
function calculate11(){
var f = document.myForm;
var one = f.williamspremiumblendedTea.value;
f.totalPrice11.value = (one * 2.95) .toFixed(2);
}//end of calculation function for Williams Premium Blended Tea
//start of calculation function for Milo
function calculate12(){
var f = document.myForm;
var one = f.miLo.value;
f.totalPrice12.value = (one * 11.65) .toFixed(2);
}//end of calculation function for Milo
//start of Total calculation
function calculateTotal(){
var f = document.myForm;
var first = f.totalPrice1.value;
var second = f.totalPrice2.value;
var third = f.totalPrice3.value;
var fourth = f.totalPrice4.value
var fifth = f.totalPrice5.value;
var sixth = f.totalPrice6.value;
var seventh = f.totalPrice7.value;
var eighth = f.totalPrice8.value;
var ninth = f.totalPrice9.value
var tenth = f.totalPrice10.value;
var eleventh = f.totalPrice11.value
var twelth = f.totalPrice12.value;
var thirteen = parseFloat(first) + parseFloat(second) + parseFloat(third) + parseFloat(fourth) + parseFloat(fifth) + parseFloat(sixth) + parseFloat(seventh) + parseFloat(eighth) + parseFloat(ninth) + parseFloat(tenth) + parseFloat(eleventh) + parseFloat(twelth);
f.totalValue.value = thirteen;
}//end of Total calculation
----------------------------------------------------------
//I would like to add all functions above to get a final
out put below but keep getting a NaN//
<td>$=</td>
<td><INPUT type="text" name="totalValue" onFocus="document.myForm.totalValue.blur()" readonly="true"value="0"size="5"></td>
<TD>
<INPUT type="button" value="calculateTotal" onMouseover="MM_validateForm('t5','','NisNum','totalValue','','NisNum');return calculateTotal();return document.MM_returnValue">
</TD>