Switching effect in ferromagnetic metallic junctions