<script>
	function redimtextareas(obj){
		obj.style.height='500px'; 
		obj.style.height = obj.scrollHeight + 20 + 'px';
	}
</script>

html:
<textarea name="nom" onFocus="redimtextarea(this);" onKeydown="redimtextarea(this);"></textarea>

css:
textarea{overflow:hidden; /* éviter les scrollbars*/}