... cambiare la funzione, così:

codice:
function a(link) { 
opener.window.document.getElementById("textarea").value=pref+link+suff 
}