Picture placement problem

I’m rewriting my XML image gallery right now to fit a site I’m doing, and I’m having problems displaying my images. The images place properly along the X axis, in 3 columns, but the pictures arn’t being placed properly on the Y axis (my rows). I know it’s something small and stupid preventing my images from placing on the Y axis, but I have no idea where I’m going wrong!! Everything else, including the loading of images works perfectly fine, but the placement just is not working for some reason. If anyone could take a look a this block of code I would be much appreciative! :hoser:

To help you out, there should be 2 rows of images (as defined by my XML file with 6 instances). Each row has 3 images in them. To figure out how many rows, I use Math.ceil, and round up the number that I get from that (total number of images/3) to provide me with how many rows I need.

function staticGallery(gallery_xml)
var galleryPictures = gallery_xml.firstChild.childNodes;
var thumb_count = 1;
numRows = Math.ceil(galleryPictures.length/3);

    for (var i = 0; i < galleryPictures.length; i++){
        var currPicture = galleryPictures*;
        for(var k = 0; k < 3; k++){
            for(var l = 0; l < numRows; l++){
            currThumb_mc = this.attachMovie("static_thumb","thumbs"+k+l,500+k);
            //currThumb_mc = this["thumbs"+k+l];
            currThumb_mc._x = 10 + (k * 110);
            currThumb_mc._y = 0 + (l * 85);