My server control looks like this:
var accHost = $find(‘navigation_AccordionExtender’);
var i = accHost.get_SelectedIndex() + 1;
Whenever ChangeIndex() is called, it moves the Accordion control to the next panel. Of course needs some error checking to make sure you do not go past the end but you get the idea. Hope it helps.