In reply to Tyler: Mountain bike sizing is as inconsistent as rockshoe sizing I'm afraid. Standover height, top tube lengths etc are not at all consistent between brands and sizes. Having said all that though....
If you're 5,9 then an 18 is almost certainly much too big if what you are after is a "chuckable" bike rather than a glorified road bike for sitting on and munching miles. I'd want plenty of space when "straddling" not just for maneuvering the bike, but for dabs and crashing...One that is nearly touching the lads is not right.
I would guess 16, 17 or "med" are your most likely sizes but it will vary from bike to bike. If you're trying to buy a fun bike, then which model you pick is pretty important too. If you buy a steeper head angled, higher cross country type frame it's just never going to fit and ride as a more aggressive bike would even if you do get the size right. It is also possible to go too small though, creating a cramped an uncomfy position when climbing.
Which bikes have you been looking at so far out of interest?