/ / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   G o   T o p 
 
 / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 f u n c t i o n   g o _ t o p ( )   { 
 
 	 x   =   d o c u m e n t . b o d y . s c r o l l L e f t ; 
 
 	 y   =   d o c u m e n t . b o d y . s c r o l l T o p ; 
 
 	 s t e p   =   2 ; 
 
 	 
 
 	 w h i l e   ( ( x   ! =   0 )   | |   ( y   ! =   0 ) )   { 
 
 	                 s c r o l l   ( x ,   y ) ; 
 
 	                 s t e p   + =   ( s t e p   *   s t e p   /   3 0 0 ) ; 
 
 	                 x   - =   s t e p ; 
 
 	                 y   - =   s t e p ; 
 
 	                 i f   ( x   <   0 )   x   =   0 ; 
 
 	                 i f   ( y   <   0 )   y   =   0 ; 
 
 	 }   
 
 	 s c r o l l   ( 0 ,   0 ) ; 
 
 } 
 
 
 
 
 
 / /   T O P   „¼¼Ò  ¬Â|·tÇÜ´  
 
 / / n e w   F l o a t i n g ( È©Æ`Õ¬´Ì  ,   X •ÍìÅ1¼  ,   Y •ÍìÅ1¼  ,   ø»D°ì·ÀÉ”²ÁÄ³: ‘ÇDÇÂ]¸`¾„¹. . 0®ø¼2 0   ,   `¾t¹0®: ‘ÇDÇÂ]¸€½Ü´ì·ÀÆ. . 0®ø¼1 0 ) ; 
 
 f u n c t i o n   F l o a t i n g ( F l o a t i n g O b j , M a r g i n X , M a r g i n Y , P e r c e n t a g e , s e t T i m e )   { 
 
 	 t h i s . F l o a t i n g O b j   =   F l o a t i n g O b j ; 
 
 	 t h i s . M a r g i n X   =   ( M a r g i n X )   ?   M a r g i n X   :   0 ; 
 
 	 t h i s . M a r g i n Y   =   ( M a r g i n Y )   ?   M a r g i n Y   :   0 ; 
 
 	 t h i s . P e r c e n t a g e   =   ( P e r c e n t a g e )   ?   P e r c e n t a g e   :   2 0 ; 
 
 	 t h i s . s e t T i m e   =   ( s e t T i m e )   ?   s e t T i m e   :   1 0 ; 
 
 	 t h i s . F l o a t i n g O b j . s t y l e . p o s i t i o n   =   " a b s o l u t e " ; 
 
 	 t h i s . B o d y   =   n u l l ; 
 
 	 t h i s . s e t T i m e O u t   =   n u l l ; 
 
 	 t h i s . R u n ( ) ; 
 
 } 
 
 
 
 F l o a t i n g . p r o t o t y p e . R u n   =   f u n c t i o n   ( )   { 
 
 	 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 . s c r o l l L e f 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 )   >   ( d o c u m e n t . b o d y . s c r o l l L e f t   +   d o c u m e n t . b o d y . s c r o l l T o p ) )   { 
 
 	 	 t h i s . B o d y   =   d o c u m e n t . d o c u m e n t E l e m e n t ; 
 
 	 }   e l s e   { 
 
 	 	 t h i s . B o d y   =   d o c u m e n t . b o d y ; 
 
 	 } 
 
 
 
 	 v a r   T h i s   =   t h i s ; 
 
 	 v a r   F l o a t i n g O b j L e f t   =   ( t h i s . F l o a t i n g O b j . s t y l e . l e f t )   ?   p a r s e I n t ( t h i s . F l o a t i n g O b j . s t y l e . l e f t , 1 0 )   :   t h i s . F l o a t i n g O b j . o f f s e t L e f t ; 
 
 	 v a r   F l o a t i n g O b j T o p   =   ( t h i s . F l o a t i n g O b j . s t y l e . t o p )   ?   p a r s e I n t ( t h i s . F l o a t i n g O b j . s t y l e . t o p , 1 0 )   :   t h i s . F l o a t i n g O b j . o f f s e t T o p ; 
 
 	 v a r   D o c L e f t   =   t h i s . B o d y . s c r o l l L e f t   +   t h i s . M a r g i n X ; 
 
 	 v a r   D o c T o p   =   t h i s . B o d y . s c r o l l T o p   +   t h i s . M a r g i n Y ; 
 
 
 
 	 v a r   M o v e X   =   M a t h . a b s ( F l o a t i n g O b j L e f t   -   D o c L e f t ) ; 
 
 	 M o v e X   =   M a t h . c e i l ( M o v e X   /   t h i s . P e r c e n t a g e ) ; 
 
 	 v a r   M o v e Y   =   M a t h . a b s ( F l o a t i n g O b j T o p   -   D o c T o p ) ; 
 
 	 M o v e Y   =   M a t h . c e i l ( M o v e Y   /   t h i s . P e r c e n t a g e ) ; 
 
 
 
 	 i f   ( F l o a t i n g O b j L e f t   <   D o c L e f t )   { 
 
 	 	 t h i s . F l o a t i n g O b j . s t y l e . l e f t   =   F l o a t i n g O b j L e f t   +   M o v e X   +   " p x " ; 
 
 	 }   e l s e   { 
 
 	 	 t h i s . F l o a t i n g O b j . s t y l e . l e f t   =   F l o a t i n g O b j L e f t   -   M o v e X   +   " p x " ; 
 
 	 } 
 
 
 
 	 i f   ( F l o a t i n g O b j T o p   <   D o c T o p )   { 
 
 	 	 t h i s . F l o a t i n g O b j . s t y l e . t o p   =   F l o a t i n g O b j T o p   +   M o v e Y   +   " p x " ; 
 
 	 }   e l s e   { 
 
 	 	 t h i s . F l o a t i n g O b j . s t y l e . t o p   =   F l o a t i n g O b j T o p   -   M o v e Y   +   " p x " ; 
 
 	 } 
 
 
 
 	 w i n d o w . c l e a r T i m e o u t ( t h i s . s e t T i m e O u t ) ; 
 
 	 t h i s . s e t T i m e O u t   =   w i n d o w . s e t T i m e o u t ( f u n c t i o n   ( )   {   T h i s . R u n ( ) ;   } , t h i s . s e t T i m e ) ; 
 
 } 
 
 