Spidey07 is right on. The reason it's so easy to get taken advantage of buying a new car is because there's so many things happening at once. After doing a bit of research I bought a new car for my wife 5 months ago (Nissan Versa), and broke it down in the following manner:
Negotiate the sale price of the car.
For this you should go to edmunds, yahoo cars, etc and find the invoice price of the car and the invoice price of the extras that you want. You're rarely going to find a car that has exactly the options you want, it'll either be settle for less, or pay for more, but at least have an idea of what the extras cost so you don't start paying $1000 for floormats.
By the time you're done negotiating for the car, you should have a specific list in front of you that exactly details out what you're purchasing and what their specific cost is. It should be in the ballpark of the costs you gathered from Edmunds, etc (Bring a notepad or printout with your research). If not, argue, or find another dealer. If/when the dealership bugs you about financing, trade-ins, anything, tell them you just want to talk about the price of the car + options, and nothing else.
Once the price is settled on, move to either your trade in, or financing. People differ in how you should approach this, but personally I applied for financing before I stepped into the dealership. Captial One, or any other number of reputable online loan companies can usually get back to you within 24 hours with a specific rate and terms. (Let's say you get approved for $25,000 at 48/months at a 7.9% rate). Also, it's best to ask for enough to cover the full price of the car including tax & title, as will be explained in trade-ins.
At the dealership, you can now tell them that you already have financing at the rate you were approved for, but IF they can beat these terms, you'll gladly use their financing. If they start asking about how much a month you want to pay, or if you want 80 months of payments tell them you're done talking about financing and will be using your pre-arranged check. This allows YOU to control the transaction, and eliminates the hours (literally) of going back & forth between financing manager & sales person to "ask" for better rates. Either they beat it, or they don't, end of story.
The only downside to this approach is if you've gotten a response from the company you applied with, the dealership cannot get any better rate, so if you're going to use this approach only apply with one company. (For example the 7.9% with Cap one will be the best the dealer could offer as well with this company when they shop your loan around. Essentially you're "locked in" at this rate)
Lastly once the financing is complete, talk to them about your possible trade-in.
Before you go to the dealer, do some research on your specific car on kbb, autotrader, craigstlist, etc. Get a good baseline idea of what your car and it's options/mileage/condition is on the market for. If it's a high value such as you believe yours has, and you really think you can get that much because you researched it, you won't have to sweat when the dealer offers you $10k less because it's "not a popular color" or some other nonsense. Generally you're always going to get less than general market value (the dealer has to make profit too), just ask yourself if you're willing to put the time and effort into selling your car for the market value, or if you'd rather just be done with it for the less money. This is the part where if your trade-in winds up being worth more than everything you've purchased + extras/tax/etc, you'll be cut a check for the extra amount.
Anyhow this post is more than long enough, but this is the process I went through after several weeks of research and I was extremely satisifed that I was getting a good deal, and that the dealership was able to make money too, all in all with the total transaction taking a little under an hour and a half.