var PreloadedImages = InitGallery();

// TODO: Replace string const with php's $MyGalleryButton...
// TODO: Add image size parameters with php's getimagesize() 
//       called upon array_button_empty.gif
function InitGallery()
{
  var button_prefix = "arrow_button";

  var button_type   = new Array(
                                "_first",
                                "_prev",
                                "_stop",
                                "_next",
                                "_last"
                                );

  var button_state  = new Array(
                                "",
                                "_h",
                                "_p"
                                );

  var images = new Array;

  for (type = 0; type < button_type.length; type++)
  {
    for (state = 0; state < button_state.length; state++)
    {
      var img = new Image();

      img.src = button_prefix + button_type[type] + button_state[state] + ".gif";
      images.push(img);
    }
  }

  var img = new Image();

  img.src = button_prefix + "_empty.gif";
  images.push(img);

  return images;
}


