var act_picture = [],
    g_id;

var gallery =
{
  show: function(gallery_id, act)
  {
    var carousel = new YAHOO.widget.Carousel(gallery_id, {
                        numVisible: 1
    });
    carousel.render(); // get ready for rendering the widget
    carousel.show();   // display the widget
    carousel.scrollTo(act, false);
  },
  tmpRegexp: function(resp_tmp)
  {
    var results = resp_tmp.match(/act_picture\['[0-9]+_[0-9]+'\]\s*=\s*[0-9]+/g);
    for (var r = 0; r < results.length; r++)
    {
      matches = results[r].match(/act_picture\['([0-9]+)_([0-9]+)'\]\s*=\s*([0-9]+)/);
      gallery.show('minigallery_' + matches[1] + '_' + matches[2], matches[3]);
    }
  }
}