split code into function

Add a piece of code to generate floating footnote in html code
remove old footnotes