/**
 * You must create the carousel after the page is loaded since it is
 * dependent on an HTML element (in this case 'mycarousel'.) See the
 * HTML code below.
 **/

var carousel; // for ease of debugging; globals generally not a good idea
var pageLoad = function() 
{
  carousel = new YAHOO.extension.Carousel("mycarousel", 
    {
      numVisible:        3,
      animationSpeed:    0.4,
      scrollInc:         1,
      navMargin:         32,
      prevElement:     "prev-arrow",
      nextElement:     "next-arrow",
      size:              5
    }
  );
};

YAHOO.util.Event.addListener(window, 'load', pageLoad);