That's almost identical to the problem we have with a similar 2006 iMac where I work...

I remember when we first discovered it, it was reported all over these forums (this was quite a while ago!) and it turned out that a bunch of iMac's all produced within a range of weeks (similar serial no's) were coming up with this problem, all around the same time and after the warranty. Apple would not replace/repair without charging a large fee which was not worth it (despite the fact it appears to be a common fault which would have always been present but took time to show). I seem to remember Apple said you'd need to replace the 'mainboard' or in other words, motherboard - despite the fact external displays are absolutely fine so it's obviously an issue specific to the display.

In the end we have bought a new monitor and hooked it up to the iMac - far cheaper, acceptable result.

MacRumors attracts a broad audience
of both consumers and professionals interested in
the latest technologies and products. We also boast an active community focused on
purchasing decisions and technical aspects of the iPhone, iPod, iPad, and Mac platforms.