

<!-- Calculation script.  -->
<!-- Add VAT if applicable and round to 2 decimal places -->

<!-- Begin
function  doMath() {
var wdth = eval(document.myform.width.value)
var wdthf = eval(document.myform.widthf.value)
var lngth = eval(document.myform.length.value)
var lngthf = eval(document.myform.lengthf.value) 
var space = (wdth + wdthf) * (lngth + lngthf)
var pr = .1893
var pri= 0
{
  if( space == 0 )	// ==0 
			space = 1;		// still costs the min
}
{
  if( space >= 1 )	// less than 
			pri = 2.99 ;		// still costs the min
}
{
  if( space > 1.25 )	// less than 
			pri = 2.74 ;		// still costs the min
}
{
  if( space > 1.50 )	// less than 
			pri = 2.49 ;		// still costs the min
}
{
  if( space > 1.75 )	// less than 
			pri = 2.24 ;		// still costs the min
}
{
  if( space > 2 )	// less than 
			pri = 1.99 ;		// still costs the min
}
{
  if( space > 2.25 )	// less than 
			pri = 1.8175 ;		// still costs the min
}
{
  if( space > 2.50 )	// less than 
			pri = 1.645 ;		// still costs the min
}
{
  if( space > 2.75 )	// less than 
			pri = 1.4725 ;		// still costs the min
}
{
  if( space > 3 )	// less than 
			pri = 1.30 ;		// still costs the min
}
{
  if( space > 3.25 )	// less than 
			pri = 1.2471 ;		// still costs the min
}
{
  if( space > 3.50 )	// less than 
			pri = 1.1943 ;		// still costs the min
}
{
  if( space > 3.75 )	// less than 
			pri = 1.1415 ;		// still costs the min
}
{
  if( space > 4 )	// less than 
			pri = 1.0877 ;		// still costs the min
}
{
  if( space > 4.25 )	// less than 
			pri = 1.0359 ;		// still costs the min
}
{
  if( space > 4.50 )	// less than 
			pri = .9831 ;		// still costs the min
}
{
  if( space > 4.75 )	// less than 
			pri = .9303 ;		// still costs the min
}
{
  if( space > 5 )	// less than 
			pri = .8775 ;		// still costs the min
}
{
  if( space > 5.25 )	// less than 
			pri = .8247 ;		// still costs the min
}
{
  if( space > 5.50 )	// less than 
			pri = .7719 ;		// still costs the min
}
{
  if( space > 5.75 )	// less than 
			pri = .7191 ;		// still costs the min
}
{
  if( space > 6 )	// less than 
			pri = .6663 ;		// still costs the min
}
{
  if( space > 6.25 )	// less than 
			pri = .6617 ;		// still costs the min
}
{
  if( space > 6.50 )	// less than 
			pri = .6572 ;		// still costs the min
}
{
  if( space > 6.75 )	// less than 
			pri = .65265 ;		// still costs the min
}
{
  if( space > 7 )	// less than 
			pri = .6481 ;		// still costs the min
}
{
  if( space > 7.25 )	// less than 
			pri = .643625 ;		// still costs the min
}
{
  if( space > 7.50 )	// less than 
			pri = .63915 ;		// still costs the min
}
{
  if( space > 7.75 )	// less than 
			pri = .634675 ;		// still costs the min
}
{
  if( space > 8 )	// less than 
			pri = .6302 ;		// still costs the min
}
{
  if( space > 8.25 )	// less than 
			pri = .6257 ;		// still costs the min
}
{
  if( space > 8.50 )	// less than 
			pri = .6167 ;		// still costs the min
}
{
  if( space > 8.75 )	// less than 
			pri = .6122 ;		// still costs the min
}
{
  if( space > 9 )	// less than 
			pri = .6077 ;		// still costs the min
}
{
  if( space > 9.25 )	// less than 
			pri = .6032 ;		// still costs the min
}
{
  if( space > 9.50 )	// less than 
			pri = .5987 ;		// still costs the min
}
{
  if( space > 9.75 )	// less than 
			pri = .5942 ;		// still costs the min
}
{
  if( space > 10 )	// less than 
			pri = .5897 ;		// still costs the min
}
{
  if( space > 10.25 )	// less than 
			pri = .5852375 ;		// still costs the min
}
{
  if( space > 10.50 )	// less than 
			pri = .580775 ;		// still costs the min
}
{
  if( space > 10.75 )	// less than 
			pri = .5763125 ;		// still costs the min
}
{
  if( space > 11 )	// less than 
			pri = .57185 ;		// still costs the min
}
{
  if( space > 11.25 )	// less than 
			pri = .5673625 ;		// still costs the min
}
{
  if( space > 11.50 )	// less than 
			pri = .562875 ;		// still costs the min
}
{
  if( space > 11.75 )	// less than 
			pri = .5583785 ;		// still costs the min
}
{
  if( space > 12 )	// less than 
			pri = .5539 ;		// still costs the min
}
{
  if( space > 12.25 )	// less than 
			pri = .5494375 ;		// still costs the min
}
{
  if( space > 12.50 )	// less than 
			pri = .544975 ;		// still costs the min
}
{
  if( space > 12.75 )	// less than 
			pri = .5405125 ;		// still costs the min
}
{
  if( space > 13 )	// less than 
			pri = .53605 ;		// still costs the min
}
{
  if( space > 13.25 )	// less than 
			pri = .531575 ;		// still costs the min
}
{
  if( space > 13.50 )	// less than 
			pri = .5271 ;		// still costs the min
}
{
  if( space > 13.75 )	// less than 
			pri = .522625 ;		// still costs the min
}
{
  if( space > 14 )	// less than 
			pri = .51815 ;		// still costs the min
}
{
  if( space > 14.25 )	// less than 
			pri = .513675 ;		// still costs the min
}
{
  if( space > 14.50 )	// less than 
			pri = .5093 ;		// still costs the min
}
{
  if( space > 14.75 )	// less than 
			pri = .504725 ;		// still costs the min
}
{
  if( space > 15 )	// less than 
			pri = .500025 ;		// still costs the min
}
{
  if( space > 15.25 )	// less than 
			pri = .4957625 ;		// still costs the min
}
{
  if( space > 15.50 )	// less than 
			pri = .491275 ;		// still costs the min
}
{
  if( space > 15.75 )	// less than 
			pri = .4957625 ;		// still costs the min
}
{
  if( space > 16 )	// less than 
			pri = .4823 ;		// still costs the min
}
{
  if( space > 16.25 )	// less than 
			pri = .47926 ;		// still costs the min
}
{
  if( space > 16.50 )	// less than 
			pri = .47530 ;		// still costs the min
}
{
  if( space > 16.75 )	// less than 
			pri = .46744 ;		// still costs the min
}
{
  if( space > 17 )	// less than 
			pri = .4635 ;		// still costs the min
}
{
  if( space > 18 )	// less than 
			pri = .4754 ;		// still costs the min
}
{
  if( space > 19 )	// less than 
			pri = .4259 ;		// still costs the min
}
{
  if( space > 20 )	// less than 
			pri = .4071;		// still costs the min
}
{
  if( space > 21 )	// less than 
			pri = .3883 ;		// still costs the min
}
{
  if( space > 22 )	// less than 
			pri = .3695 ;		// still costs the min
}
{
  if( space > 23 )	// less than 
			pri = .3536 ;		// still costs the min
}
{
  if( space > 24 )	// less than 
			pri = .3377 ;		// still costs the min
}
{
  if( space > 25 )	// less than 
			pri = .3219 ;		// still costs the min
}
{
  if( space > 26 )	// less than 
			pri = .3143 ;		// still costs the min
}
{
  if( space > 27 )	// less than 
			pri = .3068 ;		// still costs the min
}
{
  if( space > 28 )	// less than 
			pri = .2993 ;		// still costs the min
}
{
  if( space > 29 )	// less than 
			pri = .2918 ;		// still costs the min
}
{
  if( space > 30 )	// less than 
			pri = .2843 ;		// still costs the min
}
{
  if( space > 31 )	// less than 
			pri = .2768 ;		// still costs the min
}
{
  if( space > 32 )	// less than 
			pri = .2693 ;		// still costs the min
}
{
  if( space > 33 )	// less than 
			pri = .2670 ;		// still costs the min
}
{
  if( space > 34 )	// less than 
			pri = .2648 ;		// still costs the min
}
{
  if( space > 35 )	// less than 
			pri = .2626 ;		// still costs the min
}
{
  if( space > 36 )	// less than 
			pri = .2604 ;		// still costs the min
}
{
  if( space > 37 )	// less than 
			pri = .2582 ;		// still costs the min
}
{
  if( space > 38 )	// less than 
			pri = .2463 ;		// still costs the min
}
{
  if( space > 39 )	// less than 
			pri = .2344 ;		// still costs the min
}
{
  if( space > 40 )	// less than 
			pri = .2225 ;		// still costs the min
}
{
  if( space > 45 )	// less than 
			pri = .2106 ;		// still costs the min
}
{
  if( space > 50 )	// less than 
			pri = .2106 ;		// still costs the min
}
{
  if( space > 55 )	// less than 
			pri = .1695 ;		// still costs the min
}
{
  if( space > 60 )	// less than 
			pri = .1648 ;		// still costs the min
}
{
  if( space > 64 )	// less than 
			pri = .1601 ;		// still costs the min
}
{
  if( space > 70 )	// less than 
			pri = .1556 ;		// still costs the min
}
{
  if( space > 75 )	// less than 
			pri = .1512 ;		// still costs the min
}
{
  if( space > 79 )	// less than 
			pri = .1468 ;		// still costs the min
}
{
  if( space > 89 )	// less than 
			pri = .1349 ;		// still costs the min
}
{
  if( space > 99 )	// less than 
			pri = .123 ;		// still costs the min
}
{
  if( space > 107 )	// less than 
			pri = .1149;		// still costs the min
}
{
  if( space > 119 )	// less than 
			pri = .108 ;		// still costs the min
}
{
  if( space > 129 )	// less than 
			pri = .102 ;		// still costs the min
}
{
  if( space > 143 )	// less than 
			pri = .0944;		// still costs the min
}
{
  if( space > 153 )	// less than 
			pri = .0897 ;		// still costs the min
}
{
  if( space > 163 )	// less than 
			pri = .0865 ;		// still costs the min
}
{
  if( space > 173 )	// less than 
			pri = .0835 ;		// still costs the min
}
{
  if( space > 183 )	// less than 
			pri = .0850 ;		// still costs the min
}
{
  if( space > 191 )	// less than 
			pri = .0774;		// still costs the min
}
{
  if( space > 199 )	// less than 
			pri = .0764 ;		// still costs the min
}
{
  if( space > 229 )	// less than 
			pri = .0729 ;		// still costs the min
}
{
  if( space > 239 )	// less than 
			pri = .0694 ;		// still costs the min
}
{
  if( space > 251 )	// less than 
			pri = .0659;		// still costs the min
}
{
  if( space > 255 )	// less than 
			pri = .0653 ;		// still costs the min
}
{
  if( space > 265 )	// less than 
			pri = .0646 ;		// still costs the min
}
{
  if( space > 275 )	// less than 
			pri = .0640 ;		// still costs the min
}
{
  if( space > 287 )	// less than 
			pri = .0634;		// still costs the min
}
{
  if( space > 297 )	// less than 
			pri = .0619 ;		// still costs the min
}
{
  if( space > 309 )	// less than 
			pri = .0603 ;		// still costs the min
}
{
  if( space > 319 )	// less than 
			pri = .0587 ;		// still costs the min
}
{
  if( space > 323 )	// less than 
			pri = .05827;		// still costs the min
}
{
  if( space > 399 )	// less than 
			pri = .0547;		// still costs the min
}
{
  if( space > 431 )	// less than 
			pri = .0542 ;		// still costs the min
}
{
  if( space > 499 )	// less than 
			pri = .0539;		// still costs the min
}
{
  if( space > 599 )	// less than 
			pri = .0538;		// still costs the min
}
{
  if( space > 699 )	// less than 
			pri = .0537;		// still costs the min
}
{
  if( space > 799 )	// less than 
			pri = .0535;		// still costs the min
}
{
  if( space > 1799 )	// less than 
			pri = .0530 ;		// still costs the min
}
{
  if( space > 2400 )	// less than 
			pri = .0520 ;		// still costs the min
}
{
  if( space > 3200 )	// less than 
			pri = .0510 ;		// still costs the min
}
{
  if( space > 3839 )	// less than 
			pri = .0490 ;		// still costs the min
}
{
  if( space > 4323 )	// less than 
			pri = .0475 ;		// still costs the min
}

var prod = space  *  pri  
document.myform.amount.value=custRound(prod,2);
}

function custRound(x,places) {
return (Math.round(x*Math.pow(10,places)))/Math.pow(10,places)
}

// End -->


