Simple javascript library to handle form validation and ajax posting