
<!--
function initArray(num) { for (var j=0; j < num; j++) this[j] = 0; }

var sinLookup = new initArray(360), cosLookup = new initArray(360);

for (var j=0, h; j < 360; j++) {
h = j * Math.PI / 180;
sinLookup[j] = Math.sin(h);
cosLookup[j] = Math.cos(h);
}

var x = new initArray(3), y = new initArray(3);
var px = new initArray(3), py = new initArray(3); 
var angles = new initArray(3);

var r, z = 140, w = -1;

function init() {
with (picture) {
r = width >> 2;

x[0] = px[0] = width >> 1;
x[1] = px[1] = width * (1/3);
x[2] = px[2] = width * (2/3);

y[0] = py[0] = height * (1/3);
y[1] = py[1] = height * (2/3);
y[2] = py[2] = height * (2/3);

filters.Light.AddPoint(x[0], y[0], z, 0xFF, 0x00, 0x00, 90);
filters.Light.AddPoint(x[1], y[1], z, 0x00, 0xFF, 0x00, 90);
filters.Light.AddPoint(x[2], y[2], z, 0x00, 0x00, 0xFF, 90);
}

rotateCircles();
}

function rotateCircles() {
z += w; if (z<24 || z>84) w *= -1

for (var i=0; i < 3; i++) {
angles[i] += 10 + i*5; if (angles[i] >= 360) angles[i] = 0;

if (!(i % 2)) r *= -1; else r *= (r < 0) ? -1 : 1;

x[i] = Math.floor(r * cosLookup[angles[i]] + px[i]);
y[i] = Math.floor(r * sinLookup[angles[i]] + py[i]);

picture.filters.Light.MoveLight(i, x[i], y[i], z, true);
}

window.setTimeout('rotateCircles()', 1);
}
//-->
