    /* Show an object */
    function showObject(object) {
        object.visibility = VISIBLE;
    }

    /* Hide an object */
    function hideObject(object) {
        object.visibility = HIDDEN;
    }

    function rotateBalls(from, to) {
        initObjects();
    }

     /* Rotate balls */
                                function rotateObjects() {
                                if (spin == true){
                                for (var i = 0; i < pos.length; i++) {
                                pos[i] += inc; objects[i].visibility = 'visible';
                                objects[i].left = (r * Math.cos(pos[i])) + xoff;
                                objects[i].top = (r * Math.sin(pos[i])) + yoff;}
                                }
                                rotateTimer = setTimeout("rotateObjects()", 70);
                                }

     /* Initialize selected objects for rotation */
     function initObjects() {
        /* the array of HTML elements that will be rotated, from fly1 to fly4 */
        objects = new Array(ball1, ball2, ball3, ball4);
        pos = new Array();
        pos[0] = 0;
            for (var i = 1; i < objects.length; i++) {
                pos[i] = parseFloat(pos[i - 1] + ((2 * pi) / objects.length));
            }
        rotateObjects();
    }

/* Variables for rotating objects */
    var objects;
    var pos;
    var r = 160;        // radius
    var xoff = 240;     // x offset
    var yoff = 230;     // y offset
    var pi = Math.PI;   // get pi
    var inc = -pi / 180; // degrees per rotation cycle
    var objects;        // objects to be rotated
    var pos;            // position for objects
    var spin = true;