Attenuated-total-reflection predictions to surface-plasmon resonance in a layered structure