I have a code looking like this

Code:
function a()
{
...
displayNextButton( checkBoxesArray );			
...
}

function displayNextButton( checkBoxesArray )
{
	for( i = 0; i < checkBoxesArray.length; i++ )
	{
		alert("inne i loopen");
		elem =  checkBoxesArray[i];
				
		if( !elem.checked )
		{
			alert("inne i if checked och visible");
			document.getElementById('bNextPage').disabled = true;		
			return;
		}
				
		else
			document.getElementById('bNextPage').disabled = false;		
	}
		
}

....

<asp:Button ID="bNextPage" OnClick="bNextPage_OnClick" Text="Vidare" Runat="server" />
But it doesn't work because the buttoncontrol is a runat server control so the name isn't bNextPage. But maybe I can use the clientId istead? How can I get the clientId name of the button?