As I observed back when this started to break, what we have here is a step backward to the global politics of the post-Boer War to WWI. The failure of the Bush Administration foreign policy was the belief that old fashioned sovereign power politics no longer mattered. Certainly the U.S. was correct that stateless terrorists and rogue states presented a threat. But the decision that it presented the only threat, or even the primary threat, was vastly mistaken. This error was compaunded by the insistence on treating Iran as a "rogue state" like N. korea rather than as a hostile regional power engaged in standard soveriegn power politics.
The next President will face the continuing problem of a shift away from U.S, lead hegemonic global policy to the emrgence of a good old fashioned arms race and Great Power games centered on the emerging Great Powers: Russia, India, China, and the strong regional blocks and also rans -- Iran, Brazil, Venezeula, possibly Indonesia and/or Phillipines. Even allied powers such as Brazil, Columbia and India will need to reevaluate their positions in light of demonstrated U.S. weakness.
Consider India. It borders several Great Powers and regional powers, in addition to having a constant state of hostilities with Pakistan. Pakistan has a high population, low economic development, and nuclear capabilities. It is the perfect proxy and magnet for Great Power mischief of the kind that used to get played in Serbia and China and Eastern Europe.
I think the situation is far worse if we elect McCain than Obama because we need a pragmatist willing to hear bad news and not another one of our "by jingo, no croaking, Britannia rules the waves, Hurrah!" administration that blusters and treats the military like some kind of indestructible toy. But either way, we are going to need someone flexble able to recognize the new reality of where power lies and what we need to do to protect our interests.