Javascript function to load big list piece by piece via ajax calls.