Interactive map having problems with boxes exceeding boundries PLEASE HELP

I posted a few days ago but still havent got it working.(thnks to graylensman for the help though)

I made an interactive map using the hover captions tutorial. But my problem is the caption boxes on the edge of the map exceed the stage so you cant see them.

How do you keep this from happening?

if you would like to see the map its at www.terraproperties.net/plotmap.html
this is the code i have which i only slightly modified from the tutorial.

captionFN = function (showCaption, captionText, captionText2, captionText3, captionText4, captionText5, captionText6, bName) {
if (showCaption) {
_root.createEmptyMovieClip(“hoverCaption”, this.getNextHighestDepth());
cap.desc.text = captionText;
cap.desc2.text = captionText2;
cap.desc3.text = captionText3;
cap.desc4.text = captionText4;
cap.desc5.text = captionText5;
cap.desc6.text = captionText6;
cap._width = 191
cap._alpha = 98;
//
if(cap._x+cap._width>Stage.width){
cap._x=Stage.width-cap._width;
} else {
xo = -90;
yo = -157;
}
hoverCaption.onEnterFrame = function() {
cap._x = _root._xmouse+xo;
cap._y = _root._ymouse+yo;
cap._visible = true;
};
} else {
delete hoverCaption.onEnterFrame;
cap._visible = false;
}
};

[URL=“http://www.terraproperties.net/plotmap.html”]