From http://www.snipplr.com/view/71829/javascript--validate-number-of-days-in-a-given-month/