getFocus and getSelection

m looking for the code that clears an input text field once that text field has regained focus. For example, if I type Adobe Flash into an input text field, then move the mouse elsewhere (thereby losing focus for that text field), then put the I-beam cursor back into that same text field, what’s the code that would clear the text field one it regains focus?

Also, what would be the code that removes each letter from a text field in reverse? For instance, if [email protected] is in an input textfield, what would be the code to remove those characters/letters from the text field one by one, starting from the last character, one I move the mouse then put the I-beam cursor back into that text field?

Thanks for any assistance/fla.s