Sync with Javascript question

Hi,

I have a form with a input field(name) and a textarea(keywords).
I am using the below code to sync the value of name with keywords.
If additional keywords are added in the textarea and then the name field is altered all additional keywords are lost as they are overwritten by the name field sync.
I would like to place a comma after the synced value and have whatever follows the comma to not be touched.
Like this:

Name: keyword1
Keywords: keyword1, keyword2, keyword3, etc.

Could anyone point me in the right direction?
Any help with this would be most appreciated.

var obj=document.getElementById('name');
var att = {"onkeyup":"sync()"};
for(var n in att) {
    obj.setAttribute(n, att[n]);
    }
function sync()
{
  var v1 = document.getElementById('name');
  var v2 = document.getElementById('keywords');
  v2.value = v1.value;
}

Why synchronize onkeyup when input required is a word?
setAttribute and events do not work in IE
http://www.webdeveloper.com/forum/showthread.php?t=238327