< ! D O C T Y P E   h t m l   P U B L I C   " - / / W 3 C / / D T D   X H T M L   1 . 0   T r a n s i t i o n a l / / E N "   " h t t p : / / w w w . w 3 . o r g / T R / x h t m l 1 / D T D / x h t m l 1 - t r a n s i t i o n a l . d t d " > 
 
 < ! - -   s a v e d   f r o m   u r l = ( 0 0 1 6 ) h t t p : / / l o c a l h o s t   - - > 
 
 < h t m l   x m l n s = " h t t p : / / w w w . w 3 . o r g / 1 9 9 9 / x h t m l "   o n c l i c k = " c l e a r S e a r c h ( ) " > 
 
 < h e a d > 
 
         < h t a : a p p l i c a t i o n   i d = " U D C _ A p p "   a p p l i c a t i o n n a m e = " H P P r i n t e r A s s i s t a n t "   w i n d o w s t a t e = " n o r m a l " 
 
                 b o r d e r = " t h i c k "   c a p t i o n = " y e s "   m a x i m i z e b u t t o n = " y e s "   m i n i m i z e b u t t o n = " y e s "   s h o w i n t a s k b a r = " y e s " 
 
                 i n n e r b o r d e r = " n o "   n a v i g a b l e = " n o "   s c r o l l = " n o "   s c r o l l f l a t = " y e s "   s i n g l e i n s t a n c e = " n o " 
 
                 s y s m e n u = " y e s "   c o n t e x t m e n u = " n o "   s e l e c t i o n = " y e s "   v e r s i o n = " 1 . 0 "   i c o n = " . / U D C _ f i l e s / i m g / h p l o g o . i c o "   / > 
 
         < t i t l e > H P   P r i n t e r   A s s i s t a n t < / t i t l e > 
 
         < l i n k   i d = " d e f a u l t _ c s s "   h r e f = " . / U D C _ f i l e s / U D C . c s s "   r e l = " s t y l e s h e e t "   t y p e = " t e x t / c s s "   / > 
 
         < s c r i p t   t y p e = " t e x t / j a v a s c r i p t " > 
 
 
 
                 / /   g l o b a l s 
 
                 v a r   b _ h t m l _ f i l e ;   / /   u s e d   t o   s h a r e   t h e   f i l e   b e t w e e n   h t a   a n d   h t m l   f o r m a t s 
 
                 v a r   l o c a l i z e _ o b j ,   U D C m a i n _ o b j ,   t a s k s _ o b j ,   i n s t a l l _ o b j ,   d e v i c e _ o b j ,   i n k _ o b j ,   u r l _ o b j ;   / /   j s o n   l o a d e d   o b j e c t s 
 
                 v a r   c o n t e n t _ f o l d e r ;   / /   l o c a t i o n   o f   i n s t a l l   a n d   d e v i c e   f i l e 
 
                 v a r   b _ i e 6 ;   / /   t r u e   i f   t h e   b r o w s e r   i s   i e 6 
 
 
 
                 v a r   t a s k _ a v a i l _ a r r a y ;   / / s t a t e   o f   d i s a b l e / e n a b l e d   t o p   l e v e l   t a s k s 
 
                 v a r   t a s k _ i m a g e _ a r r a y ;   / / 2 D   a r r a y   o f   i m a g e s   f o r   t h e   t o p   l e v e l   t a s k s   
 
                 v a r   t a s k _ n u m b e r ;   / / n u m b e r   o f   h i g h e r   l e v e l   t a s k s 
 
 
 
                 v a r   c u r _ s e l e c t i o n ,   p r e _ s e a r c h _ s e l e c t i o n ,   b l o c a l _ s e a r c h ,   b d r o p _ s h o w n ,   b s e a r c h _ l o c k ;   / /   s t a t e   v a r i a b l e s 
 
                 v a r   c u r _ s u b _ t a s k _ s e l e c t i o n ; 
 
                 v a r   d e v i c e _ n a m e ;   / / s t r i n g   o n   d e v i c e   n a m e 
 
                 v a r   b _ f i l e s _ f o u n d ,   b _ p a g e _ e r r o r _ m e s s a g e ;   / /   e r r o r   s t a t e   i f   a   f i l e   c a n ' t   b e   f o u n d 
 
                 v a r   b _ x m l _ l o a d e d ;   / /   e r r o r   s t a t e   i f   t h e   x m l   f i l e s   w i t h   t h e   h e l p   d a t a   f a i l s   t o   l o a d 
 
                 v a r   p r o g r a m _ s u b _ a r r a y ;   / /   l i s t   o f   s t r i n g s   t o   s u b s t i t u t e   i n   e x e c u t e d   p r o g r a m s 
 
                 v a r   d i v _ b a c k g r o u n d ;   / /   b a c k g r o u n d   g r a p h i c   f o r   t h e   t a b   s e c t i o n 
 
                 v a r   i n k _ t a s k ;   / /   j s o n   e l e m e n t   f o r   t h e   t a b   l e v e l   i n k   d i s p a l y 
 
                 v a r   l o g _ f i l e n a m e ;   / /   n a m e   o f   t h e   l o g   f i l e 
 
                 v a r   b _ r t l ;   / / w h e t h e r   o r   n o t   t h e   l o c a l i z e d   l a n g u a g e   i s   r i g h t   t o   l e f t 
 
                 v a r   b _ l a r g e _ t e x t ;   / /   w h e t h e r   t h e   u s e r   i s   u s i n g   l a r g e   t e x t   s e t t i n g s 
 
                 v a r   p r o g r a m _ f o l d e r ;   / / p a t h   c o n t a i n i n g   t h e   e x e c u t a b l e   ( s u b s t i t u e   f o r   r e l a t i v e   p a t h s ) 
 
                 v a r   x m l _ s e a r c h _ a r r a y ;   / /   s e a r c h a b l e   i t e m s   f r o m   T O C . x m l 
 
 
 
                 v a r   b _ l o g _ s t a r t ,   b _ l o g _ v a l i d ;   / /   l o g g i n g   s t a t e   v a r i a b l e s 
 
                 v a r   b _ f i l e s _ l o g g e d ;   / / t r u e   i f   t h e   d y n a m i c   f i l e s   h a v e   b e e n   c o p i e d   i n t o   t h e   l o g 
 
                 v a r   a c t i v e _ d e v i c e _ c a t e g o r y _ c o u n t ;   / / t h e   n u m b e r   o f   a c t i v e   d e v i c e   c a t e g o r i e s   
 
 	 	 
 
 	 	 v a r   c u r _ t a b _ n a m e   =   " " ;   / /   t h e   c u r r e n t   t a b   u s e r   i s   n a v i g a t i n g 
 
                 
 
                 / /   d e b u g g e r ;   / / u s e   t h i s   t o   d e b u g   s c r i p t s   a n d   r e m e m b e r   t o   t u r n   o n   a l l o w   s c r i p t   d e b u g g i n g   i n   i e   s e t t i n g s 
 
                 / /   a d d s   a   m e s s a g e   t o   t h e   l o g ,   s t a r t s   a   n e w   l o g   i f   n e e d e d 
 
                 f u n c t i o n   a d d L o g M e s s a g e ( m e s s a g e )   { 
 
                         / /   c h e c k   i f   r e g i s t r y   t o   s e e   i f   a   l o g   s h o u l d   b e   w r i t t e n 
 
                         i f ( b _ l o g _ v a l i d   = =   n u l l ) 
 
                                 b _ l o g _ v a l i d   =   c h e c k L o g R e g ( ) ; 
 
 
 
                         i f ( b _ l o g _ v a l i d   = =   f a l s e ) 
 
                                 r e t u r n ; 
 
                                 
 
                         v a r   s y s t e m _ o b j ,   h a n d l e ; 
 
                         i f   ( ! b _ l o g _ s t a r t )   { 
 
                                 / / s t a r t   a   n e w   l o g   f i l e ,   ( c u r r e n t   d a t e / t i m e   g o e s   i n   t h e   f i l e   n a m e ) 
 
                                 v a r   d   =   n e w   D a t e ( ) ; 
 
                                 l o g _ f i l e n a m e   =   c o n t e n t _ f o l d e r   +   " / U D C _ L o g f i l e _ "   +   d . g e t F u l l Y e a r ( )   +   " _ "   +   d . g e t M o n t h ( )   +   " _ "   +   d . g e t D a t e ( )   +   " _ "   +   d . g e t H o u r s ( )   +   " _ "   +   d . g e t M i n u t e s ( )   +   " _ "   +   d . g e t S e c o n d s ( )   +   " . t x t " ; 
 
 
 
                                 / /   c r e a t e / o p e n   t h e   f i l e 
 
                                 s y s t e m _ o b j   =   n e w   A c t i v e X O b j e c t ( " S c r i p t i n g . F i l e S y s t e m O b j e c t " ) ; 
 
                                 t r y   { 
 
                                         h a n d l e   =   s y s t e m _ o b j . O p e n T e x t F i l e ( l o g _ f i l e n a m e ,   2 ,   t r u e ,   t r u e ) ; 
 
                                 } 
 
                                 c a t c h   ( e r r )   { 
 
                                         r e t u r n ; 
 
                                 } 
 
 
 
                                 / /   w r i t e   t h e   m e s s a g e 
 
                                 h a n d l e . W r i t e L i n e ( " L o g   o p e n e d : "   +   D a t e ( ) ) ; 
 
                                 b _ l o g _ s t a r t   =   t r u e ; 
 
                         } 
 
                         e l s e   { 
 
                                 / /   o p e n   t h e   o l d   l o g 
 
                                 s y s t e m _ o b j   =   n e w   A c t i v e X O b j e c t ( " S c r i p t i n g . F i l e S y s t e m O b j e c t " ) ; 
 
                                 t r y   { 
 
                                         h a n d l e   =   s y s t e m _ o b j . O p e n T e x t F i l e ( l o g _ f i l e n a m e ,   8 ,   f a l s e ,   t r u e ) ; 
 
                                 } 
 
                                 c a t c h   ( e r r )   { 
 
                                         r e t u r n ; 
 
                                 } 
 
                         } 
 
 
 
                         / /   a d d   t h e   m e s s a g e   t o   t h e   e x i s t i n g   l o g 
 
                         h a n d l e . W r i t e L i n e ( m e s s a g e ) ; 
 
                         h a n d l e . C l o s e ( ) ; 
 
                 } 
 
 
 
                 / /   c h e c k s   t h e   r e g i s t r y   e n t r y   " H K C U \ \ S o f t w a r e \ \ H P \ \ N G \ \ L o g g i n g   "   t o   s e e   i f   a   l o g   s h o u l d   b e   k e p t 
 
                 f u n c t i o n   c h e c k L o g R e g ( ) 
 
                 { 
 
                         v a r   o b j S h e l l   =   n e w   A c t i v e X O b j e c t ( " W S c r i p t . S h e l l " ) ; 
 
                         v a r   b _ r e s u l t ; 
 
                         t r y   { 
 
                                 v a r   r e g v a l   =   o b j S h e l l . R e g R e a d ( " H K E Y _ C U R R E N T _ U S E R \ \ S o f t w a r e \ \ H P \ \ N G \ \ L o g g i n g \ \ L o g C a t e g o r i e s " ) ; 
 
                                 / / t r u e   i f   t h e   e n t r y   e x i s t s   a n d   h a s   a   n o n - z e r o   v a l u e 
 
                                 b _ r e s u l t   =   ! ( r e g v a l   = =   0 ) ; 
 
                         } 
 
                         c a t c h   ( e )   { 
 
                                 / /   r e g i s t r y   e n t r y   n o t   f o u n d 
 
                                 b _ r e s u l t   =   f a l s e ; 
 
                         } 
 
                         r e t u r n   b _ r e s u l t ; 
 
                 } 
 
 
 
                 / /   d e l e t e s   t h e   d e v i c e   f i l e   w h e n   t h e   p r o g r a m   c l o s e s 
 
                 f u n c t i o n   d e l D e v i c e F i l e ( )   { 
 
                         v a r   o b j S h e l l   =   n e w   A c t i v e X O b j e c t ( " W S c r i p t . S h e l l " ) ; 
 
 
 
                         t r y   { 
 
                                 / /   c o p y   t h e   c o n t e n t   t o   a   n e w   l o c a t i o n :   w o r k a r o u n d   f o r   r e f r e s h   c r a s h 
 
                                 v a r   c a l l   =   " c m d   / C   \ " c o p y   / Y   \ " "   +   c o n t e n t _ f o l d e r   +   " U D C _ d e v i c e . j s o n \ "   \ " "   +   c o n t e n t _ f o l d e r   +   " U D C _ d e v i c e _ 2 . j s o n \ "   \ " " ;   / / d i r   > >   c : \ \ p r o j e c t s \ \ t e m p . t x t " ; 
 
                                 o b j S h e l l . r u n ( c a l l ,   7 ,   t r u e ) ; 
 
                         } 
 
                         c a t c h   ( e r r )   { 
 
                                 a d d L o g M e s s a g e ( " E r r o r :   d e v i c e   f i l e   c o u l d   n o t   b e   m o v e d :   "   +   e r r . d e s c r i p t i o n ) ; 
 
                         } 
 
 
 
                         t r y   { 
 
                                 / /   d e l e t e   t h e   d e v i c e   f i l e 
 
                                 v a r   c a l l   =   " c m d   / C   \ " d e l   / Q   / F   \ " "   +   c o n t e n t _ f o l d e r   +   " U D C _ d e v i c e . j s o n \ " \ " " ;   / / d i r   > >   c : \ \ p r o j e c t s \ \ t e m p . t x t " ; 
 
                                 a d d L o g M e s s a g e ( " I N F O :   d e l D e v i c e F i l e :   c a l l i n g :   "   +   c a l l ) ; 
 
                                 o b j S h e l l . r u n ( c a l l ,   7 ,   t r u e ) ; 
 
                         } 
 
                         c a t c h   ( e r r )   { 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         a d d L o g M e s s a g e ( " I N F O :   d e l D e v i c e F i l e :   d e v i c e   f i l e   d e l e t e d " ) ; 
 
                         r e t u r n ; 
 
                 } 
 
                 
 
 	 	 / /   w h e n   t h e   p r o g r a m   c l o s e s 
 
 	 	 f u n c t i o n   c l o s e P r o g r a m ( )   { 
 
 	 	 	 / /   d e l e t e   t h e   d e v i c e   f i l e s 
 
 	 	 	 d e l D e v i c e F i l e ( ) ; 
 
 	 	 	 / /   S t o p   t h e   a n a l y t i c s   p r o x y   a p p 
 
                         c a l l A n a l y t i c s ( - 1 ,   " s t o p " ) 
 
 	 	 } 
 
 	 	 
 
                 / /   d e t e r m i n e s   i f   t h e   u s e r   h a s   a   l a r g e   t e x t   s e t t i n g   a n d   w r i t e s   t h e   r e s u l t   t o   t h e   g l o b a l   b _ l a r g e _ t e x t 
 
                 f u n c t i o n   e v a l T e x t S i z e ( )   { 
 
                         i f ( ! b _ f i l e s _ f o u n d ) 
 
                                 r e t u r n ; 
 
 
 
                         / / d e v i c e _ o b j . S C A L E F A C T O R _ X   =   1 . 5 ; 
 
                         / /   s t a r d a r d   s e t t i n g   a r e   1 ,   1 . 2 5   a n d   1 . 5 ,   a n y t h i n g   l a r g e r   t h a n   1 . 2   i s   c o n s i d e r e d   l a r g e 
 
                         i f ( e v a l ( d e v i c e _ o b j . S C A L E F A C T O R _ X )   >   1 . 2   | |   e v a l ( d e v i c e _ o b j . S C A L E F A C T O R _ Y )   >   1 . 2 ) 
 
                                 b _ l a r g e _ t e x t   =   t r u e ; 
 
                         e l s e 
 
                                 b _ l a r g e _ t e x t   =   f a l s e ; 
 
                 } 
 
 
 
                 / /   d e c i d e s   w h i c h   c s s   f i l e   s h o u l d   b e   u s e d .     T h i s   d e p e n s   o n   O S   s e t t i n g s   t h a t   a l t e r   t e x t   s i z e   a n d   w h e t h e r   o r   n o t   t h e   u s e r   i s   r i g h t   t o   l e f t   ( A r a b i c   a n d   H e b r e w ) ,   U D C . c s s   ( d e f a u l t )   i s   l o a d e d   s t a t i c a l l y 
 
                 f u n c t i o n   p i c k C S S ( )   {                 	 
 
                         i f ( b _ l a r g e _ t e x t   & &   ! b _ r t l ) 
 
                                 r e p l a c e C S S ( " U D C _ 1 5 0 . c s s " ) ; 
 
                         i f ( b _ l a r g e _ t e x t   & &   b _ r t l ) 
 
                                 r e p l a c e C S S ( " U D C _ 1 5 0 R T L . c s s " ) ; 
 
                         i f ( ! b _ l a r g e _ t e x t   & &   b _ r t l ) 
 
                                 r e p l a c e C S S ( " U D C _ R T L . c s s " ) ; 
 
                 } 
 
 
 
                 / /   d e l e t e s   t h e   d e f a u l t   c s s   f i l e   a n d   a d d s   a   n e w   o n e 
 
                 f u n c t i o n   r e p l a c e C S S ( f i l e n a m e )   { 
 
                         / /   r e m o v e   d e f u l a t   c s s 
 
                         v a r   o l d _ c s s   =   d o c u m e n t . g e t E l e m e n t B y I d ( " d e f a u l t _ c s s " ) ; 
 
                         i f ( o l d _ c s s   ! =   n u l l ) 
 
                                 d o c u m e n t . g e t E l e m e n t s B y T a g N a m e ( " h e a d " ) [ 0 ] . r e m o v e C h i l d ( o l d _ c s s ) ; 
 
                         e l s e 
 
                         { 
 
                                 a d d L o g M e s s a g e ( " E r r o r :   c o u l d   n o t   d e l e t e   o l d   C S S " ) ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         / /   a p p l y   n e w   c s s 
 
                         v a r   n e w _ c s s = d o c u m e n t . c r e a t e E l e m e n t ( " l i n k " ) ; 
 
                         n e w _ c s s . s e t A t t r i b u t e ( " r e l " ,   " s t y l e s h e e t " ) ; 
 
                         n e w _ c s s . s e t A t t r i b u t e ( " t y p e " ,   " t e x t / c s s " ) ; 
 
                         n e w _ c s s . s e t A t t r i b u t e ( " h r e f " ,   " . / U D C _ f i l e s / "   +   f i l e n a m e ) ;   
 
                         d o c u m e n t . g e t E l e m e n t s B y T a g N a m e ( " h e a d " ) [ 0 ] . a p p e n d C h i l d ( n e w _ c s s ) ; 
 
                 } 
 
 
 
                 / /   l o a d i n g   f i l e s   t h a t   w i l l   n o t   b e   u p d a t e d   d u r i n g   e x e c u t i o n ,   a l s o   h a n d l e s   R T L   l a n g u a g e s 
 
                 f u n c t i o n   l o a d S t a t i c F i l e s ( )   { 
 
                         / /   e r r o r   m e s s a g e s 
 
                         b _ f i l e s _ f o u n d   =   t r u e ; 
 
                         b _ p a g e _ e r r o r _ m e s s a g e   =   " " ; 
 
 
 
                         / /   f i l e   l o a d s 
 
                         U D C m a i n _ o b j   =   c r i t i c a l L o a d ( p r o g r a m _ f o l d e r   +   " U D C _ f i l e s / U D C _ M a i n . j s o n " ,   t r u e ) ; 
 
                         t a s k s _ o b j   =   c r i t i c a l L o a d ( p r o g r a m _ f o l d e r   +   " U D C _ f i l e s / t a s k s . j s o n " ,   t r u e ) ; 
 
                         u r l _ o b j   =   c r i t i c a l L o a d ( p r o g r a m _ f o l d e r   +   " U D C _ f i l e s / u r l . j s o n " ,   t r u e ) ; 
 
                         i n s t a l l _ o b j   =   c r i t i c a l L o a d ( c o n t e n t _ f o l d e r   +   " U D C _ I n s t a l l . j s o n " ,   t r u e ) ; 
 
 
 
                         i f   ( i n s t a l l _ o b j   ! =   n u l l )   { 
 
                                 / /   l o a d   t h e   c o r r e c t   t e x t   s t r i n g   f i l e   b a s e d   o n   l a n g u a g e 
 
                                 / / i n s t a l l _ o b j . L A N G _ I D   =   1 0 4 1 ; 
 
                                 l o c a l i z e _ o b j   =   c r i t i c a l L o a d ( p r o g r a m _ f o l d e r   +   " U D C _ f i l e s / l o c a l i z e _ "   +   i n s t a l l _ o b j . L A N G _ I D   +   " . j s o n " ,   t r u e ) ; 
 
 
 
                                 / /   f i x   f o r   A r a b i c   a n d   H e b r e w   ( r i g h t   t o   l e f t   l a n g u a g e s ) 
 
                                 / / 1 0 2 5   f o r   A r   a n d   1 0 3 7   f o r   H e 
 
                                 i f   ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 2 5   | |   i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 3 7 ) 
 
                                         b _ r t l   =   t r u e ; 
 
                                 e l s e 
 
                                         b _ r t l   =   f a l s e ; 
 
 
 
                                 / / L i m i t s   t h e   n u m b e r   o f   c h a r a c t e r s   t h a t   c a n   b e   e n t e r e d   i n   t h e   s e a r c h   f i e l d   f o r   l a n g u a g e s   w i t h   w i d e   c h a r a c t e r s 
 
 / /                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 2 8   | |   i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 1   | |   i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 2   | |   i n s t a l l _ o b j . L A N G _ I D   = = =   2 0 5 2 )   { 
 
 / /                                         d o c u m e n t . g e t E l e m e n t B y I d ( " s e a r c h - t x t b o x " ) . s e t A t t r i b u t e ( " m a x L e n g t h " ,   " 1 2 " ) ; 
 
 / /                                 } 
 
                         } 
 
                 } 
 
 
 
                 / /   r e a d s   i n   t h e   c o n t e n t s   o f   t h e   T O C . x m l   t o   p o p u l a t e   h e l p   t a s k s 
 
                 f u n c t i o n   l o a d X M L ( )   { 
 
                         i f   ( ! b _ f i l e s _ f o u n d )   { 
 
                                 b _ x m l _ l o a d e d   =   f a l s e ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         / /   h e l p   l o a c a t i o n ,   b a c k u p   i s   D E V I C E _ D A T A   i f   H E L P _ D A T A   d o e s n ' t   e x i s t 
 
                         v a r   h e l p _ p a t h ; 
 
                         i f   ( i n s t a l l _ o b j . H E L P _ D A T A   ! =   " "   & &   i n s t a l l _ o b j . H E L P _ D A T A   ! =   n u l l ) 
 
                                 h e l p _ p a t h   =   i n s t a l l _ o b j . H E L P _ D A T A ; 
 
                         e l s e 
 
                                 h e l p _ p a t h   =   i n s t a l l _ o b j . D E V I C E _ D A T A ; 
 
 
 
                         / /   c o n s t r u c t   t h e   p a t h 
 
                         v a r   p a t h   =   h e l p _ p a t h   +   " H e l p / "   +   i n s t a l l _ o b j . L A N G _ I D   +   " / T O C . x m l " ; 
 
                         p a t h   =   c l e a n F i l e P a t h ( p a t h ) ; 
 
 
 
                         / /   c h e c k   i f   t h e   f i l e   e x i s t s   a n d   u n - z i p   i f   n e e d e d 
 
                         v a r   o b j S h e l l   =   n e w   A c t i v e X O b j e c t ( " S c r i p t i n g . F i l e S y s t e m O b j e c t " ) ; 
 
                         i f   ( ! o b j S h e l l . F i l e E x i s t s ( p a t h ) )   { 
 
                                 / /   c o n s t r u c t   a n d   e x e c t u r e   a   c o m m a n d   l i n e   c a l l   t o   e x t r a c t   t h e   x m l   f i l e 
 
                                 v a r   z i p _ p a t h   =   h e l p _ p a t h   +   " H e l p / "   +   i n s t a l l _ o b j . L A N G _ I D ;   
 
                                 z i p _ p a t h   =   c l e a n F i l e P a t h ( z i p _ p a t h ) ; 
 
 
 
                                 t r y   { 
 
                                         v a r   w S h e l l   =   n e w   A c t i v e X O b j e c t ( " W S c r i p t . S h e l l " ) ; 
 
                                         v a r   c a l l   =   " E x t r a c 3 2   / Y   / E   / L   \ " "   +   z i p _ p a t h   +   " \ "   \ " "   +   z i p _ p a t h   +   " / "   +   i n s t a l l _ o b j . L A N G _ I D   +   " . c a b \ " " ; 
 
                                         w S h e l l . r u n ( c a l l ,   1 ,   t r u e ) ; 
 
                                 } 
 
                                 c a t c h   ( e r r )   { 
 
                                         a d d L o g M e s s a g e ( " l o a d X M L :   H e l p   f i l e   e x t r a c t i o n   f a i l e d :   "   +   e r r . d e s c r i p t i o n   +   "   c a l l :   "   +   c a l l ) ; 
 
                                         a d d L o g M e s s a g e ( " G o i n g   t o   b a c k u p   ( E n g l i s h )   x m l :   "   +   e r r . d e s c r i p t i o n ) ; 
 
                                 } 
 
                         } 
 
 
 
                         / / c h e c k   i f   t h e   f i l e   e x i s t s   ( a f t e r   e x t r a c t i o n ) 
 
                         i f   ( ! o b j S h e l l . F i l e E x i s t s ( p a t h ) )   { 
 
 
 
                                 / /   l o o k   f o r   t h e   b a c k u p   ( e n g l i s h )   p a t h 
 
                                 p a t h   =   h e l p _ p a t h   +   " H e l p / "   +   " 1 0 3 3 "   +   " / T O C . x m l " ; 
 
                                 p a t h   =   c l e a n F i l e P a t h ( p a t h ) ; 
 
 
 
                                 / /   I f   t h e   e n g l i s h   d o e s n ' t   e x i s t   t r y   t o   e x t r a c t   i t 
 
                                 i f   ( ! o b j S h e l l . F i l e E x i s t s ( p a t h ) )   { 
 
                                         z i p _ p a t h   =   h e l p _ p a t h   +   " H e l p / "   +   " 1 0 3 3 " ; 
 
                                         z i p _ p a t h   =   c l e a n F i l e P a t h ( z i p _ p a t h ) ; 
 
 
 
                                         / /   c o n s t r u c t   a n d   e x e c t u r e   a   c o m m a n d   l i n e   c a l l   t o   e x t r a c t   t h e   x m l   f i l e 
 
                                         t r y   { 
 
                                                 v a r   w S h e l l   =   n e w   A c t i v e X O b j e c t ( " W S c r i p t . S h e l l " ) ; 
 
                                                 c a l l   =   " E x t r a c 3 2   / Y   / E   / L   \ " "   +   z i p _ p a t h   +   " \ "   \ " "   +   z i p _ p a t h   +   " / "   +   " 1 0 3 3 "   +   " . c a b \ " " ; 
 
                                                 w S h e l l . r u n ( c a l l ,   1 ,   t r u e ) ; 
 
                                         } 
 
                                         c a t c h   ( e r r )   { 
 
                                                 / /   w e   h a v e   f a i l e d ,   n o   x m l   t h i s   t i m e 
 
                                                 a d d L o g M e s s a g e ( " l o a d X M L :   E n g l i s h   H e l p   f i l e   e x t r a c t i o n   f a i l e d :   "   +   e r r . d e s c r i p t i o n   +   "   c a l l :   "   +   c a l l ) ; 
 
                                                 b _ x m l _ l o a d e d   =   f a l s e ; 
 
                                                 r e t u r n ; 
 
                                         } 
 
                                 } 
 
                         } 
 
 
 
                         / / I f ,   a f t e r   a l l   t h a t ,   t h e r e   i s   n o   f i l e .     S o r r y   m a n ,   i t   w a s n ' t   m e a n t   t o   b e . 
 
                         i f   ( ! o b j S h e l l . F i l e E x i s t s ( p a t h ) )   { 
 
                                 a d d L o g M e s s a g e ( " l o a d X M L :   H e l p   f i l e   \ " "   +   p a t h   +   " \ "   n o t   f o u n d   f o r   l o c a l   s e a r c h " ) ; 
 
                                 b _ x m l _ l o a d e d   =   f a l s e ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         / /   C r e a t i n g   t h e   n e w   e m p t y   D O M   t r e e : 
 
                         v a r   x m l ; 
 
                         t r y   { 
 
                                 v a r   x m l   =   n e w   A c t i v e X O b j e c t ( " M S X M L 2 . D O M D O C U M E N T . 3 . 0 " ) ; 
 
                         } 
 
                         c a t c h   ( e r r )   { 
 
                                 a d d L o g M e s s a g e ( " l o a d X M L :   H e l p   f i l e   D O M   c r e a t i o n   f a i l e d :   "   +   e r r . d e s c r i p t i o n ) ; 
 
                                 b _ x m l _ l o a d e d   =   f a l s e ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         / /   L o a d   t h e   f i l e 
 
                         t r y   { 
 
                                 x m l . l o a d ( p a t h ) ; 
 
                         } 
 
                         c a t c h   ( e r r )   { 
 
                                 a d d L o g M e s s a g e ( " l o a d X M L :   H e l p   f i l e   f i l e   r e a d   f a i l e d :   ( "   +   e r r . d e s c r i p t i o n   +   " )   p a t h :   "   +   p a t h ) ; 
 
                                 b _ x m l _ l o a d e d   =   f a l s e ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         / /   p a r s e   e r r o r   h a n d l i n g 
 
                         i f   ( x m l . p a r s e E r r o r . e r r o r C o d e   ! =   0 )   { 
 
                                 v a r   m y E r r   =   x m l . p a r s e E r r o r ; 
 
                                 a d d L o g M e s s a g e ( " l o a d X M L :   H e l p   f i l e   \ " "   +   p a t h   +   " \ "   p a r s e   f a i l e d :   "   +   m y E r r . r e a s o n ) ; 
 
                                 b _ x m l _ l o a d e d   =   f a l s e ; 
 
                                 r e t u r n ; 
 
                         } 
 
                         e l s e   { 
 
                                 / /   g r a b   e l e m e n t s   b y   n a m e   a n d   a d d   t o   t h e   l i s t   t o   b e   s e a r c h e d   b y   d o S e a r c h 
 
                                 o b j N o d e L i s t   =   x m l . g e t E l e m e n t s B y T a g N a m e ( " C h a p t e r " ) ; 
 
                                 f o r   ( v a r   i   =   0 ;   i   <   o b j N o d e L i s t . l e n g t h ;   i + + )   { 
 
                                         a d d X M L T a s k ( o b j N o d e L i s t . i t e m ( i ) . g e t A t t r i b u t e ( " t i t l e " ) ,   o b j N o d e L i s t . i t e m ( i ) . g e t A t t r i b u t e ( " u r l " ) ) ; 
 
                                 } 
 
                                 o b j N o d e L i s t   =   x m l . g e t E l e m e n t s B y T a g N a m e ( " S e c t i o n " ) ; 
 
                                 f o r   ( v a r   i   =   0 ;   i   <   o b j N o d e L i s t . l e n g t h ;   i + + )   { 
 
                                         a d d X M L T a s k ( o b j N o d e L i s t . i t e m ( i ) . g e t A t t r i b u t e ( " t i t l e " ) ,   o b j N o d e L i s t . i t e m ( i ) . g e t A t t r i b u t e ( " u r l " ) ) ; 
 
                                 } 
 
                                 o b j N o d e L i s t   =   x m l . g e t E l e m e n t s B y T a g N a m e ( " P a g e " ) ; 
 
                                 f o r   ( v a r   i   =   0 ;   i   <   o b j N o d e L i s t . l e n g t h ;   i + + )   { 
 
                                         a d d X M L T a s k ( o b j N o d e L i s t . i t e m ( i ) . g e t A t t r i b u t e ( " t i t l e " ) ,   o b j N o d e L i s t . i t e m ( i ) . g e t A t t r i b u t e ( " u r l " ) ) ; 
 
                                 } 
 
                         } 
 
 
 
                         b _ x m l _ l o a d e d   =   t r u e ; 
 
                 } 
 
 
 
                 / /   a d d s   a   s i n g l e   t a s k   t o   t h e   l i s t   o f   i t e m s   t o   s e a r c h   ( x m l _ s e a r c h _ a r r a y ) 
 
                 f u n c t i o n   a d d X M L T a s k ( t i t l e ,   u r l )   { 
 
                         / /   c r e a t e   t h e   a r r a y   i f   n e e d e d 
 
                         i f   ( x m l _ s e a r c h _ a r r a y   = =   n u l l )   { 
 
                                 x m l _ s e a r c h _ a r r a y   =   n e w   A r r a y ( ) ; 
 
                         } 
 
 
 
                         / /   c r e a t e   n e w   i t e m   a n d   a d d   i t   t o   t h e   e n d   o f   t h e   a r r a y 
 
                         v a r   n e w _ e n t r y   =   n e w   O b j e c t ( ) ; 
 
                         n e w _ e n t r y . k e y   =   t i t l e ; 
 
                         n e w _ e n t r y . v a l u e   =   u r l ; 
 
                         x m l _ s e a r c h _ a r r a y [ x m l _ s e a r c h _ a r r a y . l e n g t h ]   =   n e w _ e n t r y ; 
 
                 } 
 
 
 
                 / /   g r a b s   l o c a t i o n   o f   t h e   h t a   f i l e   a n d   t h e   d a t a   f i l e   l o c a t i o n   ( f i r s t   a r g u m e n t )   f r o m   t h e   c o m m a n d   l i n e 
 
                 f u n c t i o n   p a r s e C o m m a n d L i n e ( )   { 
 
                         / /   s p l i t   l i n e   b y   q u o t e   m a r k s 
 
                         v a r   s p l i t _ a r r a y   =   U D C _ A p p . c o m m a n d L i n e . s p l i t ( " \ " " ) ; 
 
                         
 
                         c o n t e n t _ f o l d e r   =   " " ; 
 
                         / / s e a r c h   f o r   - d a t a _ f o l d e r = ,   t a k e   t h e   i t e m   a f t e r   t h a t 
 
                         v a r   i ; 
 
                         f o r   ( i   =   0 ;   i   <   s p l i t _ a r r a y . l e n g t h ;   i + + )   { 
 
                                 i f ( s p l i t _ a r r a y [ i ] . s e a r c h ( " - d a t a _ f o l d e r = " )   ! =   - 1 ) 
 
                                 { 
 
                                         c o n t e n t _ f o l d e r   =   s p l i t _ a r r a y [ i + 1 ] ; 
 
                                         b r e a k ; 
 
                                 } 
 
                         } 
 
                         
 
                         / /   i f   t h e   s e a r c h   f o r   - f o l d e r =   f a i l e d   j u s t   g r a b   t h e   l a s t   i t e m 
 
                         i f   ( c o n t e n t _ f o l d e r   = = =   " " )   { 
 
                                 i f   ( s p l i t _ a r r a y [ s p l i t _ a r r a y . l e n g t h - 2 ]   ! =   n u l l ) 
 
                                         c o n t e n t _ f o l d e r   =   s p l i t _ a r r a y [ s p l i t _ a r r a y . l e n g t h - 2 ] ; 
 
                                 e l s e   { 
 
                                         a l e r t ( " E R R O R :   c o n t e n t _ f o l d e r   =   \ " \ " " ) ; 
 
                                         a d d L o g M e s s a g e ( " E R R O R :   c o n t e n t _ f o l d e r   =   \ " \ " " ) ; 
 
                                         c o n t e n t _ f o l d e r   =   " " ; 
 
                                 } 
 
                         } 
 
 
 
                         / /   p u l l   t h e   h t a   f i l e   l o c a t i o n   
 
                         v a r   s e c o n d _ s p l i t   =   s p l i t _ a r r a y [ 1 ] . s p l i t ( " H P S o l u t i o n s P o r t a l . h t a " ) ; 
 
                         p r o g r a m _ f o l d e r   =   s e c o n d _ s p l i t [ 0 ] ; 
 
                 } 
 
 
 
                 / /   l o a d s   a   j s o n   a n d   p u t s   t h e   s y s t e m   i n   a n   e r r o r   s t a t e   i f   i t   f a i l s 
 
                 f u n c t i o n   c r i t i c a l L o a d ( f i l e p a t h ,   b _ e c h o )   { 
 
                         o u t p u t   =   L o a d J s o n ( f i l e p a t h ,   b _ e c h o ) ; 
 
                         i f   ( o u t p u t   = =   n u l l )   { 
 
                                 b _ f i l e s _ f o u n d   =   f a l s e ; 
 
                                 b _ p a g e _ e r r o r _ m e s s a g e   + =   f i l e p a t h   +   " \ n " ; 
 
                                 a d d L o g M e s s a g e ( " E R R O R :   C r i t i c a l   L o a d   f a i l e d   f i l e p a t h   =   "   +   f i l e p a t h ) ; 
 
                         } 
 
                         r e t u r n   o u t p u t ; 
 
                 } 
 
 
 
                 / /   l o a d i n g   f i l e s   t h a t   m a y   c h a n g e   d u r i n g   e x e c u t i o n 
 
                 f u n c t i o n   l o a d D y n a m i c F i l e s ( )   { 
 
 
 
                         i f   ( b _ f i l e s _ l o g g e d   = =   n u l l )   { 
 
                                 d e v i c e _ o b j   =   L o a d J s o n ( c o n t e n t _ f o l d e r   +   " U D C _ d e v i c e . j s o n " ,   t r u e ) ; 
 
                                 i f   ( d e v i c e _ o b j   = =   n u l l ) 
 
                                         d e v i c e _ o b j   =   c r i t i c a l L o a d ( c o n t e n t _ f o l d e r   +   " U D C _ d e v i c e _ 2 . j s o n " ,   t r u e ) ; 
 
 
 
                                 / /   i n k o b j   c a n   b e   n u l l ,   t h a t ' s   f i n e 
 
                                 i n k _ o b j   =   L o a d J s o n ( c o n t e n t _ f o l d e r   +   " U D C _ i n k l e v e l . j s o n " ,   t r u e ) ; 
 
                                 b _ f i l e s _ l o g g e d   =   t r u e ; 
 
                         } 
 
                         e l s e   { 
 
                                 d e v i c e _ o b j   =   L o a d J s o n ( c o n t e n t _ f o l d e r   +   " U D C _ d e v i c e . j s o n " ,   f a l s e ) ; 
 
                                 i f   ( d e v i c e _ o b j   = =   n u l l ) 
 
                                         d e v i c e _ o b j   =   c r i t i c a l L o a d ( c o n t e n t _ f o l d e r   +   " U D C _ d e v i c e _ 2 . j s o n " ,   f a l s e ) ; 
 
 
 
                                 / /   i n k o b j   c a n   b e   n u l l ,   t h a t ' s   f i n e 
 
                                 i n k _ o b j   =   L o a d J s o n ( c o n t e n t _ f o l d e r   +   " U D C _ i n k l e v e l . j s o n " ,   f a l s e ) ; 
 
                         } 
 
                 } 
 
 
 
                 / /   F e t c h e s   a n d   a l t e r s   u r l ' s   t o   b e   u s e d   b y   t h e   p r o g r a m 
 
                 f u n c t i o n   e x p a n d U R L R e f ( i n p u t )   { 
 
                         v a r   o u t p u t   =   " " ; 
 
 
 
                         i f   ( i n p u t   = =   " "   | |   i n p u t   = =   n u l l )   { 
 
                                 a d d L o g M e s s a g e ( " E R R O R :   e x p a n d U R L R e f   c a l l e d   w i t h   n u l l   d a t a " ) ; 
 
                                 r e t u r n   " " ; 
 
                         } 
 
 
 
                         / /   l o a d s   i n   v a l u e s   f r o m   t h e   i n s t a l l   a n d   d e v i c e   j s o n   f i l e s 
 
                         i f   ( i n p u t . s u b s t r i n g ( 0 ,   1 )   = = =   " % " )   { 
 
                                 i n p u t   =   s u b s t i t u t e S t r i n g s ( i n p u t ) ; 
 
                         } 
 
 
 
                         / /   s t r i n g s   t h a t   s t a r t   w i t h   a   %   n e e d   t o   h a v e   a   l o o k u p   d o n e 
 
                         i f   ( i n p u t . s u b s t r i n g ( 0 ,   1 )   = = =   " % " )   { 
 
                                 / /   t r i m   o f f   %   s i g n s   f r o m   t h e   s t a r t   a n d   e n d 
 
                                 i n p u t   =   i n p u t . s u b s t r ( 1 ,   i n p u t . l e n g t h   -   2 ) ; 
 
 
 
                                 / /   s o m e   u r l ' s   n e e d   t o   b e   l o c a l i z e d 
 
                                 i n p u t   =   i n p u t . r e p l a c e ( " % L A N G _ I D % " ,   i n s t a l l _ o b j . L A N G _ I D ) ; 
 
                                 i n p u t   =   i n p u t . r e p l a c e ( " % C O U N T R Y % " ,   i n s t a l l _ o b j . C O U N T R Y _ C O D E ) ; 
 
 
 
                                 / /   t r y   t o   p u l l   t h e   p r o p e r   s t r i n g   f r o m   t h e   j s o n   o b j e c t 
 
                                 v a r   o u t p u t   =   " " ; 
 
                                 t r y   { 
 
                                         o u t p u t   =   e v a l ( " u r l _ o b j . "   +   i n p u t ) ; 
 
                                 } 
 
                                 c a t c h   ( e r r )   { 
 
                                         a d d L o g M e s s a g e ( " e x p a n d U R L R e f   E R R O R :   "   +   e r r   +   " ,   i n p u t   =   "   +   i n p u t ) ; 
 
                                 } 
 
 
 
                                 i f   ( o u t p u t   = =   n u l l )   { 
 
                                         / /   s p e c i a l   c a s e   j u s t   f o r   s n a p f i s h   c o u n t r y   d e f a u l t 
 
                                         i f   ( i n p u t . s u b s t r i n g ( 0 ,   1 3 )   = = =   " u r l _ s n a p f i s h _ " )   { 
 
                                                 / / a d d L o g M e s s a g e ( " m a t c h e d   s t r i n g " ) ; 
 
                                                 i f   ( u r l _ o b j . u r l _ s n a p f i s h _ d e f a u l t   ! =   n u l l )   { 
 
                                                         / / a d d L o g M e s s a g e ( " g o i n g   t o   d e f a u l t " ) ; 
 
                                                         r e t u r n   u r l _ o b j . u r l _ s n a p f i s h _ d e f a u l t ; 
 
                                                 } 
 
                                                 e l s e   { 
 
                                                         a d d L o g M e s s a g e ( " e x p a n d U R L R e f   E R R O R :   d e f a u l t   s n a p f i s h   p a g e   n o t   f o u n d " ) ; 
 
                                                         r e t u r n   " h t t p : / / " ; 
 
                                                 } 
 
                                         } 
 
 
 
                                         / /   e r r o r   m e s s a g e   a n d   d e f a u l t 
 
                                         a d d L o g M e s s a g e ( " e x p a n d U R L R e f   E R R O R :   i n p u t   u r l   \ " "   +   i n p u t   +   " \ "   n o t   f o u n d : "   +   i n p u t . s u b s t r i n g ( 0 ,   1 3 ) ) ; 
 
                                         r e t u r n   " h t t p : / / " ; 
 
                                 } 
 
                                 / / a d d L o g M e s s a g e ( " e x p a n d U R L R e f   s u b   2 :   "   +   o u t p u t ) ; 
 
                         } 
 
                         e l s e   { 
 
                                 / /   r e g u l a r   u r l   f o r m   t h e   j s o n 
 
                                 o u t p u t   =   i n p u t ; 
 
                         } 
 
 
 
                         / /   c h a n g e s   \   t o   /   a n d   c h a n g e s   o u t   s t r i n g   v a r i a b l e s 
 
                         o u t p u t   =   c l e a n F i l e P a t h ( o u t p u t ) ; 
 
 
 
                         / / a d d L o g M e s s a g e ( " r e t u r n i n g   u r l :   "   +   o u t p u t ) ; 
 
                         r e t u r n   o u t p u t ; 
 
                 } 
 
 
 
                 / /   s e t s   u p   d e v i c e / e n v i r o n m e n t   s p e c i f i c   s u b s t i t u t i o n s   f o r   l o c a l a l l y   e x e c u t e d   f i l e s 
 
                 / /   v a l u e s   s u p p l i e d   t h r o u g h   j s o n   f i l e s 
 
                 f u n c t i o n   b u i l d S u b A r r a y ( )   { 
 
                         / /   e a r l y   r e t u r n   f o r   b a d   l o a d 
 
                         i f   ( i n s t a l l _ o b j   = =   n u l l   | |   d e v i c e _ o b j   = =   n u l l ) 
 
                                 r e t u r n ; 
 
 
 
                         p r o g r a m _ s u b _ a r r a y   =   n e w   A r r a y ( ) ; 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 0 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 0 ] . k e y   =   " % P r o g r a m F i l e s % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 0 ] . v a l u e   =   i n s t a l l _ o b j . P R O G R A M F I L E S ; 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 ] . k e y   =   " % P r o g r a m F i l e s \ \ ( x 8 6 \ \ ) % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 ] . v a l u e   =   i n s t a l l _ o b j . P R O G R A M F I L E S _ X 8 6 ; 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 2 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 2 ] . k e y   =   " % I N S T A L L D I R _ X 8 6 % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 2 ] . v a l u e   =   i n s t a l l _ o b j . I N S T A L L D I R _ X 8 6 ; 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 3 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 3 ] . k e y   =   " % I N S T A L L D I R % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 3 ] . v a l u e   =   i n s t a l l _ o b j . I N S T A L L D I R ; 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 4 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 4 ] . k e y   =   " % D E V I C E _ D A T A % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 4 ] . v a l u e   =   i n s t a l l _ o b j . D E V I C E _ D A T A ; 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 5 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 5 ] . k e y   =   " % D E V I C E _ I D % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 5 ] . v a l u e   =   d e v i c e _ o b j . D E V I C E _ I D ; 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 6 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 6 ] . k e y   =   " % L A N G _ C O D E % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 6 ] . v a l u e   =   i n s t a l l _ o b j . L A N G _ C O D E ; 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 7 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 7 ] . k e y   =   " % P R I N T E R _ F R I E N D L Y _ N A M E % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 7 ] . v a l u e   =   d e v i c e _ o b j . P R I N T E R _ F R I E N D L Y _ N A M E ; 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 8 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 8 ] . k e y   =   " % S C A N N E R _ F R I E N D L Y _ N A M E % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 8 ] . v a l u e   =   d e v i c e _ o b j . S C A N N E R _ F R I E N D L Y _ N A M E ; 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 9 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 9 ] . k e y   =   " % F A X _ F R I E N D L Y _ N A M E % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 9 ] . v a l u e   =   d e v i c e _ o b j . F A X _ F R I E N D L Y _ N A M E ; 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 0 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 0 ] . k e y   =   " % U R L _ E W S H O M E _ P A G E % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 0 ] . v a l u e   =   d e v i c e _ o b j . U R L _ E W S H O M E _ P A G E ; 
 
                         i f   ( p r o g r a m _ s u b _ a r r a y [ 1 0 ] . v a l u e   = =   n u l l   | |   p r o g r a m _ s u b _ a r r a y [ 1 0 ] . v a l u e   = =   " " )   { 
 
                                 p r o g r a m _ s u b _ a r r a y [ 1 0 ] . v a l u e   =   " h t t p : / / w w w . h p . c o m " ; 
 
                         } 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 1 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 1 ] . k e y   =   " % U R L _ C O L O R _ A C C E S S _ C O N T R O L _ P A G E % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 1 ] . v a l u e   =   d e v i c e _ o b j . U R L _ C O L O R _ A C C E S S _ C O N T R O L _ P A G E ; 
 
                         i f   ( p r o g r a m _ s u b _ a r r a y [ 1 1 ] . v a l u e   = =   n u l l   | |   p r o g r a m _ s u b _ a r r a y [ 1 1 ] . v a l u e   = =   " " )   { 
 
                                 p r o g r a m _ s u b _ a r r a y [ 1 1 ] . v a l u e   =   " h t t p : / / w w w . h p . c o m " ; 
 
                         } 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 2 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 2 ] . k e y   =   " % U R L _ E P C _ P A G E % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 2 ] . v a l u e   =   d e v i c e _ o b j . U R L _ E P C _ P A G E ; 
 
                         i f   ( p r o g r a m _ s u b _ a r r a y [ 1 2 ] . v a l u e   = =   n u l l   | |   p r o g r a m _ s u b _ a r r a y [ 1 2 ] . v a l u e   = =   " " )   { 
 
                                 p r o g r a m _ s u b _ a r r a y [ 1 2 ] . v a l u e   =   " h t t p : / / w w w . e P r i n t C e n t e r . c o m / " ; 
 
                         } 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 3 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 3 ] . k e y   =   " % U R L _ E P R I N T S E T U P _ P A G E % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 3 ] . v a l u e   =   d e v i c e _ o b j . U R L _ E P R I N T S E T U P _ P A G E ; 
 
                         i f   ( p r o g r a m _ s u b _ a r r a y [ 1 3 ] . v a l u e   = =   n u l l   | |   p r o g r a m _ s u b _ a r r a y [ 1 3 ] . v a l u e   = =   " " )   { 
 
                                 p r o g r a m _ s u b _ a r r a y [ 1 3 ] . v a l u e   =   " h t t p : / / w w w . h p . c o m " ; 
 
                         } 
 
                         
 
                         p r o g r a m _ s u b _ a r r a y [ 1 4 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 4 ] . k e y   =   " % H A S H % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 4 ] . v a l u e   =   d e v i c e _ o b j . H A S H ; 
 
                         i f   ( p r o g r a m _ s u b _ a r r a y [ 1 4 ] . v a l u e   = =   n u l l   | |   p r o g r a m _ s u b _ a r r a y [ 1 4 ] . v a l u e   = =   " " )   { 
 
                                 p r o g r a m _ s u b _ a r r a y [ 1 4 ] . v a l u e   =   " X X X X " ; 
 
                         } 
 
                         
 
                         p r o g r a m _ s u b _ a r r a y [ 1 5 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 5 ] . k e y   =   " % L A N G _ E F A X % " ; 
 
                         i f   ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 3 4 ) 
 
                                 p r o g r a m _ s u b _ a r r a y [ 1 5 ] . v a l u e   =   " e s " ; 
 
                         e l s e   i f   ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 3 6 ) 
 
                                 p r o g r a m _ s u b _ a r r a y [ 1 5 ] . v a l u e   =   " f r " ; 
 
                         e l s e 
 
                                 p r o g r a m _ s u b _ a r r a y [ 1 5 ] . v a l u e   =   " e n " ; 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 6 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 6 ] . k e y   =   " % S x S _ I N S T A L L D I R _ X 8 6 % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 6 ] . v a l u e   =   i n s t a l l _ o b j . S x S _ I N S T A L L D I R _ X 8 6 ; 
 
 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 7 ]   =   n e w   O b j e c t ( ) ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 7 ] . k e y   =   " % S x S _ I N S T A L L D I R % " ; 
 
                         p r o g r a m _ s u b _ a r r a y [ 1 7 ] . v a l u e   =   i n s t a l l _ o b j . S x S _ I N S T A L L D I R ; 
 
 
 
 
 
 	 	 } 
 
 
 
                 / /   s e t s   u p   t h e   t a s k   t a b s   a t   t h e   t o p   o f   t h e   a p p 
 
                 f u n c t i o n   b u i l d T a b s ( )   { 
 
                         / /   l o a d   a n   e m p t y   s e c t i o n   i f   t h e   l o a d   i s   b a d 
 
                         i f   ( ! b _ f i l e s _ f o u n d )   { 
 
                                 v a r   c o n t a i n e r _ d i v   =   d o c u m e n t . g e t E l e m e n t B y I d ( " t a b - s e c t i o n " ) ; 
 
                                 v a r   t x t   =   d o c u m e n t . c r e a t e T e x t N o d e ( G e t L a n g S t r i n g ( " U D C S t r i n g _ E r r o r D a t a F i l e " ) ) ; 
 
                                 c o n t a i n e r _ d i v . a p p e n d C h i l d ( t x t ) ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         / /   M a k e   t h e   f o n t s i z e   o f   t h e   s e a r c h   t e x t   s m a l l e r   f o r   K o r e a n .   P u t t i n g   h e r e   b e c a u s e   l a r g e   t e x t   n o t   y e t   d e t e r m i n e d   i n   l o a d s t a t i c f i l e s   f u n c t i o n 
 
 / /                         i f   ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 2 )   { 
 
 / /                                 i f ( ! b _ l a r g e _ t e x t )   { 
 
 / /                                         d o c u m e n t . g e t E l e m e n t B y I d ( " s e a r c h - t x t b o x " ) . s t y l e . f o n t S i z e   =   " 1 3 p x " ; 
 
 / /                                 } 
 
 / /                                 e l s e   { 
 
 / /                                         d o c u m e n t . g e t E l e m e n t B y I d ( " s e a r c h - t x t b o x " ) . s t y l e . f o n t S i z e   =   " 1 9 p x " ; 
 
 / /                                 } 
 
 / /                         } 
 
                         	 	 	 	 
 
                         / /   s e t   u p   t a s k _ a v a i l _ a r r a y   a n d   t a s k _ f i l t e r e d _ s u b s _ a r r a y 
 
                         f i l t e r _ t a s k s ( ) ; 
 
 
 
                         / /   b u i l d   a   h t m l   t a b l e   i n   t h e   D O M 
 
                         / / g r a b   t h e   d i v 
 
                         v a r   c o n t a i n e r _ d i v   =   d o c u m e n t . g e t E l e m e n t B y I d ( " t a b - s e c t i o n " ) ; 
 
 
 
                         / /   c r e a t e   t h e   t a b l e   
 
                         v a r   t a b l e _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ; 
 
                         c o n t a i n e r _ d i v . a p p e n d C h i l d ( t a b l e _ e l ) ; 
 
                         t a b l e _ e l . c l a s s N a m e   =   ( " t a b s - f u l l " ) ; 
 
                         v a r   b o d y _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t b o d y " ) ; 
 
                         t a b l e _ e l . a p p e n d C h i l d ( b o d y _ e l ) ; 
 
 
 
                         / /   n e w   r o w 
 
                         t o p _ r o w   =   d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ;                           
 
                         b o d y _ e l . a p p e n d C h i l d ( t o p _ r o w ) ; 
 
 
 
                         / /   n e w   r o w 
 
                         b o t t o m _ r o w   =   d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; 
 
                         b o d y _ e l . a p p e n d C h i l d ( b o t t o m _ r o w ) ; 
 
 
 
                         / /   f o r   e a c h   t a b   t o   b e   b u i l t 
 
                         v a r   i   =   0 ,   i n d e x   =   0 ; 
 
                         v a r   s t a r t   =   0 ;   i n c   =   1 ; 
 
                         i f ( b _ r t l )   {               
 
                         	 v a r   w   =   0 ; 
 
 
 
                         	 i n c   =   - 1 ; 
 
                         	 f o r   ( w = 0 ;   t a s k s _ o b j . u p p e r T a s k s A r r a y [ w ]   ! =   n u l l ;   w + + ) 
 
                         	 { 
 
                         	 	 	 s t a r t + + ; 
 
                         	 	 	 
 
                         	         i f   ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ w ] . i d   = =   " U D C Q u i e t M o d e "   & &   ( t h i s . t a s k _ a v a i l _ a r r a y [ w ]   = =   f a l s e ) ) 
 
                         	                 c o n t i n u e ; 
 
                         	         
 
                         	         i f   ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ w ] . i d   = =   " U D C e P C P a g e "   & &   ( t h i s . t a s k _ a v a i l _ a r r a y [ w ]   = =   f a l s e ) ) 
 
                         	                 c o n t i n u e ; 
 
 
 
                         	         i f   ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ w ] . i d   = =   " U D C I n k D i s p l a y "   & &   t a s k s _ o b j . u p p e r T a s k s A r r a y [ w ] . I s A v a i l a b l e   = =   f a l s e ) 
 
                         	               c o n t i n u e ; 
 
                         	         
 
                         	 	     i n d e x + + ; 
 
                         	 } 
 
                         	                         	                             	     
 
                         	 s t a r t   =   s t a r t   -   1 ; 
 
                         	 i n d e x   =   i n d e x   -   1 ; 
 
 / /                             i n c   =   - 1 ; 
 
 / /                             i n d e x   =   s t a r t ;   / / r e m o v e   o n e   f o r   t h e   i n k - l e v e l 
 
                         } 
 
 
 
                         f o r   ( i   =   s t a r t ;   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ]   ! =   n u l l ;   i + = i n c )   { 
 
                                 v a r   t a s k   =   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] ; 
 
 
 
                                 i f   ( t a s k . I s A v a i l a b l e   = =   f a l s e )   { 
 
                                         / / i f   ( b _ r t l )   { 
 
                                         / /         i n d e x - - ; 
 
                                         / / } 
 
                                         t h i s . t a s k _ a v a i l _ a r r a y [ i ]   =   f a l s e ; 
 
                                         c o n t i n u e ; 
 
                                 } 
 
 	 	 	 	 
 
                                 i f   ( t a s k . i d   = =   " U D C Q u i e t M o d e "   & &   t h i s . t a s k _ a v a i l _ a r r a y [ i ]   = =   f a l s e ) 
 
                                 { 
 
                                         / / i f   ( b _ r t l )   { 
 
                                         / /         i n d e x - - ; 
 
                                         / / } 
 
                                         c o n t i n u e ; 
 
                                 } 
 
 
 
 	 	 	 	                 i f   ( t a s k . i d   = =   " U D C e P C P a g e "   & &   t h i s . t a s k _ a v a i l _ a r r a y [ i ]   = =   f a l s e ) 
 
 	 	 	 	                 { 
 
 	 	 	 	                     / / i f   ( b _ r t l )   { 
 
 	 	 	 	                     / /         i n d e x - - ; 
 
 	 	 	 	                     / / } 
 
 	 	 	 	                     c o n t i n u e ; 
 
 	 	 	 	                 } 
 
 
 
                                 i f ( t a s k . t y p e   = =   " i n k _ l e v e l " )   { 
 
                                         t h i s . t a s k _ a v a i l _ a r r a y [ i ]   =   f a l s e ; 
 
 
 
                                         / /   i n k   b a r s 
 
                                         v a r   b a r s _ c e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                         t o p _ r o w . a p p e n d C h i l d ( b a r s _ c e l l ) ; 
 
                                         b a r s _ c e l l . r o w S p a n   =   1 ; 
 
                                         v a r   b a r s _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                         b a r s _ d i v . i d   =   " b a r s - f u l l " ; 
 
                                         b a r s _ c e l l . a p p e n d C h i l d ( b a r s _ d i v ) ; 
 
 
 
                                         / /   g r a p h i c 
 
                                         v a r   g r a p h _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                         b a r s _ d i v . a p p e n d C h i l d ( g r a p h _ d i v ) ; 
 
                                         g r a p h _ d i v . i d   =   " b a r s - g r a p h i c " ; 
 
 
 
                                         / /   t e x t 
 
                                         v a r   t e x t _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                         b a r s _ d i v . a p p e n d C h i l d ( t e x t _ d i v ) ; 
 
                                         t e x t _ d i v . i d   =   " b a r s - t e x t " ; 
 
                                         
 
                                         / / r e d u c e   t h e   f o n t   s i z e   i f   1 0 4 1   i n   n o r m a l   t e x t   m o d e 
 
 / /                                         i f   ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 1 )   { 
 
 / /                                                 i f   ( ! b _ l a r g e _ t e x t )   { 
 
 / /                                                         t e x t _ d i v . s t y l e . f o n t S i z e   =   " 1 3 p x " ; 
 
 / /                                                 } 
 
 / /                                         } 
 
 	 	 	 	 	 
 
                               	 	 	 / /   t e x t   
 
                                 	 	 v a r   t e x t _ c e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ;                               
 
                                 	 	 b o t t o m _ r o w . a p p e n d C h i l d ( t e x t _ c e l l ) ; 
 
                                 	 	 v a r   c e l l _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 	 	 t e x t _ c e l l . a p p e n d C h i l d ( c e l l _ d i v ) ; 
 
                                 	 	 c e l l _ d i v . c l a s s N a m e   =   " t a b - t e x t " ; 
 
                             
 
                                 	 	 / /   A d d   a n   e l e m e n t   p l a c e h o l d e r   
 
                                 	 	 v a r   t e x t _ n o d e   =   d o c u m e n t . c r e a t e T e x t N o d e ( " " ) ; 
 
                                 	 	 c e l l _ d i v . a p p e n d C h i l d ( t e x t _ n o d e ) ; 
 
                                 	 	 	 	 	 
 
                                         i f   ( b _ r t l )   { 
 
                                                 i n d e x - - ; 
 
                                         }   e l s e   { 
 
                                                 i n d e x + + ; 
 
                                         } 
 
                                         c o n t i n u e ; 
 
                                 } 
 
 
 
                                 / /   i n d e x   o f   t a s k 
 
                                 t a s k . i n d e x   =   i n d e x ; 
 
                                 i f   ( b _ r t l )   { 
 
                                         i n d e x - - ; 
 
                                 }   e l s e   { 
 
                                         i n d e x + + ; 
 
                                 } 
 
                                 
 
                                 / /   i c o n   i m a g e   ( l i n k   w i t h   b a c k g r o u n d   i m a g e ) 
 
                                 v a r   i c o n _ c e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                 t o p _ r o w . a p p e n d C h i l d ( i c o n _ c e l l ) ; 
 
 
 
                                 v a r   i c o n _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 i c o n _ c e l l . a p p e n d C h i l d ( i c o n _ d i v ) ; 
 
                                 i c o n _ d i v . c l a s s N a m e   =   " t a b - d i v " ; 
 
                                 i c o n _ d i v . t i t l e   =   G e t L a n g S t r i n g ( t a s k . r o l l o v e r _ d e s c ) ; 
 
 
 
                                 v a r   i c o n _ l i n k   =   d o c u m e n t . c r e a t e E l e m e n t ( " a " ) ; 
 
                                 i c o n _ d i v . a p p e n d C h i l d ( i c o n _ l i n k ) ; 
 
                                 i c o n _ l i n k . c l a s s N a m e   =   " t a b - i c o n " ; 
 
 	 	 	 	                 i c o n _ l i n k . t a b I n d e x   =   " 0 " ; 
 
                                 i c o n _ l i n k . i d   =   " t a b - i c o n - "   +   i ; 
 
                                 i f   ( t a s k . t y p e   = =   " l i n k _ e x t e r n a l " )   { 
 
                                         v a r   u r l   =   ( e x p a n d U R L R e f ( t a s k . l o c a t i o n ) ) . r e p l a c e ( / ' / g ,   " \ \ \ ' " ) ; 
 
                                         i c o n _ l i n k . o n c l i c k   =   n e w   F u n c t i o n ( " l a u n c h L i n k ( ' "   +   u r l   +   " ' , ' "   +   t a s k . i d   +   " ' ) " ) ; 
 
 	 	 	 	 	                     i c o n _ l i n k . o n k e y p r e s s   =   f u n c t i o n ( )   { 
 
 	 	 	 	 	 	                       i f   ( e v e n t . k e y C o d e   = =   1 3 ) 
 
 	 	 	 	 	 	 	                         l a u n c h L i n k ( u r l , t a s k . i d ) ; 	 
 
 	 	 	 	 	                     } 
 
                                 } 
 
 	 	 	 	                 e l s e   i f   ( t a s k . t y p e   = =   " l o c a l " )   { 
 
 	 	 	 	 	                   v a r   p a t h   =   c l e a n F i l e P a t h ( t a s k . l o c a t i o n ) ; 
 
                                       p a t h   =   p a t h . r e p l a c e ( / ' / g ,   " \ \ \ ' " ) ; 
 
                                     i c o n _ l i n k . o n c l i c k   =   n e w   F u n c t i o n ( " l a u n c h F i l e ( ' "   +   p a t h   +   " ' , ' "   +   t a s k . i d   +   " ' ) " ) ; 
 
 	 	 	 	 	                 i c o n _ l i n k . o n k e y p r e s s   =   n e w   F u n c t i o n ( " k e y P r e s s O n T a s k ( ' l o c a l ' , ' "   +   p a t h     +   " ' , ' "   +   t a s k . i d   +   " ' ) " ) ; 
 
 	 	 	 	                 } 
 
 	 	 	 	                 e l s e   i f   ( t a s k . t y p e   = =   " o p e n _ f i l e " )   { 
 
 	 	 	 	 	                   v a r   p a t h   =   c l e a n F i l e P a t h ( t a s k . l o c a t i o n ) ; 
 
                                       p a t h   =   p a t h . r e p l a c e ( / ' / g ,   " \ \ \ ' " ) ; 
 
                                     i c o n _ l i n k . o n c l i c k   =   n e w   F u n c t i o n ( " o p e n F i l e ( ' "   +   p a t h   +   " ' , ' "   +   t a s k . i d   +   " ' ) " ) ; 
 
 	 	 	 	 	                 i c o n _ l i n k . o n k e y p r e s s   =   n e w   F u n c t i o n ( " k e y P r e s s O n T a s k ( ' o p e n _ f i l e ' , ' "   +   p a t h     +   " ' , ' "   +   t a s k . i d   +   " ' ) " ) ; 
 
 	 	 	 	                 } 	 	 	 	                 
 
                                 e l s e   { 
 
                                         i c o n _ l i n k . o n c l i c k   =   n e w   F u n c t i o n ( " s e l e c t N e w T a b ( ' "   +   i   +   " ' ,   f a l s e ) " ) ; 
 
 	 	 	 	 	                     i c o n _ l i n k . o n k e y p r e s s   =   n e w   F u n c t i o n ( " k e y P r e s s O n T a b ( ' "   +   i   +   " ' ) " ) ; 
 
                                 } 
 
 	 	 	 	 
 
                                 i f ( b _ i e 6 )   { 
 
                                           i c o n _ l i n k . s e t A t t r i b u t e ( " s r c " ,   " U D C _ f i l e s / i m g / b l a n k . g i f " ) ; 
 
                                 } 
 
                                 e l s e   { 
 
 	 	 	 	 / /   K 2 0 .   P R 2 6 3 3 9   " - 1 "   C D   v a r i a n t s   -   r e m o v e   F a x   f u n c t i o n a l i t y   b y   p a c k a g i n g   F a x   i n   R e q u i r e d   M S I 
 
                                         i f   ( t a s k . i d   = =   " U D C D e v i c e P a g e " )   { 
 
 	 	 	 	 	 	 i f ( d e v i c e _ o b j . I s F u n c t i o n P r i n t   & &   d e v i c e _ o b j . I s F u n c t i o n S c a n   & &   ! d e v i c e _ o b j . I s F u n c t i o n F a x )   { 
 
 	 	 	 	 	 	 	 t a s k . i m a g e   =   " . / U D C _ f i l e s / t a s k I m g / D e v i c e A c t i o n s _ P r i n t S c a n . p n g " ; 
 
 	 	 	 	 	 	 } 
 
 	 	 	 	 	 	 e l s e   i f ( d e v i c e _ o b j . I s F u n c t i o n P r i n t   & &   ! d e v i c e _ o b j . I s F u n c t i o n F a x )   { 
 
 	 	 	 	 	 	 	 t a s k . i m a g e   =   " . / U D C _ f i l e s / t a s k I m g / D e v i c e A c t i o n s _ P r i n t . p n g " ; 
 
 	 	 	 	 	 	 } 
 
 	 	 	 	 	 } 
 
 	 	 	 	 	 i c o n _ l i n k . s t y l e . b a c k g r o u n d I m a g e   =   " u r l ( ' "   +   t a s k . i m a g e   +   " ' ) " ; 
 
 	 	 	 	 	 i c o n _ l i n k . s e t A t t r i b u t e ( " a l t " ,   G e t L a n g S t r i n g ( t a s k . t i t l e ) ) ; 
 
                                 } 
 
 
 
                                 / /   c a l l b a c k s 
 
 	 	 	 	                 i c o n _ l i n k . o n f o c u s   =   n e w   F u n c t i o n ( " r o l l o v e r ( ' "   +   i   +   " ' ,   t r u e ) " ) ; 
 
 	 	 	 	                 i c o n _ l i n k . o n f o c u s o u t   =   n e w   F u n c t i o n ( " r o l l o v e r ( ' "   +   i   +   " ' ,   f a l s e ) " ) ; 
 
                                 i c o n _ l i n k . o n m o u s e o v e r   =   n e w   F u n c t i o n ( " r o l l o v e r ( ' "   +   i   +   " ' ,   t r u e ) " ) ; 
 
                                 i c o n _ l i n k . o n m o u s e o u t   =   n e w   F u n c t i o n ( " r o l l o v e r ( ' "   +   i   +   " ' ,   f a l s e ) " ) ; 
 
 
 
                                 / /   t e x t   
 
                                 v a r   t e x t _ c e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ;                               
 
                                 b o t t o m _ r o w . a p p e n d C h i l d ( t e x t _ c e l l ) ; 
 
                                 v a r   c e l l _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 t e x t _ c e l l . a p p e n d C h i l d ( c e l l _ d i v ) ; 
 
                                 c e l l _ d i v . c l a s s N a m e   =   " t a b - t e x t " ; 
 
                                 c e l l _ d i v . i d   =   " t a b - t e x t - "   +   i ; 
 
                                 
 
                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 3 ) 
 
                                   c e l l _ d i v . s t y l e . w i d t h   =   " 1 1 2 p x " ; 
 
                                   
 
 / / c e l l _ d i v . s t y l e . b o r d e r   =   " 1 p x   s o l i d   # 0 c f f 0 0 " ;     
 
 	 	 	 	 
 
 	 	 	 	 / /   K 2 0 .   P R 2 6 3 3 9   " - 1 "   C D   v a r i a n t s   -   r e m o v e   F a x   f u n c t i o n a l i t y   b y   p a c k a g i n g   F a x   i n   R e q u i r e d   M S I 
 
                                 i f ( t a s k . i d   = = =   " U D C D e v i c e P a g e " )   { 
 
                                         i f ( d e v i c e _ o b j . I s F u n c t i o n P r i n t   & &   d e v i c e _ o b j . I s F u n c t i o n S c a n   & &   ! d e v i c e _ o b j . I s F u n c t i o n F a x ) 
 
                                                 t a s k . t i t l e   =   " U D C S t r i n g 0 0 2 0 1 " ; 
 
                                         e l s e   i f ( d e v i c e _ o b j . I s F u n c t i o n P r i n t   & &   ! d e v i c e _ o b j . I s F u n c t i o n F a x ) 
 
                                                 t a s k . t i t l e   =   " U D C S t r i n g 0 0 2 0 0 " ; 
 
                                 } 
 
                                 v a r   t e x t _ n o d e   =   d o c u m e n t . c r e a t e T e x t N o d e ( G e t L a n g S t r i n g ( t a s k . t i t l e ) ) ; 
 
                                 i f ( b _ r t l ) 
 
                                         c e l l _ d i v . s t y l e . d i r e c t i o n = " r t l " ; 
 
                                 c e l l _ d i v . a p p e n d C h i l d ( t e x t _ n o d e ) ; 
 
 
 
                                 / / r e d u c e   t h e   f o n t   s i z e   i f   1 0 4 1   o r   2 0 5 2   i n   n o r m a l   t e x t   m o d e 
 
 / /                                 i f   ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 1   | |   i n s t a l l _ o b j . L A N G _ I D   = = =   2 0 5 2 )   { 
 
 / /                                         i f   ( ! b _ l a r g e _ t e x t )   { 
 
 / /                                                 c e l l _ d i v . s t y l e . f o n t S i z e   =   " 1 2 p x " ; 
 
 / /                                         } 
 
 / /                                 }                                 
 
                                 
 
                                 / /   c o p i e d   c a l l b a c k s   t o   t e x t   s e c t i o n 
 
                                 t e x t _ c e l l . o n c l i c k   =   i c o n _ l i n k . o n c l i c k ; 
 
 	 	 	 	                 t e x t _ c e l l . o n k e y p r e s s   =   i c o n _ l i n k . o n k e y p r e s s ; 
 
                                 t e x t _ c e l l . o n m o u s e o v e r   =   i c o n _ l i n k . o n m o u s e o v e r ; 
 
                                 t e x t _ c e l l . o n m o u s e o u t   =   i c o n _ l i n k . o n m o u s e o u t ; 
 
 	 	 	 	                 t e x t _ c e l l . o n f o c u s   =   i c o n _ l i n k . o n f o c u s ; 
 
 	 	 	 	                 t e x t _ c e l l . o n f o c u s o u t   =   i c o n _ l i n k . o n f o c u s o u t ; 
 
                                 t e x t _ c e l l . t i t l e   =   i c o n _ d i v . t i t l e ; 
 
                         } 
 
 
 
                         / / i f ( b _ r t l )   { 
 
                         / /         v a r   i ;   
 
                         / /         f o r   ( i   =   0 ;   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ]   ! =   n u l l ;   i + + )   { 
 
                         / /                 i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . i n d e x   ! =   n u l l ) 
 
                         / /                         t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . i n d e x   =   i n d e x   -   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . i n d e x - 1 ; 
 
                         / /       } 
 
                         / / } 
 
                 } 
 
 	 	 
 
 	 	         f u n c t i o n   k e y P r e s s O n T a b ( i n d e x )   { 
 
 	 	 	           a d d L o g M e s s a g e ( " K e y   p r e s s e d   o n   t a b   i n d e x   :   " + i n d e x + " ,   k e y c o d e   i s   " + e v e n t . k e y C o d e ) ; 
 
 	 	 	           i f   ( e v e n t . k e y C o d e   = =   1 3 ) 
 
 	 	 	 	             s e l e c t N e w T a b ( i n d e x ,   f a l s e ) ; 	 	 	 	 
 
 	 	         } 
 
 
 
                 / /   d r a w s   t h e   i n k   b a r s   w i t h   d a t a   f r o m   i n k   j s o n 
 
                 f u n c t i o n   d r a w I n k ( )   { 
 
                         / /   g e t   t h e   h t m l   o b j e c t   a n d   e a r l y   r e t u r n   i f   n e e d e d 
 
                         v a r   i n k _ d o m   =   d o c u m e n t . g e t E l e m e n t B y I d ( " b a r s - g r a p h i c " ) ; 
 
                         v a r   t e x t _ d i v   =   d o c u m e n t . g e t E l e m e n t B y I d ( " b a r s - t e x t " ) ; 
 
                         v a r   i n k _ b l o c k   =   d o c u m e n t . g e t E l e m e n t B y I d ( " b a r s - f u l l " ) ; 
 
 
 
                         i f   ( i n k _ d o m   = =   n u l l   | |   t e x t _ d i v   = =   n u l l   | |   i n k _ b l o c k   = =   n u l l ) 
 
                                 r e t u r n ; 
 
 
 
                         / / d e l e t e   o l d   c o n t e n t 
 
                         i n k _ d o m . i n n e r H T M L   =   " " ; 
 
                         v a r   c h i l d l i s t   =   i n k _ d o m . c h i l d N o d e s ; 
 
                         i f   ( c h i l d l i s t   ! =   n u l l ) 
 
                                 f o r   ( v a r   i   =   0 ;   c h i l d l i s t [ i ]   ! =   n u l l ;   i + + ) 
 
                                         i n k _ d o m . r e m o v e C h i l d ( c h i l d l i s t [ i ] ) ; 
 
 
 
                         / /   e a r l   r e t u r n   f o r   n o   t a s k   d a t a 
 
                         i f   ( i n k _ t a s k   = =   n u l l ) 
 
                                 r e t u r n ; 
 
 
 
                         / /   m o u s e o v e r   t e x t ,   t a b   t i t l e   a n d   e x t e r n a l   c a l l ; 
 
                         v a r   t e x t _ n o d e   =   d o c u m e n t . c r e a t e T e x t N o d e ( G e t L a n g S t r i n g ( i n k _ t a s k . t i t l e ) ) ; 
 
                         i f ( b _ r t l ) 
 
                                 t e x t _ d i v . s t y l e . d i r e c t i o n = " r t l " ; 
 
                         v a r   c h i l d l i s t   =   t e x t _ d i v . c h i l d N o d e s ; 
 
                         i f   ( c h i l d l i s t   ! =   n u l l ) 
 
                                 f o r   ( v a r   i   =   0 ;   c h i l d l i s t [ i ]   ! =   n u l l ;   i + + ) 
 
                                         t e x t _ d i v . r e m o v e C h i l d ( c h i l d l i s t [ i ] ) ; 
 
                         t e x t _ d i v . a p p e n d C h i l d ( t e x t _ n o d e ) ; 
 
 
 
                         / /   m a k e s   t h e   w h o l e   t a s k   i n v i s i b l e   i f   t h e r e   i s   n o   i n k   f i l e 
 
                         i f ( i n k _ o b j   = =   n u l l )   { 
 
                                 i n k _ b l o c k . s t y l e . v i s i b i l i t y   =   " h i d d e n " ; 
 
                                 t e x t _ d i v . s t y l e . v i s i b i l i t y   =   " h i d d e n " ; 
 
                                 i n k _ d o m . s t y l e . v i s i b i l i t y   =   " h i d d e n " ; 
 
                                 r e t u r n ; 
 
                         } 
 
                         e l s e   { 
 
                                 i n k _ b l o c k . s t y l e . v i s i b i l i t y   =   " v i s i b l e " ; 
 
                                 t e x t _ d i v . s t y l e . v i s i b i l i t y   =   " v i s i b l e " ; 
 
                                 i n k _ d o m . s t y l e . v i s i b i l i t y   =   " v i s i b l e " ; 
 
                         } 
 
 
 
                         / / " i d " : " U D C I n k D i s p l a y " , 
 
                         v a r   b _ a c t i v e   =   c h e c k R e q ( i n k _ t a s k ) ; 
 
 
 
                         / /   d i s a b l e s / e n a b l e s   t h e   m o u s e o v e r   t e x t     a n d   c l i c k   t h r o u g h   i f   t h e   d e v i c e   i s   c o n n e c t e d / n o t   c o n n e c t e d 
 
                         i f   ( b _ a c t i v e )   { 
 
                                 / /   o n - c l i c k 
 
                                 v a r   p a t h   =   c l e a n F i l e P a t h ( i n k _ t a s k . l o c a t i o n ) ; 
 
                                 p a t h   =   p a t h . r e p l a c e ( / ' / g ,   " \ \ \ ' " ) ; 
 
 	 	 	 	 
 
 	 	 	 	                 / / e n a b l e   t a b b i n g 
 
 	 	 	 	                 i n k _ b l o c k . t a b I n d e x   =   " 0 " ; 
 
                                 i n k _ b l o c k . o n c l i c k   =   n e w   F u n c t i o n ( " l a u n c h F i l e ( ' "   +   p a t h   +   " ' , ' U D C I n k D i s p l a y ' ) " ) ; 
 
 	 	 	 	 
 
 	 	 	 	                 / / w h e n   u s e r   p r e s s   e n t e r   o n   i n k   b l o c k 
 
 	 	 	 	                 i n k _ b l o c k . o n k e y p r e s s   =   f u n c t i o n ( )   { 
 
 	 	 	 	 	                   i f   ( e v e n t . k e y C o d e   = =   1 3 ) 
 
 	 	 	 	 	 	                     l a u n c h F i l e ( p a t h , ' U D C I n k D i s p l a y ' ) ; 
 
 	 	 	 	                 } 
 
 	 	 	 	                 
 
                                 / /   m o u s o v e r   t e x t 
 
                                 i n k _ b l o c k . t i t l e   =   G e t L a n g S t r i n g ( i n k _ t a s k . r o l l o v e r _ d e s c ) ;                   
 
                                 / /   c u r s o r   t y p e   o n   m o u s o v e r 
 
                                 d o c u m e n t . g e t E l e m e n t B y I d ( " b a r s - f u l l " ) . s t y l e . c u r s o r   =   " p o i n t e r " ; 
 
                         } 
 
                         e l s e   { 
 
                                 / /   o n - c l i c k 
 
                                 i n k _ b l o c k . o n c l i c k   =   n u l l ; 
 
 	 	 	 	                 i n k _ b l o c k . o n k e y p r e s s   =   n u l l ; 
 
                                 / /   m o u s o v e r   t e x t 
 
                                 i n k _ b l o c k . t i t l e   =   " " ; 
 
                                 / /   t e x t   c o l o r 
 
                                 d o c u m e n t . g e t E l e m e n t B y I d ( " b a r s - t e x t " ) . s t y l e . c o l o r   =   " # c 0 c 0 c 0 " ; 
 
                                 / /   c u r s o r   t y p e   o n   m o u s o v e r 
 
                                 d o c u m e n t . g e t E l e m e n t B y I d ( " b a r s - f u l l " ) . s t y l e . c u r s o r   =   " d e f a u l t " ; 
 
                         } 
 
 
 
                         / /   c h e c k   f o r   i n k   o b j e c t   c o n t e n t 
 
                         i f   ( i n k _ o b j   = =   n u l l   | |   i n k _ o b j . l e n g t h   = =   n u l l   | |   i n k _ o b j . l e n g t h   = =   0 ) 
 
                                 r e t u r n ; 
 
 
 
                         / /   s i z e   c a l c u l a t i o n s ,   t o t a l   w i d t h   i s   1 2 0 ,   5   b u f f e r   o n   t h e   s i d e s 
 
                         v a r   a r r a y _ s i z e   =   i n k _ o b j . l e n g t h ; 
 
                         v a r   w i d t h   =   M a t h . f l o o r ( 1 2 0   /   a r r a y _ s i z e ) ;   / / S c a l e   O K 
 
                         i f   ( w i d t h   >   3 0 ) 
 
                                 w i d t h   =   3 0 ; 
 
 
 
                         v a r   t o t a l _ w i d t h   =   w i d t h   *   a r r a y _ s i z e ; 
 
                         v a r   p a l l e t _ s i z e ; 
 
                         i f   ( b _ l a r g e _ t e x t ) 
 
                                 p a l l e t _ s i z e   =   1 4 0 ; 
 
                         e l s e 
 
                                 p a l l e t _ s i z e   =   1 3 0 ; 
 
                                 
 
                         v a r   l e f t _ b u f f   =   M a t h . f l o o r ( ( p a l l e t _ s i z e   -   t o t a l _ w i d t h )   /   2 ) ;   / / S c a l e   O K 
 
 
 
                         / /   d r a w   e a c h   b a r 
 
                         v a r   i ; 
 
                         f o r   ( i   =   0 ;   i   <   a r r a y _ s i z e ;   i + + )   { 
 
                                 / / b a c k g r o u n d 
 
                                 v a r   b a c k _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 b a c k _ d i v . c l a s s N a m e   =   " b a r s - b a c k " ; 
 
                                 b a c k _ d i v . s t y l e . w i d t h   =   w i d t h   -   7 ; 
 
                                 b a c k _ d i v . s t y l e . l e f t   =   l e f t _ b u f f   +   w i d t h   *   i ; 
 
                                 i f   ( b _ a c t i v e ) 
 
                                         b a c k _ d i v . s t y l e . b a c k g r o u n d C o l o r   =   " # b 3 b 4 b 7 " ; 
 
                                 e l s e 
 
                                         b a c k _ d i v . s t y l e . b a c k g r o u n d C o l o r   =   " # 9 9 9 9 9 9 " ; 
 
                                 i n k _ d o m . a p p e n d C h i l d ( b a c k _ d i v ) ; 
 
 
 
                                 / / b a r 
 
                                 i f   ( i n k _ o b j [ i ] . P E N _ C O L O R 2   = =   " " )   { 
 
                                         c r e a t e B a r ( b a c k _ d i v ,   i n k _ o b j [ i ] . P E N _ C O L O R 1 ,   3 ,   w i d t h   -   1 3 ,   i n k _ o b j [ i ] . I N K _ L E V E L ,   b _ a c t i v e ) ; 
 
                                 } 
 
                                 e l s e   { 
 
                                         / /   t h r e e   c o l o r   b a r s 
 
                                         v a r   t h i r d _ w i d t h   =   ( w i d t h   -   1 3 )   /   3 ; 
 
                                         v a r   p t 1   =   3 ; 
 
                                         v a r   p t 2   =   M a t h . f l o o r ( 3   +   t h i r d _ w i d t h ) ; 
 
                                         v a r   p t 3   =   M a t h . f l o o r ( 3   +   t h i r d _ w i d t h   *   2 ) ; 
 
                                         v a r   p t 4   =   M a t h . f l o o r ( 3   +   t h i r d _ w i d t h   *   3 ) ; 
 
 
 
                                         c r e a t e B a r ( b a c k _ d i v ,   i n k _ o b j [ i ] . P E N _ C O L O R 1 ,   p t 1 ,   p t 2   -   p t 1 ,   i n k _ o b j [ i ] . I N K _ L E V E L ,   b _ a c t i v e ) ; 
 
                                         c r e a t e B a r ( b a c k _ d i v ,   i n k _ o b j [ i ] . P E N _ C O L O R 2 ,   p t 2 ,   p t 3   -   p t 2 ,   i n k _ o b j [ i ] . I N K _ L E V E L ,   b _ a c t i v e ) ; 
 
                                         c r e a t e B a r ( b a c k _ d i v ,   i n k _ o b j [ i ] . P E N _ C O L O R 3 ,   p t 3 ,   p t 4   -   p t 3 ,   i n k _ o b j [ i ] . I N K _ L E V E L ,   b _ a c t i v e ) ; 
 
                                 } 
 
 
 
                                 / /   e r r o r   i c o n s   i f   a n y 
 
                                 i f   ( i n k _ o b j [ i ] . P E N _ S T A T E I C O N   ! =   " O K "   & &   b _ a c t i v e )   { 
 
                                         v a r   l e f t _ o f f   =   M a t h . f l o o r ( ( w i d t h   -   2   -   1 5 )   /   2 ) ;     / / S c a l e   O K 
 
                                         v a r   i c o n _ i m g   =   d o c u m e n t . c r e a t e E l e m e n t ( " i m g " ) ; 
 
                                         i f   ( i n k _ o b j [ i ] . P E N _ S T A T E I C O N   = =   " E r r o r " ) 
 
                                                 i c o n _ i m g . s e t A t t r i b u t e ( " s r c " ,   " . / U D C _ f i l e s / i m g / i c o n _ s t a t u s _ c r i t i c a l 0 9 . p n g " ) ; 
 
                                         e l s e   i f   ( i n k _ o b j [ i ] . P E N _ S T A T E I C O N   = =   " Q u e s t i o n " ) 
 
                                                 i c o n _ i m g . s e t A t t r i b u t e ( " s r c " ,   " . / U D C _ f i l e s / i m g / i c o n _ s t a t u s _ u n k n o w n 0 9 . p n g " ) ; 
 
                                         e l s e 
 
                                                 i c o n _ i m g . s e t A t t r i b u t e ( " s r c " ,   " . / U D C _ f i l e s / i m g / i c o n _ s t a t u s _ m i n o r 0 9 . p n g " ) ; 
 
                                         i c o n _ i m g . c l a s s N a m e   =   " i n k - w a r n - i c o n " ; 
 
                                         i c o n _ i m g . s t y l e . l e f t   =   l e f t _ o f f ; 
 
                                         i c o n _ i m g . s t y l e . t o p   =   4 ; 
 
                                         b a c k _ d i v . a p p e n d C h i l d ( i c o n _ i m g ) ; 
 
                                 } 
 
                         } 
 
                 } 
 
 
 
                 / /   c r e a t e s   a n   i n d v i d u a l   i n k   b a r   a n d   p a s s e s   i s   b a c k   t o   t h e   c a l l i n g   f u n c t i o n   f o r   a t t a c h m e n t 
 
                 f u n c t i o n   c r e a t e B a r ( t a r g e t _ b a c k ,   c o l o r _ s t r i n g ,   l e f t ,   w i d t h ,   l e v e l ,   b _ a c t i v e )   { 
 
                         / /   r o u n d   t o   n e a r e s t   1 0 % 
 
                         l e v e l   =   1 0   *   ( M a t h . f l o o r ( l e v e l   /   1 0   +   0 . 5 ) ) 
 
 
 
                         / /   h e i g h t   c a l c u l a t i o n s 
 
                         v a r   h e i g h t ,   s o l i d _ h e i g h t ,   b l u r _ h e i g h t ,   r e m a i n i n g _ h e i g h t ; 
 
                         h e i g h t   =   M a t h . f l o o r ( 9 8   /   1 0 0 . 0   *   l e v e l ) ;     / / S c a l e   O K 
 
                         s o l i d _ h e i g h t   =   h e i g h t   -   8 ;     / / S c a l e   O K 
 
                         i f   ( s o l i d _ h e i g h t   <   0 ) 
 
                                 s o l i d _ h e i g h t   =   0 ; 
 
                         b l u r _ h e i g h t   =   h e i g h t   -   s o l i d _ h e i g h t ; 
 
                         r e m a i n i n g _ h e i g h t   =   9 8   -   b l u r _ h e i g h t   -   s o l i d _ h e i g h t ; 
 
                         
 
                         / / a l e r t ( l e v e l   +   " ,   "   +   h e i g h t   +   " ,   "   +     s o l i d _ h e i g h t   +   " ,   "   +   b l u r _ h e i g h t ) ; 
 
 
 
                         / /   s o l i d   p a r t   o f   t h e   b a r 
 
                         i f   ( s o l i d _ h e i g h t   >   0 )   { 
 
                                 v a r   c o l o r _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 c o l o r _ d i v . c l a s s N a m e   =   " b a r s - c o l o r " ; 
 
                                 c o l o r _ d i v . s t y l e . l e f t   =   l e f t ; 
 
                                 c o l o r _ d i v . s t y l e . w i d t h   =   w i d t h ; 
 
                                 c o l o r _ d i v . s t y l e . h e i g h t   =   s o l i d _ h e i g h t ; 
 
                                 i f   ( b _ a c t i v e ) 
 
                                         c o l o r _ d i v . s t y l e . b a c k g r o u n d C o l o r   =   " # "   +   c o l o r _ s t r i n g . s u b s t r i n g ( 2 ,   8 ) ; 
 
                                 e l s e 
 
                                         c o l o r _ d i v . s t y l e . b a c k g r o u n d C o l o r   =   " # 4 4 4 4 4 4 " ; 
 
                                 t a r g e t _ b a c k . a p p e n d C h i l d ( c o l o r _ d i v ) ; 
 
                         } 
 
 
 
                         / /   b l u r r e d   p a r t   o f   t h e   b a r 
 
                         i f   ( b l u r _ h e i g h t   >   0 )   { 
 
                                 v a r   b l u r _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 b l u r _ d i v . c l a s s N a m e   =   " b a r s - c o l o r - g r a d " ; 
 
                                 b l u r _ d i v . s t y l e . l e f t   =   l e f t ; 
 
                                 b l u r _ d i v . s t y l e . w i d t h   =   w i d t h ; 
 
                                 b l u r _ d i v . s t y l e . h e i g h t   =   b l u r _ h e i g h t ; 
 
                                 b l u r _ d i v . s t y l e . b o t t o m   =   3   +   s o l i d _ h e i g h t ; 
 
                                 i f   ( b _ a c t i v e ) 
 
                                         b l u r _ d i v . s t y l e . f i l t e r   =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . G r a d i e n t ( E n d C o l o r S t r = # "   +   c o l o r _ s t r i n g . s u b s t r i n g ( 2 ,   8 )   +   " ,   S t a r t C o l o r S t r = # f f f f f f ) " ; 
 
                                 e l s e 
 
                                         b l u r _ d i v . s t y l e . f i l t e r   =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . G r a d i e n t ( E n d C o l o r S t r = # 4 4 4 4 4 4 ,   S t a r t C o l o r S t r = # 9 9 9 9 9 9 ) " ; 
 
                                 t a r g e t _ b a c k . a p p e n d C h i l d ( b l u r _ d i v ) ; 
 
                         } 
 
                         
 
                         / /   r e m a i n i n g   p a r t   o f   t h e   b a r   ( a t   t o p ) 
 
                         i f   ( r e m a i n i n g _ h e i g h t   >   0 )   { 
 
                                 v a r   r e m a i n i n g _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 r e m a i n i n g _ d i v . c l a s s N a m e   =   " b a r s - c o l o r - w h i t e " ; 
 
                                 r e m a i n i n g _ d i v . s t y l e . l e f t   =   l e f t ; 
 
                                 r e m a i n i n g _ d i v . s t y l e . w i d t h   =   w i d t h ; 
 
                                 r e m a i n i n g _ d i v . s t y l e . h e i g h t   =   r e m a i n i n g _ h e i g h t ; 
 
                                 r e m a i n i n g _ d i v . s t y l e . b o t t o m   =   3   +   s o l i d _ h e i g h t   +   b l u r _ h e i g h t ;                                 
 
                                 t a r g e t _ b a c k . a p p e n d C h i l d ( r e m a i n i n g _ d i v ) ; 
 
                         }                         
 
 
 
                         
 
                 } 
 
 
 
                 / /   l o o k   t h r o u g h   r e q u i r e m e n t   a r r a y s   t o   r e m o v e / d i s a b l e   b a d   t a s k s 
 
                 f u n c t i o n   f i l t e r _ t a s k s ( )   { 
 
                         / /   e a r l y   r e t u r n   i f   t h e   l o a d   i s   b a d 
 
                         i f   ( ! b _ f i l e s _ f o u n d ) 
 
                                 r e t u r n ; 
 
 
 
                         t a s k _ a v a i l _ a r r a y   =   n e w   A r r a y ( ) ; 
 
                         t a s k _ i m a g e _ a r r a y   =   n e w   A r r a y ( ) ; 
 
 
 
                         v a r   i ; 
 
                         f o r   ( i   =   0 ;   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ]   ! =   n u l l ;   i + + )   { 
 
                                 / /   d e t r m i n e   h i g h e r   l e v e l   t a s k   a v a i l i b i l i t y 
 
                                 t a s k _ a v a i l _ a r r a y [ i ]   =   c h e c k R e q ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] ) 
 
 
 
                                 / /   h a n d l i n g   f o r   t h e   i n k   t a s k   ( s p e c i a l   c a s e ) 
 
                                 i f   ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . t y p e   = =   " i n k _ l e v e l " )   { 
 
                                         i n k _ t a s k   =   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] ; 
 
                                         t a s k _ a v a i l _ a r r a y [ i ]   =   f a l s e ; 
 
                                         c o n t i n u e ; 
 
                                 } 
 
 
 
                                 t a s k _ i m a g e _ a r r a y [ i ]   =   n e w   A r r a y ( ) ; 
 
                                 t a s k _ i m a g e _ a r r a y [ i ] [ 0 ]   =   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . i m g 0 ; 
 
                                 t a s k _ i m a g e _ a r r a y [ i ] [ 1 ]   =   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . i m g 1 ; 
 
                                 t a s k _ i m a g e _ a r r a y [ i ] [ 2 ]   =   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . i m g 2 ; 
 
 
 
                                 / /   s u b t a s k s   f o r   t h e   c a t e g o r y   b a s e d   t a s k s   
 
                                 i f   ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . c a t e g o r y A r r a y   ! =   n u l l )   { 
 
                                         / /   c a t e g o r y   a r r a y   
 
                                         v a r   j ; 
 
                                         f o r   ( j   =   0 ;   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . c a t e g o r y A r r a y [ j ]   ! =   n u l l ;   j + + )   { 
 
                                                 v a r   k ; 
 
                                                 f o r   ( k   =   0 ;   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . c a t e g o r y A r r a y [ j ] . s u b T a s k s A r r a y [ k ]   ! =   n u l l ;   k + + )   { 
 
                                                         t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . c a t e g o r y A r r a y [ j ] . s u b T a s k s A r r a y [ k ] . a c t i v e   =   c h e c k R e q ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . c a t e g o r y A r r a y [ j ] . s u b T a s k s A r r a y [ k ] ) ; 
 
                                                 } 
 
                                         } 
 
                                 } 
 
                                       
 
                                 / /   t a s k   w i t h   o n e   g r o u p   o f   s u b - t a s k s 
 
                                 i f   ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . s u b T a s k s A r r a y   = =   n u l l ) 
 
                                         c o n t i n u e ; 
 
                                 v a r   j ; 
 
                                 f o r   ( j   =   0 ;   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . s u b T a s k s A r r a y [ j ]   ! =   n u l l ;   j + + )   { 
 
                                         / /   d e t e r m i n e   s u b t a s k   a v a i l i b i l i t y 
 
                                         t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . s u b T a s k s A r r a y [ j ] . a c t i v e   =   c h e c k R e q ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . s u b T a s k s A r r a y [ j ] ) ; 
 
                                 } 
 
                         } 
 
                         t a s k _ n u m b e r   =   i ; 
 
                 } 
 
 
 
                 / /   l o a d s   a   j s o n   f i l e   i n t o   a n   o b j e c t   a n d   r e t u r n s   t h e   c r e a t e d   o b j e c t 
 
                 f u n c t i o n   L o a d J s o n ( f i l e n a m e ,   b _ e c h o )   { 
 
                         v a r   o u t _ o b j   =   n u l l ; 
 
                         v a r   o u t _ s t r i n g ,   s y s t e m _ o b j ,   h a n d l e ; 
 
 
 
                         t r y   { 
 
                                 / /   r e a d   f i l e   c o n t e n t s 
 
                                 s y s t e m _ o b j   =   n e w   A c t i v e X O b j e c t ( " S c r i p t i n g . F i l e S y s t e m O b j e c t " ) ; 
 
                                 h a n d l e   =   s y s t e m _ o b j . O p e n T e x t F i l e ( f i l e n a m e ,   1 ) ; 
 
                                 o u t _ s t r i n g   =   h a n d l e . R e a d A l l ( ) ; 
 
                                 h a n d l e . C l o s e ( ) ; 
 
 
 
                                 / /   c o n v e r t   t o   a   l o c a l   o b j e c t 
 
                                 o u t _ o b j   =   e v a l ( ' ( '   +   o u t _ s t r i n g   +   ' ) ' ) ; 
 
                         } 
 
                         c a t c h   ( e r r )   { 
 
                                 t r y   { 
 
                                         / /   r e - t r y   t h e   f i l e   o p e n   a s   a   u n i c o d e   f i l e   ( m o s t   o f   t h e   l o c a l i z a t i o n   f i l e s ) 
 
                                         h a n d l e   =   s y s t e m _ o b j . O p e n T e x t F i l e ( f i l e n a m e ,   1 ,   f a l s e ,   t r u e ) ; 
 
                                         o u t _ s t r i n g   =   h a n d l e . R e a d A l l ( ) ; 
 
                                         h a n d l e . C l o s e ( ) ; 
 
 
 
                                         o u t _ o b j   =   e v a l ( ' ( '   +   o u t _ s t r i n g   +   ' ) ' ) ; 
 
                                 } 
 
                                 c a t c h   ( e r r )   { 
 
                                         a d d L o g M e s s a g e ( " E R R O R :   L o a d J s o n   l o a d   e r r o r   ( u n i c o d e ) :   "   +   e r r . d e s c r i p t i o n   +   "   f i l e n a m e   =   "   +   f i l e n a m e ) ; 
 
                                         a d d L o g M e s s a g e ( "           :   O K   i f   t h i s   i s   t h e   U D C _ i n k L e v e l . j s o n   f i l e " ) ; 
 
                                         o u t _ o b j   =   n u l l ; 
 
                                 } 
 
                         } 
 
 
 
                         / /   c o p y   f i l e   t e x t   i n t o   t h e   l o g   f i l e 
 
                         i f   ( b _ e c h o )   { 
 
                                 i f   ( o u t _ o b j )   { 
 
                                         a d d L o g M e s s a g e ( " - - - - - - - - - - - - - - - - - - - - - - - "   +   f i l e n a m e   +   " - - - - - - - - - " ) ; 
 
                                         a d d L o g M e s s a g e ( " c o n t e n t s   =   "   +   o u t _ s t r i n g ) ; 
 
                                         a d d L o g M e s s a g e ( " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " ) ; 
 
                                 } 
 
                         } 
 
                         r e t u r n   o u t _ o b j ; 
 
                 } 
 
 
 
                 / /   s e t s   t h e   n a m e   i n   t h e   t i t l e   b a r 
 
                 f u n c t i o n   s e t A p p S t r i n g s ( )   { 
 
                         / /   e a r l y   r e t u r n   i f   t h e   l o a d   i s   b a d 
 
                         i f   ( d e v i c e _ o b j   = =   n u l l ) 
 
                                 r e t u r n ; 
 
 
 
                         / /   I M P O R T A N T ! ! !   I f   t h i s   e v e r   c h a n g e s   n o t i f y   t h e   I n s t a l l e r   T e a m   b e c a u s e   t h e   D e v i c e S e t u p ' s   F i n i s h S e t u p B L 
 
                         / /   i s   t r y i n g   t o   d o   a   F i n d W i n d o w ( )   o n   t h e   n a m e   i n   t h e   t i t l e   b a r . 
 
 
 
                         v a r   d e v i c e _ n a m e   =   d e v i c e _ o b j . P R I N T E R _ F R I E N D L Y _ N A M E ; 
 
 
 
                         i f ( ! d e v i c e _ o b j . I s F u n c t i o n P r i n t   & &   d e v i c e _ o b j . I s F u n c t i o n S c a n )                         
 
                               d o c u m e n t . t i t l e   =   d e v i c e _ n a m e   +   "   :   "   +   G e t L a n g S t r i n g ( " U D C S t r i n g _ U D C _ S c a n n e r _ N a m e " ) ; 
 
                         e l s e 
 
                               d o c u m e n t . t i t l e   =   d e v i c e _ n a m e   +   "   :   "   +   G e t L a n g S t r i n g ( " U D C S t r i n g _ U D C _ P r i n t e r _ N a m e " ) ; 
 
                 } 
 
 
 
                 / /   l o a d s   a   n e w   f o o t e r   . j s o n   f i l e   a n d   p o p u l a t e s   t h e   f o o t e r   s e c t i o n 
 
                 / /   d e p r i c a t e d 
 
                 f u n c t i o n   L o a d F o o t e r ( f i l e n a m e )   { 
 
                         v a r   f o o t e r _ d i v   =   d o c u m e n t . g e t E l e m e n t B y I d ( " f o o t e r - s e c t i o n " ) ; 
 
 
 
                         / / d e l e t e   o l d   c o n t e n t 
 
                         f o o t e r _ d i v . i n n e r H T M L   =   " " ; 
 
                         v a r   c h i l d l i s t   =   f o o t e r _ d i v . c h i l d N o d e s ; 
 
                         i f   ( c h i l d l i s t   ! =   n u l l ) 
 
                                 f o r   ( v a r   i   =   0 ;   c h i l d l i s t [ i ]   ! =   n u l l ;   i + + ) 
 
                                         f o o t e r _ d i v . r e m o v e C h i l d ( c h i l d l i s t [ i ] ) ; 
 
 
 
                         / /   c r e a t e s   a n   i - f r a m e   i n   t h e   f o o t e r   ( n o n - a p p l i c a t i o n ) 
 
                         v a r   n e w I f r a m e   =   d o c u m e n t . c r e a t e E l e m e n t ( " i f r a m e " ) ; 
 
                         n e w I f r a m e . s e t A t t r i b u t e ( " h e i g h t " ,   f o o t e r _ d i v . s t y l e . h e i g h t ) ; 
 
                         v a r   w i d t h   =   d o c u m e n t . d o c u m e n t E l e m e n t . o f f s e t W i d t h ; 
 
                         i f   ( w i d t h   <   1 0 2 4 ) 
 
                                 w i d t h   =   1 0 2 4 ; 
 
                         n e w I f r a m e . s e t A t t r i b u t e ( " w i d t h " ,   w i d t h ) ; 
 
                         n e w I f r a m e . s e t A t t r i b u t e ( " s r c " ,   f i l e n a m e ) ; 
 
                         n e w I f r a m e . s e t A t t r i b u t e ( " a p p l i c a t i o n " ,   " n o " ) ; 
 
                         f o o t e r _ d i v . a p p e n d C h i l d ( n e w I f r a m e ) ; 
 
                 } 
 
 
 
                 / /   r e t u r n s   a   l o c a l i z e d   s t r i n g   b a s e d   o n   a n   i d ,   
 
                 f u n c t i o n   G e t L a n g S t r i n g ( i d )   { 
 
                         v a r   o u t p u t   =   " " ; 
 
                         t r y   { 
 
                                 o u t p u t   =   e v a l ( " l o c a l i z e _ o b j . "   +   i d ) ; 
 
                         } 
 
                         c a t c h   ( e r r )   { 
 
                                 a d d L o g M e s s a g e ( " E R R O R :   L a n g u a g e   s t r i n g   n o t   f o u n d :   "   +   i d ) ; 
 
                                 o u t p u t   =   " s t r i n g   n o t   f o u n d " ; 
 
                         } 
 
                         r e t u r n   o u t p u t ; 
 
                 } 
 
 
 
                 / /   c h a n g e s   t h e   s e l e c t e d   t a b 
 
                 f u n c t i o n   s e l e c t N e w T a b ( i n d e x ,   b _ f o r c e _ l o a d )   { 
 
 
 
                         / /   r e l o a d   d e v i c e   f i l e 
 
                         r e l o a d F i l e s ( f a l s e ) ; 
 
 	 	 	 
 
                         / /   e a r l y   r e t u r n   f o r   a   b a d   s e l e c t i o n 
 
                         i f   ( i n d e x   ! =   - 1   & &   t a s k _ a v a i l _ a r r a y [ i n d e x ]   = =   f a l s e )   { 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         / /   e m p t y   p a g e   l o a d   f o r   a   b a d   f i l e   l o a d 
 
                         i f   ( ! b _ f i l e s _ f o u n d )   { 
 
                                 l o a d C o n t e n t T a b ( - 1 ) ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         / /   c a n c e l s   t h e   a b i l i t y   t o   g o   b a c k   f r o m   a   s e a r c h   w i n d o w 
 
                         i f   ( i n d e x   > =   0 ) 
 
                                 p r e _ s e a r c h _ s e l e c t i o n   =   n u l l ; 
 
 
 
                         / /   u p d a t e   c u r r e n t   s e l e c t e d   t a b 
 
                         c u r _ s e l e c t i o n   =   i n d e x ; 
 
 
 
                         / /   r e - c o l o r   a l l   t h e   i c o n s 
 
                         v a r   i ; 
 
                         f o r   ( i   =   0 ;   i   <   t a s k _ n u m b e r ;   i + + )   { 
 
                                 r o l l o v e r ( i ,   f a l s e ) ; 
 
                         } 
 
                         
 
                         / /   h a n d l e   h i g h l i g h t 
 
                         v a r   h i g h l i g h t   =   d o c u m e n t . g e t E l e m e n t B y I d ( " h i g h l i g h t - m a i n " ) ;                       
 
                         i f   ( h i g h l i g h t   = =   n u l l ) 
 
                                 h i g h l i g h t   =   d i v _ b a c k g r o u n d ; 
 
 
 
 
 
                         v a r   h i g h l i g h t _ p o s i t i o n ; 
 
 
 
 	 	 	 	 	     i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 3 ) 
 
 	 	 	 	 	     { 
 
 	 	 	 	 	     	 i f ( b _ l a r g e _ t e x t ) 
 
                                   h i g h l i g h t . s t y l e . w i d t h   =   " 1 5 5 p x " ; 
 
                             e l s e 
 
                             	   h i g h l i g h t . s t y l e . w i d t h   =   " 1 1 3 p x " ; 
 
                         } 
 
                         
 
                         i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 2 5 ) 
 
 	 	 	 	 	     { 
 
 	 	 	 	 	     	 i f ( b _ l a r g e _ t e x t ) 
 
 	 	 	 	 	     	 { 
 
                                   h i g h l i g h t . s t y l e . w i d t h   =   " 1 6 5 p x " ; 
 
                                   h i g h l i g h t . s t y l e . h e i g h t   =   " 1 8 0 p x " ; 
 
                             } 
 
                         } 
 
                                   
 
                       i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 3 7 ) 
 
 	 	 	 	 	     { 
 
 	 	 	 	 	     	 i f ( b _ l a r g e _ t e x t ) 
 
 	 	 	 	 	     	 { 
 
                                   h i g h l i g h t . s t y l e . w i d t h   =   " 1 6 5 p x " ; 
 
                                   h i g h l i g h t . s t y l e . h e i g h t   =   " 1 8 0 p x " ; 
 
                             } 
 
                         }                                   
 
                         i f   ( h i g h l i g h t   ! =   n u l l )   { 
 
                                 i f   ( i n d e x   = =   - 1 ) 
 
                                         h i g h l i g h t . s t y l e . v i s i b i l i t y   =   " h i d d e n " ; 
 
                                 e l s e   { 
 
                                       i f ( b _ l a r g e _ t e x t )   { 
 
                                       	     i f   ( b _ r t l )   { 
 
                                       	     	   i f ( ! d e v i c e _ o b j . I s F u n c t i o n P r i n t   & &   d e v i c e _ o b j . I s F u n c t i o n S c a n ) 
 
                                       	     	   { 
 
 	 	 	 	 	 	 	 	 	 	                 i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   2 ) 
 
   	 	 	 	 	 	 	 	 	 	 	                   h i g h l i g h t _ p o s i t i o n   =   0 ; 
 
   	 	 	 	 	 	 	 	 	                     i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   3 ) 
 
   	 	 	 	 	 	 	 	 	 	 	                   h i g h l i g h t _ p o s i t i o n   =   1 7 0 ;   	 	 	 	 	 	 	 	 	         
 
   	 	 	 	 	 	 	 	 	                     i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   4 )   	 	 	 	 	 	 	 	 	         
 
   	 	 	 	 	 	 	 	 	 	 	     	 	       h i g h l i g h t _ p o s i t i o n   =   3 4 0 ; 	 
 
   	 	 	 	 	 	 	 	 	                     i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   5 ) 	 	 	 	 	 	 	 	 	           	 	 	 	 	 	 	 	 	           	 	 	 	 	 	 	 	 	         
 
   	 	 	 	 	 	 	 	 	 	 	                   h i g h l i g h t _ p o s i t i o n   =   5 0 0 ; 	 
 
   	 	 	 	 	 	 	 	 	                     i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   6 ) 	 	 	 	 	 	 	 	 	         	 	 	 	 	 	 	           	 	   	 	 	 	 	 	 	 	 	         
 
   	 	 	 	 	 	 	 	 	 	 	                   h i g h l i g h t _ p o s i t i o n   =   6 7 0 ; 	   	 	 	 	 	 	 	 	 	 	 	             
 
   	 	 	 	 	 	 	 	 	                     i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   7 ) 
 
   	 	 	 	 	 	 	 	 	 	 	                   h i g h l i g h t _ p o s i t i o n   =   8 0 5 ; 
 
                                       	     	   	 
 
                                       	     	   } 
 
                                       	     	   e l s e 
 
                                       	     	   { 
 
 	 	 	 	 	 	 	 	 	 	                 i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   0 ) 
 
   	 	 	 	 	 	 	 	 	 	 	                   h i g h l i g h t _ p o s i t i o n   =   0 ; 
 
   	 	 	 	 	 	 	 	 	                     i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   1 ) 
 
   	 	 	 	 	 	 	 	 	 	 	                   h i g h l i g h t _ p o s i t i o n   =   1 7 0 ;   	 	 	 	 	 	 	 	 	         
 
   	 	 	 	 	 	 	 	 	                     i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   2 )   	 	 	 	 	 	 	 	 	         
 
   	 	 	 	 	 	 	 	 	 	 	     	 	       h i g h l i g h t _ p o s i t i o n   =   3 4 0 ; 	 
 
   	 	 	 	 	 	 	 	 	                     i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   3 ) 	 	 	 	 	 	 	 	 	           	 	 	 	 	 	 	 	 	           	 	 	 	 	 	 	 	 	         
 
   	 	 	 	 	 	 	 	 	 	 	                   h i g h l i g h t _ p o s i t i o n   =   5 0 0 ; 	 
 
   	 	 	 	 	 	 	 	 	                     i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   4 ) 	 	 	 	 	 	 	 	 	         	 	 	 	 	 	 	           	 	   	 	 	 	 	 	 	 	 	         
 
   	 	 	 	 	 	 	 	 	 	 	                   h i g h l i g h t _ p o s i t i o n   =   6 7 0 ; 	   	 	 	 	 	 	 	 	 	 	 	             
 
   	 	 	 	 	 	 	 	 	                     i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   5 ) 
 
   	 	 	 	 	 	 	 	 	 	 	                   h i g h l i g h t _ p o s i t i o n   =   8 0 5 ; 
 
                                       	     	   } 
 
                                       	     } 
 
                                       	     e l s e 
 
                                       	     { 
 
 	 	 	 	 	 	 	 	 	 	           i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   0 ) 
 
   	 	 	 	 	 	 	 	 	 	 	           h i g h l i g h t _ p o s i t i o n   =   0 ; 
 
   	 	 	 	 	 	 	 	 	               i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   1 ) 
 
 	 	 	 	 	 	 	 	 	                       i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 3 ) 
 
   	 	 	 	 	 	 	 	 	 	 	                     h i g h l i g h t _ p o s i t i o n   =   1 6 0 ; 
 
   	 	 	 	 	 	 	 	 	 	 	               e l s e 
 
   	 	 	 	 	 	 	 	 	 	 	                   h i g h l i g h t _ p o s i t i o n   =   1 6 8 ;   	 	 	 	 	 	 	 	 	         
 
   	 	 	 	 	 	 	 	 	               i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   2 ) 
 
 	 	 	 	 	 	 	 	 	                       i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 3 ) 
 
   	 	 	 	 	 	 	 	 	 	 	                     h i g h l i g h t _ p o s i t i o n   =   3 2 5 ; 
 
   	 	 	 	 	 	 	 	 	 	 	               e l s e   	 	 	 	 	 	 	 	 	         
 
   	 	 	 	 	 	 	 	 	 	 	     	 	         h i g h l i g h t _ p o s i t i o n   =   3 4 0 ; 	 
 
   	 	 	 	 	 	 	 	 	               i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   3 ) 
 
 	 	 	 	 	 	 	 	 	                     i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 3 ) 
 
   	 	 	 	 	 	 	 	 	 	 	                     h i g h l i g h t _ p o s i t i o n   =   4 7 5 ; 
 
   	 	 	 	 	 	 	 	 	 	 	             e l s e   	 	 	 	 	 	 	 	 	           	 	 	 	 	 	 	 	 	         
 
   	 	 	 	 	 	 	 	 	 	 	                     h i g h l i g h t _ p o s i t i o n   =   5 0 0 ; 	 
 
   	 	 	 	 	 	 	 	 	               i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   4 ) 
 
 	 	 	 	 	 	 	 	 	                     i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 3 ) 
 
 	 	 	 	 	 	 	 	 	                     { 
 
 	 	 	 	 	 	 	 	 	               	             h i g h l i g h t . s t y l e . w i d t h   =   " 1 7 5 p x " ; 
 
   	 	 	 	 	 	 	 	 	 	 	                     h i g h l i g h t _ p o s i t i o n   =   6 6 0 ; 
 
   	 	 	 	 	 	 	 	 	 	 	             } 
 
   	 	 	 	 	 	 	 	 	 	 	             e l s e 
 
   	 	 	 	 	 	 	 	 	 	 	             {   	 	 	 	 	 	 	 	 	           	 	   	 	 	 	 	 	 	 	 	         
 
   	 	 	 	 	 	 	 	 	 	 	                     h i g h l i g h t _ p o s i t i o n   =   6 7 0 ; 	 
 
   	 	 	 	 	 	 	 	 	 	 	             } 
 
   	 	 	 	 	 	 	 	 	               i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   5 ) 
 
   	 	 	 	 	 	 	 	 	 	 	           h i g h l i g h t _ p o s i t i o n   =   8 0 5 ; 
 
   	 	 	 	 	 	 	 	 	 	 	 } 	                         	 
 
                                       } 
 
                                       e l s e   { 
 
                         	                 i f   ( b _ r t l )   { 
 
                         	                 	 i f ( ! d e v i c e _ o b j . I s F u n c t i o n P r i n t   & &   d e v i c e _ o b j . I s F u n c t i o n S c a n ) 
 
                         	                 	 { 
 
   	 	 	 	 	 	 	 	 	 	             i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   2 ) 
 
   	 	 	 	 	 	 	 	 	 	 	               h i g h l i g h t _ p o s i t i o n   =   0 ; 
 
   	 	 	 	 	 	 	 	 	                 i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   3 ) 
 
   	 	 	 	 	 	 	 	 	 	 	               h i g h l i g h t _ p o s i t i o n   =   1 1 5 ; 	 
 
   	 	 	 	 	 	 	 	 	                 i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   4 ) 
 
   	 	 	 	 	 	 	 	 	 	 	               h i g h l i g h t _ p o s i t i o n   =   2 2 5 ; 	 
 
   	 	 	 	 	 	 	 	 	                 i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   5 ) 
 
   	 	 	 	 	 	 	 	 	 	 	               h i g h l i g h t _ p o s i t i o n   =   3 3 3 ; 	 
 
   	 	 	 	 	 	 	 	 	                 i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   6 ) 
 
   	 	 	 	 	 	 	 	 	 	 	               h i g h l i g h t _ p o s i t i o n   =   4 4 7 ; 	 
 
   	 	 	 	 	 	 	 	 	                 i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   7 ) 
 
   	 	 	 	 	 	 	 	 	 	 	               h i g h l i g h t _ p o s i t i o n   =   5 7 5 ; 	 
 
 
 
                         	                 	 } 
 
                         	                 	 e l s e 
 
                         	                 	 { 
 
   	 	 	 	 	 	 	 	 	 	             i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   0 ) 
 
   	 	 	 	 	 	 	 	 	 	 	               h i g h l i g h t _ p o s i t i o n   =   0 ; 
 
   	 	 	 	 	 	 	 	 	                 i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   1 ) 
 
   	 	 	 	 	 	 	 	 	 	 	               h i g h l i g h t _ p o s i t i o n   =   1 1 5 ; 	 
 
   	 	 	 	 	 	 	 	 	                 i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   2 ) 
 
   	 	 	 	 	 	 	 	 	 	 	               h i g h l i g h t _ p o s i t i o n   =   2 2 5 ; 	 
 
   	 	 	 	 	 	 	 	 	                 i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   3 ) 
 
   	 	 	 	 	 	 	 	 	 	 	               h i g h l i g h t _ p o s i t i o n   =   3 3 3 ; 	 
 
   	 	 	 	 	 	 	 	 	                 i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   4 ) 
 
   	 	 	 	 	 	 	 	 	 	 	               h i g h l i g h t _ p o s i t i o n   =   4 4 7 ; 	 
 
   	 	 	 	 	 	 	 	 	                 i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   5 ) 
 
   	 	 	 	 	 	 	 	 	 	 	               h i g h l i g h t _ p o s i t i o n   =   5 7 5 ; 	 
 
   	 	 	 	 	 	 	 	 	 	 	     } 
 
   	 	 	 	 	 	 	 	 	 	     } 
 
   	 	 	 	 	 	 	 	 	 	     e l s e 
 
   	 	 	 	 	 	 	 	 	 	     { 
 
   	 	 	 	 	 	 	 	 	 	         i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   0 ) 
 
   	 	 	 	 	 	 	 	 	 	 	         h i g h l i g h t _ p o s i t i o n   =   0 ; 
 
   	 	 	 	 	 	 	 	 	             i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   1 ) 
 
   	 	 	 	 	 	 	 	 	 	 	         h i g h l i g h t _ p o s i t i o n   =   1 1 5 ; 	 
 
   	 	 	 	 	 	 	 	 	             i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   2 ) 
 
   	 	 	 	 	 	 	 	 	 	 	         h i g h l i g h t _ p o s i t i o n   =   2 3 0 ; 	 
 
   	 	 	 	 	 	 	 	 	             i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   3 ) 
 
   	 	 	 	 	 	 	 	 	                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 3 ) 
 
   	 	 	 	 	 	 	 	 	 	 	               h i g h l i g h t _ p o s i t i o n   =   3 4 5 ; 
 
   	 	 	 	 	 	 	 	 	 	 	         e l s e 
 
   	 	 	 	 	 	 	 	 	 	 	             h i g h l i g h t _ p o s i t i o n   =   3 4 0 ; 	 	 
 
   	 	 	 	 	 	 	 	 	             i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   4 ) 
 
   	 	 	 	 	 	 	 	 	                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 3 ) 
 
   	 	 	 	 	 	 	 	 	 	 	             h i g h l i g h t _ p o s i t i o n   =   4 5 7 ; 
 
   	 	 	 	 	 	 	 	 	 	 	         e l s e 
 
   	 	 	 	 	 	 	 	 	 	 	             h i g h l i g h t _ p o s i t i o n   =   4 5 2 ; 	 	 
 
   	 	 	 	 	 	 	 	 	             i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] . i n d e x   = =   5 ) 
 
   	 	 	 	 	 	 	 	 	 	 	         h i g h l i g h t _ p o s i t i o n   =   5 7 5 ; 	 
 
   	 	 	 	 	 	 	 	 	 	     } 
 
   	 	 	 	 	 	 	 	 	 	 
 
                                         } 
 
                                 	 
 
                                         h i g h l i g h t . s t y l e . v i s i b i l i t y   =   " v i s i b l e " ; 
 
                                         i f   ( b _ r t l )   { 
 
                                                 h i g h l i g h t . s t y l e . r i g h t   =   h i g h l i g h t _ p o s i t i o n   +   " p x " ; 
 
                                         } 
 
                                         e l s e 
 
                                                 h i g h l i g h t . s t y l e . l e f t   =   h i g h l i g h t _ p o s i t i o n   +   " p x " ; 
 
                                 } 
 
                         } 
 
                         e l s e   { 
 
                                 / /   d i v   g o n e ? ? ? ? 
 
                                 a d d L o g M e s s a g e ( " E R R O R :   b a c k g r o u n d   d i v   n o t   f o u n d " ) ; 
 
                         } 
 
                         / /   e a r l y   r e t u r n   i f   a   l o c a l   s e a r c h   i s   d o n e 
 
                         i f   ( i n d e x   = =   - 1 ) 
 
                                 r e t u r n ; 
 
 
 
                         / /   l o a d   c o n t e n t   t o   m i d d l e   p a n e 
 
                         l o a d C o n t e n t T a b ( i n d e x ) ; 
 
                 } 
 
 
 
                 / /   l o a d s   c o n t e n t   t o   m i d d l e   p a n e 
 
                 f u n c t i o n   l o a d C o n t e n t T a b ( i n d e x )   { 
 
 
 
                         / / d e l e t e   o l d   c o n t e n t 
 
                         v a r   d y n a m i c _ d i v   =   d o c u m e n t . g e t E l e m e n t B y I d ( " b o d y - s e c t i o n " ) ; 
 
                         d y n a m i c _ d i v . i n n e r H T M L   =   " " ; 
 
                         v a r   c h i l d l i s t   =   d y n a m i c _ d i v . c h i l d N o d e s ; 
 
                         i f   ( c h i l d l i s t   ! =   n u l l ) 
 
                                 f o r   ( v a r   i   =   0 ;   c h i l d l i s t [ i ]   ! =   n u l l ;   i + + ) 
 
                                         d y n a m i c _ d i v . r e m o v e C h i l d ( c h i l d l i s t [ i ] ) ; 
 
 
 
                         / /   E a r l y   r e t u r n   f o r   a   b a d   f i l e   l o a d 
 
                         i f   ( ! b _ f i l e s _ f o u n d )   { 
 
                                 v a r   t x t   =   d o c u m e n t . c r e a t e T e x t N o d e ( G e t L a n g S t r i n g ( " U D C S t r i n g _ E r r o r D a t a F i l e " ) ) ; 
 
                                 i f ( b _ r t l ) 
 
                                         d y n a m i c _ d i v . s t y l e . d i r e c t i o n = " r t l " ; 
 
                                 d y n a m i c _ d i v . a p p e n d C h i l d ( t x t ) ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         v a r   t a s k   =   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i n d e x ] ; 
 
 
 
                         / /   c r e a t e   a n   i - f r a m e   a n d   l o a d   t h e   p a g e 
 
                         i f   ( t a s k . t y p e   = =   " l i n k _ i f r a m e " )   { 
 
                                 v a r   u r l   =   e x p a n d U R L R e f ( t a s k . l o c a t i o n ) ; 
 
 
 
                                 i f   ( u r l . l e n g t h   < =   7 )   { 
 
                                         / /   e r r o r   m e s s a g e   i f   u r l   i s   b a d   
 
                                         v a r   t e x t _ n o d e   =   d o c u m e n t . c r e a t e T e x t N o d e ( " B a d   U R L " ) ; 
 
                                         d y n a m i c _ d i v . a p p e n d C h i l d ( t e x t _ n o d e ) ; 
 
                                 } 
 
                                 e l s e   { 
 
                                         / /   f i l l   t h e   m i d d l e   s e c t i o n   o f   t h e   i f r a m e 
 
                                         v a r   n e w I f r a m e   =   d o c u m e n t . c r e a t e E l e m e n t ( " i f r a m e " ) ; 
 
                                         n e w I f r a m e . s e t A t t r i b u t e ( " h e i g h t " ,   d y n a m i c _ d i v . s t y l e . h e i g h t ) ; 
 
                                         v a r   w i d t h   =   d o c u m e n t . d o c u m e n t E l e m e n t . o f f s e t W i d t h ; 
 
                                         i f   ( ! b _ l a r g e _ t e x t   & &   w i d t h   <   8 0 0 ) 
 
                                                 w i d t h   =   8 0 0 ; 
 
                                         e l s e   i f   ( b _ l a r g e _ t e x t   & &   w i d t h   <   1 0 3 0 ) 
 
                                                 w i d t h   =   1 0 3 0 ; 
 
                                         n e w I f r a m e . s e t A t t r i b u t e ( " w i d t h " ,   w i d t h ) ; 
 
                                         n e w I f r a m e . s e t A t t r i b u t e ( " s r c " ,   u r l ) ; 
 
                                         n e w I f r a m e . s e t A t t r i b u t e ( " a p p l i c a t i o n " ,   " n o " ) ; 
 
                                         d y n a m i c _ d i v . a p p e n d C h i l d ( n e w I f r a m e ) ; 
 
                                         a d d L o g M e s s a g e ( " I N F O :   i f r a m e   u r l   =   "   +   u r l ) ; 
 
 	 	 	 	 	 
 
 	 	 	 	 	 c a l l A n a l y t i c s ( t a s k . i d ,   " l i n k " ) ; 
 
                                 } 
 
                         } 
 
                         / /   c r e a t e   a   s u b t a s k   l i s t 
 
                         e l s e   i f   ( t a s k . t y p e   = =   " h a s S u b t a s k s " )   { 
 
                                 v a r   t a s k D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 d y n a m i c _ d i v . a p p e n d C h i l d ( t a s k D i v ) ; 
 
                                 t a s k D i v . c l a s s N a m e   =   " b o d y - t a s k l i s t - h e a d e r - d i v " ; 
 
                                 
 
                                 i f   ( G e t L a n g S t r i n g ( t a s k . t a s k l i s t _ d e s c )   ! =   " " )   { 
 
                                                                                               
 
                                       v a r   t i t l e d i v   =   n u l l ; 
 
                         	           t i t l e d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                         	           t i t l e d i v . c l a s s N a m e   =   " b o d y - t a s k l i s t - h e a d e r - t i t l e - d i v " ; 
 
                         	           i f ( b _ r t l ) 
 
                                             t i t l e d i v . s t y l e . d i r e c t i o n = " r t l " ; 
 
                                                       	                                                     
 
                                       t a s k D i v . a p p e n d C h i l d ( t i t l e d i v ) ; 
 
                                       
 
                                       / /   c r e a t e   t h e   t a b l e   
 
                                       v a r   t a b l e _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ;                                                                                                                                       
 
                                       t i t l e d i v . a p p e n d C h i l d ( t a b l e _ e l ) ; 
 
                                       t a b l e _ e l . c l a s s N a m e   =   ( " t a b s - t e x t - f u l l " ) ; 
 
                                       v a r   b o d y _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t b o d y " ) ; 
 
                                       t a b l e _ e l . a p p e n d C h i l d ( b o d y _ e l ) ; 
 
 
 
                                       / /   n e w   r o w 
 
                                       s u b _ t a s k s _ t i t l e _ r o w   =   d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; 
 
                                       b o d y _ e l . a p p e n d C h i l d ( s u b _ t a s k s _ t i t l e _ r o w ) ;                                         
 
                                       
 
                                       / /   t e x t   
 
                                       v a r   t e x t _ c e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                       s u b _ t a s k s _ t i t l e _ r o w . a p p e n d C h i l d ( t e x t _ c e l l ) ; 
 
                                       v a r   c e l l _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                       t e x t _ c e l l . a p p e n d C h i l d ( c e l l _ d i v ) ; 
 
                                       c e l l _ d i v . c l a s s N a m e   =   " s u b - t a s k s - t i t l e - t e x t " ; 
 
                     
 
                                       v a r   t e x t _ n o d e   =   d o c u m e n t . c r e a t e T e x t N o d e ( G e t L a n g S t r i n g ( t a s k . t a s k l i s t _ d e s c ) ) ;                                               
 
                                       i f ( b _ r t l ) 
 
                                             c e l l _ d i v . s t y l e . d i r e c t i o n = " r t l " ;                                                                                             
 
                                 	 	 	 	 	 
 
                                 	   c e l l _ d i v . s t y l e . b o r d e r B o t t o m   =   " 6 p x   s o l i d   # f f f f f f " ; 
 
                                 	 	 	 	 	 
 
                                       c e l l _ d i v . a p p e n d C h i l d ( t e x t _ n o d e ) ;                                 	 	 	 	 	                                       
 
 
 
                                       / / r e d u c e   t h e   f o n t   s i z e   i f   1 0 4 1   o r   2 0 5 2   i n   n o r m a l   t e x t   m o d e 
 
 / /                                       i f   ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 1   | |   i n s t a l l _ o b j . L A N G _ I D   = = =   2 0 5 2 )   { 
 
 / /                                           i f   ( ! b _ l a r g e _ t e x t )   { 
 
 / /                                                 c e l l _ d i v . s t y l e . f o n t S i z e   =   " 1 2 p x " ; 
 
 / /                                           } 
 
 / /                                       } 
 
                                                                                           
 
 
 
                                       
 
                                 }                       
 
 
 
                                 v a r   t a s k D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 d y n a m i c _ d i v . a p p e n d C h i l d ( t a s k D i v ) ; 
 
                                 t a s k D i v . c l a s s N a m e   =   " b o d y - t a s k l i s t " ; 
 
                                                                                                                                                                     
 
                                 p o p u l a t e T a s k s ( t a s k D i v ,   t a s k . s u b T a s k s A r r a y ,   G e t L a n g S t r i n g ( t a s k . t a s k l i s t _ d e s c ) ,   " " ,   " d e v i c e " ) ; 
 
 	 	 	 	 c u r _ t a b _ n a m e   =   t a s k . i d ; 
 
 	 	 	 	 c a l l A n a l y t i c s ( t a s k . i d ,   " t a b " ) ; 
 
                         } 
 
                         / /   c r e a t e   s e v e r a l   s u b t a s k   l i s t s   ( d e v i c e   p a g e ) 
 
                         e l s e   i f   ( t a s k . t y p e   = =   " h a s S u b t a s k C a t e g o r i e s " )   { 
 
 
 
                         	     v a r   t a s k H e a d e r D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                         	     d y n a m i c _ d i v . a p p e n d C h i l d ( t a s k H e a d e r D i v ) ; 
 
                                 t a s k H e a d e r D i v . c l a s s N a m e   =   " b o d y - t a s k l i s t - h e a d e r - d i v " ; 
 
 
 
                         	     v a r   i ; 
 
                         	     v a r   t i t l e d i v   =   n u l l ; 
 
                         	     t i t l e d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ;                         	 
 
                         	     
 
                         	     t a s k H e a d e r D i v . a p p e n d C h i l d ( t i t l e d i v ) ; 
 
                         	     t i t l e d i v . c l a s s N a m e   =   " b o d y - t a s k l i s t - h e a d e r - t i t l e - d i v " ; 
 
                                 i f ( b _ r t l ) 
 
                                       t i t l e d i v . s t y l e . d i r e c t i o n = " r t l " ;                                                                 
 
                         	     
 
                                 / /   c r e a t e   t h e   t a b l e   
 
                                 v a r   t a b l e _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ; 
 
                                                                                                 
 
                                 / / 
 
                                 t i t l e d i v . a p p e n d C h i l d ( t a b l e _ e l ) ; 
 
                                 t a b l e _ e l . c l a s s N a m e   =   ( " t a b s - t e x t - f u l l " ) ; 
 
                                 v a r   b o d y _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t b o d y " ) ; 
 
                                 t a b l e _ e l . a p p e n d C h i l d ( b o d y _ e l ) ; 
 
 
 
                                 / /   n e w   r o w 
 
                                 s u b _ t a s k s _ t i t l e _ r o w   =   d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; 
 
                                 b o d y _ e l . a p p e n d C h i l d ( s u b _ t a s k s _ t i t l e _ r o w ) ;                                         
 
         	     
 
                                 f o r   ( i   =   0 ;   t a s k . c a t e g o r y A r r a y [ i ]   ! =   n u l l ;   i + + )   { 
 
                                         i f   ( t a s k . c a t e g o r y A r r a y [ i ] . I s A v a i l a b l e   & &   c h e c k R e q ( t a s k . c a t e g o r y A r r a y [ i ] ) ) 
 
                                         { 
 
                         
 
                         	 	 	 	 	   / /   c h e c k   i f   t h e r e   i s   a   v a l i d   s u b   t a s k s   a r r a y 
 
                         	 	 	 	 	   i f   ( t a s k . c a t e g o r y A r r a y [ i ] . s u b T a s k s A r r a y   = =   n u l l )   {   
 
                         	 	 	 	 	         c o n t i n u e ; 	 
 
                         	 	 	 	 	   } 
 
                         	 	 	 	 	                                                                                   	 	 	 	 	   
 
                         	 	 	 	 	   v a r   t o t a l _ s u b t a s k s   =   0 ; 
 
 
 
                                               f o r   ( v a r   j   =   0 ;   t a s k . c a t e g o r y A r r a y [ i ] . s u b T a s k s A r r a y [ j ]   ! =   n u l l ;   j + + )   { 
 
                                                 
 
                                                     / /   s k i p   i n a c t i v e   t a s k s   o r   w r o n g   c a t e g o r i e s 
 
                                                     i f   ( t a s k . c a t e g o r y A r r a y [ i ] . s u b T a s k s A r r a y [ j ] . a c t i v e   = =   f a l s e ) 
 
                                                           c o n t i n u e ; 
 
                                                         
 
                                                     i f   ( t a s k . c a t e g o r y A r r a y [ i ] . s u b T a s k s A r r a y [ j ] . c a t e g o r y   ! =   " "   & &   t a s k . c a t e g o r y A r r a y [ i ] . i d   ! =   t a s k . c a t e g o r y A r r a y [ i ] . s u b T a s k s A r r a y [ j ] . c a t e g o r y ) 
 
                                                           c o n t i n u e ; 
 
                                               	 
 
                                               	 
 
 	 	 	 	 	 	 	 	 	 	             t o t a l _ s u b t a s k s + + ; 
 
 	 	 	 	 	 	 	 	 	 	       } 
 
                                                 
 
                                               / /   D o n t   a s k   t h e   n a m e   i f   t h e   s u b   t a s k s   l i s t   i s   e m p t y   
 
                                               i f   ( t o t a l _ s u b t a s k s   = =   0 ) 
 
                                                     c o n t i n u e ;                         
 
 
 
                                               / /   t e x t   
 
                                               v a r   t e x t _ c e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                               s u b _ t a s k s _ t i t l e _ r o w . a p p e n d C h i l d ( t e x t _ c e l l ) ; 
 
                                               v a r   c e l l _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                               t e x t _ c e l l . a p p e n d C h i l d ( c e l l _ d i v ) ; 
 
                                               c e l l _ d i v . c l a s s N a m e   =   " s u b - t a s k s - t i t l e - t e x t " ; 
 
                                               c e l l _ d i v . i d   =   " s u b - t a s k s - t i t l e - t e x t - "   +   i ; 
 
 
 
 	 	 	 	 	 	 	 	 	 	 	   v a r   l e f t _ m o s t _ i t e m ; 
 
 	 	 	 	 	 	 	 	 	 	 	   
 
 	 	 	 	 	 	 	 	 	 	 	   i f ( d e v i c e _ o b j . I s F u n c t i o n P r i n t ) 
 
 	 	 	 	 	 	 	 	 	 	 	 	 	 l e f t _ m o s t _ i t e m   =   0 ; 
 
 	 	 	 	 	 	 	 	 	 	 	   e l s e 
 
 	 	 	 	 	 	 	 	 	 	 	 	 	 l e f t _ m o s t _ i t e m   =   1 ; 
 
 	 	 	 	 	 	 	 	 	 	 	   	 
 
 	 	 	 	 	 	 	 	 	 	 	   i f ( i   = =   l e f t _ m o s t _ i t e m ) 
 
 	 	 	 	 	 	 	 	 	 	 	   { 
 
 	 	 	 	 	 	 	 	 	 	 	   	   i f ( b _ r t l ) 
 
 	 	 	 	 	 	 	 	 	 	 	   	         c e l l _ d i v . s t y l e . m a r g i n R i g h t   =   " 0 p x " ; 
 
 	 	 	 	 	 	 	 	 	 	 	   	   e l s e 
 
 	 	 	 	 	 	 	 	 	 	 	   	   	     c e l l _ d i v . s t y l e . m a r g i n L e f t   =   " 0 p x " ; 
 
 	 	 	 	 	 	 	 	 	 	 	   } 
 
 	 	 	 	 	 	 	 	 	 	 	   e l s e 
 
 	 	 	 	 	 	 	 	 	 	 	   { 
 
 	 	 	 	 	 	 	 	 	 	 	   	   i f ( b _ r t l ) 
 
 	 	 	 	 	 	 	 	 	 	 	   	         c e l l _ d i v . s t y l e . m a r g i n R i g h t   =   " 4 0 p x " ; 
 
 	 	 	 	 	 	 	 	 	 	 	   	   e l s e 
 
 	 	 	 	 	 	 	 	 	 	 	   	   	     c e l l _ d i v . s t y l e . m a r g i n L e f t   =   " 4 0 p x " ; 
 
 	 	 	 	 	 	 	 	 	 	 	   	   	     	 	 	 	 	 	 	 	 	 	 	   	 
 
 	 	 	 	 	 	 	 	 	 	 	   } 
 
 	 	 	 	 	 	 	 	 	 	 	   
 
   	                                           i f   ( G e t L a n g S t r i n g ( t a s k . c a t e g o r y A r r a y [ i ] . t a s k l i s t _ d e s c )   ! =   " " )   { 
 
                                                 	                                                     
 
                                                     v a r   t e x t _ n o d e   =   d o c u m e n t . c r e a t e T e x t N o d e ( G e t L a n g S t r i n g ( t a s k . c a t e g o r y A r r a y [ i ] . t a s k l i s t _ d e s c ) ) ;                                               
 
                                                     i f ( b _ r t l ) 
 
                                                           c e l l _ d i v . s t y l e . d i r e c t i o n = " r t l " ;                                                                                             
 
                                 	 	 	 	 	 
 
 / /                                                     i f   ( i n s t a l l _ o b j . L A N G _ I D   = = =   2 0 5 2   | |   i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 2 8 )   { 
 
 / /                                                           i f   ( ! b _ l a r g e _ t e x t )   {                                                           	 	                                                                 
 
 / /                                                                 c e l l _ d i v . s t y l e . m a r g i n T o p   =   " 3 2 p x " ;                                                                                                                               
 
 / /                                                           }                                                           	 
 
 / /                                                     } 
 
 / /                                                     i f   ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 1 )   { 
 
 / /                                                           i f   ( ! b _ l a r g e _ t e x t )   { 
 
 / /                                                           	     / / c e l l _ d i v . s t y l e . f o n t S i z e   =   " 3 2 p x " ;                                                                 
 
 / /                                                                 c e l l _ d i v . s t y l e . m a r g i n T o p   =   " 1 5 p x " ;                                                                                                                               
 
 / /                                                           }                                                           	 
 
 / /                                                     } 
 
                                 	 	 	 	 	 
 
                                 	 	             c e l l _ d i v . a p p e n d C h i l d ( t e x t _ n o d e ) ; 
 
                                 	 	 	 	 	 
 
                                 
 
                                                     i f   ( i   = = =   c u r _ s u b _ t a s k _ s e l e c t i o n   & &   a c t i v e _ d e v i c e _ c a t e g o r y _ c o u n t   >   1 )                                                     
 
                                                     {                                                     	 
 
                                                             c e l l _ d i v . s t y l e . b o r d e r B o t t o m   =   " 6 p x   s o l i d   # 0 0 9 6 d 6 " ; 
 
                                                     } e l s e { 
 
                                                     	 	 c e l l _ d i v . s t y l e . b o r d e r B o t t o m   =   " 6 p x   s o l i d   # f f f f f f " ; 
 
                                                     } 
 
                                                     
 
                                                     
 
                                                                                                         
 
 	 	 	 	 	 	                             v a r   s u b c a t e g o r i e s _ h e a d e r _ l i n k   =   d o c u m e n t . c r e a t e E l e m e n t ( " a " ) ; 
 
 	 	 	 	 	 	                             c e l l _ d i v . a p p e n d C h i l d ( s u b c a t e g o r i e s _ h e a d e r _ l i n k ) ; 
 
 	 	 	 	 	 	                             s u b c a t e g o r i e s _ h e a d e r _ l i n k . c l a s s N a m e   =   " s u b - t a s k s - t i t l e - t e x t - s e l e c t a b l e " ; 
 
 	 	 	 	 	 	                             s u b c a t e g o r i e s _ h e a d e r _ l i n k . t a b I n d e x   =   " 0 " ; 
 
                                                                                     
 
                                                     s u b c a t e g o r i e s _ h e a d e r _ l i n k . a p p e n d C h i l d ( t e x t _ n o d e ) ; 
 
 
 
 
 
                                                     / / r e d u c e   t h e   f o n t   s i z e   i f   1 0 4 1   o r   2 0 5 2   i n   n o r m a l   t e x t   m o d e 
 
 / /                                                     i f   ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 1   | |   i n s t a l l _ o b j . L A N G _ I D   = = =   2 0 5 2   | |   i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 2 8 )   { 
 
 / /                                                           i f   ( ! b _ l a r g e _ t e x t )   { 
 
 / /                                                                 c e l l _ d i v . s t y l e . f o n t S i z e   =   " 1 2 p x " ; 
 
 / / 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 c e l l _ d i v . s t y l e . m a r g i n T o p   =   " 3 3 p x " ; 
 
 / /                                                           }                                                           	 
 
 / /                                                     } 
 
                                 
 
                                 	 	             i f   ( i   ! =   c u r _ s u b _ t a s k _ s e l e c t i o n ) 
 
                                 	 	             { 
 
                                 	 	   	 	           t e x t _ c e l l . o n c l i c k   =   n e w   F u n c t i o n ( " s e l e c t N e w S u b T a s k ( ' "   +   i   +   " ' ,   f a l s e ) " ) ; 
 
 	 	 	 	 	               	 	                   t e x t _ c e l l . o n k e y p r e s s   =   n e w   F u n c t i o n ( " k e y P r e s s O n N e w S u b T a s k ( ' "   +   i   +   " ' ) " ) ; 
 
 	 	 	 	 	                                 } 
 
 	 	 	 	 	                     
 
                                         	 }                                   
 
                                         } 
 
                                 } 
 
                                 
 
                                 v a r   t a s k D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 d y n a m i c _ d i v . a p p e n d C h i l d ( t a s k D i v ) ; 
 
                                 t a s k D i v . c l a s s N a m e   =   " b o d y - t a s k l i s t " ; 
 
                                 
 
                                 i f   ( t a s k . c a t e g o r y A r r a y [ c u r _ s u b _ t a s k _ s e l e c t i o n ] . I s A v a i l a b l e   & &   c h e c k R e q ( t a s k . c a t e g o r y A r r a y [ c u r _ s u b _ t a s k _ s e l e c t i o n ] ) ) 
 
                                         p o p u l a t e T a s k s ( t a s k D i v ,   t a s k . c a t e g o r y A r r a y [ c u r _ s u b _ t a s k _ s e l e c t i o n ] . s u b T a s k s A r r a y ,   G e t L a n g S t r i n g ( t a s k . c a t e g o r y A r r a y [ c u r _ s u b _ t a s k _ s e l e c t i o n ] . t a s k l i s t _ d e s c ) ,   " " ,   " d e v i c e " ) ; 
 
 
 
 	 	 	 	 c u r _ t a b _ n a m e   =   t a s k . i d ; 
 
 	 	 	 	 c a l l A n a l y t i c s ( t a s k . i d ,   " t a b " ) ; 
 
                         } 
 
                         e l s e   { 
 
                                 a d d L o g M e s s a g e ( " T a s k   t y p e   "   +   t a s k . t y p e   +   "   n o t   f o u n d " ) ; 
 
                         } 
 
 	 	 	 
 
                 } 
 
 
 
                 / /   d o e s   a   s t a n d a r d   s e t   o f   s u b s t i t u t i o n   f o r   f i l e   p a t h s   a n d   u r l s 
 
                 f u n c t i o n   s u b s t i t u t e S t r i n g s ( i n p u t )   { 
 
                         v a r   i ; 
 
                         f o r   ( i   =   0 ;   p r o g r a m _ s u b _ a r r a y [ i ]   ! =   n u l l ;   i + + )   { 
 
                                 v a r   m y r e g e x p   =   n e w   R e g E x p ( p r o g r a m _ s u b _ a r r a y [ i ] . k e y ,   " i " ) ; 
 
                                 i n p u t   =   i n p u t . r e p l a c e ( m y r e g e x p ,   p r o g r a m _ s u b _ a r r a y [ i ] . v a l u e ) ; 
 
                         } 
 
 
 
                         r e t u r n   i n p u t ; 
 
                 } 
 
 
 
                 / /   d o e s   s o m e   s t r i n g   w r a n g l i n g   f o r   f i l e   p a t h s   f r o m   j s o n s 
 
                 f u n c t i o n   c l e a n F i l e P a t h ( f i l e _ p a t h )   { 
 
                         i f   ( f i l e _ p a t h   = =   n u l l   | |   f i l e _ p a t h   = =   " " ) 
 
                                 r e t u r n   " " ; 
 
 
 
                         / /   r e p l a c e   p l a c e h o l d e r s   w i t h   v a l u e s   f r o m   t h e   j s o n   f i l e s 
 
                         f i l e _ p a t h   =   s u b s t i t u t e S t r i n g s ( f i l e _ p a t h ) ; 
 
 
 
                         / /   t h e   O n c l i c k ( )   j a v a s c r i p t   c a l l b a c k   s y s t e m   g a r b l e s   s t r i n g s   w i t h   b a c k s l a s h e s ,   a l l   f i l e   p a t h s   u s e   f o r w a r d   s l a s h e s 
 
                         / /   j a v a s c r i p t   u s e s   b a c k s l a s h   a s   a   s p e c i a l   c h a r a c t e r   i n   s t r i n g   l i t e r a l s   s o   " \ \ \ \ "   i s   t h e   e s c a p e   s e q u e n c e   f o r   " \ \ " 
 
                         / /   t h e   s e a r c h   f u n c t i o n   t r e a t s   t h e   f i r s t   i n p u t   a s   a   r e g u l a r   e x p r e s s i o n   w h e r e   " \ \ "   i s   t h e   e s c a p e   s e q u e n c e   f o r   " \ " 
 
                         / /   f i l e _ p a t h . s e a r c h ( " \ \ \ \ " )   i s   s e a r c h i n g   f o r   a   s i n g l e   b a c k s l a s h 
 
                         w h i l e   ( f i l e _ p a t h . s e a r c h ( " \ \ \ \ " )   ! =   - 1 )   { 
 
                                 f i l e _ p a t h   =   f i l e _ p a t h . r e p l a c e ( " \ \ " ,   " / " ) ; 
 
                         } 
 
 
 
                         r e t u r n   f i l e _ p a t h ; 
 
                 } 
 
 
 
                 / /   l a u n c h e s   a   f i l e   p r o g r a m   o r   d a t a   f i l e   o n   l o c a l   m a c h i n e 
 
                 f u n c t i o n   l a u n c h F i l e ( f i l e _ p a t h ,   i d )   { 
 
                         a d d L o g M e s s a g e ( " L A U N C H :   f i l e   l o c   =   "   +   f i l e _ p a t h   +   " i d   i s   "   +   i d ) ; 
 
 
 
                         i f   ( f i l e _ p a t h   = =   " " )   { 
 
                                 a d d L o g M e s s a g e ( " E R R O R :   L a u n c h   f i l e   e r r o r :   b l a n k   f i l e " ) ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         / /   o p e n   t h e   f i l e   w i t h   W s c r i p t . s h e l l 
 
                         v a r   o b j S h e l l   =   n e w   A c t i v e X O b j e c t ( " W S c r i p t . S h e l l " ) ; 
 
                         t r y   { 
 
                                 o b j S h e l l . r u n ( f i l e _ p a t h ,   1 ) ; 
 
                         } 
 
                         c a t c h   ( e r r )   { 
 
                                 a d d L o g M e s s a g e ( " E R R O R :   L a u n c h   f i l e   e r r o r :   "   +   f i l e _ p a t h   +   "   e r r   i s   "   +   e r r ) ; 
 
                                 a l e r t ( G e t L a n g S t r i n g ( " U D C S t r i n g _ E r r o r L a u n c h F i l e " ) ) ; 
 
                         } 
 
 	 	 	 c a l l A n a l y t i c s ( i d ,   " a p p " ) ; 
 
                 } 
 
 
 
                 / /   o p e n s   a   f i l e   p r o g r a m   o r   d a t a   f i l e   o n   l o c a l   m a c h i n e   i f   n o t   a b l e   t o   o p e n   i t   t r y s   t h e   a s s o c i a t i o n   f i n d   d i a l o g . 
 
                 f u n c t i o n   o p e n F i l e ( f i l e _ p a t h ,   i d )   { 
 
                         a d d L o g M e s s a g e ( " O P E N :   f i l e   l o c   =   "   +   f i l e _ p a t h   +   " i d   i s   "   +   i d ) ; 
 
 
 
                         i f   ( f i l e _ p a t h   = =   " " )   { 
 
                                 a d d L o g M e s s a g e ( " E R R O R :   O p e n   f i l e   e r r o r :   b l a n k   f i l e " ) ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         / /   o p e n   t h e   f i l e   w i t h   W s c r i p t . s h e l l 
 
                         v a r   o b j S h e l l   =   n e w   A c t i v e X O b j e c t ( " W S c r i p t . S h e l l " ) ; 
 
                         v a r   b T r y F i n d D i a l o g   =   f a l s e ; 
 
                         t r y   { 
 
                                 o b j S h e l l . r u n ( f i l e _ p a t h ,   1 ) ; 
 
                         } 
 
                         c a t c h   ( e r r )   { 
 
                                 a d d L o g M e s s a g e ( " E R R O R :   O p e n   f i l e   e r r o r :   "   +   f i l e _ p a t h   +   "   e r r   i s   "   +   e r r ) ; 
 
                                 b T r y F i n d D i a l o g   =   t r u e ; 
 
                         } 
 
                         
 
                         i f ( b T r y F i n d D i a l o g ) 
 
                         { 
 
                               t r y   { 
 
                                   o b j S h e l l . r u n ( " r u n d l l 3 2 . e x e   s h e l l 3 2 . d l l , O p e n A s _ R u n D L L   "   +   f i l e _ p a t h ,   1 ) ; 
 
                               } 
 
                               c a t c h   ( e r r )   { 
 
                                       a d d L o g M e s s a g e ( " E R R O R :   O p e n A s   f i l e   e r r o r :   "   +   f i l e _ p a t h   +   "   e r r   i s   "   +   e r r ) ;                                   
 
                                       a l e r t ( G e t L a n g S t r i n g ( " U D C S t r i n g _ E r r o r L a u n c h F i l e " ) ) ; 
 
                               }                         	 
 
                         } 
 
                                                 
 
 	 	 	 c a l l A n a l y t i c s ( i d ,   " a p p " ) ; 
 
                 } 
 
                 / /   l a u n c h e s   a   w e b   p a g e   i n   a   s e p e r a t e   p a g e 
 
                 f u n c t i o n   l a u n c h L i n k ( u r l ,   i d ,   b _ f u l l )   { 
 
                         a d d L o g M e s s a g e ( " L A U N C H :   l i n k   u r l   =   "   +   u r l ) ; 
 
 
 
                         / /   e a r l y   r e t u r n   f o r   v e r y   s h o r t   u r l s 
 
                         i f   ( u r l   = =   n u l l   | |   u r l . l e n g t h   < =   7 )   { 
 
                                 a d d L o g M e s s a g e ( " E R R O R :   l a u n c h   l i n k   t o o   s h o r t :   "   +   u r l ) ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         t r y   { 
 
 
 
                                 v a r   o b j S h e l l ,   r e g v a l ; 
 
                                 o b j S h e l l   =   n e w   A c t i v e X O b j e c t ( " W S c r i p t . S h e l l " ) ; 
 
                                 t r y   { 
 
                                         / /   g e t   d e f a u l t   b r o w s e r   i n f o   f r o m   t h e   r e g i s t r y 
 
                                         r e g v a l   =   " " ; 
 
                                         t r y   { 
 
                                                 r e g v a l   =   o b j S h e l l . R e g R e a d ( " H K E Y _ C U R R E N T _ U S E R \ \ S o f t w a r e \ \ C l i e n t s \ \ S t a r t M e n u I n t e r n e t \ \ " ) ; 
 
                                                 } 
 
                                         c a t c h   ( e r r )   { 
 
                                                 a d d L o g M e s s a g e ( " W A R N I N G :   l a u n c h L i n k   c u r r e n t   u s e r   b r o w s e r   n o t   f o u n d :   "   +   e r r . d e s c r i p t i o n ) ; 
 
                                                 r e g v a l   =   " " ; 
 
                                                 } 
 
                                                 
 
                                         i f ( r e g v a l   = = =   " " ) 
 
                                                 r e g v a l   =   o b j S h e l l . R e g R e a d ( " H K E Y _ L O C A L _ M A C H I N E \ \ S o f t w a r e \ \ C l i e n t s \ \ S t a r t M e n u I n t e r n e t \ \ " ) ; 
 
                                                 
 
                                         a d d L o g M e s s a g e ( " I N F O :   l a u n c h L i n k   d e f a u l t   b r o w s e r :   "   +   r e g v a l ) ; 
 
                                         r e g v a l   =   o b j S h e l l . R e g R e a d ( " H K E Y _ L O C A L _ M A C H I N E \ \ S O F T W A R E \ \ C l i e n t s \ \ S t a r t M e n u I n t e r n e t \ \ "   +   r e g v a l   +   " \ \ s h e l l \ \ o p e n \ \ c o m m a n d \ \ " ) ; 
 
                                         a d d L o g M e s s a g e ( " I N F O :   l a u n c h L i n k   c o m m a n d   l i n e :   "   +   r e g v a l ) ; 
 
                                         / /   a d d   p a r e n t h a s i s   a r o u n d   p a t h s ,   f i x   f o r   p a t h s   w i t h   a   s p a c e   i n   t h e   n a m e   l i k e   t h o s e   i n   " P r o g r a m   F i l e s ( x 8 6 ) " 
 
                                         i f   ( r e g v a l . s e a r c h ( " \ " " )   = =   - 1 ) 
 
                                                 r e g v a l   =   " \ " "   +   r e g v a l   +   " \ " " ; 
 
                                         / /   i n s e r t   t h e   u r l   i n t o   t h e   % 1   s p o t   o r   a d d   i t   t o   t h e   e n d   o f   t h e   c o m m a n d   l i n e 
 
                                         i f   ( r e g v a l . s e a r c h ( " % 1 " )   ! =   - 1 ) 
 
                                                 r e g v a l   =   r e g v a l . r e p l a c e ( " % 1 " ,   u r l ) ; 
 
                                         e l s e 
 
                                                 r e g v a l   =   r e g v a l   +   "   \ " "   +   u r l   +   " \ " " ; 
 
                                         a d d L o g M e s s a g e ( " I N F O :   l a u n c h L i n k   r u n n i n g :   "   +   r e g v a l ) ; 
 
                                         o b j S h e l l . r u n ( r e g v a l ) ; 
 
                                         
 
                                 } 
 
                                 c a t c h   ( e r r )   { 
 
                                         a d d L o g M e s s a g e ( " E R R O R :   l a u n c h   L i n k   e r r o r :   ( "   +   e r r . d e s c r i p t i o n   +   " )   u r l   =   "   +   u r l ) ; 
 
                                         / / j a v a s c r i p t   o p e n   w i n d o w 
 
                                         w i n d o w . o p e n ( u r l ,   " _ b l a n k " ,   " " ) ; 
 
                                 } 
 
                         } 
 
                         c a t c h   ( e r r )   { 
 
                                 a d d L o g M e s s a g e ( " E R R O R :   l a u n c h   L i n k   f a l l b a c k   e r r o r :   ( "   +   e r r . d e s c r i p t i o n   +   " )   u r l   =   "   +   u r l ) ; 
 
                         } 
 
 	 	 	 c a l l A n a l y t i c s ( i d ,   " l i n k " ) ; 
 
                 } 
 
 
 
                 / /   p o p u l a t e s   t h e   m i d d l e   s e c t i o n   o f   t h e   a p p   w i t h   a   t i t l e   a n d   t a s k s   f r o m   a   . j s o n   f i l e 
 
                 / /   i t   c a l l e d   a s   a   r e s u l t   o f   a   n e w   t a b   b e i n g   s e l e c t e d   o r   a   l o c a l   s e a r c h 
 
                 f u n c t i o n   p o p u l a t e T a s k s ( t a r g e t _ d i v ,   j s o n _ s u b o b j ,   t i t l e ,   c a t e g o r y ,   t y p e ,   i m a g e )   { 
 
 
 
                         i f   ( j s o n _ s u b o b j   = =   n u l l )   { 
 
                                 a d d L o g M e s s a g e ( " E R R O R :   n u l l   c a l l   t o   p o p u l a t e T a s k s ( ) " ) ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         / /   m e s s a g e   i f   t h e r e   a r e   n o   t a s k s 
 
                         v a r   c h i l d l i s t   =   j s o n _ s u b o b j ; 
 
                         i f   ( c h i l d l i s t   = =   n u l l   | |   c h i l d l i s t [ 0 ]   = =   n u l l )   { 
 
                                 v a r   m s g d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 v a r   n o t e T e x t   =   d o c u m e n t . c r e a t e T e x t N o d e ( "         "   +   G e t L a n g S t r i n g ( " U D C S t r i n g _ N o R e s u l t s " ) ) ; 
 
                                 i f ( b _ r t l ) 
 
                                         m s g d i v . s t y l e . d i r e c t i o n = " r t l " ; 
 
                                 m s g d i v . c l a s s N a m e   =   " l a r g e - t e x t " ; 
 
                                 m s g d i v . a p p e n d C h i l d ( n o t e T e x t ) ; 
 
                                 t a r g e t _ d i v . a p p e n d C h i l d ( m s g d i v ) ; 
 
                         } 
 
 
 
                         / /   w r i t e   o u t   t a s k s 
 
                         i f   ( c h i l d l i s t   ! =   n u l l   & &   c h i l d l i s t [ 0 ]   ! =   n u l l )   { 
 
                                 / /   p a r e n t   d i v 
 
                                 v a r   t a s k _ h o l d e r   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 t a s k _ h o l d e r . c l a s s N a m e   =   " t a s k - b l o c k " ; 
 
                                 t a r g e t _ d i v . a p p e n d C h i l d ( t a s k _ h o l d e r ) ; 
 
 
 
                                 / /   h e l p   h t m l   t a s k s   f r o m   t h e   x m l 
 
                                 i f   ( t y p e   ! =   n u l l   & &   t y p e   = =   " h t m l " )   { 
 
                                         / /   t a b l e   l a y o u t 
 
                                         v a r   t a b l e _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ; 
 
                                         t a b l e _ e l . c l a s s N a m e   =   " h e l p - t a b l e " ; 
 
                                         t a s k _ h o l d e r . a p p e n d C h i l d ( t a b l e _ e l ) ; 
 
                                         v a r   b o d y _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t b o d y " ) ; 
 
                                         t a b l e _ e l . a p p e n d C h i l d ( b o d y _ e l ) ; 
 
                                         v a r   n e x t _ s p o t   =   n u l l ,   a f t e r _ s p o t   =   n u l l ; 
 
 
 
                                         f o r   ( v a r   i   =   0 ;   c h i l d l i s t [ i ]   ! =   n u l l ;   i + + )   { 
 
                                                 / /   i f   t h e r e   i s n ' t   a   s p o t   i n   t h e   e m p t y   r o w 
 
                                                 i f   ( n e x t _ s p o t   = =   n u l l )   { 
 
                                                         / /   c r e a t e   t h e   n e x t   r o w   i n   t h e   t a b l e 
 
                                                         t a b l e _ r o w   =   d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; 
 
                                                         b o d y _ e l . a p p e n d C h i l d ( t a b l e _ r o w ) ; 
 
                                                         n e x t _ s p o t   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                                         n e x t _ s p o t . c l a s s N a m e   =   " h e l p - c o l l " ; 
 
                                                         a f t e r _ s p o t   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                                         a f t e r _ s p o t . c l a s s N a m e   =   " h e l p - c o l l " ; 
 
                                                         
 
                                                         / /   r e - a r r a n g e s   e l e m e n t s   f o r   R T L   l a n g u a g e s 
 
                                                         i f   ( b _ r t l )   { 
 
                                                                 t a b l e _ r o w . a p p e n d C h i l d ( a f t e r _ s p o t ) ; 
 
                                                                 t a b l e _ r o w . a p p e n d C h i l d ( n e x t _ s p o t ) ; 
 
                                                         } 
 
                                                         e l s e   { 
 
                                                                 t a b l e _ r o w . a p p e n d C h i l d ( n e x t _ s p o t ) ; 
 
                                                                 t a b l e _ r o w . a p p e n d C h i l d ( a f t e r _ s p o t ) ; 
 
                                                         } 
 
                                                 } 
 
 
 
                                                 / /   p o p u l a t e   t h e   t a b l e   s e c t i o n 
 
                                                 v a r   i t e m _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                                 n e x t _ s p o t . a p p e n d C h i l d ( i t e m _ d i v ) ; 
 
                                                 i t e m _ d i v . c l a s s N a m e   =   " t a s k - h t m l " ; 
 
 
 
                                                 v a r   p a t h   =   c h i l d l i s t [ i ] . v a l u e ; 
 
                                                 w h i l e   ( p a t h . s e a r c h ( " \ \ \ \ " )   ! =   - 1 )   { 
 
                                                         p a t h   =   p a t h . r e p l a c e ( " \ \ " ,   " / " ) ; 
 
                                                 } 
 
 
 
                                                 p a t h   =   s t r i p H e l p P a t h ( p a t h ) ; 
 
                                                 p a t h   =   c l e a n F i l e P a t h ( " \ " % I N S T A L L D I R % \ \ H e l p V i e w e r \ \ h p q l p v w r . e x e \ "   / f i l e - n a m e = "   +   p a t h ) ; 
 
 
 
                                                 p a t h   =   p a t h . r e p l a c e ( / ' / g ,   " \ \ \ ' " ) ; 
 
 	 	 	 	 	 	 
 
 	 	 	 	 	 	                         i t e m _ d i v . t a b I n d e x   =   " 0 " ; 
 
 	 	 	 	 	 	 
 
 	 	 	 	 	 	                         i t e m _ d i v . o n k e y p r e s s   =   n e w   F u n c t i o n ( " k e y P r e s s O n T a s k ( ' l o c a l ' , ' "   +   p a t h     +   " ' , ' U D C _ S e a r c h _ H e l p T e x t ' ) " ) ; 
 
                                                 i t e m _ d i v . o n c l i c k   =   n e w   F u n c t i o n ( " l a u n c h F i l e ( ' "   +   p a t h   +   " ' , ' U D C _ S e a r c h _ H e l p T e x t ' ) " ) ; 
 
 
 
                                                 / /   h o l d e r s   f o r   t h e   s u b t a s k   i t e m s 
 
                                                 v a r   s m a l l _ t a b l e _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ; 
 
                                                 i t e m _ d i v . a p p e n d C h i l d ( s m a l l _ t a b l e _ e l ) ; 
 
                                                 v a r   s m a l l _ b o d y _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t b o d y " ) ; 
 
                                                 s m a l l _ t a b l e _ e l . a p p e n d C h i l d ( s m a l l _ b o d y _ e l ) ; 
 
                                                 s m a l l _ t a b l e _ r o w   =   d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; 
 
                                                 s m a l l _ b o d y _ e l . a p p e n d C h i l d ( s m a l l _ t a b l e _ r o w ) ; 
 
                                                 v a r   i c o n _ c e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                                 v a r   t x t _ c e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                                 
 
                                                 / /   r e - a r r a n g e s   e l e m e n t s   f o r   R T L   l a n g u a g e s 
 
                                                 i f   ( b _ r t l )   {         
 
                                                         s m a l l _ t a b l e _ r o w . a p p e n d C h i l d ( t x t _ c e l l ) ; 
 
                                                         s m a l l _ t a b l e _ r o w . a p p e n d C h i l d ( i c o n _ c e l l ) ; 
 
                                                 } 
 
                                                 e l s e   { 
 
                                                         s m a l l _ t a b l e _ r o w . a p p e n d C h i l d ( i c o n _ c e l l ) ; 
 
                                                         s m a l l _ t a b l e _ r o w . a p p e n d C h i l d ( t x t _ c e l l ) ; 
 
                                                 } 
 
 
 
                                                 / /   i c o n 
 
                                                 v a r   t a s k i c o n 
 
                                                 i f ( b _ i e 6 )   { 
 
                                                         t a s k i c o n   =   d o c u m e n t . c r e a t e E l e m e n t ( " i m g " ) ; 
 
                                                         t a s k i c o n . s e t A t t r i b u t e ( " s r c " ,   " U D C _ f i l e s / i m g / b l a n k . g i f " ) ; 
 
                                                         t a s k i c o n . s t y l e . f i l t e r   =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = ' U D C _ f i l e s / i m g / h e l p s u p p o r t . p n g ' ) " ; 
 
                                                         t a s k i c o n . c l a s s N a m e   =   " t a s k - i m g - h e l p s e c t i o n " ; 
 
                                                         i c o n _ c e l l . a p p e n d C h i l d ( t a s k i c o n ) ; 
 
                                                 } 
 
                                                 e l s e   { 
 
                                                         t a s k i c o n   =   d o c u m e n t . c r e a t e E l e m e n t ( " i m g " ) ; 
 
                                                         t a s k i c o n . s e t A t t r i b u t e ( " s r c " ,   " . / U D C _ f i l e s / i m g / h e l p s u p p o r t . p n g " ) ; 
 
                                                         t a s k i c o n . c l a s s N a m e   =   " t a s k - i m g - h e l p s e c t i o n " ; 
 
                                                         i c o n _ c e l l . a p p e n d C h i l d ( t a s k i c o n ) ; 
 
                                                 } 
 
 
 
                                                 / /   t i t l e 
 
                                                 v a r   p 1   =   d o c u m e n t . c r e a t e E l e m e n t ( " p " ) ; 
 
                                                 p 1 . c l a s s N a m e   =   " t a s k - t i t l e - h e l p s e c t i o n " ; 
 
                                                 v a r   t e x t _ n o d e   =   d o c u m e n t . c r e a t e T e x t N o d e ( c h i l d l i s t [ i ] . k e y ) ; 
 
                                                 i f ( b _ r t l ) 
 
                                                         p 1 . s t y l e . d i r e c t i o n = " r t l " ; 
 
                                                 p 1 . a p p e n d C h i l d ( t e x t _ n o d e ) ; 
 
                                                 t x t _ c e l l . a p p e n d C h i l d ( p 1 ) ; 
 
                                                 i t e m _ d i v . t i t l e   =   c h i l d l i s t [ i ] . k e y ; 
 
 
 
                                                 / /   s e t u p   f o r   n e x t   i t e m 
 
                                                 n e x t _ s p o t   =   a f t e r _ s p o t ; 
 
                                                 a f t e r _ s p o t   =   n u l l ; 
 
                                         } 
 
                                 } 
 
                                 e l s e   i f   ( t y p e   ! =   n u l l   & &   t y p e   = =   " d e v i c e " )   { 
 
                                         / /   t a b l e   l a y o u t 
 
                                         v a r   t a b l e _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ; 
 
                                         t a b l e _ e l . c l a s s N a m e   =   " d e v i c e - t a b l e " ; 
 
                                                                             
 
 	 	 	 	 	 	 	 	 	 	 i f ( b _ r t l ) 
 
       	 	 	 	 	 	 	 	 	 	 t a b l e _ e l . s t y l e . d i r e c t i o n = " r t l " ; 
 
                                                                                   
 
                                         t a s k _ h o l d e r . a p p e n d C h i l d ( t a b l e _ e l ) ; 
 
                                         v a r   b o d y _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t b o d y " ) ; 
 
                                         t a b l e _ e l . a p p e n d C h i l d ( b o d y _ e l ) ; 
 
                                         v a r   n e x t _ s p o t   =   n u l l ,   a f t e r _ s p o t   =   n u l l ; 
 
                                         v a r   t o t a l _ s u b t a s k s   =   0 ; 
 
 
 
                                         f o r   ( v a r   i   =   0 ;   c h i l d l i s t [ i ]   ! =   n u l l ;   i + + )   { 
 
                                                 / /   s k i p   i n a c t i v e   t a s k s   o r   w r o n g   c a t e g o r i e s 
 
                                                 i f   ( c h i l d l i s t [ i ] . a c t i v e   = =   f a l s e ) 
 
                                                         c o n t i n u e ; 
 
                                                 i f   ( c a t e g o r y   ! =   " "   & &   c a t e g o r y   ! =   c h i l d l i s t [ i ] . c a t e g o r y ) 
 
                                                         c o n t i n u e ; 
 
 
 
                                                 t o t a l _ s u b t a s k s + + ; 
 
                                                 / /   i f   t h e r e   i s n ' t   a   s p o t   i n   t h e   e m p t y   r o w 
 
                                                 i f   ( n e x t _ s p o t   = =   n u l l )   { 
 
                                                         / /   c r e a t e   t h e   n e x t   r o w   i n   t h e   t a b l e 
 
                                                         t a b l e _ r o w   =   d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; 
 
                                                         b o d y _ e l . a p p e n d C h i l d ( t a b l e _ r o w ) ; 
 
                                                         n e x t _ s p o t   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                                         n e x t _ s p o t . c l a s s N a m e   =   " d e v i c e - c o l l " ; 
 
                                                         t a b l e _ r o w . a p p e n d C h i l d ( n e x t _ s p o t ) ; 
 
                                                         a f t e r _ s p o t   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                                         a f t e r _ s p o t . c l a s s N a m e   =   " d e v i c e - c o l l " ; 
 
                                                         t a b l e _ r o w . a p p e n d C h i l d ( a f t e r _ s p o t ) ; 
 
 
 
                                                         / /   r e - a r r a n g e s   e l e m e n t s   f o r   R T L   l a n g u a g e s 
 
                                                         i f ( b _ r t l )   { 
 
                                                                 v a r   s w a p   =   n e x t _ s p o t ; 
 
                                                         } 
 
                                                 } 
 
 
 
                                                 / /   c o n t a i n e r 
 
                                                 v a r   t a s k d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                                 t a s k d i v . c l a s s N a m e   =   " d e v i c e - d i v " ; 
 
 	 	 	 	 	 	                         t a s k d i v . t a b I n d e x   =   " 0 " ; 
 
       	 	 	 	 	 	                         
 
                                                 i f   ( c h i l d l i s t [ i ] . t y p e   = =   " l o c a l " )   { 
 
                                                         v a r   p a t h   =   c l e a n F i l e P a t h ( c h i l d l i s t [ i ] . l o c a t i o n ) ; 
 
                                                         p a t h   =   p a t h . r e p l a c e ( / ' / g ,   " \ \ \ ' " ) ; 
 
 	 	 	 	 	 	 	                             t a s k d i v . o n k e y p r e s s   =   n e w   F u n c t i o n ( " k e y P r e s s O n T a s k ( ' l o c a l ' , ' "   +   p a t h     +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
                                                         t a s k d i v . o n c l i c k   =   n e w   F u n c t i o n ( " l a u n c h F i l e ( ' "   +   p a t h   +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
                                                 } 
 
                                                 e l s e   i f   ( c h i l d l i s t [ i ] . t y p e   = =   " o p e n _ f i l e " )   { 
 
                                                         v a r   p a t h   =   c l e a n F i l e P a t h ( c h i l d l i s t [ i ] . l o c a t i o n ) ; 
 
                                                         p a t h   =   p a t h . r e p l a c e ( / ' / g ,   " \ \ \ ' " ) ; 
 
 	 	 	 	 	 	 	                             t a s k d i v . o n k e y p r e s s   =   n e w   F u n c t i o n ( " k e y P r e s s O n T a s k ( ' o p e n _ f i l e ' , ' "   +   p a t h     +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
                                                         t a s k d i v . o n c l i c k   =   n e w   F u n c t i o n ( " o p e n F i l e ( ' "   +   p a t h   +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
                                                 }                                                 
 
                                                 e l s e   i f   ( c h i l d l i s t [ i ] . t y p e   = =   " l i n k " )   { 
 
                                                         v a r   l i n k   =   e x p a n d U R L R e f ( c h i l d l i s t [ i ] . l o c a t i o n ) ; 
 
                                                         l i n k   =   l i n k . r e p l a c e ( / ' / g ,   " \ \ \ ' " ) ; 
 
 	 	 	 	 	 	 	                             t a s k d i v . o n k e y p r e s s   =   n e w   F u n c t i o n ( " k e y P r e s s O n T a s k ( ' l i n k ' , ' "   +   l i n k     +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
                                                         t a s k d i v . o n c l i c k   =   n e w   F u n c t i o n ( " l a u n c h L i n k ( ' "   +   l i n k   +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
                                                 } 
 
 	 	 	 	 	 	                         e l s e   i f   ( c h i l d l i s t [ i ] . t y p e   = =   " l o c a l i z e d _ p a t h " )   { 
 
 	 	 	 	 	 	 	                             / / a l l o w s   t h e   u s e   o f   U R L s   w i t h   w i l d c a r d s   t o   l o c a t e   l o c a l   f i l e s 
 
                                                         v a r   l o c P a t h   =   e x p a n d U R L R e f ( c h i l d l i s t [ i ] . l o c a t i o n ) ; 
 
 	 	 	 	 	 	 	 
 
 	 	 	 	 	 	 	                             l o c P a t h   =   l o c P a t h . r e p l a c e ( / ' / g ,   " \ \ \ ' " ) ; 
 
 	 	 	 	 	 	 	                             l o c P a t h   =   " \ " " + l o c P a t h + " \ " " ; 
 
 	 	 	 	 	 	 	                             t a s k d i v . o n k e y p r e s s   =   n e w   F u n c t i o n ( " k e y P r e s s O n T a s k ( ' l o c a l i z e d _ p a t h ' , ' "   +   l o c P a t h     +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
 	 	 	 	 	 	 	                             t a s k d i v . o n c l i c k   =   n e w   F u n c t i o n ( " l a u n c h F i l e ( ' "   +   l o c P a t h   +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
                                                 } 
 
                                                 n e x t _ s p o t . a p p e n d C h i l d ( t a s k d i v ) ; 
 
 
 
                                                 / /   m o u s e o v e r   h i g h l i g h t s 
 
                                                 t a s k d i v . o n m o u s e o v e r   =   n e w   F u n c t i o n ( " t h i s . c l a s s N a m e   =   \ " d e v i c e - d i v - h i g h l i g h t \ " " ) ; 
 
                                                 t a s k d i v . o n m o u s e o u t   =   n e w   F u n c t i o n ( " t h i s . c l a s s N a m e   =   \ " d e v i c e - d i v \ " " ) ; 
 
 	 	 	 	 	 	 
 
 	 	 	 	 	 	                         / / t a b   o n   f o c u s   h i g h l i g h t s 
 
 	 	 	 	 	 	                         t a s k d i v . o n f o c u s   =   n e w   F u n c t i o n ( " t h i s . c l a s s N a m e   =   \ " d e v i c e - d i v - h i g h l i g h t \ " " ) ; 
 
                                                 t a s k d i v . o n f o c u s o u t   =   n e w   F u n c t i o n ( " t h i s . c l a s s N a m e   =   \ " d e v i c e - d i v \ " " ) ; 
 
 
 
                                                 / /   h o l d e r s   f o r   t h e   s u b t a s k   i t e m s 
 
                                                 v a r   s m a l l _ t a b l e _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ; 
 
                                                 t a s k d i v . a p p e n d C h i l d ( s m a l l _ t a b l e _ e l ) ; 
 
                                                 v a r   s m a l l _ b o d y _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t b o d y " ) ; 
 
                                                 s m a l l _ t a b l e _ e l . a p p e n d C h i l d ( s m a l l _ b o d y _ e l ) ; 
 
                                                 s m a l l _ t a b l e _ r o w   =   d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; 
 
                                                 s m a l l _ b o d y _ e l . a p p e n d C h i l d ( s m a l l _ t a b l e _ r o w ) ; 
 
                                                 v a r   t x t _ c e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                                 v a r   i c o n _ c e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                                 i c o n _ c e l l . c l a s s N a m e   =   " d e v i c e - i m g - c o n t a i n e r " 
 
                                                 t x t _ c e l l . c l a s s N a m e   =   " d e v i c e - t e x t " ; 
 
 
 
 
 
                                                 / /   r e - a r r a n g e s   e l e m e n t s   f o r   R T L   l a n g u a g e s 
 
                                                 / / i f   ( b _ r t l )   { 
 
                                                 / /         s m a l l _ t a b l e _ r o w . a p p e n d C h i l d ( t x t _ c e l l ) ; 
 
                                                 / /         s m a l l _ t a b l e _ r o w . a p p e n d C h i l d ( i c o n _ c e l l ) ;                                                         
 
                                                 / / } 
 
                                                 / / e l s e   { 
 
                                                         s m a l l _ t a b l e _ r o w . a p p e n d C h i l d ( i c o n _ c e l l ) ; 
 
                                                         s m a l l _ t a b l e _ r o w . a p p e n d C h i l d ( t x t _ c e l l ) ; 
 
                                                 / / } 
 
                                                                                                 
 
 
 
                                                 / /   i c o n 
 
                                                 i f ( b _ i e 6 )   { 
 
                                                         v a r   t a s k i c o n   =   d o c u m e n t . c r e a t e E l e m e n t ( " i m g " ) ; 
 
                                                         t a s k i c o n . s e t A t t r i b u t e ( " s r c " ,   " U D C _ f i l e s / i m g / b l a n k . g i f " ) ; 
 
                                                         t a s k i c o n . c l a s s N a m e   =   " d e v i c e - i m g " ; 
 
                                                         t a s k i c o n . s t y l e . f i l t e r   =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = ' "   +   c h i l d l i s t [ i ] . i m a g e   +   " ' ) " ; 
 
                                                         i c o n _ c e l l . a p p e n d C h i l d ( t a s k i c o n ) ; 
 
                                                 } 
 
                                                 e l s e   { 
 
                                                         v a r   t a s k i c o n   =   d o c u m e n t . c r e a t e E l e m e n t ( " i m g " ) ; 
 
                                                         t a s k i c o n . s e t A t t r i b u t e ( " s r c " ,   c h i l d l i s t [ i ] . i m a g e ) ; 
 
                                                         t a s k i c o n . c l a s s N a m e   =   " d e v i c e - i m g " ; 
 
                                                         i c o n _ c e l l . a p p e n d C h i l d ( t a s k i c o n ) ; 
 
                                                 } 
 
 
 
                                                 / /   t i t l e 
 
                                                 v a r   p 1   =   d o c u m e n t . c r e a t e E l e m e n t ( " p " ) ; 
 
                                                 p 1 . c l a s s N a m e   =   " d e v i c e - t i t l e " ; 
 
                                                 
 
                                                 v a r   t e x t _ n o d e   =   d o c u m e n t . c r e a t e T e x t N o d e ( G e t L a n g S t r i n g ( c h i l d l i s t [ i ] . t i t l e ) ) ; 
 
                                                 
 
                                                 i f ( b _ r t l ) 
 
                                                         p 1 . s t y l e . d i r e c t i o n = " r t l " ; 
 
                                                 
 
                                                 p 1 . a p p e n d C h i l d ( t e x t _ n o d e ) ; 
 
                                                 i f ( ! b _ l a r g e _ t e x t ) 
 
                                                     t x t _ c e l l . s t y l e . w i d t h   =   " 3 5 0 p x "                                                 
 
                                                 t x t _ c e l l . a p p e n d C h i l d ( p 1 ) ;   
 
                                                                                               
 
                                                 p 1 . t i t l e   =   G e t L a n g S t r i n g ( c h i l d l i s t [ i ] . t i t l e ) ; 
 
                                                 
 
 / /                                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   2 0 5 2 )   { 
 
 / /                                                         i f ( ! b _ l a r g e _ t e x t ) 
 
 / /                                                                 p 1 . s t y l e . f o n t S i z e   =   " 1 7 p x " ;   / / 1 8 p x 
 
 / /                                                         e l s e 
 
 / /                                                                 p 1 . s t y l e . f o n t S i z e   =   " 2 4 p x " ; 
 
 / /                                                 } 
 
                                                 
 
                                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 2 8 )   { 
 
                                                         i f ( ! b _ l a r g e _ t e x t ) 
 
                                                                 p 1 . s t y l e . f o n t S i z e   =   " 1 8 p x " ; 
 
                                                         e l s e 
 
                                                                 p 1 . s t y l e . f o n t S i z e   =   " 1 6 p x " ; 
 
                                                 } 
 
   
 
 / /                                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 2 )   { 
 
 / /                                                         i f ( ! b _ l a r g e _ t e x t ) 
 
 / /                                                                 p 1 . s t y l e . f o n t S i z e   =   " 1 7 p x " ; 
 
 / /                                                         e l s e 
 
 / /                                                                 p 1 . s t y l e . f o n t S i z e   =   " 2 5 p x " ; 
 
 / /                                                 } 
 
 	 	 	 	 	 	 
 
 / /                                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 1 )   { 
 
 / /                                                         i f ( ! b _ l a r g e _ t e x t ) 
 
 / /                                                                 p 1 . s t y l e . f o n t S i z e   =   " 1 4 p x " ;   / / 1 9 p x 
 
 / /                                                         e l s e 
 
 / /                                                                 p 1 . s t y l e . f o n t S i z e   =   " 2 6 p x " ;   / / 2 5 p x 
 
 / /                                                 } 
 
 
 
                                                 / /   d e s c r i p t i o n 
 
                                                 v a r   p 2   =   d o c u m e n t . c r e a t e E l e m e n t ( " p " ) ; 
 
                                                 p 2 . c l a s s N a m e   =   " d e v i c e - d e s c r i p t i o n " ; 
 
                                                 t e x t _ n o d e   =   d o c u m e n t . c r e a t e T e x t N o d e ( G e t L a n g S t r i n g ( c h i l d l i s t [ i ] . d e s c r i p t i o n ) ) ; 
 
                                                 i f ( b _ r t l ) 
 
                                                         p 2 . s t y l e . d i r e c t i o n = " r t l " ; 
 
                                                 p 2 . a p p e n d C h i l d ( t e x t _ n o d e ) ; 
 
                                                 t x t _ c e l l . a p p e n d C h i l d ( p 2 ) ; 
 
                                                 p 2 . t i t l e   =   G e t L a n g S t r i n g ( c h i l d l i s t [ i ] . d e s c r i p t i o n ) ; 
 
 
 
 
 
                                                 / /   s l i g h t l y   d i f f r e n t   t e x t   s i z e   f o r   a s i a n   l a n g u a g e s 
 
                                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 2 8   | |   i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 2 )   { 
 
                                                         i f ( ! b _ l a r g e _ t e x t )   {   / /   s e t   l i n e H e i g h t 
 
                                                                 p 2 . s t y l e . f o n t S i z e   =   " 1 4 p x " ; 
 
                                                                 p 2 . s t y l e . l i n e H e i g h t   =   " 1 7 p x " ; 
 
                                                         } 
 
                                                         e l s e   { 
 
                                                                 p 2 . s t y l e . f o n t S i z e   =   " 2 1 p x " ; 
 
                                                                 p 2 . s t y l e . l i n e H e i g h t   =   " 2 5 p x " ; 
 
                                                         } 
 
                                                 } 
 
                                                 
 
                                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   2 0 5 2 )   { 
 
                                                         i f ( ! b _ l a r g e _ t e x t )   {   / /   s e t   l i n e H e i g h t 
 
                                                                 p 2 . s t y l e . f o n t S i z e   =   " 1 5 p x " ; 
 
                                                                 p 2 . s t y l e . l i n e H e i g h t   =   " 1 7 p x " ; 
 
                                                         } 
 
                                                         e l s e   { 
 
                                                                 p 2 . s t y l e . f o n t S i z e   =   " 2 2 . 5 p x " ; 
 
                                                                 p 2 . s t y l e . l i n e H e i g h t   =   " 2 5 p x " ; 
 
                                                         } 
 
                                                 } 
 
                                                 
 
                                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 1 )   { 
 
                                                         i f ( ! b _ l a r g e _ t e x t )   {   / /   s e t   l i n e H e i g h t 
 
                                                                 p 2 . s t y l e . f o n t S i z e   =   " 1 3 p x " ;   / / 1 5 p x 
 
                                                                 p 2 . s t y l e . l i n e H e i g h t   =   " 1 8 p x " ; 
 
                                                         } 
 
                                                         e l s e   { 
 
                                                                 p 2 . s t y l e . f o n t S i z e   =   " 2 0 p x " ;   / / 2 2 . 5 p x 
 
                                                                 p 2 . s t y l e . l i n e H e i g h t   =   " 2 6 p x " ; 
 
                                                         } 
 
                                                 } 
 
 
 
                                                 / /   s e t u p   f o r   n e x t   i t e m 
 
                                                 n e x t _ s p o t   =   a f t e r _ s p o t ; 
 
                                                 a f t e r _ s p o t   =   n u l l ; 
 
                                                 / / a f t e r _ s p o t   =   l a s t _ s p o t 
 
                                                 / / l a s t _ s p o t   =   n u l l ; 
 
                                         } 
 
                                         
 
                                         / / i f   t h e r e   a r e   n o   t a s k s   w e   s h o u l d   j u s t   d e l e t e   t h e   s e c t i o n 
 
                                         i f ( t o t a l _ s u b t a s k s   = =   0 ) 
 
                                         { 
 
                                                 t a r g e t _ d i v . r e m o v e C h i l d ( t a s k _ h o l d e r ) ; 
 
                                                 / / i f ( t i t l e d i v   ! =   n u l l ) 
 
                                                 / /         t a r g e t _ d i v . r e m o v e C h i l d ( t i t l e d i v ) ; 
 
                                         } 
 
                                 } 
 
                                 e l s e   { 
 
                                         / /   t a b l e   l a y o u t 
 
                                         v a r   t a b l e _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ; 
 
                                         t a b l e _ e l . c l a s s N a m e   =   " h e l p - t a b l e " ; 
 
                                         t a s k _ h o l d e r . a p p e n d C h i l d ( t a b l e _ e l ) ; 
 
                                         v a r   b o d y _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t b o d y " ) ; 
 
                                         t a b l e _ e l . a p p e n d C h i l d ( b o d y _ e l ) ; 
 
                                         v a r   n e x t _ s p o t   =   n u l l ,   a f t e r _ s p o t   =   n u l l ; 
 
 
 
                                         f o r   ( v a r   i   =   0 ;   c h i l d l i s t [ i ]   ! =   n u l l ;   i + + )   { 
 
                                                 / /   s k i p   i n a c t i v e   t a s k s   
 
                                                 i f   ( c h i l d l i s t [ i ] . a c t i v e   = =   f a l s e   | |   c h i l d l i s t [ i ] . i s A v a i l i b l e   = =   f a l s e ) 
 
                                                         c o n t i n u e ; 
 
 
 
                                                 / /   i f   t h e r e   i s n ' t   a   s p o t   i n   t h e   e m p t y   r o w 
 
                                                 i f   ( n e x t _ s p o t   = =   n u l l )   { 
 
                                                         / /   c r e a t e   t h e   n e x t   r o w   i n   t h e   t a b l e 
 
                                                         t a b l e _ r o w   =   d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; 
 
                                                         b o d y _ e l . a p p e n d C h i l d ( t a b l e _ r o w ) ; 
 
                                                         n e x t _ s p o t   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                                         n e x t _ s p o t . c l a s s N a m e   =   " h e l p - c o l l " ; 
 
                                                         a f t e r _ s p o t   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                                         a f t e r _ s p o t . c l a s s N a m e   =   " h e l p - c o l l " ; 
 
                                                         
 
                                                         / /   r e - a r r a n g e s   e l e m e n t s   f o r   R T L   l a n g u a g e s 
 
                                                         i f   ( b _ r t l )   {         
 
                                                                 t a b l e _ r o w . a p p e n d C h i l d ( a f t e r _ s p o t ) ; 
 
                                                                 t a b l e _ r o w . a p p e n d C h i l d ( n e x t _ s p o t ) ; 
 
                                                         } 
 
                                                         e l s e   { 
 
                                                                 t a b l e _ r o w . a p p e n d C h i l d ( n e x t _ s p o t ) ; 
 
                                                                 t a b l e _ r o w . a p p e n d C h i l d ( a f t e r _ s p o t ) ; 
 
                                                         } 
 
                                                 } 
 
 
 
                                                 s w i t c h   ( c h i l d l i s t [ i ] . t y p e )   { 
 
                                                         c a s e   ( " l i n k " ) : 
 
                                                         c a s e   ( " l o c a l " ) : 
 
 	 	 	 	 	 	 	                             c a s e   ( " l o c a l i z e d _ p a t h " ) : 
 
 
 
                                                                 / /   c o n t a i n e r   w i t h   o n - c l i c k   c a l l b a c k 
 
                                                                 v a r   t a s k d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                                                 t a s k d i v . c l a s s N a m e   =   " t a s k - d i v " ; 
 
 	 	 	 	 	 	 	 	                                 t a s k d i v . t a b I n d e x   =   " 0 " ; 
 
 	 	 	 	 	 	 	 	 
 
                                                                 i f   ( c h i l d l i s t [ i ] . t y p e   = =   " l o c a l " )   { 
 
                                                                         v a r   p a t h   =   c l e a n F i l e P a t h ( c h i l d l i s t [ i ] . l o c a t i o n ) ; 
 
                                                                         p a t h   =   p a t h . r e p l a c e ( / ' / g ,   " \ \ \ ' " ) ; 
 
 	 	 	 	 	 	 	 	 	                                     t a s k d i v . o n k e y p r e s s   =   n e w   F u n c t i o n ( " k e y P r e s s O n T a s k ( ' l o c a l ' , ' "   +   p a t h     +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
                                                                         t a s k d i v . o n c l i c k   =   n e w   F u n c t i o n ( " l a u n c h F i l e ( ' "   +   p a t h   +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
                                                                 } 
 
                                                                 e l s e   i f   ( c h i l d l i s t [ i ] . t y p e   = =   " o p e n _ f i l e " )   { 
 
                                                                         v a r   p a t h   =   c l e a n F i l e P a t h ( c h i l d l i s t [ i ] . l o c a t i o n ) ; 
 
                                                                         p a t h   =   p a t h . r e p l a c e ( / ' / g ,   " \ \ \ ' " ) ; 
 
 	 	 	 	 	 	 	 	 	                                     t a s k d i v . o n k e y p r e s s   =   n e w   F u n c t i o n ( " k e y P r e s s O n T a s k ( ' o p e n _ f i l e ' , ' "   +   p a t h     +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
                                                                         t a s k d i v . o n c l i c k   =   n e w   F u n c t i o n ( " o p e n F i l e ( ' "   +   p a t h   +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
                                                                 }                                                                 
 
                                                                 e l s e   i f   ( c h i l d l i s t [ i ] . t y p e   = =   " l i n k " )   { 
 
                                                                         v a r   l i n k   =   e x p a n d U R L R e f ( c h i l d l i s t [ i ] . l o c a t i o n ) ; 
 
                                                                         l i n k   =   l i n k . r e p l a c e ( / ' / g ,   " \ \ \ ' " ) ; 
 
 	 	 	 	 	 	 	 	 	                                     t a s k d i v . o n k e y p r e s s   =   n e w   F u n c t i o n ( " k e y P r e s s O n T a s k ( ' l i n k ' , ' "   +   l i n k     +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
                                                                         t a s k d i v . o n c l i c k   =   n e w   F u n c t i o n ( " l a u n c h L i n k ( ' "   +   l i n k   +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
                                                                 } 
 
 	 	 	 	 	 	 	 	                                 e l s e   i f   ( c h i l d l i s t [ i ] . t y p e   = =   " l o c a l i z e d _ p a t h " )   { 
 
 	 	 	 	 	 	 	 	 	                                     / / a l l o w s   t h e   u s e   o f   U R L s   w i t h   w i l d c a r d s   t o   l o c a t e   l o c a l   f i l e s 
 
                                                                         v a r   l o c P a t h   =   e x p a n d U R L R e f ( c h i l d l i s t [ i ] . l o c a t i o n ) ; 
 
 	 	 	 	 	 	 	 	 	                                     l o c P a t h   =   l o c P a t h . r e p l a c e ( / ' / g ,   " \ \ \ ' " ) ; 
 
 	 	 	 	 	 	 	 	 	                                     l o c P a t h   =   " \ " " + l o c P a t h + " \ " " ; 
 
 	 	 	 	 	 	 	 	 	                                     t a s k d i v . o n k e y p r e s s   =   n e w   F u n c t i o n ( " k e y P r e s s O n T a s k ( ' l o c a l i z e d _ p a t h ' , ' "   +   l o c P a t h     +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
 	 	 	 	 	 	 	 	 	                                     t a s k d i v . o n c l i c k   =   n e w   F u n c t i o n ( " l a u n c h F i l e ( ' "   +   l o c P a t h   +   " ' , ' "   +   c h i l d l i s t [ i ] . i d   +   " ' ) " ) ; 
 
                                                                 } 
 
 	 	 	 	 	 	 	                                     n e x t _ s p o t . a p p e n d C h i l d ( t a s k d i v ) ; 
 
 
 
                                                                 / /   m o u s e o v e r   h i g h l i g h t s 
 
                                                                 t a s k d i v . o n m o u s e o v e r   =   n e w   F u n c t i o n ( " t h i s . c l a s s N a m e   =   \ " t a s k - d i v - h i g h l i g h t \ " " ) ; 
 
                                                                 t a s k d i v . o n m o u s e o u t   =   n e w   F u n c t i o n ( " t h i s . c l a s s N a m e   =   \ " t a s k - d i v \ " " ) ; 
 
 	 	 	 	 	 	 	 	 
 
 	 	 	 	 	 	 	 	                                 / / t a b   o n   f o c u s   h i g h l i g h t s 
 
 	 	 	 	 	 	 	 	                                 t a s k d i v . o n f o c u s   =   n e w   F u n c t i o n ( " t h i s . c l a s s N a m e   =   \ " t a s k - d i v - h i g h l i g h t \ " " ) ; 
 
 	 	 	 	 	 	 	 	                                 t a s k d i v . o n f o c u s o u t   =   n e w   F u n c t i o n ( " t h i s . c l a s s N a m e   =   \ " t a s k - d i v \ " " ) ; 
 
 
 
                                                                 / /   h o l d e r s   f o r   t h e   s u b t a s k   i t e m s 
 
                                                                 v a r   s m a l l _ t a b l e _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ; 
 
                                                                 t a s k d i v . a p p e n d C h i l d ( s m a l l _ t a b l e _ e l ) ; 
 
                                                                 v a r   s m a l l _ b o d y _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t b o d y " ) ; 
 
                                                                 s m a l l _ t a b l e _ e l . a p p e n d C h i l d ( s m a l l _ b o d y _ e l ) ; 
 
                                                                 s m a l l _ t a b l e _ r o w   =   d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; 
 
                                                                 s m a l l _ b o d y _ e l . a p p e n d C h i l d ( s m a l l _ t a b l e _ r o w ) ; 
 
                                                                 v a r   i c o n _ c e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                                                 v a r   t x t _ c e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                                                 t x t _ c e l l . c l a s s N a m e   =   " t a s k - t e x t " ; 
 
 
 
                                                                 / /   r e - a r r a n g e s   e l e m e n t s   f o r   R T L   l a n g u a g e s 
 
                                                                 i f   ( b _ r t l )   {         
 
                                                                         s m a l l _ t a b l e _ r o w . a p p e n d C h i l d ( t x t _ c e l l ) ; 
 
                                                                         s m a l l _ t a b l e _ r o w . a p p e n d C h i l d ( i c o n _ c e l l ) ; 
 
                                                                 } 
 
                                                                 e l s e   { 
 
                                                                         s m a l l _ t a b l e _ r o w . a p p e n d C h i l d ( i c o n _ c e l l ) ; 
 
                                                                         s m a l l _ t a b l e _ r o w . a p p e n d C h i l d ( t x t _ c e l l ) ; 
 
                                                                 } 
 
 
 
                                                                 / /   i c o n 
 
                                                                 i f ( b _ i e 6 )   { 
 
                                                                         v a r   t a s k i c o n   =   d o c u m e n t . c r e a t e E l e m e n t ( " i m g " ) ; 
 
                                                                         t a s k i c o n . s e t A t t r i b u t e ( " s r c " ,   " U D C _ f i l e s / i m g / b l a n k . g i f " ) ; 
 
                                                                         t a s k i c o n . c l a s s N a m e   =   " t a s k - i m g " ; 
 
                                                                         t a s k i c o n . s t y l e . f i l t e r   =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = ' "   +   c h i l d l i s t [ i ] . i m a g e   +   " ' ) " ; 
 
                                                                         i c o n _ c e l l . a p p e n d C h i l d ( t a s k i c o n ) ; 
 
                                                                 } 
 
                                                                 e l s e   { 
 
                                                                         v a r   t a s k i c o n   =   d o c u m e n t . c r e a t e E l e m e n t ( " i m g " ) ; 
 
                                                                         t a s k i c o n . s e t A t t r i b u t e ( " s r c " ,   c h i l d l i s t [ i ] . i m a g e ) ; 
 
                                                                         t a s k i c o n . c l a s s N a m e   =   " t a s k - i m g " ; 
 
                                                                         i c o n _ c e l l . a p p e n d C h i l d ( t a s k i c o n ) ; 
 
                                                                 } 
 
 
 
                                                                 / /   t i t l e 
 
                                                                 v a r   p 1   =   d o c u m e n t . c r e a t e E l e m e n t ( " p " ) ; 
 
                                                                 p 1 . c l a s s N a m e   =   " t a s k - t i t l e " ; 
 
                                                                 v a r   t e x t _ n o d e   =   d o c u m e n t . c r e a t e T e x t N o d e ( G e t L a n g S t r i n g ( c h i l d l i s t [ i ] . t i t l e ) ) ; 
 
                                                                 p 1 . a p p e n d C h i l d ( t e x t _ n o d e ) ; 
 
                                                                 t x t _ c e l l . s t y l e . w i d t h   =   " 2 5 0 p x " ; 
 
                                                                 i f ( b _ r t l ) 
 
                                                                         p 1 . s t y l e . d i r e c t i o n = " r t l " ; 
 
                                                                 t x t _ c e l l . a p p e n d C h i l d ( p 1 ) ; 
 
                                                                 p 1 . t i t l e   =   G e t L a n g S t r i n g ( c h i l d l i s t [ i ] . t i t l e ) ; 
 
                                                                 / /   t i t l e   f o n t 
 
                                                                 p 1 . s t y l e . f o n t S i z e   =   " 1 6 p x " ; 
 
                                                                 p 1 . s t y l e . l i n e H e i g h t   =   " 2 0 p x " ; 
 
                                                                 p 1 . s t y l e . f o n t F a m i l y   =   " a r i a l ,   s a n s - s e r i f " ; 
 
                                                                 p 1 . s t y l e . f o n t   =   " b o l d   1 6 p x   a r i a l " ; 
 
 
 
                                                                 / /   s l i g h t l y   d i f f r e n t   t e x t   s i z e   f o r   a s i a n   l a n g u a g e s 
 
 / /                                                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 2 8   | |   i n s t a l l _ o b j . L A N G _ I D   = = =   2 0 5 2 )   { 
 
 / /                                                                         i f ( ! b _ l a r g e _ t e x t ) 
 
 / /                                                                                 p 1 . s t y l e . f o n t S i z e   =   " 1 8 p x " ; 
 
 / /                                                                         e l s e 
 
 / /                                                                                 p 1 . s t y l e . f o n t S i z e   =   " 2 4 p x " ; 
 
 / /                                                                 } 
 
                                                                 
 
 / /                                                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 2 )   { 
 
 / /                                                                         i f ( ! b _ l a r g e _ t e x t ) 
 
 / /                                                                                 p 1 . s t y l e . f o n t S i z e   =   " 1 8 p x " ; 
 
 / /                                                                         e l s e 
 
 / /                                                                                 p 1 . s t y l e . f o n t S i z e   =   " 2 4 p x " ; 
 
 / /                                                                 } 
 
 
 
 / /                                                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 1 )   { 
 
 / /                                                                         i f ( ! b _ l a r g e _ t e x t ) 
 
 / /                                                                                 p 1 . s t y l e . f o n t S i z e   =   " 2 0 p x " ;   / / 2 1 p x 
 
 / /                                                                         e l s e 
 
 / /                                                                                 p 1 . s t y l e . f o n t S i z e   =   " 3 0 p x " ;   / / 3 1 . 5 p x 
 
 
 
 / /                                                                 } 
 
                                                                 / /   d e s c r i p t i o n 
 
                                                                 v a r   p 2   =   d o c u m e n t . c r e a t e E l e m e n t ( " p " ) ; 
 
                                                                 p 2 . c l a s s N a m e   =   " t a s k - d e s c r i p t i o n " ; 
 
 / /                                                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 2 8 ) 
 
 / /                                                                         p 2 . s t y l e . m a r g i n T o p   =   " 4 p x " ; 
 
                                                                 t e x t _ n o d e   =   d o c u m e n t . c r e a t e T e x t N o d e ( G e t L a n g S t r i n g ( c h i l d l i s t [ i ] . d e s c r i p t i o n ) ) ; 
 
                                                                 i f ( b _ r t l ) 
 
                                                                         p 2 . s t y l e . d i r e c t i o n = " r t l " ; 
 
                                                                 p 2 . a p p e n d C h i l d ( t e x t _ n o d e ) ; 
 
                                                                 t x t _ c e l l . a p p e n d C h i l d ( p 2 ) ; 
 
                                                                 p 2 . t i t l e   =   G e t L a n g S t r i n g ( c h i l d l i s t [ i ] . d e s c r i p t i o n ) ; 
 
                                                                 / /   d e s c   f o n t 
 
                                                                 p 2 . s t y l e . f o n t S i z e   =   " 1 2 p x " ; 
 
                                                                 p 2 . s t y l e . l i n e H e i g h t   =   " 1 3 . 5 p x " ; 
 
                                                                 p 2 . s t y l e . f o n t F a m i l y   =   " a r i a l ,   s a n s - s e r i f " ; 
 
                                                                 p 2 . s t y l e . f o n t   =   " n o r m a l   1 2 p x   a r i a l " ; 
 
   
 
                                                                 
 
                                                                 / /   s l i g h t l y   d i f f r e n t   t e x t   s i z e   f o r   a s i a n   l a n g u a g e s 
 
 / /                                                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   2 0 5 2 )   { 
 
 / /                                                                         i f ( ! b _ l a r g e _ t e x t )   {   / /   s e t   l i n e H e i g h t 
 
 / /                                                                                 p 2 . s t y l e . f o n t S i z e   =   " 1 5 p x " ; 
 
 / /                                                                                 p 2 . s t y l e . l i n e H e i g h t   =   " 1 7 p x " ; 
 
 / /                                                                         } 
 
 / /                                                                         e l s e   { 
 
 / /                                                                                 p 2 . s t y l e . f o n t S i z e   =   " 2 2 . 5 p x " ; 
 
 / /                                                                                 p 2 . s t y l e . l i n e H e i g h t   =   " 2 5 p x " ; 
 
 / /                                                                         } 
 
 / /                                                                 } 
 
 
 
 / /                                                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 2 8 )   { 
 
 / /                                                                         i f ( ! b _ l a r g e _ t e x t )   {   / /   s e t   l i n e H e i g h t 
 
 / /                                                                                 p 2 . s t y l e . f o n t S i z e   =   " 1 4 p x " ; 
 
 / /                                                                                 p 2 . s t y l e . l i n e H e i g h t   =   " 1 7 p x " ; 
 
 / /                                                                         } 
 
 / /                                                                         e l s e   { 
 
 / /                                                                                 p 2 . s t y l e . f o n t S i z e   =   " 2 2 . 5 p x " ; 
 
 / /                                                                                 p 2 . s t y l e . l i n e H e i g h t   =   " 2 5 p x " ; 
 
 / /                                                                         } 
 
 / /                                                                 } 
 
 
 
 / /                                                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 2 )   { 
 
 / /                                                                         i f ( ! b _ l a r g e _ t e x t )   {   / /   s e t   l i n e H e i g h t 
 
 / /                                                                                 p 2 . s t y l e . f o n t S i z e   =   " 1 4 p x " ; 
 
 / /                                                                                 p 2 . s t y l e . l i n e H e i g h t   =   " 1 7 p x " ; 
 
 / /                                                                         } 
 
 / /                                                                         e l s e   { 
 
 / /                                                                                 p 2 . s t y l e . f o n t S i z e   =   " 2 2 p x " ; 
 
 / /                                                                                 p 2 . s t y l e . l i n e H e i g h t   =   " 2 5 p x " ; 
 
 / /                                                                         } 
 
 / /                                                                 } 
 
                                                                 
 
 / /                                                                 i f ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 1 )   { 
 
 / /                                                                         i f ( ! b _ l a r g e _ t e x t )   {   / /   s e t   l i n e H e i g h t 
 
 / /                                                                                 p 2 . s t y l e . f o n t S i z e   =   " 1 3 p x " ;   / / 1 5 . 5 
 
 / /                                                                                 p 2 . s t y l e . l i n e H e i g h t   =   " 1 8 p x " ; 
 
 / /                                                                         } 
 
 / /                                                                         e l s e   { 
 
 / /                                                                                 p 2 . s t y l e . f o n t S i z e   =   " 1 9 p x " ;   / / 2 2 . 5 p x 
 
 / /                                                                                 p 2 . s t y l e . l i n e H e i g h t   =   " 2 6 p x " ; 
 
 / /                                                                         } 
 
 / /                                                                 } 
 
 
 
                                                                 / /   s e t u p   f o r   n e x t   i t e m 
 
                                                                 n e x t _ s p o t   =   a f t e r _ s p o t ; 
 
                                                                 a f t e r _ s p o t   =   n u l l ; 
 
 
 
                                                                 b r e a k ; 
 
                                                         d e f a u l t : 
 
                                                                 a d d L o g M e s s a g e ( " E R R O R :   s u b t a s k   t y p e :   "   +   c h i l d l i s t [ i ] . t y p e   +   " n o t   r e c o g n i z e d " ) ; 
 
                                                                 b r e a k ; 
 
                                                 } 
 
                                         } 
 
                                 } 
 
                         } 
 
                 } 
 
 
 
                 / /   r e t u r n s   t h e   f i l e   n a m e   p a r t   o f   a   p a t h ,   f o r w a r d   s l a s h   o n l y 
 
                 f u n c t i o n   s t r i p H e l p P a t h ( p a t h )   { 
 
                         v a r   s A r r a y   =   p a t h . s p l i t ( " / " ) ; 
 
                         r e t u r n   s A r r a y [ s A r r a y . l e n g t h   -   1 ] ; 
 
                 } 
 
 	 	 
 
                 / /   c h a n g e s   t h e   s e l e c t e d   t a b 
 
                 f u n c t i o n   s e l e c t N e w S u b T a s k ( i n d e x )   { 
 
 
 
                         c u r _ s u b _ t a s k _ s e l e c t i o n   =   N u m b e r ( i n d e x ) ; 
 
                         s e l e c t N e w T a b ( c u r _ s e l e c t i o n ,   t r u e ) ; 
 
 
 
                 } 
 
 
 
                 f u n c t i o n   k e y P r e s s O n N e w S u b T a s k ( i n d e x )   { 
 
                         a d d L o g M e s s a g e ( " K e y   p r e s s e d   o n   t a b   i n d e x   :   "   +   i n d e x   +   " ,   k e y c o d e   i s   "   +   e v e n t . k e y C o d e ) ; 
 
                         i f   ( e v e n t . k e y C o d e   = =   1 3 ) 
 
                                 s e l e c t N e w S u b T a s k ( i n d e x ,   f a l s e ) ; 
 
                 } 
 
 
 
 	 	         f u n c t i o n   k e y P r e s s O n T a s k ( t a s k T y p e , p a t h , i d )   { 	 	 	 
 
 	 	 	             a d d L o g M e s s a g e ( " K e y   p r e s s e d   o n   a   t a s k .   E v e n t   c o d e   i s   " + e v e n t . k e y C o d e + " ,   T a s k   t y p e   i s   " + t a s k T y p e + " ,   P a t h   i s   " + p a t h + " ,   I D   i s   " + i d + " . " ) ; 
 
 	 	 	             i f   ( e v e n t . k e y C o d e   = =   1 3 )   { 
 
 	 	 	                   i f   ( t a s k T y p e   = =   " l o c a l "   | |   t a s k T y p e   = =   " l o c a l i z e d _ p a t h " )   
 
 	 	 	 	 	                 l a u n c h F i l e ( p a t h , i d ) ; 
 
 	 	 	 	 	           e l s e   i f   ( t a s k T y p e   = =   " o p e n _ f i l e " ) 
 
 	 	 	 	 	           	     o p e n F i l e ( p a t h , i d ) ; 
 
                               e l s e   i f   ( t a s k T y p e   = =   " l i n k " )   
 
                                     l a u n c h L i n k ( p a t h , i d ) ; 	 	 	 
 
 	 	 	             } 
 
 	 	         } 
 
 
 
                 / /   h a n d e l s   a l l   e v e n t s   t h a t   c h a n g e   t h e   c o l o r   o f   t h e   i c o n s   i n   t h e   h e a d e r   s e c t i o n 
 
                 / /   t h i s   i n c l u d e s   a c t u a l   m o u s e   e v e n t s ,   a n d   c h a n g e s   i n   t a b   s e l e c t i o n 
 
                 f u n c t i o n   r o l l o v e r ( i n d e x ,   b O v e r )   { 
 
 
 
                         v a r   i c o n   =   d o c u m e n t . g e t E l e m e n t B y I d ( " t a b - i c o n - "   +   i n d e x ) ; 
 
 
 
                         / /   e a r l y   r e t u r n   f o r   u n a v a i l i b l e   i c o n s 
 
                         i f   ( i c o n   = =   n u l l ) 
 
                                 r e t u r n ; 
 
 
 
                         v a r   b A v a i l   =   t a s k _ a v a i l _ a r r a y [ i n d e x ] ; 
 
                         v a r   b S e l   =   ( i n d e x   = =   c u r _ s e l e c t i o n ) ; 
 
                         v a r   t e x t _ e l   =   d o c u m e n t . g e t E l e m e n t B y I d ( " t a b - t e x t - "   +   i n d e x ) ; 
 
                         i f   ( t e x t _ e l   = =   n u l l )   { 
 
                                 a d d L o g M e s s a g e ( " E R R O R :   b a d   c a l l   t o   r o l l o v e r ,   i n d e x   =   "   +   i n d e x ) ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         i f   ( ! b A v a i l )   { 
 
                                 / /   d i s a b l e d   e n t r y 
 
                                 i f ( b _ i e 6 ) 
 
                                         i c o n . s t y l e . f i l t e r   =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = ' "   +   t a s k _ i m a g e _ a r r a y [ i n d e x ] [ 2 ]   +   " ' ) " ; 
 
                                 e l s e 
 
                                         i c o n . s t y l e . b a c k g r o u n d P o s i t i o n   =   " 0 p x   - 1 0 0 p x " ;     / / S c a l e   O K 
 
                                         
 
                                 t e x t _ e l . c l a s s N a m e   =   " t a b - t e x t " ; 
 
                         } 
 
                         e l s e   i f   ( b S e l )   { 
 
                                 / /   s e l e c t e d   e l e m e n t 
 
                                 i f ( b _ i e 6 ) 
 
                                         i c o n . s t y l e . f i l t e r   =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = ' "   +   t a s k _ i m a g e _ a r r a y [ i n d e x ] [ 1 ]   +   " ' ) " ; 
 
                                 e l s e 
 
                                         i c o n . s t y l e . b a c k g r o u n d P o s i t i o n   =   " 0 p x   - 5 5 p x " ;       / / S c a l e   O K 
 
                                 t e x t _ e l . c l a s s N a m e   =   " t a b - s e l e c t e d - t e x t " ; 
 
                         } 
 
                         e l s e   i f   ( b O v e r )   { 
 
                                 / /   m o u s e o v e r 
 
                                 i f ( b _ i e 6 ) 
 
                                         i c o n . s t y l e . f i l t e r   =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = ' "   +   t a s k _ i m a g e _ a r r a y [ i n d e x ] [ 1 ]   +   " ' ) " ; 
 
                                 e l s e 
 
                                         i c o n . s t y l e . b a c k g r o u n d P o s i t i o n   =   " 0 p x   - 5 5 p x " ;       / / S c a l e   O K 
 
                                 t e x t _ e l . c l a s s N a m e   =   " t a b - t e x t " ; 
 
                         } 
 
                         e l s e   { 
 
                                 / /   u n s e l e c t e d 
 
                                 i f ( b _ i e 6 ) 
 
                                         i c o n . s t y l e . f i l t e r   =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = ' "   +   t a s k _ i m a g e _ a r r a y [ i n d e x ] [ 0 ]   +   " ' ) " ; 
 
                                 e l s e 
 
                                         i c o n . s t y l e . b a c k g r o u n d P o s i t i o n   =   " 0 p x   0 p x " ;       / / S c a l e   O K 
 
                                 t e x t _ e l . c l a s s N a m e   =   " t a b - t e x t " ; 
 
                         } 
 
                         / / r e d u c e   t h e   f o n t   s i z e   i f   1 0 4 1   o r   2 0 5 2   i n   n o r m a l   t e x t   m o d e 
 
 / /                         i f   ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 1   | |   i n s t a l l _ o b j . L A N G _ I D   = = =   2 0 5 2 )   { 
 
 / /                                 i f   ( ! b _ l a r g e _ t e x t )   { 
 
 / /                                         t e x t _ e l . s t y l e . f o n t S i z e   =   " 1 2 p x " ; 
 
 / /                                 } 
 
 / /                         } 
 
                 } 
 
 
 
                 / /   c a l l e d   b y   e v e n t   w h e n   e i t h e r   o f   t h e   s e a r c h   s e l e c t i o n   b u t t o n s   a r e   c a l l e d 
 
                 / /   r e - c o l o r s   t h o s e   b u t t o n s   a n d   c h a n g e s   t h e   b l o c a l _ s e a r c h   g l o b a l 
 
                 f u n c t i o n   s e t L o c a l S e a r c h ( b L o c a l )   { 
 
                         / /   s e t   g l o b a l   v a r i a b l e 
 
                         b l o c a l _ s e a r c h   =   b L o c a l ; 
 
 
 
                         / /   h t m l   e l e m e n t s   t o   a l t e r   t o   s h o w   s e l e c t i o n 
 
                         v a r   d i v _ s h o w ,   c h e c k _ s h o w ,   d i v _ h i d e ,   c h e c k _ h i d e ,   t e x t _ s h o w ,   t e x t _ h i d e ; 
 
 
 
                         / /   c h a n g e   s e a r c h   b o x   t e x t   a n d   g r a b   e l e m e n t s   f r o m   t h e   D O M 
 
                         v a r   b o x   =   d o c u m e n t . g e t E l e m e n t B y I d ( " s e a r c h - t x t b o x " ) ; 
 
                         i f   ( b L o c a l )   { 
 
                                 b o x . v a l u e   =   G e t L a n g S t r i n g ( " U D C S t r i n g _ S e a r c h L o c a l " ) ; 
 
                         }   
 
                         b _ u s e r _ t e x t   =   f a l s e ; 
 
 
 
                         / /   h i d e   t h e   d r o p d o w n   m e n u   a f t e r   a   s e l e c t i o n   i s   m a d e 
 
                         s h o w D r o p ( f a l s e ) ; 
 
                 } 
 
 
 
                 / /   c a l l e d   w h e n   t h e   u s e r   c l i c k s   t h e   s e a r c h   b o x 
 
                 f u n c t i o n   c l i c k S e a r c h ( )   { 
 
                         i f   ( ! b _ u s e r _ t e x t )   { 
 
                                 v a r   b o x   =   d o c u m e n t . g e t E l e m e n t B y I d ( " s e a r c h - t x t b o x " ) ; 
 
                                 b o x . v a l u e   =   " " ; 
 
                         } 
 
                         b _ u s e r _ t e x t   =   t r u e ; 
 
                 } 
 
 
 
                 / /   f i n d   m a t c h e s   a m o n g   t h e   x m l   p r o v i d e d   h t m l   f i l e s 
 
                 f u n c t i o n   f i n d H T M L M a t c h e s ( s e a r c h _ p h r a s e )   { 
 
                         i f   ( ! b _ x m l _ l o a d e d ) 
 
                                 r e t u r n   n u l l ; 
 
 
 
                         / /   s e t u p   v a r i a b l e s 
 
                         v a r   r e s u l t s   =   n e w   O b j e c t ( ) ; 
 
                         r e s u l t s . t a s k _ l i s t   =   n e w   A r r a y ( ) ; 
 
                         v a r   c o u n t   =   0 ; 
 
                       / *   i g n o r e   *   (   a n d   )   - -   a l l   o t h e r s   m a y   g e t   e s c a p e d   N O T E :   w e   a r e   n o t   d o i n g   w i l d c a r d   s e a r c h   * / 
 
                         s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ * / g ,   ' ' ) ; 
 
                         s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ ( / g ,   ' ' ) ; 
 
                         s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ ) / g ,   ' ' ) ; 
 
 	 	 	             / *   i g n o r e   +   [   \   a n d   ?   * / 
 
 	 	 	             s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ + / g ,   ' ' ) ; 
 
 	 	 	             s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ ? / g ,   ' ' ) ; 
 
 	 	 	             s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ [ / g ,   ' ' ) ; 
 
 	 	 	             s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ ] / g ,   ' ' ) ; 
 
 	 	     	         s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ \ / g ,   ' ' ) ; 
 
                           / / f o r   h e l p   s e a r c h   t h e   p h r a s e   d o e s   n o t   n e e d   t o   b e   e s c a p e d 
 
                         / / s e a r c h _ p h r a s e   =   e s c a p e F o r U r l ( s e a r c h _ p h r a s e ) ; 
 
                         / / c a s e   i n d e p e n d e n t   s e a r c h 
 
                         v a r   m y r e g e x p   =   n e w   R e g E x p ( s e a r c h _ p h r a s e ,   " i " ) 
 
 
 
                         v a r   i ; 
 
                         f o r   ( i   =   0 ;   x m l _ s e a r c h _ a r r a y [ i ]   ! =   n u l l ;   i + + )   { 
 
                                 / /   s e a r c h   t h e   t i t l e   a n d   c o p y   m a t c h e s   i n t o   " r e s u l t s " 
 
                                 v a r   r e s u l t 1   =   x m l _ s e a r c h _ a r r a y [ i ] . k e y . s e a r c h ( m y r e g e x p ) ; 
 
                                 i f   ( r e s u l t 1   >   - 1 ) 
 
                                         r e s u l t s . t a s k _ l i s t [ r e s u l t s . t a s k _ l i s t . l e n g t h ]   =   x m l _ s e a r c h _ a r r a y [ i ] ; 
 
                         } 
 
 
 
                         r e t u r n   r e s u l t s ; 
 
                 } 
 
 
 
                 / /   h e l p e r   f u n c t i o n   f o r   t h e   l o c a l   s e a r c h 
 
                 / /   l o o k s   t h r o u g h   t a s k s   i n   s e a r c h _ a r r a y   f o r   t h e   s t r i n g   s e a r c h _ p h r a s e   a n d   c o p i e s   m a t c h e s   t o   r e s u l t _ a r r a y 
 
                 f u n c t i o n   f i n d M a t c h e s ( s e a r c h _ a r r a y ,   r e s u l t _ a r r a y ,   s e a r c h _ p h r a s e ,   c o u n t )   { 
 
                         i f   ( s e a r c h _ a r r a y   = =   n u l l )   { 
 
                                 a d d L o g M e s s a g e ( " E R R O R :   f i n d   m a t c h e s   c a l l e d   o n   n u l l " ) ; 
 
                                 r e t u r n   c o u n t ; 
 
                         } 
 
                         / *   i g n o r e   *   (   a n d   )   - -   a l l   o t h e r s   m a y   g e t   e s c a p e d   N O T E :   w e   a r e   n o t   d o i n g   w i l d c a r d   s e a r c h   * / 
 
                         s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ * / g ,   ' ' ) ; 
 
                         s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ ( / g ,   ' ' ) ; 
 
                         s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ ) / g ,   ' ' ) ; 
 
 	 	 	             / *   i g n o r e   +   [   \   a n d   ?   * / 
 
 	 	 	             s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ + / g ,   ' ' ) ; 
 
 	 	 	             s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ ? / g ,   ' ' ) ; 
 
 	 	 	             s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ [ / g ,   ' ' ) ; 
 
 	 	 	             s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ ] / g ,   ' ' ) ; 
 
 	 	 	             s e a r c h _ p h r a s e   =   s e a r c h _ p h r a s e . r e p l a c e ( / \ \ / g ,   ' ' ) ; 
 
                         / / f o r   h e l p   s e a r c h   t h e   p h r a s e   d o e s   n o t   n e e d   t o   b e   e s c a p e d 
 
                         / / s e a r c h _ p h r a s e   =   e s c a p e F o r U r l ( s e a r c h _ p h r a s e ) ; 
 
                         
 
                         / / c a s e   i n d e p e n d e n t   s e a r c h 
 
                         v a r   m y r e g e x p   =   n e w   R e g E x p ( s e a r c h _ p h r a s e ,   " i " ) 
 
 
 
                         / /   f o r   a l l   s u b   t a s k s 
 
                         v a r   i ; 
 
                         f o r   ( i   =   0 ;   s e a r c h _ a r r a y [ i ]   ! =   n u l l ;   i + + )   { 
 
                                 i f   ( s e a r c h _ a r r a y [ i ] . a c t i v e   = =   f a l s e ) 
 
                                         c o n t i n u e ; 
 
 
 
                                 v a r   r e s u l t 1   =   - 1 ;   v a r   r e s u l t 2   =   - 1 ; 
 
                                 v a r   t i t l e _ s t r i n g   =   G e t L a n g S t r i n g ( s e a r c h _ a r r a y [ i ] . t i t l e ) ; 
 
                                 i f   ( t i t l e _ s t r i n g   ! =   n u l l ) 
 
                                         v a r   r e s u l t 1   =   t i t l e _ s t r i n g . s e a r c h ( m y r e g e x p ) ; 
 
                                 v a r   d e s c r i p t i o n _ s t r i n g   =   G e t L a n g S t r i n g ( s e a r c h _ a r r a y [ i ] . d e s c r i p t i o n ) ; 
 
                                 i f   ( t i t l e _ s t r i n g   ! =   n u l l ) 
 
                                         v a r   r e s u l t 2   =   d e s c r i p t i o n _ s t r i n g . s e a r c h ( m y r e g e x p ) ; 
 
 
 
                                 / / i f   t h e   s t r i n g   i s   f o u n d   a d d   i t   t o   t h e   e n d   o f   t h e   l i s t 
 
                                 i f   ( ( r e s u l t 1   >   - 1   | |   r e s u l t 2   >   - 1 )   / * & &   ! f i n d I n L i s t ( s e a r c h _ a r r a y [ i ] . i d ,   r e s u l t _ a r r a y * / )   { 
 
                                         r e s u l t _ a r r a y [ c o u n t ]   =   s e a r c h _ a r r a y [ i ] ; 
 
                                         c o u n t + + ; 
 
                                 } 
 
                         } 
 
 
 
                         / /   m a t c h e s   a r e   p u t   i n t o   s e a r c h   a r r a y   ( g l o b a l ) ,   c o u n t   i s   t h e   a r r a y   l e n g t h 
 
                         r e t u r n   c o u n t ; 
 
                 } 
 
                 
 
                 / /   c l o s e s   t h e   l o c a l   s e a r c h   s e l e c t i o n   w i n d o w 
 
                 f u n c t i o n   c l e a r S e a r c h ( )   { 
 
                         i f   ( b d r o p _ s h o w n   = =   t r u e )   { 
 
                                 s h o w D r o p ( f a l s e ) ; 
 
                         } 
 
                 } 
 
 
 
                 / /   c a l l e d   w h e n   t h e   u s e r   d o e s   a   s e a r c h 
 
                 / /   h a n d l e s   l o c a l   a n d   w e b   s e a r c h e s 
 
                 f u n c t i o n   d o S e a r c h ( )   { 
 
 	 	 	             a d d L o g M e s s a g e ( " C a l l i n g   D o   S e a r c h ( ) . . . " ) ; 
 
                         / /   w o r k e d   a r o u n d   f o r   s o m e   r e p e a t e d   e v e n t   b u g s ,   s e a r c h e s   m u s t   b e   o n e   s e c o n d   a p a r t 
 
                         i f   ( b s e a r c h _ l o c k ) 
 
                                 r e t u r n ; 
 
                         v a r   t   =   s e t T i m e o u t ( " b s e a r c h _ l o c k   =   f a l s e " ,   1 0 0 0 ) ; 
 
                         b s e a r c h _ l o c k   =   t r u e ; 
 
 
 
                         / /   g e t   t h e   s e a r c h   p h r a s e   f r o m   t h e   t e x t   b o x   
 
                         v a r   s e a r c h _ p h r a s e   =   d o c u m e n t . g e t E l e m e n t B y I d ( " s e a r c h - t x t b o x " ) . v a l u e ; 
 
                         i f   ( s e a r c h _ p h r a s e   = =   " " )   { 
 
                                 / /   r e l o a d   t h e   p r e v i o u s   t a b 
 
                                 r e s e t S e a r c h ( ) ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         c l e a r S e a r c h ( ) ; 
 
 
 
                         i f   ( b l o c a l _ s e a r c h )   { 
 
                                 / /   s e t u p   v a r i a b l e s 
 
                                 v a r   r e s u l t s   =   n e w   O b j e c t ( ) ; 
 
                                 r e s u l t s . t a s k _ l i s t   =   n e w   A r r a y ( ) ; 
 
                                 v a r   c o u n t   =   0 ; 
 
 
 
                                 / /   c a l l s   f i n d m a t c h e s   f o r   r e g e x p   m a t c h i n g   i n   t h e   t a s k s   i n   t h e   . j s o n   o b j e c t 
 
                                 v a r   i ; 
 
                                 f o r   ( i   =   0 ;   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ]   ! =   n u l l ;   i + + )   { 
 
                                         / /   f o r   e a c h   t a s k   
 
                                         i f   ( ! t a s k _ a v a i l _ a r r a y [ i ]   | |   ! ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . I s A v a i l a b l e ) ) 
 
                                                 c o n t i n u e ; 
 
                                         i f   ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . t y p e   = =   " h a s S u b t a s k C a t e g o r i e s " )   { 
 
                                                 / /   f o r   t a s k   w i t h   c a t e g o r i e s ,   l o o p   t h r o u g h   t h e   c a t e g o r i e s 
 
                                                 v a r   j ; 
 
                                                 f o r   ( j   =   0 ;   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . c a t e g o r y A r r a y [ j ]   ! =   n u l l ;   j + + )   { 
 
                                                         i f   ( ! c h e c k R e q ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . c a t e g o r y A r r a y [ j ] ) ) 
 
                                                                 c o n t i n u e ; 
 
                                                         c o u n t   =   f i n d M a t c h e s ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . c a t e g o r y A r r a y [ j ] . s u b T a s k s A r r a y ,   r e s u l t s . t a s k _ l i s t ,   s e a r c h _ p h r a s e ,   c o u n t ) ; 
 
                                                 } 
 
                                         } 
 
 
 
                                         c o u n t   =   f i n d M a t c h e s ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . s u b T a s k s A r r a y ,   r e s u l t s . t a s k _ l i s t ,   s e a r c h _ p h r a s e ,   c o u n t ) ; 
 
                                 } 
 
 
 
                                 / /   s e a r c h   x m l   h e l p   f i l e s 
 
                                 v a r   h t m l _ m a t c h e s ; 
 
                                 i f   ( b _ x m l _ l o a d e d ) 
 
                                         h t m l _ m a t c h e s   =   f i n d H T M L M a t c h e s ( s e a r c h _ p h r a s e ) ; 
 
 
 
                                 / / r e s e t   t h e   g u i 
 
                                 p r e _ s e a r c h _ s e l e c t i o n   =   c u r _ s e l e c t i o n ; 
 
                                 s e l e c t N e w T a b ( - 1 ,   t r u e ) ; 
 
 
 
                                 v a r   o l d _ i m a g e   =   d o c u m e n t . g e t E l e m e n t B y I d ( " t a b - p o i n t e r " ) ; 
 
                                 i f   ( o l d _ i m a g e   ! =   n u l l )   { 
 
                                         v a r   p a r e n t   =   o l d _ i m a g e . p a r e n t N o d e ; 
 
                                         p a r e n t . r e m o v e C h i l d ( o l d _ i m a g e ) ; 
 
                                 } 
 
 
 
                                 / / d e l e t e   o l d   c o n t e n t 
 
                                 v a r   d y n a m i c _ d i v   =   d o c u m e n t . g e t E l e m e n t B y I d ( " b o d y - s e c t i o n " ) ; 
 
                                 d y n a m i c _ d i v . i n n e r H T M L   =   " " ; 
 
                                 v a r   c h i l d l i s t   =   d y n a m i c _ d i v . c h i l d N o d e s ; 
 
                                 i f   ( c h i l d l i s t   ! =   n u l l ) 
 
                                         f o r   ( v a r   i   =   0 ;   c h i l d l i s t [ i ]   ! =   n u l l ;   i + + ) 
 
                                                 d y n a m i c _ d i v . r e m o v e C h i l d ( c h i l d l i s t [ i ] ) ; 
 
 
 
                                 / /   c r e a t e   n e w   t a s k l i s t   o f   m a t c h e d   i t e m s 
 
                                 v a r   t a s k D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 d y n a m i c _ d i v . a p p e n d C h i l d ( t a s k D i v ) ; 
 
                                 t a s k D i v . c l a s s N a m e   =   " b o d y - t a s k l i s t - h e a d e r - d i v " ; 
 
                                                                                                                               
 
                                 v a r   t i t l e d i v   =   n u l l ; 
 
                         	     t i t l e d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                         	     t i t l e d i v . c l a s s N a m e   =   " b o d y - t a s k l i s t - h e a d e r - t i t l e - d i v " ; 
 
                         	     i f ( b _ r t l ) 
 
                                       t i t l e d i v . s t y l e . d i r e c t i o n = " r t l " ; 
 
                                                       	                                                     
 
                                 t a s k D i v . a p p e n d C h i l d ( t i t l e d i v ) ; 
 
                                       
 
                                 / /   c r e a t e   t h e   t a b l e   
 
                                 v a r   t a b l e _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ;                                                                                                                                       
 
                                 t i t l e d i v . a p p e n d C h i l d ( t a b l e _ e l ) ; 
 
                                 t a b l e _ e l . c l a s s N a m e   =   ( " t a b s - t e x t - f u l l " ) ; 
 
                                 v a r   b o d y _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t b o d y " ) ; 
 
                                 t a b l e _ e l . a p p e n d C h i l d ( b o d y _ e l ) ; 
 
 
 
                                 / /   n e w   r o w 
 
                                 s u b _ t a s k s _ t i t l e _ r o w   =   d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; 
 
                                 b o d y _ e l . a p p e n d C h i l d ( s u b _ t a s k s _ t i t l e _ r o w ) ;                                         
 
                                       
 
                                 / /   t e x t   
 
                                 v a r   t e x t _ c e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                 s u b _ t a s k s _ t i t l e _ r o w . a p p e n d C h i l d ( t e x t _ c e l l ) ; 
 
                                 v a r   c e l l _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 t e x t _ c e l l . a p p e n d C h i l d ( c e l l _ d i v ) ; 
 
                                 c e l l _ d i v . c l a s s N a m e   =   " s u b - t a s k s - t i t l e - t e x t " ; 
 
                     
 
                                 v a r   t e x t _ n o d e   =   d o c u m e n t . c r e a t e T e x t N o d e ( G e t L a n g S t r i n g ( " U D C S t r i n g _ S e a r c h R e s u l t s " )   +   "   -   \ " "   +   s e a r c h _ p h r a s e   +   " \ " " ) ;                                               
 
                                 i f ( b _ r t l ) 
 
                                       c e l l _ d i v . s t y l e . d i r e c t i o n = " r t l " ;                                                                                             
 
                                 	 	 	 	 	 
 
                                 c e l l _ d i v . s t y l e . b o r d e r B o t t o m   =   " 6 p x   s o l i d   # f f f f f f " ; 
 
                                 	 	 	 	 	 
 
                                 c e l l _ d i v . a p p e n d C h i l d ( t e x t _ n o d e ) ;                                 	 	 	 	 	                                       
 
 
 
                                 / / r e d u c e   t h e   f o n t   s i z e   i f   1 0 4 1   o r   2 0 5 2   i n   n o r m a l   t e x t   m o d e 
 
 / /                                 i f   ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 1   | |   i n s t a l l _ o b j . L A N G _ I D   = = =   2 0 5 2 )   { 
 
 / /                                     i f   ( ! b _ l a r g e _ t e x t )   { 
 
 / /                                           c e l l _ d i v . s t y l e . f o n t S i z e   =   " 1 2 p x " ; 
 
 / /                                     } 
 
 / /                                 } 
 
                                                                                                                                                                                     
 
                                 v a r   t a s k D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                 d y n a m i c _ d i v . a p p e n d C h i l d ( t a s k D i v ) ; 
 
                                 t a s k D i v . c l a s s N a m e   =   " b o d y - t a s k l i s t " ; 
 
                                 p o p u l a t e T a s k s ( t a s k D i v ,   r e s u l t s . t a s k _ l i s t , " " ,   " d e v i c e " ) ; 
 
 
 
 
 
                                 / /   c r e a t e   n e w   t a s k l i s t   o f   m a t c h e d   h t m l   p a g e s 
 
                                 i f   ( b _ x m l _ l o a d e d   & &   h t m l _ m a t c h e s . t a s k _ l i s t . l e n g t h   >   0 ) 
 
                                 { 
 
                                 	 
 
                                       / /   c r e a t e   n e w   t a s k l i s t   o f   m a t c h e d   i t e m s 
 
                                       v a r   t a s k D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                       d y n a m i c _ d i v . a p p e n d C h i l d ( t a s k D i v ) ; 
 
                                       t a s k D i v . c l a s s N a m e   =   " b o d y - t a s k l i s t - h e a d e r - d i v " ; 
 
                                                                                                                               
 
                                       v a r   t i t l e d i v   =   n u l l ; 
 
                         	           t i t l e d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                         	           t i t l e d i v . c l a s s N a m e   =   " b o d y - t a s k l i s t - h e a d e r - t i t l e - d i v " ; 
 
                         	           i f ( b _ r t l ) 
 
                                             t i t l e d i v . s t y l e . d i r e c t i o n = " r t l " ; 
 
                                                       	                                                     
 
                                       t a s k D i v . a p p e n d C h i l d ( t i t l e d i v ) ; 
 
                                       
 
                                       / /   c r e a t e   t h e   t a b l e   
 
                                       v a r   t a b l e _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ;                                                                                                                                       
 
                                       t i t l e d i v . a p p e n d C h i l d ( t a b l e _ e l ) ; 
 
                                       t a b l e _ e l . c l a s s N a m e   =   ( " t a b s - t e x t - f u l l " ) ; 
 
                                       v a r   b o d y _ e l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t b o d y " ) ; 
 
                                       t a b l e _ e l . a p p e n d C h i l d ( b o d y _ e l ) ; 
 
 
 
                                       / /   n e w   r o w 
 
                                       s u b _ t a s k s _ t i t l e _ r o w   =   d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; 
 
                                       b o d y _ e l . a p p e n d C h i l d ( s u b _ t a s k s _ t i t l e _ r o w ) ;                                         
 
                                       
 
                                       / /   t e x t   
 
                                       v a r   t e x t _ c e l l   =   d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
                                       s u b _ t a s k s _ t i t l e _ r o w . a p p e n d C h i l d ( t e x t _ c e l l ) ; 
 
                                       v a r   c e l l _ d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                       t e x t _ c e l l . a p p e n d C h i l d ( c e l l _ d i v ) ; 
 
                                       c e l l _ d i v . c l a s s N a m e   =   " s u b - t a s k s - t i t l e - t e x t " ; 
 
                     
 
                                       v a r   t e x t _ n o d e   =   d o c u m e n t . c r e a t e T e x t N o d e ( G e t L a n g S t r i n g ( " U D C S t r i n g _ H e l p R e s u l t s " )   +   "   -   \ " "   +   s e a r c h _ p h r a s e   +   " \ " " ) ;                                               
 
                                       i f ( b _ r t l ) 
 
                                             c e l l _ d i v . s t y l e . d i r e c t i o n = " r t l " ;                                                                                             
 
                                 	 	 	 	 	 
 
                                 	   c e l l _ d i v . s t y l e . b o r d e r B o t t o m   =   " 6 p x   s o l i d   # f f f f f f " ; 
 
                                 	     	 	 	 	 
 
                                       c e l l _ d i v . a p p e n d C h i l d ( t e x t _ n o d e ) ;                                 	 	 	 	 	                                       
 
 
 
                                       / / r e d u c e   t h e   f o n t   s i z e   i f   1 0 4 1   o r   2 0 5 2   i n   n o r m a l   t e x t   m o d e 
 
 / /                                       i f   ( i n s t a l l _ o b j . L A N G _ I D   = = =   1 0 4 1   | |   i n s t a l l _ o b j . L A N G _ I D   = = =   2 0 5 2 )   { 
 
 / /                                           i f   ( ! b _ l a r g e _ t e x t )   { 
 
 / /                                                 c e l l _ d i v . s t y l e . f o n t S i z e   =   " 1 2 p x " ; 
 
 / /                                           } 
 
 / /                                       } 
 
                                                                                                                                                                                     
 
                                       v a r   t a s k D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
                                       d y n a m i c _ d i v . a p p e n d C h i l d ( t a s k D i v ) ; 
 
                                       t a s k D i v . c l a s s N a m e   =   " b o d y - t a s k l i s t " ; 
 
                                       p o p u l a t e T a s k s ( t a s k D i v ,   h t m l _ m a t c h e s . t a s k _ l i s t , " " ,   " " ,   " h t m l " ,   " " ) ; 
 
                                 } 
 
                         } 
 
 	 
 
                 } 
 
 
 
                 / /   a d d s   e s c a p e   s e q u e n c e s   t o   s e a r c h   p h r a s e s   t o   b e   s e n t   t o   w e b   s e a r c h 
 
                 f u n c t i o n   e s c a p e F o r U r l ( i n p u t )   { 
 
                         i n p u t   =   e n c o d e U R I C o m p o n e n t ( i n p u t ) ; 
 
                         / / u g h   :   u s e   b u i l t   i n   f u n c t i o n s   i n s t e a d 
 
                         r e t u r n   i n p u t ; 
 
                 } 
 
 
 
                 / /   t o g g l e s   w h e t h e r   t h e   d r o p d o w n   i s   s h o w n 
 
                 f u n c t i o n   s h o w D r o p ( b _ s t o p )   { 
 
                         i f   ( b _ s t o p )   { 
 
                                 / /   i f   s h o w d r o p   i s   c a l l e d   t h r o u g h   a n   e v e n t   t h e n   t h e   e v e n t   c a n   f i n i s h 
 
                                 e v e n t . c a n c e l B u b b l e   =   t r u e ; 
 
                         } 
 
 
 
                         / /   t o g g l e 
 
                         b d r o p _ s h o w n   =   ! b d r o p _ s h o w n ; 
 
                 } 
 
 
 
                 / /   s e t s   u p   s e a r c h   r e l a t e d   d a t a 
 
                 f u n c t i o n   i n i t S e a r c h ( )   { 
 
                         b d r o p _ s h o w n   =   t r u e ; 
 
                         s e t L o c a l S e a r c h ( t r u e ) ; 
 
                         b s e a r c h _ l o c k   =   f a l s e ; 
 
 
 
                         / / v a r   t e x t _ n o d e   =   d o c u m e n t . g e t E l e m e n t B y I d ( " d r o p - l o c a l - t e x t " ) ; 
 
                         / / t e x t _ n o d e . i n n e r H T M L   =   G e t L a n g S t r i n g ( " U D C S t r i n g _ T y p e L o c a l " ) ; 
 
                         / / t e x t _ n o d e   =   d o c u m e n t . g e t E l e m e n t B y I d ( " d r o p - w e b - t e x t " ) ; 
 
                         / / t e x t _ n o d e . i n n e r H T M L   =   G e t L a n g S t r i n g ( " U D C S t r i n g _ T y p e B i n g " ) ; 
 
                 } 
 
 
 
                 / /   s t a t i c   t y p e   v a r i a b l e s   f o r   f i x v e r t i c l e   s i z e 
 
                 v a r   l a s t _ h e i g h t ,   l a s t _ w i d t h ,   p r e v _ h e i g h t ,   p r e v _ w i d t h ; 
 
 
 
                 / /   m a n a g e s   w i n d o w   h e i g h t 
 
                 f u n c t i o n   f i x V e r t i c l e S i z e ( )   { 
 
                 	                 	     
 
                         / /   g e t   w i n d o w   i n n e r   h e i g h t 
 
                         v a r   h e i g h t   =   d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t H e i g h t ; 
 
                         v a r   w i d t h   =   d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t W i d t h ; 
 
 
 
 	 	 	 / /   F o r   R T L ,   h i d e   h i g h t l i g h t   m a i n   ( t h e   b l u e   b a c k g r o u n d   f o r   t h e   s e l e c t e d   t a b )   w h e n   t h e   w i n d o w   i s   n a r r o w e r   t h a n   8 0 0 p x ,   o t h e r w i s e   t h e   e l e m e n t   w i l l   a p p e a r   t o   h a v e   s h i f t e d 
 
 	 	 	 i f   ( b _ r t l )   { 
 
 	 	 	 	 v a r   h i g h l i g h t   =   d o c u m e n t . g e t E l e m e n t B y I d ( " h i g h l i g h t - m a i n " ) ;                       
 
 	 	 	 	 i f   ( h i g h l i g h t   = =   n u l l ) 
 
 	 	 	 	 	 h i g h l i g h t   =   d i v _ b a c k g r o u n d ; 
 
 	 	 	 	 i f   ( w i d t h   <   8 2 0 )   { 
 
 	 	 	 	 	 h i g h l i g h t . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
 	 	 	 	 } 
 
 	 	 	 	 e l s e   { 
 
 	 	 	 	 	 h i g h l i g h t . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
 	 	 	 	 } 
 
 	 	 	 } 
 
 
 
                         / /   e f f e c t i v e l y   s e t s   a   m i n i m u m   s i z e   f o r   t h e   w i n d o w 
 
                         i f   ( h e i g h t   <   2 0 0   | |   w i d t h   <   3 0 0 )   { 
 
                                 v a r   n _ w i d t h   =   ( w i d t h   <   4 0 0 )   ?   4 0 0   :   w i d t h ; 
 
                                 v a r   n _ h e i g h t   =   ( h e i g h t   <   3 0 0 )   ?   3 0 0   :   h e i g h t ; 
 
                                 t r y   { 
 
                                         w i n d o w . r e s i z e T o ( n _ w i d t h ,   n _ h e i g h t ) ; 
 
                                 } 
 
                                 c a t c h   ( e r r )   { 
 
                                         a d d L o g M e s s a g e ( " E r r o r :   w i n d o w   r e s i z e   e r r o r :   "   +   e r r . d e s c r i p t i o n   +   " ,   h e i g h t   =   "   +   n _ h e i g h t   +   " ,   w i d t h   =   "   +   n _ w i d t h ) ; 
 
                                 } 
 
 
 
                                 / /   r e - s i z e   w i l l   c a l l   t h i s   f u n c t i o n   a g a i n   t h r o u g h   o n - r e s i z e   e v e n t 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         / /   r o u g h   f i x e s   f o r   a   c o u p l e   o f   i n f i n i t e   l o o p   i s s u e s   w i t h   r e - s i z e   c a l l s 
 
                         i f   ( h e i g h t   = =   p r e v _ h e i g h t   & &   w i d t h   = =   p r e v _ w i d t h )   { 
 
                                 r e t u r n ; 
 
                         } 
 
                         i f   ( h e i g h t   = =   l a s t _ h e i g h t   & &   w i d t h   = =   l a s t _ w i d t h )   { 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         p r e v _ h e i g h t   =   l a s t _ h e i g h t ; 
 
                         l a s t _ h e i g h t   =   h e i g h t ; 
 
                         p r e v _ w i d t h   =   l a s t _ w i d t h ; 
 
                         l a s t _ w i d t h   =   w i d t h ; 
 
 
 
                         v a r   h e a d e r _ s i z e ; 
 
                         i f ( b _ l a r g e _ t e x t ) 
 
                                 h e a d e r _ s i z e   =   1 8 0 ; 
 
                         e l s e 
 
                                 h e a d e r _ s i z e   =   1 5 0 ; 
 
                                 
 
                         / /   c e n t r a l   d i v   h e i g h t   a d j u s t m e n t 
 
                         v a r   c e n t r a l _ d i v   =   d o c u m e n t . g e t E l e m e n t B y I d ( " b o d y - s e c t i o n " ) ; 
 
                         i f   ( h e i g h t   <   5 5 0 ) 
 
                                 h e i g h t   =   5 3 0 ; 
 
 
 
                         / /   h e i g h t   c a l c u l a t i o n   f i x   f o r   i e 6 
 
                         i f   ( b _ i e 6 ) 
 
                                 h e i g h t   - =   4 ; 
 
                         c e n t r a l _ d i v . s t y l e . h e i g h t   =   h e i g h t   -   h e a d e r _ s i z e ;   / / 2 3 4   w i t h   f o o t e r 
 
 
 
                         / /   c e n t r a l   d i v   w i d t h / h e i g h t   a d j u s t m e n t   ( i f r a m e   o n l y ) 
 
                         v a r   n e w I f r a m e   =   c e n t r a l _ d i v . c h i l d N o d e s [ 0 ] ; 
 
                         i f   ( n e w I f r a m e   ! =   n u l l   & &   n e w I f r a m e . t a g N a m e   = = =   " I F R A M E " )   { 
 
                                 n e w I f r a m e . s e t A t t r i b u t e ( " h e i g h t " ,   c e n t r a l _ d i v . s t y l e . h e i g h t ) ; 
 
 
 
                                 v a r   w i d t h   =   d o c u m e n t . d o c u m e n t E l e m e n t . o f f s e t W i d t h ; 
 
                                 i f   ( ! b _ l a r g e _ t e x t   & &   w i d t h   <   8 0 0 ) 
 
                                         w i d t h   =   8 0 0 ; 
 
                                 e l s e   i f   ( b _ l a r g e _ t e x t   & &   w i d t h   <   1 0 3 0 ) 
 
                                         w i d t h   =   1 0 3 0 ; 
 
                                 n e w I f r a m e . s e t A t t r i b u t e ( " w i d t h " ,   w i d t h ) ; 
 
                         } 
 
 
 
                         / /   f o o t e r   w i d t h 
 
                         v a r   f o o t   =   d o c u m e n t . g e t E l e m e n t B y I d ( " f o o t e r - s e c t i o n " ) ; 
 
 
 
                         i f   ( w i d t h   <   8 0 0 ) 
 
                                 w i d t h   =   8 0 0 ; 
 
                         i f   ( w i d t h   >   1 0 2 4 ) 
 
                                 w i d t h   =   1 0 2 4 ; 
 
 
 
                         f o o t . s e t A t t r i b u t e ( " w i d t h " ,   w i d t h ) ; 
 
                 } 
 
 
 
                 / /   d o e s   a l l   t e s t s   f o r   a   t a s k   t o   d e t e r m i n e   i f   i t ' s   a c t i v e 
 
                 f u n c t i o n   c h e c k R e q ( t e s t _ t a s k )   { 
 
                         i f   ( t e s t _ t a s k . I s A v a i l a b l e   = =   f a l s e ) 
 
                                 r e t u r n   f a l s e ; 
 
 
 
                         / /   r e t u r n   t r u e   i f   t h e r e   a r e   n o   r e q u i r e m e n t s 
 
                         i f   ( t e s t _ t a s k . r e q A r r a y   = =   n u l l ) 
 
                                 r e t u r n   t r u e ; 
 
 
 
                         / /   l o o p   t h r o u g h   e a c h   r e q u i r e m e n t 
 
                         v a r   i ; 
 
                         f o r   ( i   =   0 ;   t e s t _ t a s k . r e q A r r a y [ i ]   ! =   n u l l ;   i + + )   { 
 
                                 / /   f i l t e r   r e q u i r e m e n t   t y p e s 
 
                                 s w i t c h   ( t e s t _ t a s k . r e q A r r a y [ i ] . t y p e )   { 
 
                                         / /   c h e c k s   a g a i n s t   t h e   d e v i c e   f i l e           
 
                                         c a s e   " 6 4 b i t O S " : 
 
                                                 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   i n s t a l l _ o b j . I s 6 4 b i t O S ) 
 
                                                         r e t u r n   f a l s e ; 
 
                                                 b r e a k ; 
 
                                         c a s e   " p r i n t e r " : 
 
                                                 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   d e v i c e _ o b j . I s F u n c t i o n P r i n t ) 
 
                                                         r e t u r n   f a l s e ; 
 
                                                 b r e a k ; 
 
                                         c a s e   " s c a n n e r " : 
 
                                                 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   d e v i c e _ o b j . I s F u n c t i o n S c a n ) 
 
                                                         r e t u r n   f a l s e ; 
 
                                                 b r e a k ; 
 
                                         c a s e   " f a x " : 
 
                                                 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   d e v i c e _ o b j . I s F u n c t i o n F a x ) 
 
                                                         r e t u r n   f a l s e ; 
 
                                                 b r e a k ; 
 
                                         c a s e   " n e t w o r k e d " : 
 
                                                 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   d e v i c e _ o b j . I s N e t w o r k e d ) 
 
                                                         r e t u r n   f a l s e ; 
 
                                                 b r e a k ; 
 
                                         c a s e   " w s d " : 
 
                                                 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   d e v i c e _ o b j . I s W S D I D e v i c e ) 
 
                                                         r e t u r n   f a l s e ; 
 
                                                 b r e a k ; 
 
                                         c a s e   " c o n n e c t e d " : 
 
                                                 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   d e v i c e _ o b j . I s C o n n e c t e d ) 
 
                                                         r e t u r n   f a l s e ; 
 
                                                 b r e a k ; 
 
 	 	 	 	 	                     c a s e   " s u p p o r t _ q u i e t _ m o d e " : 
 
 	 	 	 	 	 	                         i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   d e v i c e _ o b j . S u p p o r t s Q u i e t M o d e ) 
 
 	 	 	 	 	 	 	                             r e t u r n   f a l s e ; 
 
 	 	 	 	 	 	                         b r e a k ; 
 
 	 	 	 	 	                     c a s e   " w e b _ s e r v i c e s _ e n a b l e d " : 
 
 	 	 	 	 	 	                         i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   d e v i c e _ o b j . A r e W e b S e r v i c e s E n a b l e d ) 
 
 	 	 	 	 	 	 	                             r e t u r n   f a l s e ; 
 
 	 	 	 	 	 	                         b r e a k ; 
 
 	 	 	 	 	                     c a s e   " c o n t r o l _ p a n e l _ l o c k e d " : 
 
 	 	 	 	 	 	                         i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   d e v i c e _ o b j . I s C o n t r o l P a n e l L o c k e d ) 
 
 	 	 	 	 	 	 	                             r e t u r n   f a l s e ; 
 
 	 	 	 	 	 	                         b r e a k ; 
 
 	 	 	 	 	                     c a s e   " e w s _ p a s s w o r d _ s e t " : 
 
 	 	 	 	 	 	                         i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   d e v i c e _ o b j . I s E W S P a s s w o r d S e t ) 
 
 	 	 	 	 	 	 	                             r e t u r n   f a l s e ; 
 
 	 	 	 	 	 	                         b r e a k ; 	 	 	 	 	 	                         
 
 	 	 	 	 	                     c a s e   " c o l o r _ a c c e s s _ c o n t r o l _ s u p p o r t e d " : 
 
 	 	 	 	 	 	                         i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   d e v i c e _ o b j . I s C o l o r A c c e s s C o n t r o l S u p p o r t e d ) 
 
 	 	 	 	 	 	 	                             r e t u r n   f a l s e ; 
 
 	 	 	 	 	 	                         b r e a k ; 	 	 	 	 	 	                         	 	 	 	 	 	                         
 
                                         / /   f i l e   c h e c k s         
 
                                         c a s e   " f i l e _ e x i s t " : 
 
                                                 v a r   e x p a n d e d _ i d   =   c l e a n F i l e P a t h ( t e s t _ t a s k . r e q A r r a y [ i ] . i d ) ; 
 
 
 
                                                 v a r   o b j S h e l l   =   n e w   A c t i v e X O b j e c t ( " S c r i p t i n g . F i l e S y s t e m O b j e c t " ) ; 
 
                                                 v a r   b e x i s t   =   ( o b j S h e l l . F i l e E x i s t s ( e x p a n d e d _ i d ) ) ; 
 
                                                 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   b e x i s t )   { 
 
                                                         r e t u r n   f a l s e ; 
 
                                                 } 
 
                                                 b r e a k ; 
 
 	 	 	 	 	 	 
 
 	 	 	 	 	 / /   l o c a l i z e d   f i l e   c h e c k s         
 
                                         c a s e   " l o c a l i z e d _ f i l e _ e x i s t " : 
 
                                                 v a r   e x p a n d e d _ i d   =   e x p a n d U R L R e f ( t e s t _ t a s k . r e q A r r a y [ i ] . i d ) ; 
 
 	 	 	 	 	 	 v a r   o b j S h e l l   =   n e w   A c t i v e X O b j e c t ( " S c r i p t i n g . F i l e S y s t e m O b j e c t " ) ; 
 
                                                 v a r   b e x i s t   =   ( o b j S h e l l . F i l e E x i s t s ( e x p a n d e d _ i d ) ) ; 
 
                                                 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   b e x i s t )   { 
 
                                                         r e t u r n   f a l s e ; 
 
                                                 } 
 
                                                 b r e a k ; 
 
 
 
 
 
                                         / /   r e g i s t r y   c h e c k s         
 
                                         c a s e   " r e g _ e x i s t " : 
 
                                                 v a r   o b j S h e l l   =   n e w   A c t i v e X O b j e c t ( " W S c r i p t . S h e l l " ) ; 
 
                                                 v a r   b e x i s t ; 
 
                                                 t r y   { 
 
                                                         v a r   r e g v a l   =   o b j S h e l l . R e g R e a d ( t e s t _ t a s k . r e q A r r a y [ i ] . i d ) ; 
 
                                                         b e x i s t   =   ( r e g v a l   ! =   " "   & &   r e g v a l   ! =   n u l l ) ; 
 
                                                 } 
 
                                                 c a t c h   ( e )   { 
 
                                                         b e x i s t   =   f a l s e ; 
 
                                                 } 
 
                                                 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   b e x i s t ) 
 
                                                         r e t u r n   f a l s e ; 
 
                                                 b r e a k ; 
 
                                         c a s e   " r e g _ m a t c h " : 
 
                                                 v a r   o b j S h e l l   =   n e w   A c t i v e X O b j e c t ( " W S c r i p t . S h e l l " ) ; 
 
                                                 v a r   b m a t c h ; 
 
                                                 t r y   { 
 
                                                         v a r   r e g v a l   =   o b j S h e l l . R e g R e a d ( t e s t _ t a s k . r e q A r r a y [ i ] . i d ) ; 
 
                                                         b m a t c h   =   ( r e g v a l   = =   t e s t _ t a s k . r e q A r r a y [ i ] . v a l u e ) ; 
 
                                                 } 
 
                                                 c a t c h   ( e )   { 
 
                                                         b m a t c h   =   f a l s e ; 
 
                                                 } 
 
                                                 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   b m a t c h ) 
 
                                                         r e t u r n   f a l s e ; 
 
                                                 b r e a k ; 
 
 
 
                                         / / l a n g u a g e   &   c o u n t r y   c h e c k s       
 
                                         c a s e   " l a n g u a g e " : 
 
                                                 v a r   l a n g   =   n a v i g a t o r . b r o w s e r L a n g u a g e ; 
 
 
 
                                                 v a r   b m a t c h   =   ( t e s t _ t a s k . r e q A r r a y [ i ] . i d   = =   l a n g ) ; 
 
 
 
                                                 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   b m a t c h ) 
 
                                                         r e t u r n   f a l s e ; 
 
                                                 b r e a k ; 
 
                                         c a s e   " c o u n t r y " : 
 
                                                 v a r   b m a t c h   =   ( t e s t _ t a s k . r e q A r r a y [ i ] . i d   = =   i n s t a l l _ o b j . C O U N T R Y _ C O D E ) ; 
 
 
 
                                                 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   b m a t c h ) 
 
                                                         r e t u r n   f a l s e ; 
 
                                                 b r e a k ; 
 
                                         c a s e   " s u b s c r i b e d _ t o _ i n s t a n t _ i n k " : 
 
                                                 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   i n s t a l l _ o b j . I s S u b s c r i b e d T o I n s t a n t I n k ) 
 
                                                         r e t u r n   f a l s e ; 
 
                                                 b r e a k ; 
 
 	 	 	 	 	 c a s e   " u s b _ o n l y _ d e v i c e " : 
 
 	 	 	 	 	 	 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   d e v i c e _ o b j . I s U s b O n l y D e v i c e ) 
 
 	 	 	 	 	 	 	 r e t u r n   f a l s e ; 
 
 	 	 	 	 	 	 b r e a k ; 
 
 	 	 	 	 	 c a s e   " w i f i _ s u p p o r t e d " : 
 
 	 	 	 	 	 	 i f   ( t e s t _ t a s k . r e q A r r a y [ i ] . c o n d i t i o n   ! =   d e v i c e _ o b j . I s W i F i S u p p o r t e d ) 
 
 	 	 	 	 	 	 	 r e t u r n   f a l s e ; 
 
 	 	 	 	 	 	 b r e a k ; 
 
                                         d e f a u l t : 
 
                                                 a d d L o g M e s s a g e ( " r e q u i r e m e n t   t y p e   \ " "   +   t e s t _ t a s k . r e q A r r a y [ i ] . t y p e   +   " \ "   n o t   f o u n d ! " ) ; 
 
                                 } 
 
                         } 
 
                         r e t u r n   t r u e ; 
 
                 } 
 
 
 
 	 	 	 	 f u n c t i o n   C o u n t D e v i c e C a t e g o r i e s ( ) 
 
 	 	 	 	 { 
 
 	 	 	 	           v a r   n u m _ c a t e g o r i e s   =   0 ; 
 
 	 	 	 	           
 
 	 	 	 	           v a r   i ,   j   ,   k ; 
 
                           f o r   ( i   =   0 ;   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ]   ! =   n u l l ;   i + + )   { 
 
                                   i f   ( ! t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ]   | |   ! ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . I s A v a i l a b l e ) ) 
 
                                             c o n t i n u e ; 
 
                                             
 
                           	 	 i f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . i d   = =   " U D C D e v i c e P a g e " ) 
 
                           	 	 { 
 
                                       i f   ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . c a t e g o r y A r r a y   ! =   n u l l )   { 
 
                                           / /   c a t e g o r y   a r r a y   
 
                                           f o r   ( j   =   0 ;   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . c a t e g o r y A r r a y [ j ]   ! =   n u l l ;   j + + )   { 
 
                                                   
 
                                                     i f   ( ! t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . c a t e g o r y A r r a y [ j ]   | |   ! ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . c a t e g o r y A r r a y [ j ] . I s A v a i l a b l e ) ) 
 
                                                         c o n t i n u e ; 
 
                                                     
 
                                                     n u m _ c a t e g o r i e s + + ; 
 
                                                   
 
                                           } 
 
                                       } 
 
                           	 	 	 
 
                           	 	 } 
 
                           	 	   
 
                           } 
 
                           
 
                           r e t u r n   n u m _ c a t e g o r i e s ; 
 
 	 	 	 	 } 
 
 	 	 	 	 
 
                 / /   t r a n s l a t e s   a   t a s k   i d   i n t o   a n   i n d e x 
 
                 f u n c t i o n   g e t T a b I n d e x ( i d )   { 
 
 
 
                         i f   ( ! b _ f i l e s _ f o u n d ) 
 
                                 r e t u r n   - 1 ; 
 
                         v a r   i ; 
 
 	 	 	 	 	 	 
 
                         f o r   ( i   =   0 ;   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ]   ! =   n u l l ;   i + + )   { 
 
                                 i f   ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . i d   = =   i d )   { 
 
                                         / / s p e c i a l   c a s e   f o r   t h e   e p c   ( e x t e r n a l   l a u n c h )   t h a t   m o v e s   t h i n g s   t o   t h e   d e v i c e 
 
                                         i f   ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . t y p e   = =   " l i n k _ e x t e r n a l " )   { 
 
                                                 l a u n c h L i n k ( e x p a n d U R L R e f ( t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . l o c a t i o n ) ,   t a s k s _ o b j . u p p e r T a s k s A r r a y [ i ] . i d ) ; 
 
                                                 v a r   f a l l b a c k   =   d e v i c e _ o b j . F A L L B A C K _ P A G E ; 
 
                                                 i f ( f a l l b a c k   = =   n u l l ) 
 
                                                         f a l l b a c k   =   " U D C H e l p P a g e " ; 
 
                                                 r e t u r n   g e t T a b I n d e x ( f a l l b a c k ) ; 
 
                                         } 
 
                                         e l s e 
 
                                                 r e t u r n   i ; 
 
                                 } 
 
                         } 
 
 
 
                         r e t u r n   - 1 ; 
 
                 } 
 
 
 
                 / /   r e l o a d s   t h e   d y n a m i c   f i l e s   a n d   a n d   u p d a t e s   t h e   G U I 
 
                 f u n c t i o n   r e l o a d F i l e s ( b _ r e d r a w _ m i d )   { 
 
                         l o a d D y n a m i c F i l e s ( ) ; 
 
                         b u i l d S u b A r r a y ( ) ; 
 
                         d r a w I n k ( ) ; 
 
                         f i l t e r _ t a s k s ( ) ; 
 
                         i f   ( ! b _ f i l e s _ f o u n d ) 
 
                                 a l e r t ( b _ p a g e _ e r r o r _ m e s s a g e ) ; 
 
 
 
                         i f   ( b _ r e d r a w _ m i d ) 
 
                                 s e l e c t N e w T a b ( c u r _ s e l e c t i o n ,   t r u e ) ; 
 
                 } 
 
 
 
                 / /   c r e a t e s   a   c a l l b a c k   t o   t r y   t o   l o a d   t h e   i n k   l e v e l s   i n   5   s e c o n d s 
 
                 f u n c t i o n   s t a r t I n k C a l l b a c k ( )   { 
 
                         v a r   t   =   s e t T i m e o u t ( " U p d a t e I n k ( ) " ,   5 0 0 0 ) ; 
 
                 } 
 
 
 
                 / /   l o a d s   t h e   i n k   l e v e l s   o r   c r e a t e s   a   c a l l b a c k   t o   t r y   a g a i n 
 
                 f u n c t i o n   U p d a t e I n k ( )   { 
 
                         i n k _ o b j   =   L o a d J s o n ( c o n t e n t _ f o l d e r   +   " / U D C _ i n k l e v e l . j s o n " ) ; 
 
                         i f   ( i n k _ o b j   = =   n u l l ) 
 
                                 s t a r t I n k C a l l b a c k ( ) ; 
 
                         e l s e 
 
                                 d r a w I n k ( ) ; 
 
                 } 
 
 
 
                 / /   c l e a r s   a   s e a r c h   a n d   g o e s   b a c k   t o   t h e   p r e v i o u s   t a b 
 
                 f u n c t i o n   r e s e t S e a r c h ( )   { 
 
                         i f   ( p r e _ s e a r c h _ s e l e c t i o n   ! =   n u l l   & &   c u r _ s e l e c t i o n   = =   - 1 ) 
 
                                 s e l e c t N e w T a b ( p r e _ s e a r c h _ s e l e c t i o n ,   f a l s e ) ; 
 
                 } 
 
 
 
                 / /   T e s t s   t h e   t e x t   i n   t h e   s e a r c h   t e x t   b o x   a n d   r e s e t s   t h e   s e l e c t e d   t a b   i f   n e e d e d 
 
                 f u n c t i o n   t e s t R e s e t S e a r c h ( )   { 
 
                         v a r   s e a r c h _ p h r a s e   =   d o c u m e n t . g e t E l e m e n t B y I d ( " s e a r c h - t x t b o x " ) . v a l u e ; 
 
                         i f   ( s e a r c h _ p h r a s e   = =   " " ) 
 
                                 r e s e t S e a r c h ( ) ; 
 
                 } 
 
 
 
                 / /   c h a n g e s   t h e   H T A   t o   w i n d o w e d   m o d e   i f   t h e r e   i s   r o o m 
 
               f u n c t i o n   s e t I n i t i a l S i z e ( )   { 
 
                         i f   ( ! b _ f i l e s _ f o u n d ) 
 
                                 r e t u r n ; 
 
                                 
 
                         v a r   v a r _ S t a r t W i d t h ,   v a r _ S t a r t H e i g h t ; 
 
 
 
 	 	 	 	 	 	 i f ( b _ l a r g e _ t e x t ) 
 
 	 	 	 	 	 	 { 
 
 	 	 	 	 	 	 	 v a r _ S t a r t W i d t h   =   U D C m a i n _ o b j . S t a r t W i d t h _ L a r g e T e x t ; 
 
 	 	 	 	 	 	 	 v a r _ S t a r t H e i g h t   =   U D C m a i n _ o b j . S t a r t H e i g h t _ L a r g e T e x t ; 
 
 	 	 	 	 	 	 } 
 
 	 	 	 	 	 	 e l s e 
 
 	 	 	 	 	 	 { 
 
 	 	 	 	 	 	 	 v a r _ S t a r t W i d t h   =   U D C m a i n _ o b j . S t a r t W i d t h ; 
 
 	 	 	 	 	 	 	 v a r _ S t a r t H e i g h t   =   U D C m a i n _ o b j . S t a r t H e i g h t ; 
 
 	 	 	 	 	 	 } 
 
 	 	 	 	 	 	                         
 
 	 	 	 	 	 	 w i n d o w . r e s i z e T o ( v a r _ S t a r t W i d t h ,   v a r _ S t a r t H e i g h t ) ; 
 
                         w i n d o w . m o v e T o ( ( s c r e e n . w i d t h   -   v a r _ S t a r t W i d t h ) / 2 ,   ( s c r e e n . h e i g h t   -   v a r _ S t a r t H e i g h t ) / 2 ) ; 
 
                         a d d L o g M e s s a g e ( " r e s i z i n g ,   r e s   =   ( "   +   d e v i c e _ o b j . S C A L E D _ R E S X   +   " ,   "   +   d e v i c e _ o b j . S C A L E D _ R E S Y   +   " )   s t a r t s i z e   =   ( "   +   v a r _ S t a r t W i d t h   +   " ,   "   +   v a r _ S t a r t H e i g h t   +   " ) " ) ; 
 
                         
 
                 } 
 
 
 
                 v a r   b _ s h i f t _ d o w n ,   b _ c t r l _ d o w n ; 
 
 
 
                 / /   o n f o c u s   c l e a r   t h e   s h i f t   a n d   c o n t r o l   k e y s 
 
                 f u n c t i o n   h a n d l e F o c u s ( )   { 
 
                         b _ s h i f t _ d o w n   =   f a l s e ; 
 
                         b _ c t r l _ d o w n   =   f a l s e ; 
 
                 } 
 
 
 
                 / /   k e e p s   t r a c k   o f   t h e   s h i f t   a n d   c t r l   k e y s 
 
                 f u n c t i o n   h a n d l e K e y U p ( )   { 
 
                         i f   ( e v e n t . k e y C o d e   = =   1 6 )   { 
 
                                 b _ s h i f t _ d o w n   =   f a l s e ; 
 
                         } 
 
                         
 
                         i f   ( e v e n t . k e y C o d e   = =   1 7 )   { 
 
                                 b _ c t r l _ d o w n   =   f a l s e ; 
 
                         } 
 
                 } 
 
 
 
                 / /   h a n d l e s   k e y b o a r d   i n p u t 
 
                 f u n c t i o n   h a n d l e K e y S t r o k e ( )   { 
 
 	 	 
 
                         / /   s t o p s   t h e   f 5   k e y   f r o m   c a u s i n g   a   r e - f r e s h 
 
                         i f   ( e v e n t . k e y C o d e   = =   1 1 6 )   { 
 
                                 e v e n t . r e t u r n V a l u e   =   f a l s e ; 
 
                                 r e t u r n ; 
 
                         } 
 
                         
 
                         / /   k e e p s   t r a c k   o f   t h e   c t r l   a n d   s h i f t   k e y s 
 
                         i f   ( e v e n t . k e y C o d e   = =   1 6 )   { 
 
                                 b _ s h i f t _ d o w n   =   t r u e ; 
 
                                 r e t u r n ; 
 
                         } 
 
                         
 
                         i f   ( e v e n t . k e y C o d e   = =   1 7 )   { 
 
                                 b _ c t r l _ d o w n   =   t r u e ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         / /   p r e v e n t s   t a b   c h a n g e   f r o m   a r r o w   k e y s   w h i l e   t h e   u s e r   i s   t y p i n g 
 
                         / / i f   ( d o c u m e n t . a c t i v e E l e m e n t . i d   = =   " s e a r c h - t x t b o x " ) 
 
                         / /         r e t u r n ; 
 
 
 
                                 
 
                         / /   f 3   p u t s   a   c u r s o r   o n   t h e   s e a r c h   b a r 
 
                         i f   ( e v e n t . k e y C o d e   = =   1 1 4 )   { 
 
                                 d o c u m e n t . g e t E l e m e n t B y I d ( " s e a r c h - t x t b o x " ) . f o c u s ( ) ; 
 
                                 e v e n t . r e t u r n V a l u e   =   f a l s e ; 
 
                                 r e t u r n ; 
 
                         } 
 
 
 
                         / /   l e f t   k e y   o r   c t r l + s h i f t + t a b ,   c o d e   t o   l o o p   a r o u n d   i s   c o m m e n t e d   o u t 
 
                         i f   ( / * e v e n t . k e y C o d e   = =   3 7   | | * /   ( e v e n t . k e y C o d e   = =   9   & &   b _ s h i f t _ d o w n   & &   b _ c t r l _ d o w n ) )   { 
 
                                 i f   ( c u r _ s e l e c t i o n   = =   - 1 ) 
 
                                         r e t u r n ; 
 
                                 v a r   t a r g e t _ i n d e x   =   c u r _ s e l e c t i o n - 1 ; 
 
                                 w h i l e   ( / * t a r g e t _ i n d e x   ! =   c u r _ s e l e c t i o n * /   t a r g e t _ i n d e x   >   - 1 )   { 
 
                                         i f   ( t a s k _ a v a i l _ a r r a y [ t a r g e t _ i n d e x ] )   { 
 
                                                 v a r   t a r g e t   =   d o c u m e n t . g e t E l e m e n t B y I d ( " t a b - i c o n - "   +   t a r g e t _ i n d e x ) ; 
 
                                                 t a r g e t . c l i c k ( ) ; 
 
                                                 e v e n t . r e t u r n V a l u e   =   f a l s e ; 
 
                                                 r e t u r n ; 
 
                                         } 
 
                                         e l s e   { 
 
                                                 t a r g e t _ i n d e x - - ; 
 
                                                 / / i f ( t a r g e t _ i n d e x   < =   - 1 ) 
 
                                                 / /         t a r g e t _ i n d e x   =   t a s k _ a v a i l _ a r r a y . l e n g t h - 1 ; 
 
                                         } 
 
                                 } 
 
                         } 
 
 
 
                         / /   r i g h t   k e y   o r   c t r l + t a b ,   c o d e   t o   l o o p   a r o u n d   i s   c o m m e n t e d   o u t 
 
                         i f   ( / * e v e n t . k e y C o d e   = =   3 9   | | * /   ( e v e n t . k e y C o d e   = =   9   & &   ! b _ s h i f t _ d o w n   & &   b _ c t r l _ d o w n ) )   { 
 
                                 i f   ( c u r _ s e l e c t i o n   = =   - 1 ) 
 
                                         r e t u r n ; 
 
 
 
                                 v a r   t a r g e t _ i n d e x   =   e v a l ( c u r _ s e l e c t i o n )   +   1 ; 
 
                                 w h i l e   ( / * t a r g e t _ i n d e x   ! =   c u r _ s e l e c t i o n * /   t a r g e t _ i n d e x   <   t a s k _ a v a i l _ a r r a y . l e n g t h )   { 
 
                                         i f   ( t a s k _ a v a i l _ a r r a y [ t a r g e t _ i n d e x ] )   { 
 
                                                 v a r   t a r g e t   =   d o c u m e n t . g e t E l e m e n t B y I d ( " t a b - i c o n - "   +   t a r g e t _ i n d e x ) ; 
 
                                                 t a r g e t . c l i c k ( ) ; 
 
                                                 e v e n t . r e t u r n V a l u e   =   f a l s e ; 
 
                                                 r e t u r n ; 
 
                                         } 
 
                                         e l s e   { 
 
                                                 t a r g e t _ i n d e x + + ; 
 
                                                 / / i f ( t a r g e t _ i n d e x   > =   t a s k _ a v a i l _ a r r a y . l e n g t h ) 
 
                                                 / /         t a r g e t _ i n d e x   =   0 ; 
 
                                         } 
 
                                 } 
 
                         } 
 
                 } 
 
                 
 
                 / /   d e t e c t s   t h e   i e   v e r s i o n   a n d   s e t s   b _ i e 6 
 
                 f u n c t i o n   g e t I E V e r s i o n ( )   { 
 
                         i f   ( n a v i g a t o r . a p p V e r s i o n . i n d e x O f ( " M S I E " )   = =   - 1 )   { 
 
                                 b _ i e 6   =   f a l s e ; 
 
                                 r e t u r n ; 
 
                         } 
 
                         v a r   v e r s i o n   =   p a r s e F l o a t ( n a v i g a t o r . a p p V e r s i o n . s p l i t ( " M S I E " ) [ 1 ] ) ; 
 
                         i f ( v e r s i o n   < = 6 . 9 9 ) 
 
                                 b _ i e 6   =   t r u e ; 
 
                         e l s e 
 
                                 b _ i e 6   =   f a l s e ; 
 
                 } 
 
 
 
                 / /   c h a n g e s   s o m e   s t a t i c   i m a g e   p r o p e r t i e s   t o   t o   w o r k   a r o u n d   s o m e   I E 6   t r a n s p a r e n c y   i s s u e s 
 
                 f u n c t i o n   r e m a k e I m a g e s ( )   { 
 
                         r e m a k e O n e I m a g e ( " s e a r c h - l e f t - b u m p " ) ; 
 
                         r e m a k e O n e I m a g e ( " s e a r c h - r i g h t - b u m p " ) ; 
 
                         r e m a k e O n e I m a g e ( " s e a r c h - b u t t o n " ) ; 
 
                         r e m a k e O n e I m a g e ( " s e a r c h - d r o p " ) ; 
 
                         r e m a k e O n e I m a g e ( " h i g h l i g h t - l e f t " ) ; 
 
                         r e m a k e O n e I m a g e ( " h i g h l i g h t - r i g h t " ) ; 
 
                 } 
 
 
 
                 / /   c h a n g e s   s o m e   s t a t i c   i m a g e   p r o p e r t i e s   t o   t o   w o r k   a r o u n d   s o m e   I E 6   t r a n s p a r e n c y   i s s u e s 
 
                 f u n c t i o n   r e m a k e O n e I m a g e ( i d )   { 
 
                         v a r   e l e m e n t   =   d o c u m e n t . g e t E l e m e n t B y I d ( i d ) ; 
 
                         i f ( e l e m e n t   = =   n u l l )   { 
 
                                 a d d L o g M e s s a g e ( " i m a g e   i d   n o t   f o u n d :   "   +   i d ) ; 
 
                                 r e t u r n ; 
 
                         } 
 
                         v a r   o l d _ s r c   =   e l e m e n t . g e t A t t r i b u t e ( " s r c " ) ; 
 
                         e l e m e n t . s e t A t t r i b u t e ( " s r c " ,   " U D C _ f i l e s / i m g / b l a n k . g i f " ) ; 
 
 
 
                         e l e m e n t . s t y l e . f i l t e r   =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = ' "   +   o l d _ s r c   +   " ' ) " ; 
 
                 
 
                         / / < i m g   i d = " h i g h l i g h t - r i g h t "   s r c = " U D C _ f i l e s / i m g / h o v e r _ r i g h t . p n g " > 
 
                         / / < i m g   i d = " h i g h l i g h t - r i g h t "   s r c = " U D C _ f i l e s / i m g / b l a n k . g i f " > 
 
                 } 
 
 	 	 
 
 	 	 / /   C a l l i n g   A n a l y t i c s   w r a p p e r 
 
 	 	 f u n c t i o n   c a l l A n a l y t i c s ( i d , t y p e )   { 
 
 	 	 	 v a r   a n a l y t i c s _ p a t h   =   " \ " "   +   i n s t a l l _ o b j . I N S T A L L D I R   +   " \ \ H P P A H e l p e r . e x e \ " " ; 	 
 
 	 	 	 v a r   s c r e e n _ n a m e   =   c u r _ t a b _ n a m e ; 
 
 	 	 	 
 
 	 	 	 v a r   c m d p a r a m   =   " " ; 
 
 	 	 	 i f   ( t y p e   = =   " s t a r t " ) 
 
                                 c m d p a r a m   =   a n a l y t i c s _ p a t h ; 
 
                         e l s e   i f   ( t y p e   = =   " s t o p " ) 
 
                                 c m d p a r a m   =   a n a l y t i c s _ p a t h   +   "   - s t o p " ;   
 
                         e l s e   i f   ( t y p e   = =   " t a b " ) 
 
 	 	 	 	 c m d p a r a m   =   a n a l y t i c s _ p a t h   +   "   - t a b i d   "   +   i d ; 
 
 	 	 	 e l s e   i f   ( t y p e   = =   " l i n k "   | |   t y p e   = =   " a p p " )     {   / /   c u r r e n t l y   t r e a t   l a u n c h i n g   l i n k   a n d   a p p   a s   t h e   s a m e   c a s e   s i n c e   t h e y   a r e   a l l   U D C   s h o r t c u t s 
 
 	 	 	 	 / /   p a s s   t h e   t a b   i d   a s   t h e   s c r e e n   n a m e   i n   t h e   l i n k i d   w h i c h   h a s   t h e   f o r m a t   < t a b   i d > # < l i n k   i d > 
 
 	 	 	 	 c m d p a r a m   =   a n a l y t i c s _ p a t h   +   "   - l i n k i d   "   +   s c r e e n _ n a m e   +   " # "   +   i d ; 
 
 	 	 	 } 
 
 	 	 	 a d d L o g M e s s a g e ( " C a l l i n g   a n a l y t i c s   w i t h   p a r a m e t e r s :   "   +   c m d p a r a m ) ; 
 
 	 	 	 
 
 	 	 	 v a r   o b j S h e l l   =   n e w   A c t i v e X O b j e c t ( " W S c r i p t . S h e l l " ) ; 
 
 
 
 	 	 	 t r y   { 
 
                                 o b j S h e l l . r u n ( c m d p a r a m ,   1 ) ; 
 
                         } 
 
                         c a t c h   ( e r r )   { 
 
                         	 a d d L o g M e s s a g e ( " E R R O R :   L a u n c h   a n a l y t i c s   e r r o r :   "   +   c m d p a r a m   +   "   e r r   i s   "   +   e r r ) ; 
 
                         } 
 
 	 	 } 
 
 
 
                 / /   i n i t i a l i z a t i o n s 
 
 	 	 w i n d o w . o n l o a d   =   f u n c t i o n   ( )   { 
 
 
 
 	 	                 b _ l o g _ s t a r t   =   f a l s e ; 
 
                         
 
                         b _ s h i f t _ d o w n   =   f a l s e ; 
 
                         b _ c t r l _ d o w n   =   f a l s e ; 
 
 
 
                         / /   g e t   f o l d e r   n a m e s   f r o m   t h e   c o m m a n d   l i n e 
 
                         p a r s e C o m m a n d L i n e ( ) ; 
 
 
 
                         / /   w o r k i n g   d i r e c t o r y   o u t p u t 
 
                         v a r   o b j S h e l l   =   n e w   A c t i v e X O b j e c t ( " W S c r i p t . S h e l l " ) ; 
 
                         a d d L o g M e s s a g e ( " * * * * * * * * * * * * * * * * * *   s t a r t   * * * * * * * * * * * * * * * * * * * * * * * * " ) ; 
 
                         a d d L o g M e s s a g e ( " I N F O :   d i r e c t o r y   =   "   +   o b j S h e l l . C u r r e n t D i r e c t o r y ) ; 
 
                         a d d L o g M e s s a g e ( " I N F O :   d o c u m e n t   u r l   =   "   +   d o c u m e n t . U R L ) ; 
 
                         a d d L o g M e s s a g e ( " I N F O :   c o n t e n t _ f o l d e r   =   "   +   c o n t e n t _ f o l d e r ) ; 
 
                         a d d L o g M e s s a g e ( " I N F O :   c o m m a n d   l i n e   =   "   +   U D C _ A p p . c o m m a n d L i n e ) ; 
 
                         a d d L o g M e s s a g e ( " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " ) ; 
 
                         l o a d S t a t i c F i l e s ( ) ; 
 
                         l o a d D y n a m i c F i l e s ( ) ; 
 
                         e v a l T e x t S i z e ( ) ; 
 
                         b u i l d S u b A r r a y ( ) ; 
 
                         l o a d X M L ( ) ; 
 
                         i f   ( ! b _ f i l e s _ f o u n d ) 
 
                                 a l e r t ( b _ p a g e _ e r r o r _ m e s s a g e ) ; 
 
                         
 
                         / /   S t a r t   t h e   a n a l y t i c s   p r o x y   a p p 
 
 	 	 	 / /   1 / 2 8 / 2 0 1 6 :   T h i s   c a l l   i s   n o t   n e c e s s a r y   b e c a u s e   t h e r e   i s   a n o t h e r   c a l l   i m m e d i a t e l y   a f t e r   t h i s   w h e n   U D C D e v i c e T a b   i s   b e i n g   d i s p l a y e d ,   h e n c e   c o m m e n t e d   o f f . 
 
                         / / c a l l A n a l y t i c s ( - 1 ,   " s t a r t " ) 
 
         
 
                         g e t I E V e r s i o n ( ) ; 
 
                         i f ( b _ i e 6 ) 
 
                                 r e m a k e I m a g e s ( ) ; 
 
 
 
 	 	 	             i f ( d e v i c e _ o b j . I s F u n c t i o n P r i n t ) 
 
 	 	 	 	                 c u r _ s u b _ t a s k _ s e l e c t i o n   =   0 ; 
 
 	 	 	             e l s e 
 
 	 	 	                     c u r _ s u b _ t a s k _ s e l e c t i o n   =   1 ; 
 
 
 
 	 	 	             a c t i v e _ d e v i c e _ c a t e g o r y _ c o u n t   =   C o u n t D e v i c e C a t e g o r i e s ( ) ; 
 
 
 
                         b u i l d T a b s ( ) ; 
 
                         d r a w I n k ( ) ; 
 
                         i f   ( b _ f i l e s _ f o u n d ) 
 
                                 s e t I n i t i a l S i z e ( ) ; 
 
                         f i x V e r t i c l e S i z e ( ) ; 
 
                         s e t A p p S t r i n g s ( ) ; 
 
                         i n i t S e a r c h ( ) ; 
 
                         i f   ( b _ f i l e s _ f o u n d ) 
 
                                 s e l e c t N e w T a b ( g e t T a b I n d e x ( d e v i c e _ o b j . S T A R T _ P A G E ) ,   f a l s e ) ; 
 
                         e l s e 
 
                                 s e l e c t N e w T a b ( - 1 ,   f a l s e ) ; 
 
 
 
                         i f   ( i n k _ o b j   = =   n u l l ) 
 
                                 s t a r t I n k C a l l b a c k ( ) ; 
 
 
 
                         p i c k C S S ( ) ; 
 
 
 
                 } 
 
 
 
                 / /   c a l l b a c k   t o   a d j u s t   t h e   l a y o u t   a s   w i n d o w   s i z e   c h a n g e s 
 
                 w i n d o w . o n r e s i z e   =   f i x V e r t i c l e S i z e ; 
 
 
 
         < / s c r i p t > 
 
 < / h e a d > 
 
 < b o d y   c l a s s = " S P A p p "   o n u n l o a d = " c l o s e P r o g r a m ( ) "   o n k e y d o w n = " h a n d l e K e y S t r o k e ( ) "   o n k e y u p = " h a n d l e K e y U p ( ) "   o n F o c u s = " h a n d l e F o c u s ( ) " > 
 
         < ! - -   T o p   s e c t i o n ,   t a b   s e l e c t i o n   - - > 
 
         < d i v   i d = " h e a d - s e c t i o n "   c l a s s = " h e a d - d e f a u l t " >                                 
 
                 < d i v   i d = " t a b - s e c t i o n " > 
 
 	 	 	 < d i v   i d = " h i g h l i g h t - m a i n " > 
 
 	 	 	 	 < i m g   i d = " h i g h l i g h t - i m a g e "   s r c = " U D C _ f i l e s / i m g / H o v e r . p n g " 
 
 	 	 	 < / d i v > 
 
                 < / d i v >                 	 
 
                 < d i v   i d = " s e a r c h - s e c t i o n "   c l a s s = " s e a r c h - d i v " > 
 
                         < i n p u t   t a b i n d e x = " - 1 "   i d = " s e a r c h - b u t t o n "   t y p e = " i m a g e "   s r c = " U D C _ f i l e s / i m g / s e a r c h _ i c o n . p n g "   o n m o u s e d o w n = " d o S e a r c h ( ) "   / > 
 
                         < i n p u t   t a b i n d e x = " 0 "   i d = " s e a r c h - t x t b o x "   t y p e = " t e x t "   s i z e = " 1 4 0 "   m a x l e n g t h = " 1 4 0 "   o n c l i c k = " c l i c k S e a r c h ( ) "   o n k e y d o w n = " i f   ( e v e n t . k e y C o d e   = =   1 3 )   { d o S e a r c h ( ) ; r e t u r n   f a l s e ; } " 
 
                                 o n b l u r = " t e s t R e s e t S e a r c h ( ) "   / > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < ! - -   M i d   s e c t i o n ,   p o p u l a t e d   b a s e d   o n   t a b s   - - > 
 
         < d i v   i d = " b o d y - s e c t i o n "   c l a s s = " b o d y - d e f a u l t "   > < / d i v > 
 
         < ! - -   B o t t o m   s e c t i o n ,   p o p u l a t e d   w i t h   e x t e r n a l   h t m l   - - > 
 
         < d i v   i d = " f o o t e r - s e c t i o n "   c l a s s = " f o o t e r - d e f a u l t " > < / d i v > 
 
         < ! - -   d i s p l a y s   a n   e r r o r   i n   n o n - s c r i p t   e n v i r o n e m n t s   - - > 
 
         < n o s c r i p t > 
 
                 < d i v   i d = " p g m - n o - j s - t e x t " > 
 
                         < p > 
 
                                 J a v a S c r i p t   i s   r e q u i r e d   t o   a c c e s s   t h i s   w e b s i t e . < / p > 
 
                         < p > 
 
                                 P l e a s e   e n a b l e   J a v a S c r i p t   o r   u s e   a   b r o w s e r   t h a t   s u p p o r t s   J a v a S c r i p t . < / p > 
 
                 < / d i v > 
 
         < / n o s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 