Plug-in JavaScript Chapter 7, Example 54 (Click on the icon to view the source for copy and pasting)
» Run this code now (Right click and select Back to return from the example)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html><head><title>Plug-in JavaScript: Example 54</title>

<script src="PJ.js"></script>
<script>Initialize()</script>

</head><body>

<img id='ball' src='ball.png' />

<script>

window.onload = function()
{
   Position('ball', 'absolute')

   width  = GetWindowWidth()
   height = GetWindowHeight()
   r      = width  - 100
   b      = height - 100
   x      = width  / 2 - 50
   y      = height / 2 - 50

   ch1 = InsVars("Slide('ball', #1, #2, #3, #4, 500, 0)", 0, y, x, 0)
   ch2 = InsVars("Slide('ball', #1, #2, #3, #4, 500, 0)", x, 0, r, y)
   ch3 = InsVars("Slide('ball', #1, #2, #3, #4, 500, 0)", r, y, x, b)
   ch4 = InsVars("Slide('ball', #1, #2, #3, #4, 500, 0)", x, b, 0, y)

   Repeat(10, Array(ch1, ch2, ch3, ch4))
}

</script>