Updated JavaScript

Updated JavaScript