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