Contour Surface Function

This function will plot a surface with contours, and flatten the contours to a horizontal plane.

surfaceContours[function_,xRange_,yRange_,zRange_,base_,nContours_]:=Module[{contourList,surfacePlot,contourPlot},

surfacePlot=ContourPlot3D[function==z,xRange,yRange,zRange,ContourStyle->Opacity[.8],PlotPoints->40,MeshStyle->{{RGBColor[1,.2,0],Thickness[.004]}},Mesh->{0,0,nContours}];

contourPlot=ContourPlot3D[function==z,xRange,yRange,zRange,ContourStyle->{RGBColor[0,.8,.8],Opacity[0.9]},PlotPoints->40,MeshStyle->{{RGBColor[0,0,0],Thickness[.002]}},Mesh->{0,0,nContours},Lighting->{{"Ambient", Cyan}}];

contourPlot[[1,1]]={#1,#2,base}&@@@contourPlot[[1,1]];

Show[{surfacePlot,contourPlot},PlotRange->{Min[{base,zRange[[2]]}],zRange[[3]]}]
]

Example:  f(x,y)=3+(x^2)+x y-((y^3)/3)-2x

surfaceContours[3+(x^2)+x y-((y^3)/2)-2x,{x,-3,4},{y,-3,3},{z,0,6},0,10]