rem: MochiKit.Format._numberFormatter = function (placeholder, header, footer, locale, isPercent, precision, leadingZeros, separatorAt, trailingZeros) { return function (num) { num = parseFloat(num); if (typeof(num) == "undefined" || num == null || isNaN(num)) { return placeholder; } var curheader = header; var curfooter = footer; if (num < 0) { num = -num; } else { curheader = curheader.replace(/-/, ""); } var me = arguments.callee; var fmt = MochiKit.Format.formatLocale(locale); if (isPercent) { num = num * 100.0; curfooter = fmt.percent + curfooter; } num = MochiKit.Format.roundToFixed(num, precision); var parts = num.split(/\./); var whole = parts[0]; var frac = (parts.length == 1) ? "" : parts[1]; var res = ""; while (whole.length < leadingZeros) { whole = "0" + whole; } if (separatorAt) { while (whole.length > separatorAt) { var i = whole.length - separatorAt;  res = fmt.separator + whole.substring(i, whole.length) + res; whole = whole.substring(0, i); } } res = whole + res; if (precision > 0) { while (frac.length < trailingZeros) { frac = frac + "0"; } res = res + fmt.decimal + frac; } return curheader + res + curfooter; }; 
add: MochiKit.Format._numberFormatter=function(_227,_228,_229,_230,_231,_232,_233,_234,_235){ return function(num){ num=parseFloat(num); if(typeof (num)=="undefined"||num==null||isNaN(num)){ return _227; } var _236=_228; var _237=_229; if(num<0){ num=-num; }else{ _236=_236.replace(/-/,""); } var me=arguments.callee; var fmt=MochiKit.Format.formatLocale(_230); if(_231){ num=num*100; _237=fmt.percent+_237; } num=MochiKit.Format.roundToFixed(num,_232); var _239=num.split(/\./); var _240=_239[0]; var frac=(_239.length==1)?"":_239[1]; var res=""; while(_240.length<_233){ _240="0"+_240; } if(_234){ while(_240.length>_234){ var i=_240.length-_234; res=fmt.separator+_240.substring(i,_240.length)+res; _240=_240.substring(0,i); } } res=_240+res; if(_232>0){ while(frac.length<_235){ frac=frac+"0"; } res=res+fmt.decimal+frac; } return _236+res+_237; 
context: MochiKit.Format._numberFormatter = function (placeholder, header, footer, locale, isPercent, precision, leadingZeros, separatorAt, trailingZeros) {    return function (num) {        num = parseFloat(num);        if (typeof(num) == "undefined" || num == null || isNaN(num)) {            return placeholder;        }        var curheader = header;        var curfooter = footer;        if (num < 0) {            num = -num;        } else {            curheader = curheader.replace(/-/, "");        }        var me = arguments.callee;        var fmt = MochiKit.Format.formatLocale(locale);        if (isPercent) {            num = num * 100.0;            curfooter = fmt.percent + curfooter;        }        num = MochiKit.Format.roundToFixed(num, precision);        var parts = num.split(/\./);        var whole = parts[0];        var frac = (parts.length == 1) ? "" : parts[1];        var res = "";        while (whole.length < leadingZeros) {            whole = "0" + whole;        }        if (separatorAt) {            while (whole.length > separatorAt) {                var i = whole.length - separatorAt;                //res = res + fmt.separator + whole.substring(i, whole.length);                res = fmt.separator + whole.substring(i, whole.length) + res;                whole = whole.substring(0, i);            }        }        res = whole + res;        if (precision > 0) {            while (frac.length < trailingZeros) {                frac = frac + "0";            }            res = res + fmt.decimal + frac;        }        return curheader + res + curfooter;    };};
meta: 8607	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8607/ad067b3f5d648d6df90ec6fb2b79f0027612a307/MochiKit.js/buggy/trunk/lib/MochiKit.js