
function growFrom (id, direction)
{
    if (!direction) direction = 'center';
    Effect.Grow(id, {direction: direction});
}

function shrinkFrom (id, direction)
{
    if (!direction) direction = 'center';
    Effect.Shrink(id, {direction: direction});
}

function moveToCenter (el)
{
    el = $(el);

    var w = window;
    var wwidth  = w.innerWidth  || (w.document.documentElement.clientWidth  || w.document.body.clientWidth);
    var wheight = w.innerHeight || (w.document.documentElement.clientHeight || w.document.body.clientHeight);

    var top  = (wwidth  - el.getWidth())  / 2;
    var left = (wheight - el.getHeight()) / 2;

    top  = top  + 'px';
    left = left + 'px';
    el.setStyle({top: top, left: left});
}


