A short script to validate a form via JavaScript