Far infrared galaxies: star formation and AGN