hello dudes ! Im newbie in the forum and JavaScript ...

im trying to make a function ! but dosen't work like i suposes....
im trying to pass the value of a checkbox straight to an textfield, of a jsp to another ...

the events of checkbox:

<input type="checkbox" name="check" onclick="selecionado('<%dados.getString("COD_FORNECEDOR");%>');">
and the function:

function selecionado(cod){     
	var check = '';     
	check += cod;     
	check += ', ';     
	window.opener.parametro.vs_fornecedor.value += check;     
im no idea whats im doing wrong !