Remember, the cardinal rule of DSLRs is that "you don't buy a camera body, you buy into the lens family." Both Nikon and Canon both have excellent lenses and camera bodies. It is not advised to invest in two lens families; pick one.
I have the Nikon D50 (~$650 with kit lens), and I would have to say that it's your best bang-for-your buck. Plus, the fact that it works with my 30-year-old lenses, and just about every single Nikkor 35mm or DX lens ever made, is a huge plus for me. By that same token, do NOT get the D40. The D40 is a high-end consumer camera, because it does not have the aforementioned decades-spanning compatability with the Nikkor lens family, because it doesn't have an integrated focus motor (the focus motor must be in the lens, such as with 35mm -IF lenses or DX AF-S lenses). I consider the D50 to be prosumer (consumer price point, some professional features). My D50 setup, purchased off Amazon.com, totaled $1050 about two months ago, and included the following: 18-55mm kit lens, 55-200mm kit lens, 2GB Sandisk UltraII SD card, 2 UV filters, 1 circular polarizing filter, 1 equipment bag, and an extra battery.
For a mid-range to start you off, I would go with the Canon 400D (EOS Digital Rebel XTi; ~$1000 with kit lens). It's a fantastic camera.
To start at high-mid-range, I would get the Nikon D80 (~$1200 with kit lens). It's just about as high as the prosumer DSLRs go. Almost all of its features are directly off the D2Xs and the D200. The Canon EOS 30D is also in this price bracket.
For high-end, I would go with the Nikon D200 (~$1200 body only, ~$2000 with a good carry lens). It's essentially a D2Xs that's been shrunk a bit, and lost a few fringe features in the process.
Professional grade would be the Nikon D2Xs and the Canon EOS 1Ds MkII. These cameras cost ~$5000 for the body alone, and it's really a shame to put a kit lens on it once you get into this price bracket.