function amendcart(rrid, itemtype, isdel) {
	requestbucket["a"] = {
		url: '/rewards/catalog/ajamendcart',
		parameters: 'rrid='+rrid+'&itemtype='+itemtype+'&isdel='+isdel,
		callbackfunction: 'afteraddcart',
		callbackstate: '0',
		rrid: rrid
	};
	call_bucket("a");
	
}

function afteraddcart() {
	replace_html(requestbucket.a.json);
	
	if(thispage=='viewcart') {
		rrid = requestbucket.a.rrid;
		o1 = $("incart_single_"+rrid);
		o2 = $("incart_case_"+rrid);
		if(!o1 && !o2) {
			// just get rid of it until refresh.
			o3 = $("sritem_"+rrid);
			o3.hide();
			//window.location = window.location;
		}
	}
}
