Potential distribution and switching phenomena in discontinuous silver films