Juan Cole has the best analysis, as usual.
Despite all the hate erupting from Ahmadinejad's mouth, fortunately he is not in control of Iran's foreign policy and certainly has done little to assist the Palestinians so his support does not ring true - and they know it. It will be important for the US and the West in general not to over-react to Iranian pretensions of power coupled with Ahmadinejad's views. Israel needs to show restraint, and likely will refrain from any military action - which would need American assent in any case.
Ahmadinejad will not be there forever.