/*
 * $Id: number.js 45 2009-09-27 07:19:26Z wru $
 */

Number.prototype.formatInt = function (thewidth, thefill)
{
    if (typeof thewidth == "undefined")
        thewidth = 0;
    if (typeof thefill == "undefined")
        thefill = "0";
    var val = this.toFixed (0);
    while (val.length < thewidth)
        val = thefill + val;
    return (val);
}
