Not sure about the longer legs, but assume that you probably want a medium frame - 18 or 19".
How to size your frame. Stand over your mountain bike with your feet about a foot apart. The frame should be about 2" - 4" clear of your family jewels. If the frame is too big you will bash your nads on the top bar.
Extend your saddle so that, with your heal on the peddle your leg is fully extended. This means that when riding on the balls of your feet your leg will be slightly bent. If your saddle is right down on its lowest point, or only two or three inches above, your frame is too big. You want the seat post to have about a foot in height so that it adds to the bike suspension by flexing. If, however, your leg is slightly bent and the seat post is beyond the safety markings on the tube, the frame is too small and you should look at the next size up.
Finally, lean over and grab the bars. If you feel too stretched and uncomfortable, then the bike style is probably wrong for you. Different manufacturers have different geometry. Try out a few until you find a comfortable set up.