Replay() function Added in js file