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