In the <HEAD>:
<script>
function moveIt() {
chgXBy = Math.floor((Math.random() * 10))
if ((Math.random() < .5 || document.mover.top >= (window.innerHeight-40)) &&
document.mover.top > 5) { document.mover.top-=chgXBy }
else { document.mover.top+=chgXBy }
chgYBy = Math.floor((Math.random() * 10))
if ((Math.random() < .5 || document.mover.left >= (window.innerWidth-40)) &&
document.mover.left > 5) { document.mover.left-=chgYBy }
else { document.mover.left+=chgYBy }
setTimeout("moveIt()",10)
}
</script>
<style type="text/css>
#mover {position: absolute; left: 5; top: 5;}
</style>