JavaScript form validation. Decided against jQuery and rolled my own simple JavaScript validation function