var myObj;var maxsteps=500;var step=1;var dx=1;
function initfly() {
myObj=document.getElementById('tileds'); 
myObj.style.left='0px';myObj.style.top='0px';
window.setTimeout(fly,10);	
}
function fly() {  
var x=parseInt(myObj.style.left);var y=parseInt(myObj.style.top); 
if (step>=0) {
if (step<=maxsteps) {x+=dx;step++;} 
else {step=step*-1;}
} else {step++;x-=dx;}
y=10+10*Math.sin(2*Math.PI/100*x);
myObj.style.top=y+'px';	myObj.style.left=x+'px';
window.setTimeout(fly, 10);	
} // end function
initfly();

