Tight-binding calculations of the band structure and total energies of the various phases of magnesium