Simple Javascript util for displaying loading indicators