<%
Private Function MkPhoneNum(byVal number)
Dim tmp
number = CStr( number )
number = Trim( number )
number = Replace( number, " ", "" )
number = Replace( number, "-", "" )
number = Replace( number, "(", "" )
number = Replace( number, ")", "" )
Select Case Len( number )
Case 7
tmp = tmp & Mid( number, 1, 3 ) & "-"
tmp = tmp & Mid( number, 4, 4 )
Case 10
tmp = tmp & "(" & Mid( number, 1, 3 ) & ") "
tmp = tmp & Mid( number, 4, 3 ) & "-"
tmp = tmp & Mid( number, 7, 4 )
Case 11
tmp = tmp & Mid( number, 1, 1 ) & " "
tmp = tmp & "(" & Mid( number, 2, 3 ) & ") "
tmp = tmp & Mid( number, 5, 3 ) & "-"
tmp = tmp & Mid( number, 8, 4 )
Case Else
MkPhoneNum = Null
Exit Function
End Select
MkPhoneNum = tmp
End Function
%>