voltage divider and transistor switch

components:
1) B1: 9 volt battery
2) LED1: light emitting diode
3) R1: 100 ohm resistor
4) R2: 10k ohm resistor
5) R3: 100k potentiometer
5b) R3: 1k-20k photoresistor
6) T1: NPN transistor
notes:
1) Use the center lead of the pot and one of the two outer leads. Resistance
through the two outer leads is the total resistance of the potentiometer and
doesn't change.
2) Replace pot in r3 with a photoresistor to make a dark detector.
3) Transistor must be hooked up correctly to work!