i recently sold my D1H, and even though its only 2.74mp its image quality was as good as any nikon ive owned (D50, D2H, D40X) - far less noise then my current D2H.
They may be old, and unless you want to make big prints or do a lot of cropping, its as good as many current models for image quality.
the only bad thing about them is the lcd quality, pictures always look too bright or dark when in fact they are just right, and you can't zoom in much either, the size and weight - d40s are like an ipod shuffle in comparison.
It has a few advantages over a D40; 5 AF points, a tiny bit faster 3fps over 2.5fps, sync and remote ports, less going into the menu to change settings, a proper prism so the viewfinder is brighter, vertical mode, and although it doesn't support iTTL flash modes, I used my SB800 on it flawlessly, plus its made like a tank.
if they haven't got a decent priced D50 or D70 get it.
Bye