Unable to format the integer values in text boxes

Hi
In my application, i have to format the integet values in JavaScript. I am using json object to fetch the values.I would like handle the formatting functionality in JavaScript.
Code:
oServerSideTextBox = top.ltop.document.getElementById("jsonTextBox").value;
if (oServerSideTextBox != "") {
var oServerJSON = eval("(" + oServerSideTextBox + ")");
var i;
for (i = 0; i < oServerJSON.length; i++) {
var row = oServerJSON[i];
var Val = row.Value;
$('#' + row.Name).val(Val);
}
}
I want to format the numeric values like 12345 -? 12,345

Thanks in advance
jdiaz
