blotunga: Good that you don't need a visa to enter the US. A friend of mine wanted to travel to New Zealand, and he didn't knew that he needs a visa for Australia in order to change the plane in Australia (same airport). And since he didn't had an Australian visa, he had to turn back all the way. So customs and immigration policies suck wherever you go, especially if you're from some backwater country and not from the ruling elite...
Normally, if you're not leaving the airport, they'll process you through customs, then send you to your plane. That's what happened when I transferred in South Korea on my way home. There's an international treaty that covers that.
However, when it comes to taking a plane out of a different airport, then countries have the right to require a visa. Although, I think it's usually granted on arrival in cases like that.