function fmtPrice(value)
  {
    var result = Math.floor(value) + ".";
    var cents = 100*(value - Math.floor(value))+0.5;
    result += Math.floor(cents/10);
    result += Math.floor(cents%10);
    return result;
 }


function calculateDirectoryTotal(qty){
	
  directory_cost = 40;
  shipping_cost = 7;
  
  directory_total = (directory_cost) *(qty);
	document.sendorder.Subtotal.value = fmtPrice(directory_total);
	
	total_taxes = (directory_total) * 0.07;
	document.sendorder.Total_Taxes.value = fmtPrice(total_taxes);
	
	total_shipping = (qty) * (shipping_cost);
  document.sendorder.Total_Shipping.value = fmtPrice(total_shipping);
  
  grand_total = (directory_total) + (total_taxes) + (total_shipping);
  document.sendorder.GrandTotal.value = fmtPrice(grand_total);
  
	
}




