I've just published a webform_steps.module module that provides a navigation bar for multi page webforms. It solves the problem by implementing a submit-handler that simulates the next and previous buttons very similar to how you describe it.
The magic has to happen on the PHP side in the $form_state
array.