Try passing the activestepindex into a hidden field and access it in client side.
P.S: Probably it is too late :) You may have figured out something.