To anyone looking to buy a sailboat of any significant value, I'd suggest to restrain yourself for the first year or two. Buy something small like a Laser, Sunfish, Invitation, Spindrift, etc. Something that won't cost you more than $1000 and that you can keep in the driveway. Sail it for a season or two. Then, if you find that you're using frequently enough and it doesn't meet your needs for sailing with family / friends / whatever, start looking for a new boat.
Decide what you'd like to do with your new boat. Daysailing? Overnight / weekend cruising? Racing? Who with? What kind of water do you sail on? With a list of requirements, start looking around. At first, look at any boat you can find. This includes the 40-footers at boat shows -- you'll see features in them that you might not see on smaller boats, or that will give you ideas on how to customize the boat you'll eventually find.
Take a friend along whenever you can, and take a camera. I used a Kodak disposable camera -- most of the photos on my webpage are taken with it, and they turned out remarkably good. This will give you something to refer to when discussing boats with your friend / spouse afterwards.
Also make a point of checking forsale listings on the Internet. There are a plethora of boats listed online, and this can give you a very good idea of what selling prices are like for boats in your category. As you narrow your search, it's also a good idea to subscribe to the mailing list for several models of boats on your short list, just to see what current owners are talking about. For example, both the Catalina 22 and Tanzer 22 have active mailing lists.
Once you've narrowed your search to one model of boat, then the fun begins -- anything within 3 hours' drive of your house should be strongly considered as a potential purchase. I've driven through most of Southwestern Ontario looking at Tanzers. If at all possible, get the seller to take you out on a test sail. This gives you a first-hand experience of how the boat handles.
To give you an idea of what to look for when inspecting a boat, I've included an HTML version of my shopping checklist, which covers all the major stuff to look for on a sailboat.
In the worst-case scenario, your surveyor will tell you that the boat is a literal hole in the water to pour money into, and will recommend that you not purchase it. If that happens, you've spent about $300, but saved yourself somewhere between $5000 and $10000 by the time you add up purchase, storage, repairs, etc. In the best-case scenario, the surveyor tells you the boat is in awesome shape, and you get a warm fuzzy feeling about what great shape your new boat is in!
I'm not going to type in my entire 10-page survey report, but here's a list of the areas that my survey covered:
To find a marine surveyor in your area, look at the roster of the Society of Accredited Marine Surveyors.