DEVICE=wlan0
BOOTPROTO=dhcp
ONBOOT=no
IWCONFIG="mode managed"
IWCONFIG="essid any"

NOTE: the IWCONFIG things above may have worked
at some time, but they certainly don't work now.
This probably came from bad documentation.  It is
likely the wifi connection worked because these
settings happen to be the defaults.

What should work is just specifying:

MODE=managed
ESSID=someessid