Puha, kan godt selv bruge sådan et script så
jeg har skrevet noget fra bunden ... godt nok?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1"><title>Ingen titel</title>
<style type="text/css">
#followit{
position:absolute;top:10px;right:10px;
width:100px;border:1px solid #000;
}
</style>
<script type="text/javascript">
var tpops="bottom"; // "top" eller "bottom"
var tpopt=20; // Antal pixels fra top/bottom position
var rpops="right"; // "right" eller "left"
var rpopt=20; // Antal pixels fra right/left position
var trefval=10; // Antal ms. mellem alignment af div
var ww,wh,fi,fioh,fiow;
window.onload=function(){
ww=document.body.offsetWidth;
wh=(tmp=window.innerHeight)?tmp:document.documentElement.clientHeight;
tmp=document.getElementById("followit");
fi=tmp.style;fioh=tmp.offsetHeight;fiow=tmp.offsetWidth;
alignit(0);
setInterval("alignit(1);",trefval);
}
function alignit(tmp){
if(tmp==0){fi.top="auto";fi.right="auto";}
var dmcst=(tmenu=document.documentElement.scrollTop)?tmenu:document.body.scrollTop;
var dmcsl=(lmenu=document.documentElement.scrollLeft)?lmenu:document.body.scrollLeft;
tmpy=(tpops=="bottom")?wh-tpopt-fioh+dmcst:tpopt+dmcst;
tmpx=(rpops=="right")?ww-rpopt-fiow+dmcsl:rpopt+dmcsl;
fi.top=tmpy+"px";
fi.left=tmpx+"px";
}
</script></head>
<body onresize="alignit();" style="margin:0px;height:100%;">
<table style="width:100%;border:1px solid #000;"><tr><td>Test start<br><div style="height:700px;"> </div><br>Test slut</td></tr></table>
<div id="followit">Test</div>
</body></html>