Ultraluminous infrared galaxies: Starburst vs. AGN