Mountain Bike Headsets

Mountain Bike Sizing, help!?
I am looking into buying a new mountain bike and spotted a deal for a secondhand bike. The frame measures 18 inch from the centre of the bottom bracket to the top of the seatpost tube and the top tube measures 22 inch from the centre of the headset to the centre of the seatpost down tube. i dont really understand this i am six foot (183 cm) would this bike fit me alright.
any help would be much appreciated
The size one rides is based on inseam not height. However you may find an 18″ frame just right. If you ride tight tech. trails a slightly smaller frame will work better when the trails get tight. Get sized to make sure you get the proper frame or find someone with a bike with the same frame size and try it out.
Cycling Maintenance for Mountain Bikes : Overview on Headset System on Mountain Bikes

