quick and dirty JavaScript function to format numbers and currencies