Simple Javascript util for showing loading indicators