// JavaScript Document

function calculateDelivery(deliveryId, extract){
	
	if(extract==undefined){
		extract = 0;	
	}
	var url = fullURL + "/inc/ajax_product.php" ;
	var postData = "action=calculatedelivery&deliveryid=" + deliveryId ;
	
	showHorizontalLoader("checkout_total");
	showHorizontalLoader("checkout_tax");
	showHorizontalLoader("checkout_exc_tax");
		
		$.ajax({
			  url: url,
			  type: 'POST',
			  data: postData,
			  success: function(responseText){	  
				  $('#checkout_total').html(responseText) ;
				  doCufon();
			  }
			});
		
	var url = fullURL + "/inc/ajax_product.php" ;
	var postData = "action=calculatetax&deliveryid=" + deliveryId ;
		
		$.ajax({
			  url: url,
			  type: 'POST',
			  data: postData,
			  success: function(responseText){	  
				  $('#checkout_tax').html(responseText) ;
				  doCufon();
			  }
			});
		
	if(extract){
		
		var url = fullURL + "/inc/ajax_product.php" ;
		var postData = "action=calculateexctax&deliveryid=" + deliveryId ;
			
			$.ajax({
				  url: url,
				  type: 'POST',
				  data: postData,
				  success: function(responseText){	  
					  $('#checkout_exc_tax').html(responseText) ;
					  doCufon();
				  }
				});
		
	}
		
		
	
}
