Spin Hall effect and Spin filtering in ballistic nanojunctions