Author: David Ghabuzian
--Changed functionality of JavaScript