How do I format the following to omit the decimal places to the right of the decimal? (ex. 10.00 should be 10)

Code:
document.writeln(''+top.cart.alterError(subtotal)+'');