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