Get to get check value in an array

Hi

On my form I have an array of checkboxes
In the javascript code I need to find out which checkbox was selected and then removed checkmarks from some others.
I don’t seem to be getting anywhere with my code.

<td><input class=‘checkbox’ type=‘checkbox’ name=‘Selected1’ value=‘$sSelected1’ onchange=‘javascript:iCheckBoxSelected();’></td>

function iCheckBoxSelected()
{
var chk_arr = document.getElementsByName(“Selected1”);

for (iCount=0; iCount &lt; 3; iCount++)
{
	if (chk_arr[iCheckboxNum].checked == 1)
	{
		alert ("do something here");
	}
}

}

Are you wanting only one checkbox to be active at a time? Because if so - radio buttons are the best interface for that type of situation.

If your situation is different though, can we get some details about what you are wanting to achieve with the checkboxes?