var isIE    = !!(navigator.userAgent.toLowerCase().indexOf('msie') >= 0 && document.all);
var isOpera = !!(window.opera && document.getElementById);
var isMoz   = (!isIE && !isOpera);
var ini_top;
var zIndex = 50;

function uprise(id)
{
    id = '#' + id;

    if ($(id).css('position') != 'absolute')
    {
        $(id).css('position', 'absolute');
        $(id).css('left', 0);
        $(id).css('top', $('.osn').get(0).offsetHeight + 2 + 'px');
        ini_top = $('.osn').get(0).offsetHeight + 2;
    }

    if (parseInt($(id).css('height')) > 1)
    {
        new_height = 1;
        new_top = ini_top;
    }
    else
    {
        $(id).css('z-index', ++zIndex);
        new_height = $(id + ' > .content').get(0).offsetHeight;
        if (!isMoz) new_height += 35;
        new_top = parseInt($(id).css('top')) - new_height;
    }

    $(id).animate
    (
        {height: new_height + 'px', top: new_top + 'px'},
        1000
    );

}

function down(id)
{
    id = '#' + id;
    $(id).animate
    (
        {height: '1px', top: ini_top + 'px'},
        1000
    );
}
