Dielectric function and plasma resonances of small metal particles