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