Jason has an interesting post on AJAX Timeouts with Prototype, excellent to solve the network issues and keep control on it. A feature that Gmail handles very nicely by displaying an alert message when there is network problems. The code is commented and its very self explanatory.