var object,interval,speed,max_top,cont_height,top;

$(function() {
    object = $(".system_messages");
    interval = 50;
    speed = 1;
    max_top = object.height() * (-1);
    cont_height = object.parent().height();
    top = cont_height;
    
    var scroll_int = window.setInterval("scroll()",interval);
    
})


function scroll() {
    top -= speed;
    top = Math.max(top,max_top);
    if (top == max_top)
        top = cont_height;

    object.css({'top':top});
}


