I am using this js for expanding a text area to fit the text on mouseover. I would like to set it up to shrink it back on mouseout. I just muddle around with javascript so if an expert can give me a tip how to do this that would be great. I'd like to also apply this to a table's height. Is that possible?

js script:
Code:
function sz(t) {
a = t.value.split('\n');
b=1;
for (x=0;x < a.length; x++) {
 if (a[x].length >= t.cols) b+= Math.floor(a[x].length/t.cols);
 }
b+= a.length;
if (b > t.rows) t.rows = b;
}
Page code:
Code:
<textarea onkeyup='sz(this)' onmouseover='sz(this)' rows='10' cols='125' wrap='virtual' name='Work_Request'  id='Work_Request'><?php echo $projectrow['Work_Request']; ?></textarea>
Thanks