Added option to select contents of number fields upon focus; factored out regular expression to check if a string is numeric, and added support for negative numbers.