// update the quantity of the product
function changeQuantity(argIntItemId, argIntNewQuantity)
{
	// update client side
		$('cart_ajax').setStyle('display', 'block');
		new Fx.Style('cart_ajax', 'opacity').start(0,1);
		$('item.' + argIntItemId + '.quantity').value = argIntNewQuantity;
	
	if(1 > argIntNewQuantity)
	{
		// ask user if the product should be removed
		var blnAnswer = confirm('Wilt u dit product verwijderen uit uw winkelwagen?')
		if (true == blnAnswer)
		{
			// verwijder product
			argIntNewQuantity = 0;
			$('item.' + argIntItemId).remove();
		}
		else
		{
			// zet product op 1
			$('item.' + argIntItemId + '.quantity').value = 1;
			new Fx.Style('cart_ajax', 'opacity').start(1,0);
			return false;
		}
	}
	
	// update serverside
		// create the url
		var strUrl = strSiteUrl + strCurrentLanguage + '/ajax/?func=quantity&id=' + argIntItemId + '&quantity=' + argIntNewQuantity + '&r=' + Math.floor(Math.random() * 1000).toString(36);
		
		// do the call
		new Ajax(strUrl, {method: 'get', onComplete: quantityCallback }).request();
		
	return true;
}

function quantityCallback(responseText, responseXML)
{
	// get values
	var arrValues = responseText.split(';');
	
	// update client side
	$('cartoverview.subtotal').innerHTML 	= arrValues[0];
	$('cartoverview.btw').innerHTML 		= arrValues[1];
	$('cartoverview.total').innerHTML 		= arrValues[2];
	
	// hide loading screen
	new Fx.Style('cart_ajax', 'opacity').start(1,0);
	
}