Electronic structure of mercury-based high-Tc compounds: HgBa2Can−1CunO2n+2 (n = 1,2,3)