Validating a purchase form with java script