Hello.
Mario's link leads to a forum discussion where the populated code does not work because it uses <a href="#"...> which then redirects to the site's homepage. It is better to use a code like the following, no link, no redirection, just a passage from one page to another.
It remains to format the style of the list at the top of the page using CSS
function ff_FormName_init()
{
JQuery('#bfPage1').prepend('<ul class="marker"><li class="active"><span onclick="ff_switchpage(1);">1</span></li><li><span onclick="ff_switchpage(2);">2</span></li><li><span onclick="ff_switchpage(3);">3</span></li><li><span onclick="ff_switchpage(4);">4</span></li></ul>');
JQuery('#bfPage2').prepend('<ul class="marker"><li><span onclick="ff_switchpage(1);">1</span></li><li class="active"><span onclick="ff_switchpage(2);">2</span></li><li><span onclick="ff_switchpage(3);">3</span></li><li><span onclick="ff_switchpage(4);">4</span></li></ul>');
JQuery('#bfPage3').prepend('<ul class="marker"><li><span onclick="ff_switchpage(1);">1</span></li><li><span onclick="ff_switchpage(2);">2</span></li><li class="active"><span onclick="ff_switchpage(3);">3</span></li><li><span onclick="ff_switchpage(4);">4</span></li></ul>');
JQuery('#bfPage4').prepend('<ul class="marker"><li><span onclick="ff_switchpage(1);">1</span></li><li><span onclick="ff_switchpage(2);">2</span></li><li><span onclick="ff_switchpage(3);">3</span></li><li class="active"><span onclick="ff_switchpage(4);">4</span></li></ul>');
} // ff_FormName_init
I attach an example form as an attachment.