function Update_Cart(products_id, url, min_qty){	
	if(min_qty > $('#quantity'+products_id).val()){
		alert("Please enter the quantity.\nQuantity must be atleast " + min_qty +".");
		return false;
	}
	$('#response'+products_id).show();
	$('#response'+products_id).html('<strong>Saving...</strong>');
	
	$.post(url+"files/ajax.php?a=addCart", {
		product_id: products_id,
		product_qty: $('#quantity'+products_id).val(), 
		product_size: $('#size'+products_id).val(),
		product_comment: $('#comments'+products_id).val()
	}, function(response){
		$('#response'+products_id).html("<strong>"+unescape(response)+"</strong>");
		$('#response'+products_id).html("Added in Cart");
		window.location.href=url+'shopping_cart.php';
		//$('#response'+products_id).fadeOut(20000);
	});
	return false;
}	
function copy_value(){
	//alert($('#chkBox').attr("checked"));	
	if($('#chkBox').attr("checked")==true){
		$('#shipping_name').val($('#billing_name').val());
		$('#shipping_city').val($('#billing_city').val());
		$('#shipping_address').val($('#billing_address').val());
		$('#shipping_state').val($('#billing_state').val());
		$('#shipping_postcode').val($('#billing_postcode').val());
		$('#shipping_state').val($('#billing_state').val());
		$('#shipping_country').val($('#billing_country').val());
	}
	else {
		$('#shipping_name').val("");
		$('#shipping_city').val("");
		$('#shipping_address').val("");
		$('#shipping_state').val("");
		$('#shipping_postcode').val("");
		$('#shipping_state').val("");
		$('#shipping_country').val("");	
	}
}
function ask_for_quote(url){	
	$('#response').show();
	$('#response').html('<strong>Sending...</strong>');
	
	$.post(url, {
		pCode: $('#pCode').val(),
		quantity: $('#quantity').val(), 
		txtname: $('#txtname').val(),
		email_id: $('#email_id').val(),
		contact_no: $('#contact_no').val(),
		message: $('#email_id').val()
		
	}, function(response){
		$('#response').html("<strong>"+unescape(response)+"</strong>");
		
		$('#quantity').val(""); 
		$('#txtname').val("");
		$('#email_id').val("");
		$('#contact_no').val("");
		$('#message').val("");
		//$('#response').html("Added in Cart");
		
		//$('#response'+products_id).fadeOut(20000);
	});
	return false;
}
