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