ÿþf u n c t i o n   M o u s e X ( e v t )   {  
 i f   ( e v t . p a g e X )   r e t u r n   e v t . p a g e X ;  
 e l s e   i f   ( e v t . c l i e n t X )  
       r e t u r n   e v t . c l i e n t X   +   ( 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 L e f t   :  
       d o c u m e n t . b o d y . s c r o l l L e f t ) ;  
 e l s e   r e t u r n   n u l l ;  
 }  
 f u n c t i o n   M o u s e Y ( e v t )   {  
 i f   ( e v t . p a g e Y )   r e t u r n   e v t . p a g e Y ;  
 e l s e   i f   ( e v t . c l i e n t Y )  
       r e t u r n   e v t . c l i e n t Y   +   ( 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 . 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 T o p ) ;  
 e l s e   r e t u r n   n u l l ;  
 }  
  
 f u n c t i o n   g e t P a g e S i z e W i t h S c r o l l ( w )  
 {  
           i f   ( w . i n n e r H e i g h t   & &   w . s c r o l l M a x Y )   {                 y W i t h S c r o l l   =   w . i n n e r H e i g h t   +   w . s c r o l l M a x Y ;                   x W i t h S c r o l l   =   w . i n n e r W i d t h   +   w . s c r o l l M a x X ;           }  
 e l s e   i f   ( w . d o c u m e n t . b o d y . s c r o l l H e i g h t   >   w . d o c u m e n t . b o d y . o f f s e t H e i g h t ) {                     y W i t h S c r o l l   =   w . d o c u m e n t . b o d y . s c r o l l H e i g h t ;                   x W i t h S c r o l l   =   w . d o c u m e n t . b o d y . s c r o l l W i d t h ;           }  
 e l s e   {                   y W i t h S c r o l l   =   w . d o c u m e n t . b o d y . o f f s e t H e i g h t ;                   x W i t h S c r o l l   =   w . d o c u m e n t . b o d y . o f f s e t W i d t h ;               }            
 a r r a y P a g e S i z e W i t h S c r o l l   =   n e w   A r r a y ( x W i t h S c r o l l , y W i t h S c r o l l ) ;  
 r e t u r n   a r r a y P a g e S i z e W i t h S c r o l l ;  
 }  
 
