<!-- Oiginal Author:  Dennis Monamy (JavaBoy@madog.com) -->
<!-- This script and many more are available free online, just ask (Java-boy@madog.com)-->

<!-- Begin
//Sets to two decimal places
function TwoDecimal(number){
number=((Math.round(number*100))/100);
return number;
}
//Calculates totals 
function doform(number) {
switch (number) {

case 0 : return (""); break;
case 1 : var length = prompt("Enter the ''NET LENGTH'' of your run in lineal METRES. NB: This Calculator adds a 10mm cutting allowance to the end of the length.", "5.00");
									var width = 3.66
									var xcut = .10;
									return TwoDecimal ((length *1 +xcut)*width); break;

case 2 : var width = prompt("Enter the ''WIDTH'' of Carpet needed.", "5.00");
         var length = prompt("Enter the ''NET LENGTH'' of your run in lineal METRES. NB: This Calculator adds a 10mm cutting allowance to the end of the length.", "8.00");
         var xcut = .10;
									return TwoDecimal ((length *1 +xcut)*width); break;
    }
  }
// END -->

