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