Cursor in text box

Is there a script that places the cursor in the text box. This way the user can just type in the text box? A good example of this is on Yahoo. When you open Yahoo.com It places you in the text search box. This way you can just type.
Does that make sense?