IDL code for fitting stellar population synthesis models to observed SEDs