<script language="javascript">
var left = 0;
var top = 0;
function moveImage(){
if(left > (document.body.clientWidth)-(document.getElementById("div1").offsetWidth)-4){
left = -left;
}
if(top > (document.body.clientHeight)-(document.getElementById("div1").offsetHeight)-4){
top = -top;
}
left += 4;
top += 4;
document.getElementById("div1").style.left = Math.abs(left);
document.getElementById("div1").style.top = Math.abs(top);
}
var t1 = window.setInterval("moveImage()",100);
</script>
<body bgcolor="#CCCC00">
<div id="div1" style="position:absolute"><img src="image/left.png" id="image1" /></div>
</body>