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