If I were in the Obama campaign, I'd seize on this. At the least, it makes for a good out of touch moment, plus it hurts him on foreign policy, his "strength". Maybe Obama could say something like:
"Senator John McCain got a little confused yesterday. He started talking about the Prime Minister of Spain, who he confused with a Latin American dictator. This is coming from a man who calls himself a foreign policy expert, and he can't even name the leader of one of our key allies? Come on, folks, if he can't even get his so-called strength of foreign policy right, how can you expect him to do a good job on the economy? And it's disturbing that, like our current president, McCain immediately reaches to threats and ultimatums as a default position on foreign policy. It's time to end the bullying ways of the Bush Administration and elect leaders who believe in tough-edged diplomacy, as Joe and I will do, if the people see fit to elect our ticket."
Not sure how much weight the public places on foreign policy gaffes--Bush had a million of them, remember--but I think this is worse than those. The perception of Bush was that he was an idiot, an interpretation borne out by time. Making a gaffe didn't change that perception. However, McCain is supposed to be a foreign policy expert. A rookie mistake like this could have legs, especially if the nets pick it up. And I really do think Obama will do well in the national security/foreign policy debate, so a mistake like this could soften up the ground for a bad debate performance and make people more willing to accept that McCain's old, doesn't know what he's talking about, etc.
Oh, yeah, and in 2000 we weren't at war. We are now.