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