Smoothing Functions and Smoothing Newton Method for Complementarity and Variational Inequality Problems