<html>
<script>
function startEQ()
{
quake=5;
parent.moveBy(0,quake);
parent.moveBy(0,-quake);
parent.moveBy(quake,0);
parent.moveBy(-quake,0);
timer=setTimeout("startEQ()",10);
}
function stopEQ()
{
clearTimeout(timer);
}
</script>
</head>
<body>


DEMO IT HERE
<form>
<input type="button" onclick="startEQ()" value="Start an earthquake">
<input type="button" onclick="stopEQ()" value="Stop the earthquake">
</form>
</body>
</html>