function subscribe(userid, bool){
	Ext.Msg.wait((bool?'Subscribing':'Unsubscribing')+'...','Please wait');
	Ext.Ajax.request({
		url : './php/v1/subscribe.php',
		params : {id: userid, subscribe: (bool?1:0)}, 
		method : 'POST',
		success : function(response){
				var successMsg;
				if (bool){
					successMsg = 'You are now subscribed to this user';
				}else{
					successMsg = 'You are no longer subscribed to this user';
				}
				Ext.Msg.hide();
				if (response.responseText == '{success: true}') {
					Ext.Msg.alert('Subscription', successMsg, function(){document.location = document.location;});
				}else{
					Ext.Msg.alert('Warning', response.responseText);
				}
		},
		failure :function(){
			Ext.Msg.hide();
			Ext.Msg.alert('Warning', 'Unable to change subscription at this time - please wait a few moments and try again');
		},
		scope: this
	});
}