Selfconsistent calculations of the electronic properties of simple metal surfaces