adds brackets to if statement in form_val_num()
adds date_to_url() and makes calendar() portable
removes redundant conditional in date_to_url() in functions.php
reorganizes functions.php