
		var letSubmit = false;
		
		function calc_tot()
		{
			///  Retrieve and check the inputs
			var per_price = 0;
			var qty_total = 0;
			var box_weight = 0; //JON -- add the weight of the shipping material here ...
			var total_weight = 0;
			var denshirt_weight = .51 //in lbs
			var mug_weight = .85 //in lbs
			var lobmit_weight = .10 //in lbs
			var trtmit_weight = .10 //in lbs
			var apron_weight = .51 //in lbs
			var subtot = 0;
			var tax = document.shop.checktax.checked;



		
			
			///  denshrt
			var qty_denshrt = parseInt(document.shop.quantity_denshrt.value);
			if ( isNaN(qty_denshrt) ) { status = 'Quantity must be a number.';    document.shop.quantity_denshrt.value = 0;    return; }

			// Price Table
			per_price = 34.99;
		        
			var price_denshrt =     ( qty_denshrt * per_price );    //  Change Price Here
			qty_total = qty_total + qty_denshrt;
			subtot = subtot + price_denshrt;
			document.shop.price_denshrt.value = '$' + dollar(price_denshrt);
			
			
			
			///  crabmug
			var qty_crabmug = parseInt(document.shop.quantity_crabmug.value);
			if ( isNaN(qty_crabmug) ) { status = 'Quantity must be a number.';    document.shop.quantity_crabmug.value = 0;    return; }

			// Price Table
			per_price = 5.99;
		
			var price_crabmug =     ( qty_crabmug * per_price );    //  Change Price Here
			qty_total = qty_total + qty_crabmug;
			subtot = subtot + price_crabmug;
			document.shop.price_crabmug.value = '$' + dollar(price_crabmug);
			

			///  lobmitt
			var qty_lobmitt = parseInt(document.shop.quantity_lobmitt.value);
			if ( isNaN(qty_lobmitt) ) { status = 'Quantity must be a number.';    document.shop.quantity_lobmitt.value = 0;    return; }

			// Price Table
			per_price = 6.99;
		
			var price_lobmitt =     ( qty_lobmitt * per_price );    //  Change Price Here
			qty_total = qty_total + qty_lobmitt;
			subtot = subtot + price_lobmitt;
			document.shop.price_lobmitt.value = '$' + dollar(price_lobmitt);
			
			
			///  troutmitt
			var qty_troutmitt = parseInt(document.shop.quantity_troutmitt.value);
			if ( isNaN(qty_troutmitt) ) { status = 'Quantity must be a number.';    document.shop.quantity_troutmitt.value = 0;    return; }

			// Price Table
			per_price = 6.99;
		
			var price_troutmitt =     ( qty_troutmitt * per_price );    //  Change Price Here
			qty_total = qty_total + qty_troutmitt;
			subtot = subtot + price_troutmitt;
			document.shop.price_troutmitt.value = '$' + dollar(price_troutmitt);
			
			///  ITEM 8
			var qty_chef_aprns = parseInt(document.shop.quantity_chef_aprns.value);
			if ( isNaN(qty_chef_aprns) ) { status = 'Quantity must be a number.';    document.shop.quantity_chef_aprns.value = 0;    return; }

			// Price Table
			per_price = 19.99;
		
			var price_chef_aprns =     ( qty_chef_aprns * per_price );    //  Change Price Here
			qty_total = qty_total + qty_chef_aprns;
			subtot = subtot + price_chef_aprns;
			document.shop.price_chef_aprns.value = '$' + dollar(price_chef_aprns);
			
			

			///  Tax Rate change to 0.0635 for Utah sales tax
			if ( tax == true ) { tax = subtot * 0.0635; }    else { tax = 0; }
		
			///  Shipping as flat rate per qty
//		        var shipcost = qty_total * 3.50;

                        ///  Shipping, based on weight ...
                        //Calculate total weight
                        var shipcost = 0.00;                        
                        total_weight = (qty_denshrt * denshirt_weight) + (qty_crabmug * mug_weight) + (qty_lobmitt * lobmit_weight) + box_weight + (qty_troutmitt * trtmit_weight) + box_weight + (qty_chef_aprns * apron_weight) + box_weight;
                        
                        if ((total_weight > (0)) && (total_weight <= (1/16))) { shipcost = 0.34; }
                        if ((total_weight > (1/16)) && (total_weight <= (2/16))) { shipcost = 0.57; }
                        if ((total_weight > (2/16)) && (total_weight <= (3/16))) { shipcost = 0.80; }
                        if ((total_weight > (3/16)) && (total_weight <= (4/16))) { shipcost = 1.03; }                        
                        if ((total_weight > (4/16)) && (total_weight <= (5/16))) { shipcost = 1.26; }
                        if ((total_weight > (5/16)) && (total_weight <= (6/16))) { shipcost = 1.49; }
                        if ((total_weight > (6/16)) && (total_weight <= (7/16))) { shipcost = 1.72; }
                        if ((total_weight > (7/16)) && (total_weight <= (8/16))) { shipcost = 1.95; }                        
                        if ((total_weight > (8/16)) && (total_weight <= (9/16))) { shipcost = 2.18; }
                        if ((total_weight > (9/16)) && (total_weight <= (10/16))) { shipcost = 2.41; }
                        if ((total_weight > (10/16)) && (total_weight <= (11/16))) { shipcost = 2.64; }
                        if ((total_weight > (11/16)) && (total_weight <= (12/16))) { shipcost = 2.87; }                        
                        if ((total_weight > (12/16)) && (total_weight <= (13/16))) { shipcost = 3.10; }                                                
                        if ((total_weight > (13/16)) && (total_weight <= (1))) { shipcost = 3.50; }
                        if ((total_weight > (1)) && (total_weight <= (2))) { shipcost = 3.95; }                        
                        if ((total_weight > (2)) && (total_weight <= (3))) { shipcost = 5.20; }           
                        if ((total_weight > (3)) && (total_weight <= (4))) { shipcost = 6.45; }                                   
                        if ((total_weight > (4)) && (total_weight <= (5))) { shipcost = 7.70; }    
                        if (total_weight > (5)) { shipcost = 15.00; }                                                           
                        //JON -- what do you want to do if it weighs more than 5 lbs? FOr now, I just set it to a flat rate of $15 ...
                        
                        
//- Weight of items!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//Mugs 13.6 oz. (.85 lbs)
//T Shirt 8.1 oz. (.51 lbs)

// <!-- 1st class mail rates  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
// Single-Piece Letter/Flat Rates
//1st oz  $0.34 
//Each additional oz  0.23 

//Weight not
//over (oz)  Rate 
//1*  $0.34 
//2  0.57 
//3  0.80 
//4  1.03 
//5  1.26 
//6  1.49 
//7  1.72 
//8  1.95 
//9  $2.18 
//10  2.41 
//11  2.64 
//12 2.87 
//13 3.10 
//Over 13 oz....
//Single-Piece Rates
//Up to 1 lb $3.50 
//Up to 2 lbs  3.95 
//Up to 3 lbs  5.20 
//Up to 4 lbs  6.45 
//Up to 5 lbs  7.70 
//Over 5 pounds, see postmaster. 

			///  Shipping with a shipping table
//			var shipcost = 0.00;				// shipping if subtot = $0-50
//			if ( subtot >= 50 ) { shipcost = 4.50; }	// shipping if subtot = $50-100
//			if ( subtot >= 100 ) { shipcost = 7.50; }	// etc
//			if ( subtot >= 150 ) { shipcost = 9.50; }
//			if ( subtot >= 200 ) { shipcost = 12.00; }	// It would be very simple to 
//			if ( subtot >= 250 ) { shipcost = 14.00; }	// make a shipping table
//			if ( subtot >= 300 ) { shipcost = 18.00; }	// based off qty or something 
//			if ( subtot >= 400 ) { shipcost = 25.00; }	// else just ask.
//			if ( subtot == 0 ) { shipcost = 0; }


			///  Handling as flat rate per qty
		        var handcost = qty_total * 1.00;



 			///  Create Subtotal
			subtot = ( subtot + shipcost + handcost );
		
			///  Output the totals to the form boxes
			document.shop.shipcost.value = '$' + dollar(shipcost);
			document.shop.handcost.value = '$' + dollar(handcost);
			document.shop.subtot.value = '$' + dollar(subtot);
			document.shop.taxvalue.value = '$' + dollar(tax);
			document.shop.grandtot.value = '$' + dollar(subtot + tax);
		}
		
		///  Format Numbers to fixed two decmals ( ###.## )
		function dollar(number)
		{
			nstr = String(Math.round((number)*100) / 100 + .001);
			return nstr.substring(0,(nstr.indexOf('.') + 3));
		}

