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