A script that validates a form using Javascript