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