function addSubscription(id, type)
{
	handleSubscription('add', id, type);
}
function deleteSubscription(id, type)
{
	handleSubscription('delete', id, type);
}
function handleSubscription(action, id, type)
{
	var params = 'action=' + action + '&id=' + id+ '&type=' + type;
	//alert(params);
	var ajax_req = new Ajax.Request(
		'typo3conf/ext/user_volume/lib/php/subscriptionHandler.php',
		{
			method: 'post',
			postBody: params,
			onSuccess: function(t) { changeSubscriptionStatus(t.responseText, action, id) },
			onFailure: function(t) { alert('failed'); }
		}
	);
}
function changeSubscriptionStatus(response, action, id)
{
	handlerAdd= document.getElementById('subscriptionHandlerAdd_'+id);
	handlerDelete= document.getElementById('subscriptionHandlerDelete_'+id);
	if(action=='delete')
	{
		handlerAdd.style.display="inline";
		handlerDelete.style.display="none";
	}
	else
	{
		handlerAdd.style.display="none";
		handlerDelete.style.display="inline";
	}
	//alert(response+action);
}