VRamone 0 Newbie Poster

Hi,i´m having a terrible time to discover how can i create masks to some field.
Like for example,i would like that when someone fills a phone field,would appear (00)xxxx-xxxx, and such.
I already tried to make a javascript function,but it seems that it doesnt work with EXT,because the field is a <ext:numberfield> and somehow the function doesn´t get the id from the field.I tried also some coolite plugin and didn´t work also, and also a tag called <rich> that seemed easy but somehow it´s not supported.
Any ideas? thanks!