ÿþ/ * 
 a c t i v a t e A c t i v e X 
 - - - - - - - - - - - - - - - 
 P u r p o s e :     D y n a m i c a l l y   r e p l a c e   a n y   e l e m e n t s   t h a t   w i l l   b e   a f f e c t e d   b y   t h e   n e w   s e c u r i t y   f e a t u r e   i n   I E 6 / I E 7   t h a t   r e q u i r e s   a   u s e r   t o   c l i c k   c e r t a i n   t y p e s   o f   e l e m e n t s   t o   a c t i v a t e   t h e m   b e f o r e   u s e . 
 
 U s a g e :     I n c l u d e   t h i s   f i l e   a t   t h e   e n d   o f   y o u r   h t m l   d o c u m e n t   u s i n g   t h e   f o l l o w i n g . . . 
 	 < s c r i p t   l a n g u a g e = " J S c r i p t "   t y p e = " t e x t / j s c r i p t "   s r c = " a c t i v a t e A c t i v e X . j s " > < / s c r i p t > 
 	 
 
 
 S i n c e   t h i s   s c r i p t   i s   i n   r e s p o n s e   t o   a   s o f t w a r e   p a t e n t   l a w s u i t ,   I   f e e l   i t   n e c e s s a r y   t o   s t a t e   t h e   f o l l o w i n g . . . 	 
 
 L i c e n s e : 
 a c t i v a t e A c t i v e X   i s   C o p y r i g h t   ( C )   2 0 0 6   J a s o n   B a k e r   ( t h e r i p p a   A T   g m a i l . c o m ) .   I t   i s   a v a i l a b l e   a s   o p e n   s o u r c e   c o d e   f r o m : 
 h t t p : / / t h e r i p p a . b l o g s p o t . c o m 
 
 T h i s   p r o g r a m   i s   f r e e   s o f t w a r e ;   y o u   c a n   r e d i s t r i b u t e   i t   a n d / o r   m o d i f y   i t   u n d e r   t h e   t e r m s   o f   t h e   G N U   G e n e r a l   P u b l i c   L i c e n s e   a s   p u b l i s h e d   b y   t h e   F r e e   S o f t w a r e   F o u n d a t i o n ;   e i t h e r   v e r s i o n   2   o f   t h e   L i c e n s e ,   o r   ( a t   y o u r   o p t i o n )   a n y   l a t e r   v e r s i o n . 
 
 T h i s   p r o g r a m   i s   d i s t r i b u t e d   i n   t h e   h o p e   t h a t   i t   w i l l   b e   u s e f u l ,   b u t   W I T H O U T   A N Y   W A R R A N T Y ;   w i t h o u t   e v e n   t h e   i m p l i e d   w a r r a n t y   o f   M E R C H A N T A B I L I T Y   o r   F I T N E S S   F O R   A   P A R T I C U L A R   P U R P O S E .   S e e   t h e   G N U   G e n e r a l   P u b l i c   L i c e n s e   f o r   m o r e   d e t a i l s   h t t p : / / w w w . g n u . o r g / l i c e n s e s / g p l . h t m l 
 * / 
 
 / * 
 / / D e t e r m i n e   b r o w s e r ,   w e   o n l y   n e e d   t h i s   f o r   I n t e r n e t   E x p l o r e r 
 i f   ( n a v i g a t o r . a p p N a m e   = =   " M i c r o s o f t   I n t e r n e t   E x p l o r e r " )   { 
 	 
 	 / / A r r a y   o f   e l e m e n t s   t o   b e   r e p l a c e d 
 	 v a r   a r r E l e m e n t s   =   n e w   A r r a y ( 3 ) ; 
 	 a r r E l e m e n t s [ 0 ]   =   " o b j e c t " ; 
 	 a r r E l e m e n t s [ 1 ]   =   " e m b e d " ; 
 	 a r r E l e m e n t s [ 2 ]   =   " a p p l e t " ; 
 
 	 
 	 / / L o o p   o v e r   e l e m e n t   t y p e s 
 	 / / a l e r t ( a r r E l e m e n t s . l e n g t h ) ; 
 	 
 	 f o r   ( n   =   0 ;   n   <   a r r E l e m e n t s . l e n g t h ;   n + + )   { 
 	         / / a l e r t ( a r r E l e m e n t s [ n ] ) ; 
 	 	 / / s e t   o b j e c t   f o r   b r e v i t y 
 	 	 r e p l a c e O b j   =   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 ( a r r E l e m e n t s [ n ] ) ; 
 	 	 
 	 	 
 	 	 / / l o o p   o v e r   e l e m e n t   o b j e c t s   r e t u r n e d 
 	 	 f o r   ( i   =   0 ;   i   <   r e p l a c e O b j . l e n g t h ;   i + +   )   { 
 	 	 
 	 	 	 / / s e t   p a r e n t   o b j e c t   f o r   b r e v i t y 
 	 	 	 p a r e n t O b j   =   r e p l a c e O b j [ i ] . p a r e n t N o d e ; 
 	 	 	 
 	 	 	 / / g r a b   t h e   h t m l   i n s i d e   o f   t h e   e l e m e n t   b e f o r e   r e m o v i n g   i t   f r o m   t h e   D O M 
 	 	 	 n e w H T M L   =   p a r e n t O b j . i n n e r H T M L ; 
 	 	 	 
 	 	 	 / / r e m o v e   e l e m e n t   f r o m   t h e   D O M 
 	 	 	 p a r e n t O b j . r e m o v e C h i l d ( r e p l a c e O b j [ i ] ) ; 
 	 	 	 
 	 	 	 / / s t i c k   t h e   e l e m e n t   r i g h t   b a c k   i n ,   b u t   a s   a   n e w   o b j e c t 
 	 	 	 p a r e n t O b j . i n n e r H T M L   =   n e w H T M L ; 
 	 	 
 	 	 	 } 
 	 	 	 
 	 	 } 
 	 } 
 	 
 w i n d o w . o n u n l o a d   =   f u n c t i o n ( )  
 {    
   i f   ( 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 )  
   {      
         v a r   o b j s   =   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 ( " o b j e c t " ) ;    
         f o r   ( i = 0 ;   i < o b j s . l e n g t h ;   i + + )  
         {      
         o b j s [ i ] . o u t e r H T M L   =   " " ;  
         }  
   }  
 }  
 * /  
  
  
 / / f u n c t i o n   i e u p d a t e ( )  
 / /         {  
         v a r   s t r B r o w s e r   =   n a v i g a t o r . u s e r A g e n t . t o L o w e r C a s e ( ) ;    
         i f ( s t r B r o w s e r . i n d e x O f ( " m s i e " )   >   - 1   & &   s t r B r o w s e r . i n d e x O f ( " m a c " )   <   0 )  
                 {      
                 / / a l e r t ( s t r B r o w s e r ) ;  
                  
                 / / A r r a y   o f   e l e m e n t s   t o   b e   r e p l a c e d 
 	 v a r   a r r E l e m e n t s   =   n e w   A r r a y ( 3 ) ; 
 	 a r r E l e m e n t s [ 0 ]   =   " o b j e c t " ; 
 	 a r r E l e m e n t s [ 1 ]   =   " e m b e d " ; 
 	 a r r E l e m e n t s [ 2 ]   =   " a p p l e t " ; 
 
 	 
 	 / / L o o p   o v e r   e l e m e n t   t y p e s 
 	 / / a l e r t ( a r r E l e m e n t s . l e n g t h ) ; 
 	 
 	 f o r   ( n   =   0 ;   n   <   a r r E l e m e n t s . l e n g t h ;   n + + )   
 	         { 
 	         / / a l e r t ( a r r E l e m e n t s [ n ] ) ; 
 	 	 / / s e t   o b j e c t   f o r   b r e v i t y 
 	 	 / / r e p l a c e O b j   =   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 ( a r r E l e m e n t s [ n ] ) ;  
                  
                         v a r   t h e O b j e c t s   =   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 ( a r r E l e m e n t s [ n ] ) ;  
                         v a r   t h e O b j e c t s L e n   =   t h e O b j e c t s . l e n g t h ;      
                         f o r   ( v a r   i   =   0 ;   i   <   t h e O b j e c t s L e n ;   i + + )    
                         {        
 	 	 v a r   E l e m e n t I D   =   t h e O b j e c t s [ i ] . i d . t o L o w e r C a s e ( ) ;  
 	 	 i f ( t h e O b j e c t s [ i ] . o u t e r H T M L   & &   E l e m e n t I D . s u b s t r i n g ( 0 , 6 )   ! =   " v i e w e r " )  
                                 {          
                                         i f ( t h e O b j e c t s [ i ] . d a t a )  
                                                 {            
                                                         t h e O b j e c t s [ i ] . r e m o v e A t t r i b u t e ( ' d a t a ' ) ;    
                                                 }          
                                         v a r   t h e P a r a m s   =   t h e O b j e c t s [ i ] . g e t E l e m e n t s B y T a g N a m e ( " p a r a m " ) ;    
                                         v a r   t h e P a r a m s L e n g t h   =   t h e P a r a m s . l e n g t h ;        
                                         f o r   ( v a r   j   =   0 ;   j   <   t h e P a r a m s L e n g t h ;   j + + )    
                                         {          
                                                 i f ( t h e P a r a m s [ j ] . n a m e . t o L o w e r C a s e ( )   = =   ' f l a s h v a r s ' )  
                                                         {  
                                                                 v a r   t h e F l a s h V a r s   =   t h e P a r a m s [ j ] . v a l u e ;        
                                                         }      
                                         }      
                                         v a r   t h e O u t e r H T M L   =   t h e O b j e c t s [ i ] . o u t e r H T M L ;      
                                         v a r   r e   =   / < p a r a m   n a m e = " F l a s h V a r s "   v a l u e = " " > / i g ;      
                                         t h e O u t e r H T M L   =   t h e O u t e r H T M L . r e p l a c e ( r e , " < p a r a m   n a m e = ' F l a s h V a r s '   v a l u e = ' "   +   t h e F l a s h V a r s   +   " ' > " ) ;        
                                         t h e O b j e c t s [ i ] . o u t e r H T M L   =   t h e O u t e r H T M L ;      
                                 }    
                         }    
                 }  
                 }  
 / /         }  
                                  
 w i n d o w . o n u n l o a d   =   f u n c t i o n ( )  
 {  
         i f   ( 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 )  
                 {      
                         v a r   o b j s   =   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 ( " o b j e c t " ) ;  
                         f o r   ( i = 0 ;   i < o b j s . l e n g t h ;   i + + )  
                                 {    
                                         o b j s [ i ] . o u t e r H T M L   =   " " ;    
                                 }  
                 }  
 }  
  
 f u n c t i o n   R e s i z e M a i n T o o l b a r ( )  
 {  
 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " P a g e M a i n T o o l b a r " ) )  
         {  
         v a r   x , y ;  
         v a r   s c r o l l b a r w i d t h   =   0 ;  
         i f   ( s e l f . i n n e r H e i g h t )   / /   a l l   e x c e p t   E x p l o r e r  
         {  
         	 x   =   s e l f . i n n e r W i d t h ;  
         	 y   =   s e l f . i n n e r H e i g h t ;  
         	 i f   ( d o c u m e n t . b o d y . s c r o l l H e i g h t   >   d o c u m e n t . b o d y . c l i e n t H e i g h t )   {   s c r o l l b a r w i d t h   =   1 6 ;   }   e l s e   {   s c r o l l b a r w i d t h   =   0 ;   }    
         }  
         e l s e   i f   ( d o c u m e n t . d o c u m e n t E l e m e n 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 )  
         	 / /   E x p l o r e r   6   S t r i c t   M o d e  
         {  
         	 x   =   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 ;  
         	 y   =   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 ;  
         }  
         e l s e   i f   ( d o c u m e n t . b o d y )   / /   o t h e r   E x p l o r e r s  
         {  
         	 x   =   d o c u m e n t . b o d y . c l i e n t W i d t h ;  
         	 y   =   d o c u m e n t . b o d y . c l i e n t H e i g h t ;  
         }  
         v a r   v s c r o l l   =   d o c u m e n t . b o d y . s c r o l l T o p ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( " P a g e M a i n T o o l b a r " ) . s t y l e . p o s i t i o n   =   " a b s o l u t e " ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( " P a g e M a i n T o o l b a r " ) . s t y l e . l e f t = 0 ;  
         d o c u m e n t . g e t E l e m e n t B y I d ( " P a g e M a i n T o o l b a r " ) . s t y l e . w i d t h   =   x   -     s c r o l l b a r w i d t h ;      
         d o c u m e n t . g e t E l e m e n t B y I d ( " P a g e M a i n T o o l b a r " ) . s t y l e . t o p   =   y   -   6 3   +   v s c r o l l ;  
         }  
 }  
  
  
 f u n c t i o n   S h o w W o r k F l o w H o l d e r ( o b j e c t )  
 {  
 o b j e c t . s t y l e . z i n d e x = 5 0 0 ;  
 }  
  
 f u n c t i o n   H i d e W o r k F l o w H o l d e r ( o b j e c t )  
 {  
 o b j e c t . s t y l e . z i n d e x = 1 0 0 ;  
 }  
  
 R e s i z e M a i n T o o l b a r ( ) ;  
  
 f u n c t i o n   H i d e M a i n T o o l b a r ( )  
 {  
 d o c u m e n t . g e t E l e m e n t B y I d ( " P a g e M a i n T o o l b a r " ) . s t y l e . v i s i b i l i t y   =   " h i d d e n " ;  
 a l e r t ( " h i d e " ) ;  
 }  
 f u n c t i o n   S h o w M a i n T o o l b a r ( )  
 {  
 d o c u m e n t . g e t E l e m e n t B y I d ( " P a g e M a i n T o o l b a r " ) . s t y l e . v i s i b i l i t y   =   " v i s i b l e " ;  
 a l e r t ( " s h o w " ) ;  
 }  
 
