Input Mask for Phone fields

I wish to add Input Masking for phone fields in my site.

I can write the masking script that disallow non-numeric characters, place parenthesis and hyphens in right places (USA Format) etc.

But how/where do I hook it to all phone fields?

Please guide me to the place/files that should be modified.

Thank you