In short: Obama won--big time.
Foreign policy was, by and large, a draw, with the two trading names and policies without noticeable slipups, and a considerable amount of agreement between the two (I think the McCain campaign's post-debate ad missed the point--the question about Obama isn't his leadership, so much as his judgment; the more he agrees with McCain, the less mileage McCain can get out of his main attacking point).
It was during the first part of the debate, devoted to economics, that Obama scored at the very least a solid points decision, if not an outright TKO.
Leaving aside the details of the debate, one thing came across very clearly. There was one, and only one, avenue of direct response in this debate: Obama to McCain.
Neither candidate gave anything even remotely resembling a direct answer to Jim Lehrer. McCain's responses to Obama were rambling, frequently changing the subject, almost always off the point--stump speech renditions, to be quite frank--and at times vying for a Golden Aikido award.
Obama's responses to McCain, by contrast, were direct, to the point, and covered what McCain had actually said. He had a full grasp of what McCain said, and sufficient command of the material to essentially control that portion of the debate.
McCain recovered later, to a degree--but for those critical opening minutes, Obama was fully and undisputedly in control. I expect him to get a big bump in the polls from this debate.