Ajax.Responders.register({
  onCreate: function() {
    Ajax.activeRequestCount++;
	show($('indicator'));
  },
  onComplete: function() {
    Ajax.activeRequestCount--;
	if (Ajax.activeRequestCount == 0) {
		hide($('indicator'));
	}
  }
});

