Dynamic Placement Of Images

In the code below, I am loading in multiple images from based on an xml file. I am looking for a way to dynamically place the images depending on how many results are brought back. I have the starting points for the first image in each section in the code, I am trying to basically add about 40 pixels to those numbers for each image. Can anyone help me with this.


var xml = new XML();
xml.ignoreWhite = true;
Root = this
overText._visible = false;
xml.onLoad = function(success){
    if(success){
    NumOfCloth = this.firstChild.childNodes.length;
        
    for (i=0; i<NumOfCloth; i++) {
    Top = this.firstChild.childNodes*.childNodes[0].firstChild.nodeValue;
    Catagory = this.firstChild.childNodes*.childNodes[2].firstChild.nodeValue;    

if(Catagory == "Woolrich Upholstery Wool"){    
var clip = Root.attachMovie(Top+"Btn", Top, Root.getNextHighestDepth());
clip.ivar = Top;
clip._x = "104"
clip._y = "133"
//clip.onRelease = detailed
//clip.onRollOver = quickOver
//clip.onRollOut = quickOut

}else if(Catagory == "Pre-Washed Denim"){    
var clip =Root.attachMovie(Top+"Btn", Top, Root.getNextHighestDepth());
clip.ivar = Top;
clip._x = "104"
clip._y = "217"
//clip.onRelease = detailed
//clip.onRollOver = quickOver
//clip.onRollOut = quickOut

}else if(Catagory == "10 oz. Dry-Finish, Waxed-Cotton Canvas"){    
var clip =Root.attachMovie(Top+"Btn", Top, i);
clip.ivar = Top;
clip._x = "105"
clip._y = "299"
//clip.onRelease = detailed
//clip.onRollOver = quickOver
//clip.onRollOut = quickOut

}else if(Catagory == "10 oz. Berber Fleece"){    
var clip =Root.attachMovie(Top+"Btn", Top, i);
clip.ivar = Top;
clip._x = "105"
clip._y = "384"
//clip.onRelease = detailed
//clip.onRollOver = quickOver
//clip.onRollOut = quickOut
}else if(Catagory == "10 oz. Heavyweight Cotton Duck Canvas"){    
var clip =Root.attachMovie(Top+"Btn", Top, i);
clip.ivar = Top;
clip._x = "105"
clip._y = "468"
//clip.onRelease = detailed
//clip.onRollOver = quickOver
//clip.onRollOut = quickOut
}else if(Catagory == "8 oz. Cotton Twill"){    
var clip =Root.attachMovie(Top+"Btn", Top, i);
clip.ivar = Top;
clip._x = "105"
clip._y = "552"
//clip.onRelease = detailed
//clip.onRollOver = quickOver
//clip.onRollOut = quickOut
}
}
    }else{
        trace("Error");
    }
};
xml.load(XML File);