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