Just to improve Theo's answer.
You should NOT be using eval unless you're absolutely sure what you are passing to that function. Since eval will run the code, you can write any JavaScript code and it will be executed.
One of the ways of making sure you will only get the right code is using the following script:
var str = "$34.00 + $25.00 alert('some code')"; // Our string with code
var pattern = /[0-9\+\-\.\*\/]*/g; // Regex pattern
var math_operation = str.match(pattern).join(''); // Getting the operation
document.write(eval(math_operation)); // Getting the result
This not only allows the user to type things like $34.00 + $5.00 but also prevents from code being injected.