Source Code

<script language="JavaScript1.2">
<!--
var x=0,y=0,w=150,h=135;
var dx=5,dy=5;
var speed=80;
var theWin=window.open("dummy.htm","","height="+h+",width="+w);
theWin.moveTo(x,y);
var ID=window.setInterval("reachtheEdge()",speed);
function reachtheEdge()
{
if (theWin.closed)
{
clearInterval(ID);
return;
}
if((x+dx>(screen.availWidth-w)) || (x+dx<0))
dx = -dx;

if((y+dy>(screen.availHeight-h)) || (y+dy<0))
dy = -dy;
x+=dx;
y+=dy;
theWin.moveTo(x,y);
}
//-->
</script>

<input type="button" value="Stop" onClick="clearInterval(ID);theWin.close();" name="button">
<input type="button" value="Start" onClick="history.go(0)" ; name="button">

 

Send mail to santhosh_emids@yahoo.com with questions or comments about this web site.
Last modified: November 12, 2000