Flying Clickable GIFs

This code goes in the <head>

<SCRIPT LANGUAGE="JavaScript"><!--
startX = 600;
startY = 200;
endX = -550;
endY = 50;
deltaX = 5;
deltaY = 0;
movePeriod = 40;
function movement() {
if(currentY <= endY || currentX <= endX) {
currentX = startX;
currentY = startY;
} else {
currentX -= deltaX;
currentY -= deltaY;
}
}
function setPosition(x,y) {
divStyle.left = currentX;
divStyle.top = currentY;
}
function moveDiv() {
movement();
setPosition();
}
function get_id4(id) {
if (document.all) return document.all[id];
else if (document.layers) {
document.layers[id].style=document.layers[id];
return document.layers[id];
}
}
if (!document.getElementById) document.getElementById=get_id4;
function moveImage() {
divStyle = document.getElementById("fly").style;
currentX = startX;
currentY = startY;
setPosition(currentX, currentY);
divStyle.visibility = "visible";
setInterval("moveDiv()",movePeriod);
}
window.onload = moveImage;
//--></SCRIPT>

This code goes in the <body>

<div id="fly" style="position:absolute;visibility:hidden"><a href="http://wycombeweb.com" target="new"><img src="../applets/cessna.gif" border="0" width="138" height="54"></a>
</div>

Parameters:

You can alter where your image begins and ends its journey by adjusting these variables:

startX = 600;
startY = 200;
endX = -550;
endY = 50;

To increase or decrease speed, adjust deltaX = 5;.