Form validation and info gathering with javascript