function autoScroller(contentDiv, itemClass, speed)
{
    contentDiv = "#"+contentDiv;
    itemClass = "."+itemClass;
    var itemPadding = 14;
    var scrollSpeed = (speed==null) ? 5 : parseInt(speed);
    // set contentDiv style
    $(contentDiv).css({position:'absolute',top:0});
        
    // double make sure the autoScroller-container has the correct css position and overflow property
    $(contentDiv).parent().css({position:'relative',overflow:'hidden'});
    var outerDivHeight = $(contentDiv).parent().height();
    
    // Build Array Of News Items
    var itemCount = 0;
    var items=new Array();    
    $(itemClass).each(function(index) {
        items[itemCount] = $(this);
        itemCount++;
    }); 

    var combinedHeight = 0;
    for (idx in items)
    {
        $(contentDiv).append("<div id='dynamicDiv" +idx+"'></div>")
        $('#dynamicDiv'+idx).html(items[idx])
        $('#dynamicDiv'+idx).css({position:'absolute',top:combinedHeight});
        combinedHeight += items[idx].height() + itemPadding;   
    }
    
    var idxFirstDiv = 0;
    var idxLastDiv = itemCount-1;
    $(contentDiv).everyTime(100, function(i){
        if (parseInt($('#dynamicDiv'+idxFirstDiv).css('top'))>(combinedHeight-outerDivHeight)*(-1))
        {
            // move scroller upwards        
            for (idx in items)
            {            
                offset = parseInt($('#dynamicDiv'+idx).css('top'))-scrollSpeed+"px";
                $('#dynamicDiv'+idx).css({'top':offset});
                if ((parseInt($('#dynamicDiv'+idx).css('top')) + items[idx].height())<20)
                {
                    items[idx].fadeOut("slow")
                }
            }
        }        
        else
        {     
            offset = outerDivHeight+"px";
            $('#dynamicDiv'+idxFirstDiv).css({'top':offset});
            items[idxFirstDiv].fadeIn("slow")            
            idxFirstDiv++;
            idxLastDiv++;
            if (idxFirstDiv > (itemCount-1))
            {
                idxFirstDiv=1;
            }
            if (idxLastDiv > (itemCount-1))
            {
                idxLastDiv=1;
            }            
        }
    });
    
    // on mouse over event, pause the scroller
    $(contentDiv).mouseover(function ()
    {
        speed = scrollSpeed;
        scrollSpeed = 0;       
    });
    
    // on mouse out event, start the scroller
    $(contentDiv).mouseout(function ()
    {
        scrollSpeed = speed;
    });
}