function smallCart(productId) {
		var url = 'small_cart.php';
		var pars = 'productId=' + productId;
		$('minicart').innerHTML = '<span class="cartText">Updating Cart...</span>';
		var myAjax = new Ajax.Request( url, { method: 'post', parameters: pars, onComplete: smallCartP });
}
function smallCartP(request) {
	$('minicart').innerHTML = request.responseText;
}

//update the quantity
function updateQuantity(productId, quantity) {
		var url = 'cart_updateQuantity.php';
		var pars = 'productId=' + productId + '&quantity=' + quantity;
		$('bigcart').innerHTML = '<span class="cartText">Updating Cart...</span>';
		var myAjax = new Ajax.Request( url, { method: 'post', parameters: pars, onComplete: updateQuantityP });
}
function updateQuantityP(request) {
	$('bigcart').innerHTML = request.responseText;
}

//remove a product
function removeProduct(productId) {
		var url = 'cart_removeProduct.php';
		var pars = 'productId=' + productId;
		$('bigcart').innerHTML = '<span class="cartText">Updating Cart...</span>';
		var myAjax = new Ajax.Request( url, { method: 'post', parameters: pars, onComplete: removeProductP });
}
function removeProductP(request) {
	$('bigcart').innerHTML = request.responseText;
}

//refresh the small cart
function refreshCart() {
		var url = 'small_cartView.php';
		$('minicart').innerHTML = '<span class="cartText">Updating Cart...</span>';
		var myAjax = new Ajax.Request( url, { method: 'post', onComplete: refreshCartP });
}
function refreshCartP(request) {
	$('minicart').innerHTML = request.responseText;
}


