// must load mredkj.com NumberFormat first

function MoneyFormat(amount)
{
    var localeconv = arguments.callee.localeconv;

    var nf = new NumberFormat(amount, localeconv.decimal_point);
    nf.setCurrency(true);

    if (localeconv.n_sign_posn == 2 || localeconv.n_sign_posn == 4) {
        nf.setNegativeFormat(nf.RIGHT_DASH);
    } else {
        nf.setNegativeFormat(nf.LEFT_DASH);
    }

    nf.setCurrencyPosition(localeconv.p_cs_precedes ? nf.LEFT_OUTSIDE : nf.RIGHT_OUTSIDE);

    if (localeconv.p_sep_by_space) {
        nf.setCurrencyValue(' '+localeconv.currency_symbol);
    } else {
        nf.setCurrencyValue(localeconv.currency_symbol)
    }

    return nf.toFormatted();
}
