Format Phone and Mobile

I made this one for phone and cell. The formatted number only appears after I move to the next textbox. I wanted that when typing the number it would be formatted or that when receiving the focus the formatting would appear.

Plz have a look this extension. Hope this extension will help you.