Follow the next steps to use it:
(Go to the file: Right click and save it)
Open scrolltotop.js in notepad and search for img src="up.png"
Replace up.png by img src="http://YOURNAME.weebly.com/files/theme/up.png"
2) Now upload the file to weebly.
Go to design (on top of the page) > Edit HTML/CSS (bottom left) > upload your .js file under files (left side).
3) Next step is to download the arrow, you can use the arrow from the website or any picture you may have.
But name it up.png (because that name is used in the code).
4) Now we have to paste the code in the HTML code
Go to design (on top of the page) > Edit HTML/CSS ( upper right corner) > open the HTML file that you are using
(If you use them all paste this code on all 4 HTML files)
Paste this code in the head section. (Between <head> and </head>)
Don't forget to change YOURNAME into the name of your website.
Code from dynamicdrive.com.