Multidimensional array lengths

How can I refer to the length of a array in a multidimensional array. This code does not work, but it is my pitiful attempt. I’m trying to get it so that the var galleryLength would equal the amount of values in each array inside the multidimensional array.


var galleries:Array = new Array(
new Array("1.jpg","2.jpg","3.jpg","4.jpg","5.jpg","6.jpg","7.jpg","8.jpg"),
new Array("1a.jpg","2a.jpg","3a.jpg"),
new Array("1b.jpg","2b.jpg","3b.png"),
new Array("1c.jpg","2c.jpg","3c.jpg")
);

var galleryLength = galleries[currentGalleryID].length;

//This value is increased to switch between the different arrays inside var galleries
var currentGalleryID:int=0;