function fmtph(formOb)
{
re = /\D/g; // remove any characters that are not numbers
phnum=formOb.value.replace(re,"")
phlen=phnum.length
if(phlen>3&&phlen<7)
{
pha=phnum.slice(0,3)
phb=phnum.slice(3,6)
formOb.value=pha+"-"+phb
}
else
{
if(phlen>6)
{
pha=phnum.slice(0,3)
phb=phnum.slice(3,6)
phc=phnum.slice(6,10)
formOb.value=pha+"-"+phb+"-"+phc
}
else
{formOb.value=phnum}
}
}
