Electronic confinement of silver nanoclusters in Er3+-activated silicate and phosphate glasses