var bloom_anim_counter = 0;
var pos = 0;
var timer = null;
var inter = null;
var direc = -1;
var ready = true;

function bloom4()
{
    animate_frame(['North', 'South', 'West', 'East']);
}

function animate_frame(array_id, array_active)
{
    var bgstr = pos + ' 0';

    gbi(array_id[0]).style.backgroundPosition =
    gbi(array_id[1]).style.backgroundPosition =
    gbi(array_id[2]).style.backgroundPosition =
    gbi(array_id[3]).style.backgroundPosition = bgstr;

    if (bloom_anim_counter++ >= 13)
    {
        ready = true;

        clearInterval(inter);
        inter = null;
        bloom_anim_counter = 0;
        direc = -direc;

    }
    else
    {
        ready = false;

        pos += (54 * direc);
    }
}

