Question about the JavaScript functions on "onSubmit" attribute of a form