Write insertionSortAnim function in animation.js.