Weighted Splines Based on Piecewise Polynomial Weight Functiions