Well, the very first 5 units I made I used the LM317 cause I didnt know better.
I made a diagram, long time ago, which I was trying to find for you. Found it, So here it is.

Also, for the pins. Its standard, usually.
You will need to check the datasheet. I have encountered 2 types of LM317 where 1 has Vin GND Vout, and the other is Vout gnd Vin. When looking at the flat side.
Heres some VERY useful links for the LM317.
http://www.qsl.net/ok1duo/lm317.htm <- Schematic + Resistor value calculator for it.
http://casemods.poin...rn.org/vregtut/ - A tut on how to build a Vreg for fans, using the LM317
http://members.aol.c...aysaver/p3.html - For some playstation hacking thingy, but they use the LM317. Middle of the page has some 5 pictures of the variouse chips, and the pin outs. (Theres the LM317LZ, LM317T) LZ is the more common, lower voltage version.
Well have fun with your project.