Help needed with AS2 snippet for vertical thumbnails

Hi all, this is actually my first post and was hoping someone might be able to assist me with a problem im having.

[SIZE=“2”]function setupTPS():void{
if(numberOfImages < 11){
//Panel Dimensions
panelVisibleX = Math.floor(StageHeight - 65 - bottomMargin);
panelVisibleY = Math.floor(StageWidth/2 - (73numberOfImages/2));
panelW = 75;
panelH = (73
numberOfImages/2);
}
else{
//Panel Dimensions
panelVisibleX = Math.floor(StageHeight - 65 - bottomMargin);
panelVisibleY = Math.floor(StageWidth/2 - 800/2);
panelW = 75;
panelH = 800;
}
//THUMBNAIL SCROLLING PANEL
TPS.x = panelVisibleX;
TPS.y = panelVisibleY;
TPS.graphics.clear();
TPS.graphics.beginFill(0x000000,0);
TPS.graphics.drawRect(0, 0, panelW, panelH);
TPS.graphics.endFill();
//THUMBNAIL PANEL MASK
thumbMask.x = panelVisibleX;
thumbMask.y = panelVisibleY;
thumbMask.graphics.clear();
thumbMask.graphics.beginFill(0x000000,1);
thumbMask.graphics.drawRect(0, 0, panelW, panelH);
thumbMask.graphics.endFill();
//THUMBNAIL PANEL MASK BORDER
thumbMask_border.x = panelVisibleX - 2;
thumbMask_border.y = panelVisibleY - 2;
thumbMask_border.width = panelW + 4;
thumbMask_border.height = panelH + 4;
//Tween up
if(firstLoad){
getThumbnail();
firstLoad = false;
}
}[/SIZE]

this is a snippet from my code for the gallery within my site, this is the part that creates the thumbnail panel that scrolls, im quite confused with he code. im trying to make it vertical but every time i try and alter or edit the code nothing works.

hope someone can help, please let me know if you need anything more.

toby