Hello to all!

I need help regarding this script:

<script type="text/javascript">
<!--
var ta=new Array();
function addTextArea(n, lang, value){
var remove = document.getElementById('txtara'+n);
if (remove.hasChildNodes()){
remove.removeChild(remove.removeChild(ta[n]));
}
ta[n]=document.createElement('textarea');
ta[n].name='straInsert[description_'+lang+']';
ta[n].setAttribute('rows',7);
ta[n].setAttribute('cols',70);
ta[n].setAttribute('wrap','virtual');
ta[n].value=value;
document.getElementById('txtara'+n).appendChild(ta[n]);
}
//-->
</script>


but unfortunately, i become this error:

Error: uncaught exception: [Exception... "Node was not found" code: "8" nsresult: "0x80530008 (NS_ERROR_DOM_NOT_FOUND_ERR)"

The Problem as i understand it, is at line " remove.removeChild(remove.removeChild(ta[n])); "
Although this error in error console, the script is working smoothly & perfect, but this error is annoying!
What am i doing wrong? Can you please help me? Any help wil be appreciated!
Thank you in advance!