Phase diagram of the extended Ashkin-Teller model