Added JS function to Reg.html