<html>
<head>
<title>Floating Div (Top Left)</title>
</head>
<body bgcolor="#000000">
<!-- ********************************************************* -->
* You may use this code for free on any web page provided that
* these comment lines and the following credit remain in the code.
* TopLeft Floating Div from [URL unfurl="true"]http://www.javascript-fx.com[/URL]
******************************************************** -->
<div id="divStayTopLeft" style="position:absolute">
<img src="javascriptfx.gif"/>
</div>
<script type="text/javascript">
function JSFX_FloatTopLeft()
{
var startX = 10, startY = 100;
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
var px = document.layers ? "" : "px";
function ml(id)
{
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};
el.x = startX; el.y = startY;
return el;
}
window.stayTopLeft=function()
{
var pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
[red]startY = (pY > 100) ? 0 : 100 - pY;[/red]
ftlObj.y += (pY + startY - ftlObj.y)/8;
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 40);
}
ftlObj = ml("divStayTopLeft");
stayTopLeft();
}
JSFX_FloatTopLeft();
</script>
<!-- ********************************************************* -->
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<!-- ********************************************************* -->
</body>
</html>