Theory for the Transition from Van Der Waals to Covalent to Metallic Mercury Clusters