function calculate() {

	var standard = document.getElementById('standard').value;
	var suits = document.getElementById('suits').value;
	var smallc = document.getElementById('smallc').value;
	var largec = document.getElementById('largec').value;
	var boxers = document.getElementById('boxers').value;
	var bedding = document.getElementById('bedding').value;
	var tablecloths = document.getElementById('tablecloths').value;
	var pillows = document.getElementById('pillows').value;
	var rate = "";
	
	// debugging input variables
	
	// alert ( standard );
	// alert ( suits );
	// alert ( smallc );
	// alert ( largec );
	// alert ( boxers );
	// alert ( bedding );
	// alert ( tablecloths );
	// alert ( pillows );

	// ------------------------

	// Debugging the main calculator equation
	//alert ((( Math.abs(standard) + Math.abs(suits) + Math.abs(smallc) + Math.abs(largec) + Math.abs(boxers) + Math.abs(bedding) + Math.abs(tablecloths) + Math.abs(pillows) )));

	if ((Math.abs(standard) + Math.abs(suits) + Math.abs(smallc) + Math.abs(largec) + Math.abs(boxers) + Math.abs(bedding) + Math.abs(tablecloths) + Math.abs(pillows)) <= 10 ) {
		
		rate = 1.05; }
	
	else if ((Math.abs(standard) + Math.abs(suits) + Math.abs(smallc) + Math.abs(largec) + Math.abs(boxers) + Math.abs(bedding) + Math.abs(tablecloths) + Math.abs(pillows)) <= 20 ) {
	
		rate = 1.00; }
		
	else if ((Math.abs(standard) + Math.abs(suits) + Math.abs(smallc) + Math.abs(largec) + Math.abs(boxers) + Math.abs(bedding) + Math.abs(tablecloths) + Math.abs(pillows)) <= 30 ) {
	
		rate = 0.95; }
		
	else if ((Math.abs(standard) + Math.abs(suits) + Math.abs(smallc) + Math.abs(largec) + Math.abs(boxers) + Math.abs(bedding) + Math.abs(tablecloths) + Math.abs(pillows)) <= 40 ) {
	
		rate = 0.90; }
		
	else if ((Math.abs(standard) + Math.abs(suits) + Math.abs(smallc) + Math.abs(largec) + Math.abs(boxers) + Math.abs(bedding) + Math.abs(tablecloths) + Math.abs(pillows)) <= 50 ) {
		
		rate = 0.85; }
		
	else if ((Math.abs(standard) + Math.abs(suits) + Math.abs(smallc) + Math.abs(largec) + Math.abs(boxers) + Math.abs(bedding) + Math.abs(tablecloths) + Math.abs(pillows)) > 50 ) {
	
		rate = 0.80; }
		
	// prices are correct as of /07/05/09 and were taken from the old site	
		
    var amount = ( rate * standard );
    var suitstotal = (3.95 * suits);
    var smallctotal = (0.45 * smallc);
    var largectotal = (0.65 * largec);
    var boxerstotal = (0.30 * boxers);
    var beddingtotal = (3.00 * bedding);
    var tableclothstotal = (2.25 * tablecloths);
    var pillowstotal = (0.50 * pillows);
    
    var total = (amount + suitstotal + smallctotal + largectotal + boxerstotal + beddingtotal + tableclothstotal + pillowstotal).toFixed(2);
    
    // alert ( rate );
    
    // the total cost of ironing
    document.getElementById("result").value = total
    
    
   // the text to show underneath


}

