Go Back
Example: The floating picture in the bottom right-hand corner can be clicked. When clicked, it will take the user to the top of the page.



First, download the following picture:


Next: Copy and paste this into the document.

<style>
#watermark {
	font-family:Arial;
	font-size:8pt;
	color:FFFFFF;
}
</style>

<DIV id="waterMark" style="position:absolute">
<a href="#" onClick="window.scrollTo(0,0)">
<img src="top0112.gif" border="0">
<br>
Go Back
</a>
</DIV> 

<script language="JavaScript1.2">
<!--

// Based on watermark script by Paul Anderson, CNET Builder.com. All rights reserved.
markW = 90;       // pixels wide
markH = 50;       // pixels high
markX = 99;      // percent right
markY = 99;      // percent down
markRefresh = 50; // milliseconds

// set common object reference
if (!document.all) document.all = document;
if (!document.all.waterMark.style) document.all.waterMark.style = document.all.waterMark;

wMark = document.all.waterMark.style;
wMark.width = markW;
wMark.height = markH;
navDOM = window.innerHeight; // Nav DOM flag
 
function setVals() {
 barW = 0; // scrollbar compensation for PC Nav
 barH = 0;
 if (navDOM) {
  if (document.height > innerHeight) barW = 20;
  if (document.width > innerWidth) barH = 20;
  } else {
  innerWidth = document.body.clientWidth;
  innerHeight = document.body.clientHeight;
  }
 posX = ((innerWidth - markW)-barW) * (markX/100);
 posY = ((innerHeight - markH)-barH) * (markY/100);
 }

function wRefresh() {
 wMark.left = posX + (navDOM?pageXOffset:document.body.scrollLeft);
 wMark.top = posY + (navDOM?pageYOffset:document.body.scrollTop);
 }

function markMe() {
 setVals();
 window.onresize=setVals;
 markID = setInterval ("wRefresh()",markRefresh);
 }

window.onload=markMe; // safety for Mac IE4.5

//-->
</script>
Note: A different picture can be used, with or without words. Size parameters should be changed accordingly. To use the picture without the words, it should be noted that the height would be 40 pixels. If you'd like the floating link to take the user to another location, the pound sign (#) in the division can be changed to a URL.