function scroll_right(id)
{
    // Detect IE6
    var ie6 = (!window.opera && window.ActiveXObject && !(window.XMLHttpRequest));
  
    // See how far we can move right
    var obj = $(id).find('.scroll_content');
    var max = obj[0].scrollWidth - obj[0].offsetWidth;
    if (max > 400)
        max = 400;

    // If we can move to the right at all, animate it
    if (max > 0)
    {
      // IE6's engine is too slow to change all thsee classes. Fortunately, it's also unable to
      // fails to display the tooltips, so we don't need to do the renaming anyway.
      if (!ie6){
        // Change the items' class to "_deactivated", so IE7 can disable the tooltips as the items
        // move. Once the animation is complete, change back to the normal class.
        var items = $('a.carousel_tooltip');
        items.attr('class', 'carousel_tooltip_deactivated');
        obj.animate(
          {scrollLeft : "+=" + max}, 
          1500, 
          "swing", 
          function() {
            items.attr('class', 'carousel_tooltip'); 
          }
        );
      }
      else
      {
        obj.animate({scrollLeft : "+=" + max}, 1500);
      }
    }
}

function scroll_left(id)
{
    // Detect IE6
    var ie6 = (!window.opera && window.ActiveXObject && !(window.XMLHttpRequest));
    
    // See how far we can move left
    var obj = $(id).find('.scroll_content');
    var max = obj[0].scrollLeft;
    if (max > 400)
        max = 400;

    // If we can move left at all, animate it.
    if (max > 0)
    {
      // IE6's engine is too slow to change all thsee classes. Fortunately, it's also unable to
      // fails to display the tooltips, so we don't need to do the renaming anyway.
      if (!ie6){
        // Change the items' class to "_deactivated", so IE7 can disable the tooltips as the items
        // move. Once the animation is complete, change back to the normal class.
        var items = $('a.carousel_tooltip');
        items.attr('class', 'carousel_tooltip_deactivated');
        obj.animate(
          {scrollLeft : "-=" + max}, 
          1500, 
          "swing", 
          function() {
            items.attr('class', 'carousel_tooltip'); 
          }
        );
      }
      else
      {
        obj.animate({scrollLeft : "-=" + max}, 1500);
      }
    }
}    