ÿþS t r i n g . p r o t o t y p e . t r i m   =   f u n c t i o n   ( ) {   r e t u r n   t h i s . r e p l a c e ( / ^ \ s + | \ s + $ / g , " " ) ;   } ;  
  
 f u n c t i o n   H i d e H i n t ( )  
 {  
 	 i f   ( t y p e o f ( t r V e r i f y )   = =   ' u n d e f i n e d '   )  
 	 {  
 	 	 i f   ( t y p e o f ( t d N a m e )   ! =   ' u n d e f i n e d '   )                   t d N a m e . t i t l e   =   ' ' ;  
 	 	 i f   ( t y p e o f ( t d E M a i l )   ! =   ' u n d e f i n e d '   )                 t d E M a i l . t i t l e   =   ' ' ;  
 	 	 i f   ( t y p e o f ( t d E M a i l )   ! =   ' u n d e f i n e d '   )                 t d E M a i l . t i t l e   =   ' ' ;  
 	 	 i f   ( t y p e o f ( t d V e r s i o n )   ! =   ' u n d e f i n e d '   )             t d V e r s i o n . t i t l e   =   ' ' ;  
 	 	 i f   ( t y p e o f ( t d S e r i a l N o )   ! =   ' u n d e f i n e d '   )           t d S e r i a l N o . t i t l e   =   ' ' ;  
 	 	 i f   ( t y p e o f ( t d P a c k a g e I d )   ! =   ' u n d e f i n e d '   )         t d P a c k a g e I d . t i t l e   =   ' ' ;  
 	 	 i f   ( t y p e o f ( t d O r g a n i z a t i o n )   ! =   ' u n d e f i n e d '   )   t d O r g a n i z a t i o n . t i t l e   =   ' ' ;  
 	 }  
 }  
  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 v a r   L a n g N a m e   =   " F A " ;  
 v a r   L a n g O r g     =   " F A " ;  
 v a r   B a s e S t r i n g   =   '   ! " # $ % ¯) ( × + H- . / ðñòóôõö÷øù: ©, = . @ P0} IOID"÷ @/  /× N!MA { KR%~ ,˜†^ _ ~402Ì+(D'G*FE&/.-6B3A9157:8< | > Q' ;  
 f u n c t i o n   F a r s i K e y ( e , N a m e _ O r g )  
 {  
 	 v a r   k e y ;  
 	  
 	 i f   ( w i n d o w . e v e n t )  
 	 	 k e y   =   w i n d o w . e v e n t . k e y C o d e ;  
 	 e l s e   i f   ( e )  
 	 	 k e y   =   e . w h i c h ;  
    
 	 i f   ( (   k e y   >   3 1   & &   k e y   <   1 2 8 )   & &   (  
 	 	 (   L a n g N a m e   = =   " F A "   & &   N a m e _ O r g   = =   " N a m e "   ) | |  
 	 	 (   L a n g O r g     = =   " F A "   & &   N a m e _ O r g   = =   " O r g "   ) )  
 	       )  
 	 	 i f   ( w i n d o w . e v e n t )  
 	 	 	 w i n d o w . e v e n t . k e y C o d e   =   B a s e S t r i n g . c h a r C o d e A t ( k e y - 3 2 ) ;  
 	 	 e l s e   i f   ( e )  
 	 	 	 e . w h i c h   =   B a s e S t r i n g . c h a r C o d e A t ( k e y - 3 2 ) ;  
 	 	 	  
 	 r e t u r n   t r u e ;  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   C h a n g e L a n g ( e ,   N a m e _ O r g )  
 {  
 	 e   ?   e v t   =   e : e v t   =   w i n d o w . e v e n t ;  
  
 	 i f   (   e v t . k e y C o d e   = =   1 1 9   )      
 	 {  
 	 	 i f   (   N a m e _ O r g   = =   " N a m e "   )  
 	 	 	 L a n g N a m e     =   ( L a n g N a m e   = =   " F A " )   ?   " E N "   :   " F A " ;    
 	 	 e l s e  
 	 	 	 L a n g O r g       =   ( L a n g O r g   = =   " F A " )   ?   " E N "   :   " F A " ;   	 	  
 	 }  
 	 l b l L a n g N a m e . i n n e r H T M L   =   L a n g N a m e   ;  
 	 l b l L a n g O r g . i n n e r H T M L     =   L a n g O r g   ;  
 	 r e t u r n   t r u e ;  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   g e t A b s X ( e l t )  
 {  
 	 r e t u r n   ( e l t . x )   ?   e l t . x   :   g e t A b s P o s ( e l t , " L e f t " ) ;  
 }  
 f u n c t i o n   g e t A b s Y ( e l t )  
 {  
 	 r e t u r n   ( e l t . y )   ?   e l t . y   :   g e t A b s P o s ( e l t , " T o p " ) ;  
 }  
 f u n c t i o n   g e t A b s P o s ( e l t , w h i c h )  
 {  
 	 i P o s   =   0 ;  
 	 w h i l e   ( e l t   ! =   n u l l )  
 	 {  
 	 	 i P o s   + =   e l t [ " o f f s e t "   +   w h i c h ] ;  
 	 	 e l t   =   e l t . o f f s e t P a r e n t ;  
 	 }  
 	 r e t u r n   i P o s ;  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   N u m b e r K e y ( e )  
 {  
 	 v a r   k e y ;  
 	 l a y e r H i n t . s t y l e . v i s i b i l i t y   =   " h i d d e n "   ;  
 	 i f   ( w i n d o w . e v e n t )  
 	 	 k e y   =   w i n d o w . e v e n t . k e y C o d e ;  
 	 e l s e   i f   ( e )  
 	 	 k e y   =   e . w h i c h ;  
 	 i f   (   ! ( k e y   > =   4 8   & &   k e y   < =   5 7   | |   k e y   = =   3 2 ) )       	 	  
 	 {  
 	         i f   ( w i n d o w . e v e n t )  
 	 	         w i n d o w . e v e n t . k e y C o d e   =   0   ;  
 	         e l s e   i f   ( e )  
 	 	         e . w h i c h   =   0   ;          
                 v a r   p o s   =   G e t C u r s o r P o s i t i o n ( )   ;  
                 v a r   S e r i a l   =   d o c u m e n t . a l l [ " t x t S e r i a l N o " ]   ;  
 	 	 l a y e r H i n t . s t y l e . l e f t   =   g e t A b s X ( S e r i a l )   +   2   +   p o s * 8   +   ' p x ' ;  
 	 	 l a y e r H i n t . s t y l e . t o p     =   g e t A b s Y ( S e r i a l )   +   1 7   + ' p x ' ;  
 	 	 l a y e r H i n t . s t y l e . v i s i b i l i t y   =   " v i s i b l e "   ;  
         }  
 	 r e t u r n   t r u e ;  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   C o u n t e r K e y ( e , x , n )  
 {  
 	 v a r   k e y ;  
 	 i f   ( w i n d o w . e v e n t )  
 	 	 k e y   =   w i n d o w . e v e n t . k e y C o d e ;  
 	 e l s e   i f   ( e )  
 	 	 k e y   =   e . w h i c h ;  
 	 i f   (   k e y   = =   3 2   )  
 	 	 r e t u r n   f a l s e ;  
 	 	  
 	 v a r   p o s   =   G e t C u r s o r P o s i t i o n ( )   ;  
 	 i f   (   p o s   > =   n   )  
 	 {  
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( x ) . f o c u s ( ) ;  
 / / 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( x ) . s e l e c t ( ) ;  
 	 	 i f   (   x   = =   ' t x t O r g a n i z a t i o n '   )  
 	 	   	 r e t u r n   f a l s e ;  
 	 }  
   	 r e t u r n   t r u e ;  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   G e t C u r s o r P o s i t i o n ( )  
 {  
 	 v a r   o b j   =   d o c u m e n t . a c t i v e E l e m e n t   ;  
 	 v a r   c u r   =   d o c u m e n t . s e l e c t i o n . c r e a t e R a n g e ( )   ;  
 	 i f   ( o b j   & &   c u r )  
 	 {  
 	 	 v a r   t r   =   o b j . c r e a t e T e x t R a n g e ( )   ;  
 	 	 i f   ( t r )  
 	 	 {  
 	 	 	 f o r   (   v a r   p o s   =   0   ;   c u r . c o m p a r e E n d P o i n t s ( " S t a r t T o S t a r t " ,   t r )   >   0   ;   p o s + +   )  
 	 	 	 	 t r . m o v e S t a r t ( " c h a r a c t e r " ,   1 )   ;  
 	 	 	 r e t u r n   p o s   ;  
 	 	 }  
 	 }  
 	 r e t u r n   - 1   ;  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   C h e c k P a g e ( )  
 {  
         w i n d o w . e v e n t . r e t u r n V a l u e   =   f a l s e   ;            
         i f   (   d o c u m e n t . a l l [ " t x t S e r i a l N o " ] . v a l u e   ! =   " "   )  
         i f   (   d o c u m e n t . a l l [ " t x t P a c k a g e I d " ] . v a l u e   ! =   " "   )  
         i f   (   d o c u m e n t . a l l [ " t x t O r g a n i z a t i o n " ] . v a l u e   ! =   " "   )  
         i f   (   d o c u m e n t . a l l [ " t x t N a m e " ] . v a l u e   ! =   " "   )  
         i f   (   d o c u m e n t . a l l [ " t x t E M a i l " ] . v a l u e   ! =   " "   )  
                 w i n d o w . e v e n t . r e t u r n V a l u e   =   t r u e   ;  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   C o p y C l i p B o a r d ( )  
 {  
         w i n d o w . c l i p b o a r d D a t a . s e t D a t a ( " T e x t " , d o c u m e n t . a l l [ " t x t A c t i v a t i o n K e y " ] . v a l u e ) ;  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   C o p y C l i p B o a r d 3 ( )  
 {  
 	 s t r   =   d o c u m e n t . a l l [ " t x t A c t i v a t i o n K e y 4 " ] . v a l u e   +   d o c u m e n t . a l l [ " t x t A c t i v a t i o n K e y 3 " ] . v a l u e   +   d o c u m e n t . a l l [ " t x t A c t i v a t i o n K e y 2 " ] . v a l u e   +   d o c u m e n t . a l l [ " t x t A c t i v a t i o n K e y 1 " ] . v a l u e   ;  
         w i n d o w . c l i p b o a r d D a t a . s e t D a t a ( " T e x t " , s t r ) ;  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   P a s t e C l i p B o a r d ( )  
 {  
 	 v a r   s t r   =   w i n d o w . c l i p b o a r d D a t a . g e t D a t a ( " T e x t " ) ;  
 	 v a r   r e g   =   / [ a - z A - Z _ 0 - 9 % + @ & * = ] { 4 } / g ;  
 	 v a r   m a t c h e s   =   s t r . m a t c h ( r e g ) ;  
  
 	 i f   (   t y p e o f   ( m a t c h e s [ 0 ] )   ! =   " u n d e f i n e d "   ) 	 d o c u m e n t . a l l [ " t x t S e r i a l N o 1 " ] . v a l u e   =   m a t c h e s [ 0 ] ;  
 	 i f   (   t y p e o f   ( m a t c h e s [ 1 ] )   ! =   " u n d e f i n e d "   ) 	 d o c u m e n t . a l l [ " t x t S e r i a l N o 2 " ] . v a l u e   =   m a t c h e s [ 1 ] ;  
 	 i f   (   t y p e o f   ( m a t c h e s [ 2 ] )   ! =   " u n d e f i n e d "   ) 	 d o c u m e n t . a l l [ " t x t S e r i a l N o 3 " ] . v a l u e   =   m a t c h e s [ 2 ] ;  
 	 i f   (   t y p e o f   ( m a t c h e s [ 3 ] )   ! =   " u n d e f i n e d "   ) 	 d o c u m e n t . a l l [ " t x t S e r i a l N o 4 " ] . v a l u e   =   m a t c h e s [ 3 ] ;  
 	 e v e n t . r e t u r n V a l u e   =   f a l s e ;  
 }  
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 f u n c t i o n   C h a n g e T e x t ( x , n )  
 {  
 	 d o c u m e n t . g e t E l e m e n t B y I d ( x ) . v a l u e   =   d o c u m e n t . g e t E l e m e n t B y I d ( x ) . v a l u e . t o U p p e r C a s e ( ) . r e p l a c e ( / \ s * / g ,   " " ) . s u b s t r i n g ( 0 , n ) ;  
 }  
 
