Nikon's Creative Lighting System
As far as I have heard the D40 does not support CLS, you'll need a SB800 to act as your commander
It supports CLS but the pop-up will not serve as a commander. The "600" will and is a much more sensible purchase for the D40.