

	var Options = FlirtXchange.ActionDispatcher.MemberOptions = new Object();
	
	
	Options.requestCallbackConnect = function() {
		var Data = MainGrid.GetData(Panel.Current);
		
		var JSON = Data.Data.CallbackConnect;
		
		if (!FlirtXchange.Common.Busyness.IsBusy('CallbackConnect')) {
			FlirtXchange.Common.Busyness.Set('CallbackConnect', true, 20000);
			advAJAX.post({
				userCheck : true,
				url: '/ajax/getCallback.php',
				cli: null,
				country: JSON.Country,
				is_op : JSON.IsOperator,
				live_C : JSON.LiveCode,
				cli_type: 1, //is_mobile, 1 for mobile 0 for landlines
				service_name: JSON.Service,
				conference: JSON.Number,
				returnType : 'JSON',
				onLoading: function(){
					Panel.MemberOptions.ToggleLoader(1);
				},
				onSuccess: function(obj){
					Panel.MemberOptions.ProcessCallbackConnect(obj.responseJSON);
				}
			});
		} else {
			Panel.MemberOptions.ShowInfo('Sorry - You must wait at least 20 seconds before placing another callback request.');
		}			
	}
	
	Options.requestShoutSubscription = function() {
		
		if (!FlirtXchange.Common.Busyness.IsBusy('ShoutSubscription')) {
			FlirtXchange.Common.Busyness.Set('ShoutSubscription', true, 20000);
			
			var JSON = MainGrid.GetData(Panel.Current);

			advAJAX.post({
				url: '/ajax/smsSubscriptions.php',
				returnType : 'JSON',
				event : 'Shout',
				is_op : JSON.Data.SMSSubscriptions.Shouts.TargetIsOperator,
				target_mem_id : JSON.Data.SMSSubscriptions.Shouts.TargetId,
				direction : !JSON.Data.SMSSubscriptions.Shouts.IsSubscribed,
				onLoading: function(){
					Panel.MemberOptions.ToggleLoader(1);
				},
				onSuccess : function(obj) {
						Panel.MemberOptions.ProcessShoutSubscription(obj.responseJSON, Panel.Current);
				}
			});
		} else {
			Panel.MemberOptions.ShowInfo('Sorry - You must wait at least 20 seconds before placing another subscription request.');
		}
	}
	
	Options.requestIVRAudioDescription = function() {
		Panel.MemberOptions.ShowInfo('This great new feature is currently being developed. Please check back in the next few days.');
		return;
		
	}
	
	Options.requestIVRDescription = function() {
		Panel.MemberOptions.ShowInfo('This great new feature is currently being developed. Please check back in the next few days.');
		return;
		
	}
	
	Options.requestIVRVideoDescription = function() {
		Panel.MemberOptions.ShowInfo('This great new feature is currently being developed. Please check back in the next few days.');
		return;
		
	}
	
	Options.requestNotesSave = function() {
		if (FlirtXchange.Common.Busyness.IsBusy('SaveNote')) return;
		FlirtXchange.Common.Busyness.Set('SaveNote', true);
			
		var Data = MainGrid.GetData(Panel.Current);
			
		advAJAX.post({
			url: '/ajax/saveNotes.php',
			content: $F(Panel.Settings.NotesContentId),
			target_id :  Data.Data.MemberId,
			onSuccess: function(obj){
				$(Panel.Settings.NotesButtonId).hide();
				$(Panel.Settings.NotesConfirmId).show();
				
				Data.Member.Notes = $F(Panel.Settings.NotesContentId);
				MainGrid.SaveData(Panel.Current, Data);
				FlirtXchange.Common.Busyness.Set('SaveNote', false);
			}
		});
	}
	
	Options.requestSMSChatSend = function() {
		if (FlirtXchange.Common.Busyness.IsBusy('SendSMSChat')) {
			Panel.MemberOptions.ShowInfo('Sorry - You must wait at least 10 seconds before placing another sms request.');
			return;
		}
		
		var Data = MainGrid.GetData(Panel.Current);

		var CLI = $F('sms_chat_cli');
		var Content =  $F('profile_item_sms');
		
		if(!Content.length) {
			Panel.MemberOptions.ShowInfo('<div class="warning_color bold center"><br /><br />Please enter a message.</div>');
			return;
		}
		
		advAJAX.post({
			url: '/ajax/smsChat.php',
			content: Content,
			cli : CLI,
			returnType : 'JSON',
			is_op : Data.IsOperator,
			target_mem_id : Data.Data.MemberId,
			onLoading: function(){
				Panel.MemberOptions.ToggleLoader(1);
			},
			onSuccess : function(obj) {
				FlirtXchange.Common.Busyness.Set('SendSMSChat', true, 10000);
				Panel.MemberOptions.ProcessSMSChatSend(obj.responseJSON, Data.IsOperator);
			}
		});
	}
	