An interesting take from Strategy Page on Iranian President Imajihadi (or whatever his name is). Basically, the story says, Imajihadi is losing his grip on power in Iran over a number of idiotic statements and policy moves, and his only hope to regain power is to provoke the US into a war.
Such things have been done before. Unfortunately for him, a full-out war with the US wouldn't turn out so well, and his political future would be cut very short. The analysis does make some sense, but I think there are deeper, highly mystical, religious machinations at work.
In short, I don't think many of Imajihadi's actions are merely political maneuvering.