 f u n c t i o n   P a r s e U S N u m b e r ( P h o n e N u m b e r I n i t i a l S t r i n g )   { 
         v a r   F m t S t r = " " ; 
         v a r   i n d e x   =   0 ; 
         v a r   L i m i t C h e c k ; 
 
 	 i f   ( P h o n e N u m b e r I n i t i a l S t r i n g   = =   " " )   { 
 	 r e t u r n   F m t S t r ; 
 	 } 
         L i m i t C h e c k   =   P h o n e N u m b e r I n i t i a l S t r i n g . l e n g t h ; 
         w h i l e   ( i n d e x   ! =   L i m i t C h e c k ) 
             { 
                 i f   ( i s N a N ( p a r s e I n t ( P h o n e N u m b e r I n i t i a l S t r i n g . c h a r A t ( i n d e x ) ) ) ) 
                     {   } 
                 e l s e 
                     {   F m t S t r   =   F m t S t r   +   P h o n e N u m b e r I n i t i a l S t r i n g . c h a r A t ( i n d e x ) ;   } 
                 i n d e x   =   i n d e x   +   1 ; 
             } 
 
         i f   ( F m t S t r . l e n g t h   <   1 0 ) 
             { 
 	 a l e r t ( " W a i t !   Y o u   a r e   m i s s i n g   a   f e w   d i g i t s   i n   y o u r \ n p h o n e   n u m b e r .   P l e a s e   c h e c k   i t   a n d   t r y   a g a i n . \ n F o r m a t   u s i n g   U . S .   a r e a   c o d e   a n d   n u m b e r \ n \ n                         ( 5 5 5 )   5 5 5 - 5 5 5 5 " ) ;             } 
 
         i f   ( F m t S t r . l e n g t h   >   1 0 ) 
             { 
 	 a l e r t ( " W a i t !   Y o u   a r e   h a v e   e n t e r e d   t o o   m a n y   d i g i t s \ n i n   y o u r   p h o n e   n u m b e r .   P l e a s e   c h e c k   i t   a n d   t r y   a g a i n . \ n F o r m a t   u s i n g   U . S .   a r e a   c o d e   a n d   n u m b e r \ n \ n                         ( 5 5 5 )   5 5 5 - 5 5 5 5 " ) ;             } 
 
 
         i f   ( F m t S t r . l e n g t h   = =   1 0 ) 
             { 
                 F m t S t r   =   " ( "   +   F m t S t r . s u b s t r i n g ( 0 , 3 )   +   " )   "   +   F m t S t r . s u b s t r i n g ( 3 , 6 )   +   " - "   +   F m t S t r . s u b s t r i n g ( 6 , 1 0 ) ; 
             } 
         e l s e 
             { 
                 F m t S t r = P h o n e N u m b e r I n i t i a l S t r i n g ;         } 
         r e t u r n   F m t S t r ; 
     } 
