function ResizeTextArea(txtBox)
{
 nCols = txtBox.cols;
 sVal = txtBox.value;
 nVal = sVal.length;
 nRowCnt = 1;

 for (i=0;i<nVal;i++)
 { if (sVal.charAt(i).charCodeAt(0) == 13) { nRowCnt +=1; } }

 if (nRowCnt < (nVal / nCols)) { nRowCnt = 1 + (nVal / nCols); }
 txtBox.rows = nRowCnt;
} 
