Javascript AJAX manager for managing and regulating requests