Hello, I'm having a problem with rounding in a Javascript file. If an order comes up at 17.99 it rounds to 18.00. Please help, this is urgent.

Code:
function moneyFormat(amount) {
var	fixValue = parseFloat(Math.pow(10,2));//2 = number of dec places.
var	retValue = parseInt(Math.round(amount * fixValue)) / fixValue;
var result=((parseFloat(amount)*100))/100;
	amount=result;

	pounds=parseInt(amount);
	pence=amount-pounds;
	if ((pence > 0.90) && (pence < 0.91)) {
		amount=pounds+0.90;
	}
	if (pounds==amount) {
		return amount+".00";
	} else if (parseInt(amount*10)==amount*10) {
		return amount+"0";
	} else {
		return (parseFloat((Math.ceil(amount*100))/100));
	}
}