
	
		var List = FlirtXchange.ActionDispatcher.List = new Object();
		
		List.Settings = {
		}
		
		List.Storage = {
		}
		
		List.LoadSection = function(section, URLext) {
			if(FlirtXchange.Common.Busyness.IsBusy('SectionLoad')) return;
			FlirtXchange.Common.Busyness.Set('SectionLoad', true); 
			
			if(FlirtXchange.Common.Busyness.IsBusy('Panel')) Panel.Hide();
			
			List.Storage.CurrentSection = section || 'null';
			if(!URLext) URLext = '';
			advAJAX.post({
				url: '/instant_flirt_connections/index.php'+URLext,
    			sec: section,
				hot : MainGrid.GetHotListed(),
    			onLoading : function() {
	    			BoxGrid.ToggleLoader(1);
    			},
    			onSuccess : function(obj) {
    				setTimeout( function() {
						BoxGrid.Load(obj.responseJSON);
						BoxGrid.ToggleLoader(0);
						FlirtXchange.Common.Busyness.Set('SectionLoad', false);
    				}, 500);
    			}
			});
		}
		
		
		List.LoadSet = function(set) { 
			if(FlirtXchange.Common.Busyness.IsBusy('SectionLoad')) return;
			FlirtXchange.Common.Busyness.Set('SectionLoad', true); 
			//This function is exact copy of doListCall above, it has been created that way to ensure that further 
			//changes to the sets loading can be implemented easly. 
			
			if(FlirtXchange.Common.Busyness.IsBusy('Panel')) Panel.Hide();
			
			var set = set || null;
			if(set == null) return;
			advAJAX.post({
	    		url: '/instant_flirt_connections',
				hot : MainGrid.GetHotListed(),
	    		set: BoxGrid.Pagination.Settings.Details.CurrentSet + set,
	    		previous: BoxGrid.Pagination.Settings.Details.CurrentSet,
    			sec: List.Storage.CurrentSection,
    			onLoading : function() {
	    			BoxGrid.ToggleLoader(1);
    			},
    			onSuccess : function(obj) {
    				setTimeout( function() {
    					BoxGrid.Load(obj.responseJSON);
						BoxGrid.ToggleLoader(0);
						FlirtXchange.Common.Busyness.Set('SectionLoad', false);
    				}, 500);
    			}
			});
		}
		
		List.LoadSearch = function() {
			var params = new Object();
			params.Top = $('top_rated_input').checked;
			params.New = $('new_input').checked;
			params.AgeFrom = $F('age_input_from');
			params.AgeTo = $F('age_input_to');
			params.Region = $F('region_input');
			params.Interest = $F('interest_input');
			params.Taking = $('taking_calls_input').checked;
			params.WithVideo = $('with_video_input').checked;
			params.WithAudio = $('with_audio_input').checked;
			params.WithImage = $('with_image_input').checked;
			params.DirectInput = ($('direct_input').value.length > 0) ? $('direct_input').value : false;
			
			var URL = '?gho=0';
			
			for(var a in params) URL += '&'+a+'='+encodeURIComponent(params[a]);
			
			List.LoadSection('Search', URL);
			
		}
		
		List.changeGenderPreference = function(gender) {
			if(FlirtXchange.Common.Busyness.IsBusy('SectionLoad')) return;
			BoxGrid.SortGenderTabs(gender);
			var URL = '?gpref='+encodeURIComponent(gender);
			List.LoadSection(List.Storage.CurrentSection, URL);
		}
		