ÿþ$ ( d o c u m e n t ) . r e a d y ( f u n c t i o n ( )   {  
  
         / / P r o g r a m   I t e m s  
         v a r   c o m p a r e I t e m   =   0 ;  
         v a r   c o m p a r e I t e m L i m i t   =   3 ;  
         v a r   c u r r e n t I t e m I D   =   ' ' ;  
         v a r   c u r r e n t P r o g r a m I t e m   =   ' ' ;  
         v a r   c u r r e n t G r o u p I t e m   =   ' ' ;  
  
         v a r   p r o c e s s i n g A J A X   =   f a l s e ;  
  
  
         v a r   d a t a u r l   =   S I T E _ U R L   +   ' d e s k t o p m o d u l e s / i a s g g r o u p s / S e r v i c e s / P r o g r a m l i s t . a s p x ' ;  
         S t r i n g . p r o t o t y p e . t r i m   =   f u n c t i o n ( )   {  
  
                 r e t u r n   t h i s . r e p l a c e ( / ^ \ s + | \ s + $ / g ,   ' ' ) ;  
         }  
  
         / / C o n v e r t   A S C I I   c o d e   t o   c h a r a c t e r  
         S t r i n g . p r o t o t y p e . a s c i i D e c o d e   =   f u n c t i o n ( )   {  
  
                 r e t u r n   t h i s . r e p l a c e ( / & # ( \ d + ) ; / g ,   f u n c t i o n ( m ,   n )   {  
                         r e t u r n   S t r i n g . f r o m C h a r C o d e ( n ) ;  
                 } )  
         }  
  
         f u n c t i o n   l i m i t C h a r s ( n a m e ,   l i m i t )   {  
  
                 i f   ( n a m e   ! =   n u l l   | |   n a m e   = =   ' ' )   {  
                         i f   ( n a m e . l e n g t h   >   l i m i t )   n a m e   =   n a m e . s l i c e ( 0 ,   l i m i t ) . t r i m ( )   +   ' . . . ' ;  
                 }  
  
                 r e t u r n   n a m e ;  
         }  
  
         f u n c t i o n   f o r m a t ( i t e m )   {  
  
                 r e t u r n   ' < p > '   +   i t e m . g r o u p   +   ' < b r > < s p a n > '   +   i t e m . p r o g r a m   +   ' < / s p a n > < / p > ' ;  
         }  
  
         f u n c t i o n   s e a r c h A u t o C o m p l e t e U I ( s t a g e ,   r e s u l t )   {  
  
                 i f   ( s t a g e   = =   ' i n i t ' )   {  
                         $ ( " # d n n _ t o p l i n k s _ d n n I A S G S E A R C H _ t x t S e a r c h " ) . a t t r ( " d i s a b l e d " ,   " d i s a b l e d " ) ;  
                         $ ( " # d n n _ t o p l i n k s _ d n n I A S G S E A R C H _ t x t S e a r c h B u t t o n " ) . a t t r ( " d i s a b l e d " ,   " d i s a b l e d " ) ;  
                 }   e l s e   {  
  
                         i f   ( r e s u l t   ! =   ' ' )   {  
                                 $ ( ' # d n n _ t o p l i n k s _ d n n I A S G S E A R C H _ t x t S e a r c h ' ) . v a l ( ' L O A D I N G   P A G E . . . ' ) ;  
                                 w i n d o w . l o c a t i o n   =   r e s u l t ;  
                         }   e l s e   {  
                                 a l e r t ( ' T h e r e   i s   n o   i n f o r m a t i o n   f o r   s e l e c t e d   p r o g r a m . ' ) ;  
                                 $ ( " # d n n _ t o p l i n k s _ d n n I A S G S E A R C H _ t x t S e a r c h " ) . r e m o v e A t t r ( " d i s a b l e d " ) ;  
                                 $ ( ' # d n n _ t o p l i n k s _ d n n I A S G S E A R C H _ t x t S e a r c h B u t t o n ' ) . r e m o v e A t t r ( " d i s a b l e d " ) ;  
                                 $ ( " # d n n _ t o p l i n k s _ d n n I A S G S E A R C H _ t x t S e a r c h " ) . v a l ( ' ' ) ;  
                                 p r o c e s s i n g A J A X   =   f a l s e ;  
                         }  
                 }  
  
         }  
  
         f u n c t i o n   p r o g r a m L i s t A u t o C o m p l e t e U I ( s t a g e ,   r e s u l t )   {  
  
                 i f   ( s t a g e   = =   ' i n i t ' )   {  
                         $ ( ' # l o a d i n g P r o g r a m P a g e U R L ' ) . h t m l ( ' c h e c k i n g   p r o g r a m   i n f o r m a t i o n ' ) . s h o w ( ) ;  
                         $ ( " # a u t o c o m p l e t e G o T o P r o g r a m P a g e " ) . a t t r ( " d i s a b l e d " ,   " d i s a b l e d " ) ;  
                         $ ( " # p r o g r a m L i s t A u t o C o m p l e t e " ) . a t t r ( " d i s a b l e d " ,   " d i s a b l e d " ) ;  
                 }   e l s e   {  
  
                         i f   ( r e s u l t   ! =   ' ' )   {  
                                 $ ( ' # l o a d i n g P r o g r a m P a g e U R L ' ) . h t m l ( ' l o a d i n g   p a g e ' ) ;  
                                 w i n d o w . l o c a t i o n   =   r e s u l t ;  
                         }   e l s e   {  
                                 a l e r t ( ' T h e r e   i s   n o   i n f o r m a t i o n   f o r   s e l e c t e d   p r o g r a m . ' ) ;  
                                 $ ( ' # a u t o c o m p l e t e G o T o P r o g r a m P a g e ' ) . r e m o v e A t t r ( " d i s a b l e d " ) ;  
                                 $ ( " # p r o g r a m L i s t A u t o C o m p l e t e " ) . r e m o v e A t t r ( " d i s a b l e d " ) ;  
                                 $ ( ' # l o a d i n g P r o g r a m P a g e U R L ' ) . h t m l ( ' ' ) . h i d e ( ) ;  
                                 p r o c e s s i n g A J A X   =   f a l s e ;  
                         }  
                 }  
  
         }  
  
         $ ( " # p r o g r a m L i s t A u t o C o m p l e t e ,   # d n n _ t o p l i n k s _ d n n I A S G S E A R C H _ t x t S e a r c h " ) . a u t o c o m p l e t e ( d a t a u r l ,   {  
                 m u l t i p l e :   f a l s e ,  
                 p a r s e :   f u n c t i o n ( d a t a )   {  
                         r e t u r n   $ . m a p ( e v a l ( d a t a ) ,   f u n c t i o n ( r o w )   {  
                                 r e t u r n   {  
                                         d a t a :   r o w ,  
                                         v a l u e :   r o w . g r o u p ,  
                                         r e s u l t :   l i m i t C h a r s ( r o w . g r o u p ,   2 5 ) . a s c i i D e c o d e ( )   +   '   :   '  
                                                     +   l i m i t C h a r s ( r o w . p r o g r a m ,   3 0 ) . a s c i i D e c o d e ( )  
                                 }  
                         } ) ;  
                 } ,  
                 f o r m a t I t e m :   f u n c t i o n ( i t e m )   {  
                         r e t u r n   f o r m a t ( i t e m ) ;  
                 }  
         } ) . r e s u l t ( f u n c t i o n ( e ,   i t e m )   {  
                 c u r r e n t I t e m I D   =   i t e m . i d ;  
                 c u r r e n t P r o g r a m I t e m   =   i t e m . p r o g r a m ;  
                 c u r r e n t G r o u p I t e m   =   i t e m . g r o u p ;  
  
                 i f   ( c u r r e n t I t e m I D   ! =   ' '   & &   p r o c e s s i n g A J A X   = =   f a l s e )   {  
  
                         p r o c e s s i n g A J A X   =   t r u e ;  
  
                         v a r   o b j e c t _ i d   =   $ ( t h i s ) . a t t r ( ' i d ' ) ;  
  
                         / /   C o n s t r u c t   f u n c t i o n   t o   c a l l   a s e d   o n   E l e m e n t  
                         o b j e c t _ i d   +   ' U I '   +   " ( ' i n i t ' ,   n u l l ) " ;  
  
                         s w i t c h   ( o b j e c t _ i d )   {  
  
                                 c a s e   ' d n n _ t o p l i n k s _ d n n I A S G S E A R C H _ t x t S e a r c h ' :  
                                         s e a r c h A u t o C o m p l e t e U I ( ' i n i t ' ,   n u l l ) ;  
                                         b r e a k ;  
  
                                 c a s e   ' p r o g r a m L i s t A u t o C o m p l e t e ' :  
                                         p r o g r a m L i s t A u t o C o m p l e t e U I ( ' i n i t ' ,   n u l l ) ;  
                                         b r e a k ;  
                         }  
  
  
                         v a r   d a t a U R L   =   S I T E _ U R L   +   ' d e s k t o p m o d u l e s / i a s g g r o u p s / S e r v i c e s / P r o g r a m l i s t . a s p x ? p i d = '   +   c u r r e n t I t e m I D ;  
  
                         $ . a j a x ( {  
                                 t y p e :   ' P O S T ' ,  
                                 u r l :   d a t a U R L ,  
                                 d a t a t y p e :   " j s o n " ,  
                                 s u c c e s s :   f u n c t i o n ( r e s u l t )   {  
  
                                         s w i t c h   ( o b j e c t _ i d )   {  
  
                                                 c a s e   ' d n n _ t o p l i n k s _ d n n I A S G S E A R C H _ t x t S e a r c h ' :  
                                                         s e a r c h A u t o C o m p l e t e U I ( n u l l ,   r e s u l t ) ;  
                                                         b r e a k ;  
  
                                                 c a s e   ' p r o g r a m L i s t A u t o C o m p l e t e ' :  
                                                         p r o g r a m L i s t A u t o C o m p l e t e U I ( n u l l ,   r e s u l t ) ;  
                                                         b r e a k ;  
                                         }  
  
                                 }  
  
                         } ) ;  
  
                 }  
  
         } ) ;  
  
  
  
         $ ( " # c s e - s e a r c h - b o x " ) . s u b m i t ( f u n c t i o n ( e v e n t )   {  
  
                 i f   ( $ ( " # d n n _ t o p l i n k s _ d n n I A S G S E A R C H _ t x t S e a r c h " ) . v a l ( )   = =   ' ' )   r e t u r n   f a l s e ;  
  
         } ) ;  
  
  
  
  
 } ) ; 
