Update existing Value in textarea?

Dear sirs

i’m having a textareas and fill it with some makro-texts. If i use:

Form.setItemValue("alert","This is a test");

he always clears my textarea and fill in the new text. Is there a way to keep the existing text and fill in the new text where my cursor stands? Something like the “paste” function?

Thank you in advance

Best regards
Oli

Got it … As we are just working with Mozilla this works for me.
If someone has got the same problem:

var input   = Form.getInput("alert");
var start   = input.selectionStart;
var end     = input.selectionEnd;
input.value = input.value.substr(0, start) + "This is a test" + input.value.substr(end);