Format Currency Function

This code will format a number and round it to the nearest penny. If a number such as "897.956" is entered, the result will be rounded up to "897.96".

Original number
The Result:
Math.round Result:
   

*Instructions:
Either enter a number into the box labeled "Original Number" and click "Test Value", or click "Show Random Values" to have random numbers tested. You will see "My Result" which is what my format currency function comes up with, and the value that the standard "Math.round" function comes up with in the "Their Result" box.

** Notes:
This function does not include support of negative numbers, numbers with leading 0's (ex: 00000.890), or a variable number of digits after the decimal point. These all will be considered for future versions of this function.

*** Disclaimer:
You are free to use this code as long as the orignal comments and notices are intact. However, if you are using this for business purposes, and somebody complains about the way this function rounds off pennies, the author (me) is not at fault. So use at your own risk.