Ja, grundlæggende skal du bare ændre definitionen af wHeight og -Width, samt sætte diven udenom:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>Flying picture</title>
<meta name="Generator" content="Stone's WebWriter 4">
<style type="text/css">
html,body{margin:0;padding:0;height:100%;}
#site{width:800px;height:600px;overflow:hidden;margin:0 auto;border:1px solid red;position:relative;}
</style>
<script type="text/javascript">
//position til slut
var newTop = 30,newRight = 30;
var wHeight,wWidth,pHeight,pWidth,distHoriz,distVert,percMoved=0,pic;
window.onload = function(){
pic = document.getElementById("flyingPic")
pHeight = pic.offsetHeight;
pWidth = pic.offsetWidth;
// alert(pHeight+"\n"+pWidth);
wHeight = document.getElementById("site").offsetHeight;
wWidth = document.getElementById("site").offsetWidth;
// alert(wHeight+"\n"+wWidth);
pic.style.left = -pWidth + "px";
pic.style.top = wHeight + "px";
distVert = wHeight - newTop;
distHoriz = wWidth - newRight;
// alert(distVert+"\n"+distHoriz);
movePic();
}
function movePic(){
percMoved += 0.25;
// document.getElementById("percM").firstChild.nodeValue = percMoved;
var actLeft = Math.floor(percMoved*distHoriz/100) - pWidth + "px";
pic.style.left = actLeft;
// document.getElementById("actL").firstChild.nodeValue = actLeft;
var actTop = wHeight - Math.floor(percMoved*distVert/100) + "px";
pic.style.top = actTop;
// document.getElementById("actT").firstChild.nodeValue = actTop;
if(100>percMoved){
setTimeout("movePic()",10);
}
}
</script>
</head>
<body>
<div id="site">
<img id="flyingPic" src="
http://www.eksperten.dk/img/elogo.png" style="position:absolute;left:-200px;">
</div>
<!-- test-spans
%: <span id="percM"> </span>%<br>
Left: <span id="actL"> </span><br>
Top: <span id="actT"> </span><br>
-->
</body>
</html>