ÿþ/ / * * *   M o u s e   a c t i o n   s c r i p t   f o r   S V Z   h o m e p a g e   c o l o u r e d   b l o c k s   * * * / /  
 f u n c t i o n   S h o w P r o d u c t ( b l o c k N u m b e r )  
 {  
         v a r   d i v B l o c k S q u a r e     =   d o c u m e n t . g e t E l e m e n t B y I d ( " d i v B l o c k S q u a r e " + b l o c k N u m b e r ) ;  
         v a r   d i v B l o c k P r o d u c t   =   d o c u m e n t . g e t E l e m e n t B y I d ( " d i v B l o c k P r o d u c t " + b l o c k N u m b e r ) ;  
          
         i f   ( d i v B l o c k S q u a r e   ! =   n u l l   & &   d i v B l o c k P r o d u c t   ! =   n u l l )  
         {                
                 d i v P r o d u c t O b j e c t L i s t [ ( b l o c k N u m b e r * 2 ) ] . s t y l e . o p a c i t y   =   0 . 0 0 ;  
 	 	 / / f o t o 1 . s t y l e . k h t m l - o p a c i t y   =   ( 1 . 0 0 - f a d i n g C o u n t e r ) + ' ' ;  
 	 	 d i v P r o d u c t O b j e c t L i s t [ ( b l o c k N u m b e r * 2 ) ] . s t y l e . f i l t e r   =   ' a l p h a ( O p a c i t y = 0 ) ' ;  
                  
                 P r o d u c t F a d i n g C o u n t e r [ b l o c k N u m b e r ]   =   0 . 0 0 ;  
                 P r o d u c t I s P o i n t e d A t [ b l o c k N u m b e r ]   =   t r u e ;                  
                 P r o d u c t F a d i n g U p [ b l o c k N u m b e r ]   =   t r u e ;  
         }      
 }  
  
 f u n c t i o n   H i d e P r o d u c t ( b l o c k N u m b e r )  
 {  
         v a r   d i v B l o c k S q u a r e     =   d o c u m e n t . g e t E l e m e n t B y I d ( " d i v B l o c k S q u a r e " + b l o c k N u m b e r ) ;  
         v a r   d i v B l o c k P r o d u c t   =   d o c u m e n t . g e t E l e m e n t B y I d ( " d i v B l o c k P r o d u c t " + b l o c k N u m b e r ) ;  
          
         i f   ( d i v B l o c k S q u a r e   ! =   n u l l   & &   d i v B l o c k P r o d u c t   ! =   n u l l )  
         {  
                 d i v P r o d u c t O b j e c t L i s t [ ( b l o c k N u m b e r * 2 ) ] . s t y l e . o p a c i t y   =   1 . 0 0 ;  
 	 	 / / f o t o 1 . s t y l e . k h t m l - o p a c i t y   =   ( 1 . 0 0 - f a d i n g C o u n t e r ) + ' ' ;  
 	 	 d i v P r o d u c t O b j e c t L i s t [ ( b l o c k N u m b e r * 2 ) ] . s t y l e . f i l t e r   =   ' a l p h a ( O p a c i t y = 1 0 0 ) ' ;  
 	 	  
                 P r o d u c t I s P o i n t e d A t [ b l o c k N u m b e r ]   =   f a l s e ;                  
                 S t a r t F a d i n g ( b l o c k N u m b e r ) ;  
         }  
 }  
  
 / / * * *   F a d i n g   s c r i p t   f o r   S V Z   h o m e p a g e   c o l o u r e d   b l o c k s   * * * / /  
 v a r   d i v P r o d u c t O b j e c t L i s t   =   n e w   A r r a y ( 1 0 ) ;  
                                                                  
 / / t i m e   c h a n g i n g   w i l l   s t a r t   t h e   f i r s t   t i m e  
 v a r   P r o d u c t S t a r t T i m e O f f s e t     =   n e w   A r r a y ( 6 0 0 0 , 1 0 0 0 , 1 1 0 0 0 , 4 0 0 0 , 9 0 0 0 , 7 0 0 0 ) ;    
  
 / / t i m e   d u r i n g   f a d e s t e p s                    
 v a r   P r o d u c t C h a n g i n g T i m e           =   n e w   A r r a y ( 3 5 , 3 5 , 3 5 , 3 5 , 3 5 , 3 5 ) ;      
  
 / / t i m e   b e t w e e n   c h a n g e s  
 v a r   P r o d u c t C h a n g e F r e q u e n c y     =   n e w   A r r a y ( 5 0 0 0 , 4 0 0 0 , 5 5 0 0 , 3 0 0 0 , 3 5 0 0 , 4 5 0 0 ) ;    
  
 / / l i s t   t o   r e g i s t e r   e a c h   o b j e c t ' s   o w n   f a d i n g c o u n t e r   ( = c u r r e n t   s t e p   i n   t h e   f a d i n g   p r o c e s s )  
 v a r   P r o d u c t F a d i n g C o u n t e r         =   n e w   A r r a y ( 0 . 0 0 , 0 . 0 0 , 0 . 0 0 , 0 . 0 0 , 0 . 0 0 , 0 . 0 0 ) ;    
  
 / / l i s t   t o   r e g i s t e r   e a c h   o b j e c t ' s   o w n   f a d i n g   d i r e c t i o n  
 v a r   P r o d u c t F a d i n g U p                   =   n e w   A r r a y ( t r u e , t r u e , t r u e , t r u e , t r u e , t r u e ) ;  
  
 / / l i s t   t o   r e g i s t e r   w h e t h e r   o r   n o t   a n   o b j e c t   i s   c u r r e n t l y   u n d e r   t h e   m o u s e c u r s o r  
 v a r   P r o d u c t I s P o i n t e d A t             =   n e w   A r r a y ( f a l s e , f a l s e , f a l s e , f a l s e , f a l s e , f a l s e ) ;     / / l i s t   t o   r e g i s t e r   e a c h   o b j e c t ' s   o w n   f a d i n g   d i r e c t i o n  
  
 v a r   c y c l e   =   0 ; 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	  
  
 f u n c t i o n   S t a r t B l o c k F a d i n g ( )  
 {  
         / / f i r s t   r e a d   a l l   b l o c k s   i n t o   a   l i s t   f o r   e a s y   a c c e s s 	 	  
         S t a r t R e a d i n g B l o c k s ( ) ; 	 	  
 	 	 	 	 	 	 	  
         / / s e t   r a n d o m   f i r s t   i m a g e  
         S t a r t F a d i n g ( 0 ) ;    
         S t a r t F a d i n g ( 1 ) ;    
         S t a r t F a d i n g ( 2 ) ;    
         S t a r t F a d i n g ( 3 ) ;    
         S t a r t F a d i n g ( 4 ) ;    
         S t a r t F a d i n g ( 5 ) ;  
 }  
  
 f u n c t i o n   S t a r t R e a d i n g B l o c k s ( )  
 { 	 	 	 	 	 	 	 	          
         f o r   ( v a r   i   =   0 ;   i   < =   5 ;   i + + )  
         {   	 	 	 	 	 	 	 	  
                 d i v P r o d u c t O b j e c t L i s t [ ( i * 2 ) ]       =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v B l o c k S q u a r e ' + i ) ;  
                 d i v P r o d u c t O b j e c t L i s t [ ( i * 2 ) + 1 ]   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v B l o c k P r o d u c t ' + i ) ;  
         } 	  
 }        
          
 f u n c t i o n   S t a r t F a d i n g ( b l o c k N u m b e r )  
 {   	 	 	 	 	 	 	 	 	  
 	 i f   ( d i v P r o d u c t O b j e c t L i s t [ ( b l o c k N u m b e r * 2 ) ]   ! =   n u l l   & &   d i v P r o d u c t O b j e c t L i s t [ ( b l o c k N u m b e r * 2 ) + 1 ]   ! =   n u l l ) 	  
 	 { 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	  
 	 	 c y c l e   =   1 ; 	 	 	  
 	 	 w i n d o w . s e t T i m e o u t ( ' F a d i n g ( 0 . 0 1 , ' + b l o c k N u m b e r + ' ) ' , P r o d u c t S t a r t T i m e O f f s e t [ b l o c k N u m b e r ] ) ; 	 	 	 	 	 	 	 	 	  
 	 } 	 	  
 } 	 	 	 	 	  
 	 	 	 	 	  
 f u n c t i o n   F a d i n g ( q u a n t i t y , b l o c k N u m b e r )  
 { 	 	 	  
         i f   ( P r o d u c t I s P o i n t e d A t [ b l o c k N u m b e r ] )  
         {  
                 / / e s c a p e   t h e   f a d i n g   p r o c e s s   a n d   d o   n o t h i n g   u n t i l   t h e   m o u s e   l e a v e s   t h e   o b j e c t  
                 r e t u r n ;  
         }  
 	         	 	 	 	 	 	 	 	 	         	 	 	 	 	 	 	 	  
 	 i f   ( P r o d u c t F a d i n g U p [ b l o c k N u m b e r ] )  
 	 { 	  
 	 	 i f   ( P r o d u c t F a d i n g C o u n t e r [ b l o c k N u m b e r ]   > =   1 . 0 0 )  
 	 	 {  
 	 	 	 P r o d u c t F a d i n g U p [ b l o c k N u m b e r ]   =   f a l s e ;  
 	 	 	 P r o d u c t F a d i n g C o u n t e r [ b l o c k N u m b e r ]   =   1 . 0 0 ;  
 	 	 	  
 	 	 	 c y c l e   =   c y c l e   +   1 ;  
 	  
 	 	 	 i f   ( c y c l e   > =   1 )  
 	 	 	 {  
 	 	 	 	 c y c l e   =   0 ;  
 	 	 	 } 	 	 	 	 	 	 	 	 	 	 	 	 	  
 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	  
 	 	 	 w i n d o w . s e t T i m e o u t ( ' F a d i n g ( 0 . 0 1 , ' + b l o c k N u m b e r + ' ) ' , P r o d u c t C h a n g e F r e q u e n c y [ b l o c k N u m b e r ] ) ; 	 	 	 	 	 	 	 	 	 	 	  
 	 	 }  
 	 	 e l s e  
 	 	 { 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	  
 	 	 	 d i v P r o d u c t O b j e c t L i s t [ ( b l o c k N u m b e r * 2 ) ] . s t y l e . o p a c i t y   =   ( 1 . 0 0 - P r o d u c t F a d i n g C o u n t e r [ b l o c k N u m b e r ] ) + ' ' ;  
 	 	 	 d i v P r o d u c t O b j e c t L i s t [ ( b l o c k N u m b e r * 2 ) ] . s t y l e . f i l t e r   =   ' a l p h a ( O p a c i t y = ' + ( 1 0 0 - P r o d u c t F a d i n g C o u n t e r [ b l o c k N u m b e r ] * 1 0 0 ) + ' ) ' ;  
 	 	  
 	 	 	 P r o d u c t F a d i n g C o u n t e r [ b l o c k N u m b e r ]   =   P r o d u c t F a d i n g C o u n t e r [ b l o c k N u m b e r ]   +   q u a n t i t y ;  
 	 	 	 	 	 	 	 	 	 	 	 	  
 	 	 	 w i n d o w . s e t T i m e o u t ( ' F a d i n g ( 0 . 0 1 , ' + b l o c k N u m b e r + ' ) ' , P r o d u c t C h a n g i n g T i m e [ b l o c k N u m b e r ] ) ; 	 	 	 	 	 	 	 	 	 	 	  
 	 	 } 	 	  
 	 }  
 	 e l s e  
 	 {  
 	 	 i f   ( P r o d u c t F a d i n g C o u n t e r [ b l o c k N u m b e r ]   < =   0 . 0 0 )  
 	 	 {  
 	 	 	 P r o d u c t F a d i n g U p [ b l o c k N u m b e r ]   =   t r u e ; 	  
 	 	 	 P r o d u c t F a d i n g C o u n t e r [ b l o c k N u m b e r ]   =   0 . 0 0 ;  
 	 	 	  
 	 	 	 c y c l e   =   c y c l e   +   1 ;  
 	  
 	 	 	 i f   ( c y c l e   > =   1 )  
 	 	 	 {  
 	 	 	 	 c y c l e   =   0 ;  
 	 	 	 } 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	  
 	 	 	 	 	 	 	 	 	 	 	 	 	 	  
 	 	 	 w i n d o w . s e t T i m e o u t ( ' F a d i n g ( 0 . 0 1 , ' + b l o c k N u m b e r + ' ) ' , P r o d u c t C h a n g e F r e q u e n c y [ b l o c k N u m b e r ] ) ;  
 	 	 }  
 	 	 e l s e  
 	 	 {  
 	 	 	 d i v P r o d u c t O b j e c t L i s t [ ( b l o c k N u m b e r * 2 ) ] . s t y l e . o p a c i t y   =   ( 1 . 0 0 - P r o d u c t F a d i n g C o u n t e r [ b l o c k N u m b e r ] ) + ' ' ;  
 	 	 	 d i v P r o d u c t O b j e c t L i s t [ ( b l o c k N u m b e r * 2 ) ] . s t y l e . f i l t e r   =   ' a l p h a ( O p a c i t y = ' + ( 1 0 0 - P r o d u c t F a d i n g C o u n t e r [ b l o c k N u m b e r ] * 1 0 0 ) + ' ) ' ;  
 	 	  
 	 	 	 P r o d u c t F a d i n g C o u n t e r [ b l o c k N u m b e r ]   =   P r o d u c t F a d i n g C o u n t e r [ b l o c k N u m b e r ]   -   q u a n t i t y ;  
 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	  
 	 	 	 w i n d o w . s e t T i m e o u t ( ' F a d i n g ( 0 . 0 1 , ' + b l o c k N u m b e r + ' ) ' , P r o d u c t C h a n g i n g T i m e [ b l o c k N u m b e r ] ) ;  
 	 	 } 	  
 	 } 	 	 	 	 	 	 	 	  
 }  
  
 
