function addToBasket (id) {
	
	Ext.Ajax.request({
		url: '/?event=cmp.cst.products.addtobasket',
	   	success: function (a) {
			ret = Ext.util.JSON.decode( a.responseText );
			
			Ext.Msg.show({
				title:'Hinweis',
				msg: ret.DESCRIPTION,
				buttons: Ext.Msg.OK,
				fn: function() {
					if(ret.SUCCESS == 1) {
						document.getElementById('amount' + id).value = '';
						document.getElementById('annotation' + id).value = '';
					}
					
					location.reload();
				},
				animEl: 'elId',
				icon: Ext.MessageBox.QUESTION
			});
		},
		params: { 
			price: id,
			amount: document.getElementById('amount' + id).value,
			annotation: document.getElementById('annotation' + id).value
		}
	});

	
}


function updateBasketPosition (id) {
	
	Ext.Ajax.request({
		url: '/?event=cmp.cst.products.updatebasketposition',
	   	success: function (a) {
		
			ret = Ext.util.JSON.decode( a.responseText );
			
			if(ret.SUCCESS == 0) {
			
				Ext.Msg.show({
					title:'Hinweis',
					msg: ret.DESCRIPTION,
					buttons: Ext.Msg.OK,					
					animEl: 'elId',
					icon: Ext.MessageBox.QUESTION
				});
		
			} else {
				location.href = '/?cid=' + cid;
			}
		},
		params: {
			id: id,
			amount: document.getElementById('amount' + id).value,
			annotation: document.getElementById('annotation' + id).value
		}
	});
	
}
