function PadDigits(string, newlength) { var pad = ""; var len = newlength-String(string).length; var i; for (i = 0; i