<!--
 var result = 0;
 var result2 = 0;
 var result3 = 0;
 
 // Temperature conversion -----------------------------------
 
 function convertFtoC() { // convert F to C
  result = ((document.form1.temperature.value - 32) / 1.8);
  result = Math.round(result*Math.pow(10,2))/Math.pow(10,2); // rounding to 2 dec places
  document.form1.result.value = result; }
  
 function convertCtoF() { // convert C to F
  result = (document.form2.temperature.value * 1.8 + 32);
  result = Math.round(result*Math.pow(10,2))/Math.pow(10,2);
  document.form2.result.value = result; }
 
 // Length conversion ----------------------------------------
 
 function convertItoC() { // convert in to cm
  result = (document.form3.inches.value * 2.54);
  result = Math.round(result*Math.pow(10,2))/Math.pow(10,2);
  document.form3.result.value = result; }

 function convertCtoI() { // convert cm to in
  result = (document.form4.CM.value / 2.54);
  result = Math.round(result*Math.pow(10,2))/Math.pow(10,2);
  document.form4.result.value = result; }

// Surface area calculation ----------------------------------

 function surfaceAreaIn() { // working in inches
  result = (document.form5.lengthIn.value * document.form5.widthIn.value);
  result = Math.round(result*Math.pow(10,2))/Math.pow(10,2);
  document.form5.result.value = result; // = result in sq in
  result2 = (result / 24);
  result2 = Math.round(result2*Math.pow(10,0))/Math.pow(10,0); // rounding to 0 dec places
  document.form5.result2.value = (result2); } // = total length of fish in inches
 
 function surfaceAreaCm() { // working in cm
  result = (document.form6.lengthCm.value * document.form6.widthCm.value);
  result = Math.round(result*Math.pow(10,2))/Math.pow(10,2);
  document.form6.result.value = result; // = result in sq cm
  result2 = (result / 60);
  result2 = Math.round(result2*Math.pow(10,0))/Math.pow(10,0); // rounding to 0 dec places
  document.form6.result2.value = (result2); } // = total length of fish in cm
 
 // Volume calculation ---------------------------------------
 
 function volumeGals() { // working in UK gals & lbs
  result = (document.form7.lengthInV.value * document.form7.widthInV.value * document.form7.heightInV.value); // = result in cu in
  result = (result * 0.016387); // = result in litres
  result2 = result; // = result in kilos (as 1 litre weighs 1 kilo at STP)
  result = (result / 4.54611); // converting litres to UK gals
  result = Math.round(result*Math.pow(10,2))/Math.pow(10,2);
  document.form7.result.value = result; // = result in UK gals
  result2 = (result2 * 2.2046); // converting kilos to lbs
  result2 = Math.round(result2*Math.pow(10,2))/Math.pow(10,2);
  document.form7.result2.value = (result2); // = result in lbs
  result3 = (result * 1.201); // converting UK to US gals
  result3 = Math.round(result3*Math.pow(10,2))/Math.pow(10,2);
  document.form7.result3.value = (result3); } // = result in US gals
 
 function volumeLitres() { // working in litres & kilos
  result = (document.form8.lengthCmV.value * document.form8.widthCmV.value * document.form8.heightCmV.value); // = result in cu cm
  result = (result / 1000); // = result in litres
  result2 = result; // = result in kilos (as 1 litre weighs 1 kilo at STP)
  result = Math.round(result*Math.pow(10,2))/Math.pow(10,2);
  document.form8.result.value = result; // = result in litres
  result2 = Math.round(result2*Math.pow(10,2))/Math.pow(10,2);
  document.form8.result2.value = (result2); } // = result in kilos
 
 // Volume conversion ----------------------------------------
 
 function convertUKgals() { // convert UK gals
  result = (document.form9.UKgals.value * 4.5461);
  result = Math.round(result*Math.pow(10,2))/Math.pow(10,2);
  document.form9.result.value = result; // = result in litres
  result2 = (document.form9.UKgals.value * 1.201);
  result2 = Math.round(result2*Math.pow(10,2))/Math.pow(10,2);
  document.form9.result2.value = result2; } // = result in US gals
 
 function convertUSgals() { // convert US gals
  result = (document.form10.USgals.value * 3.7854);
  result = Math.round(result*Math.pow(10,2))/Math.pow(10,2);
  document.form10.result.value = result; // = result in litres
  result2 = (document.form10.USgals.value * 0.8327);
  result2 = Math.round(result2*Math.pow(10,2))/Math.pow(10,2);
  document.form10.result2.value = result2; } // = result in UK gals
 
 function convertLitres() { // convert litres
  result = (document.form11.litres.value * 0.21997);
  result = Math.round(result*Math.pow(10,2))/Math.pow(10,2);
  document.form11.result.value = result; // = result in UK gals
  result2 = (document.form11.litres.value * 0.2642);
  result2 = Math.round(result2*Math.pow(10,2))/Math.pow(10,2);
  document.form11.result2.value = result2; } // = result in US gals
  
//-->