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