Overheating only with AC on and while idling? Could be fan, but I believe it could also be therm or the temp sensor on lower hose. There are a number of 'feeds' to tell therm to open. If yours was an aluminum housing therm, that makes it suspect.
I know the fan should come on for a few seconds when you turn on the AC, just so the car knows it works, but usually it will be off. I don't otherwise know how to test it.
You'd might have some codes stored that would help you diagnose this...find a local with code reader.
Performing at the Comedy Cove--595 Morris Ave. Springfield NJ reservations 973 376-3840
A recent set