var flexutils = function(){

	return {

		setPage: function (pageIndex) {
			showAjaxLoadingWindow(false);
			$.post(CONTEXT_ROOT + "services/magazine.service", {
				page: pageIndex,
				method: "setPage"
			});
			return false;
		},
	
		setSection: function (sectionKey) {
			$.post(CONTEXT_ROOT + "services/magazine.service", {
				section: sectionKey,
				method: "setSection"
			}, function(response) {
				window.location = CONTEXT_ROOT;	// Navigate away only after response is received (if we redirect the user before setting the section he may land in the splash page again)
			});
			return false;
		},
		
		loading: function() {
			loading();	// Shows the loading progress indicator (global function inserted by behavior.js)
			return false;
		},
		
		search: function() {
			loading();
			window.location = "http://www.lookformycar.com";
			return false;
		},
		
		searchdealer: function() {
			loading();
			window.location = CONTEXT_ROOT + "dealerships.htm";
			return false;
		},
		
		sellvehicle: function() {
			loading();
			window.location = CONTEXT_ROOT + 'actions/sellvehicle.action';
			return false;
		}
		
	}

}();

