ÿþ 
 f u n c t i o n   f i n d b r a n c h a r c h i v e ( ) {  
 	 v a r   a j a x R e q u e s t ;    
 	  
 	 t r y {  
 	 	 a j a x R e q u e s t   =   n e w   X M L H t t p R e q u e s t ( ) ;  
 	 }   c a t c h   ( e ) {  
 	 	 t r y {  
 	 	 	 a j a x R e q u e s t   =   n e w   A c t i v e X O b j e c t ( " M s x m l 2 . X M L H T T P " ) ;  
 	 	 }   c a t c h   ( e )   {  
 	 	 	 t r y {  
 	 	 	 	 a j a x R e q u e s t   =   n e w   A c t i v e X O b j e c t ( " M i c r o s o f t . X M L H T T P " ) ;  
 	 	 	 }   c a t c h   ( e ) {  
 	 	 	 	 a l e r t ( " Y o u r   b r o w s e r   b r o k e ! " ) ;  
 	 	 	 	 r e t u r n   f a l s e ;  
 	 	 	 }  
 	 	 }  
 	 }  
 	 a j a x R e q u e s t . o n r e a d y s t a t e c h a n g e   =   f u n c t i o n ( ) {  
 	 	 i f ( a j a x R e q u e s t . r e a d y S t a t e   = =   4 ) {  
 	 	 	 v a r   a j a x D i s p l a y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' A b r a n c h ' ) ;  
 	 	 	 a j a x D i s p l a y . i n n e r H T M L   =   a j a x R e q u e s t . r e s p o n s e T e x t ;  
 	 	 }  
 	 }  
 	 v a r   c a t e g o r y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c a t ' ) . v a l u e ;  
 	 v a r   q u e r y S t r i n g   =   " ? m a s t e r = "   +   c a t e g o r y ;  
 	 a j a x R e q u e s t . o p e n ( " G E T " ,   " f i n d b r a n c h . p h p "   +   q u e r y S t r i n g ,   t r u e ) ;  
 	 a j a x R e q u e s t . s e n d ( n u l l ) ;  
 }  
  
 f u n c t i o n   f i n d b r a n c h ( ) {  
 	 v a r   a j a x R e q u e s t ;    
 	  
 	 t r y {  
 	 	 a j a x R e q u e s t   =   n e w   X M L H t t p R e q u e s t ( ) ;  
 	 }   c a t c h   ( e ) {  
 	 	 t r y {  
 	 	 	 a j a x R e q u e s t   =   n e w   A c t i v e X O b j e c t ( " M s x m l 2 . X M L H T T P " ) ;  
 	 	 }   c a t c h   ( e )   {  
 	 	 	 t r y {  
 	 	 	 	 a j a x R e q u e s t   =   n e w   A c t i v e X O b j e c t ( " M i c r o s o f t . X M L H T T P " ) ;  
 	 	 	 }   c a t c h   ( e ) {  
 	 	 	 	 a l e r t ( " Y o u r   b r o w s e r   b r o k e ! " ) ;  
 	 	 	 	 r e t u r n   f a l s e ;  
 	 	 	 }  
 	 	 }  
 	 }  
 	 a j a x R e q u e s t . o n r e a d y s t a t e c h a n g e   =   f u n c t i o n ( ) {  
 	 	 i f ( a j a x R e q u e s t . r e a d y S t a t e   = =   4 ) {  
 	 	 	 v a r   a j a x D i s p l a y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' a j a x D i v ' ) ;  
 	 	 	 a j a x D i s p l a y . i n n e r H T M L   =   a j a x R e q u e s t . r e s p o n s e T e x t ;  
 	 	 }  
 	 }  
 	 v a r   c a t e g o r y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c a t e g o r y ' ) . v a l u e ;  
 	 v a r   q u e r y S t r i n g   =   " ? m a s t e r = "   +   c a t e g o r y ;  
 	 a j a x R e q u e s t . o p e n ( " G E T " ,   " f i n d b r a n c h . p h p "   +   q u e r y S t r i n g ,   t r u e ) ;  
 	 a j a x R e q u e s t . s e n d ( n u l l ) ;  
 }  
  
  
 f u n c t i o n   f c o m m e n t ( )  
 {  
 	 	 i f ( d o c u m e n t . c o m m e n t f o r m . n a m e . v a l u e = = " " )  
 	 {  
 	 	 a l e r t ( " ã ä   Ý Ö á ß   Ã ß Ê È   Ç á Å Ó ã   Ç á Î Ç Õ   È ß   ! " ) ;  
 	 	 d o c u m e n t . c o m m e n t f o r m . n a m e . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	  
 	 	 i f ( d o c u m e n t . c o m m e n t f o r m . c o m m e n t . v a l u e = = " " )  
 	 {  
 	 	 a l e r t ( " ã ä   Ý Ö á ß   Ã ß Ê È   Ê Ú á í Þ ß   ! " ) ;  
 	 	 d o c u m e n t . c o m m e n t f o r m . c o m m e n t . f o c u s ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 } 	  
 	  
 	 v a r   i C h a r s   =   " ! @ # $ % ^ & * ( ) + = - [ ] \ \ \ ' ; , . / { } | \ " : < > ? " ;  
  
     f o r   ( v a r   i   =   0 ;   i   <   d o c u m e n t . c o m m e n t f o r m . c o m m e n t . v a l u e . l e n g t h ;   i + + )   {  
     	 i f   ( i C h a r s . i n d e x O f ( d o c u m e n t . c o m m e n t f o r m . c o m m e n t . v a l u e . c h a r A t ( i ) )   ! =   - 1 )   {  
     	 a l e r t   ( " á Ç   í Ó ã Í   È Å Ó Ê Î Ï Ç ã   Ç á Ñ ã æ Ò   Ç á Ê Ç á í É   Ý í   ß Ê Ç È É   Ç á Ê Ú á í Þ Ç Ê   . \ n   \ n   ! @ # $ % ^ & * ( ) + = [ ] \ \ \ ' ; , . / { } | \ " : < > ? . " ) ;  
     	 d o c u m e n t . c o m m e n t f o r m . c o m m e n t . f o c u s ( ) ;  
     	 r e t u r n   f a l s e ;  
     	 }  
     }  
 }  
  
  
 f u n c t i o n   s a v e p a g e ( ) {  
 	 i f   ( c o n f i r m ( ' GD  *1:(  AJ  -A8  'D5A-)  ! ' ) )  
 	 {  
 	 h t m l B t n . d i s a b l e d   =   t r u e ;  
 	 d o c u m e n t . e x e c C o m m a n d ( " S a v e a s " ,   " t r u e " ,   " N e w s D e t a i l s . h t m " ) ;  
 	 h t m l B t n . d i s a b l e d   =   f a l s e ;  
 	 }  
 }  
  
  
 / / * *   T a b   C o n t e n t   s c r i p t   v 2 . 0 -   ©   D y n a m i c   D r i v e   D H T M L   c o d e   l i b r a r y   ( h t t p : / / w w w . d y n a m i c d r i v e . c o m )  
 / / * *   U p d a t e d   O c t   7 t h ,   0 7   t o   v e r s i o n   2 . 0 .   C o n t a i n s   n u m e r o u s   i m p r o v e m e n t s :  
 / /       - A d d e d   A u t o   M o d e :   S c r i p t   a u t o   r o t a t e s   t h e   t a b s   b a s e d   o n   a n   i n t e r v a l ,   u n t i l   a   t a b   i s   e x p l i c i t l y   s e l e c t e d  
 / /       - A b i l i t y   t o   e x p a n d / c o n t r a c t   a r b i t r a r y   D I V s   o n   t h e   p a g e   a s   t h e   t a b b e d   c o n t e n t   i s   e x p a n d e d /   c o n t r a c t e d  
 / /       - A b i l i t y   t o   d y n a m i c a l l y   s e l e c t   a   t a b   e i t h e r   b a s e d   o n   i t s   p o s i t i o n   w i t h i n   i t s   p e e r s ,   o r   i t s   I D   a t t r i b u t e   ( g i v e   t h e   t a r g e t   t a b   o n e   1 s t )  
 / /       - A b i l i t y   t o   s e t   w h e r e   t h e   C S S   c l a s s n a m e   " s e l e c t e d "   g e t   a s s i g n e d -   e i t h e r   t o   t h e   t a r g e t   t a b ' s   l i n k   ( " A " ) ,   o r   i t s   p a r e n t   c o n t a i n e r  
 / / * *   U p d a t e d   F e b   1 8 t h ,   0 8   t o   v e r s i o n   2 . 1 :   A d d s   a   " t a b i n s t a n c e . c y c l e i t ( d i r ) "   m e t h o d   t o   c y c l e   f o r w a r d   o r   b a c k w a r d   b e t w e e n   t a b s   d y n a m i c a l l y  
 / / * *   U p d a t e d   A p r i l   8 t h ,   0 8   t o   v e r s i o n   2 . 2 :   A d d s   s u p p o r t   f o r   e x p a n d i n g   a   t a b   u s i n g   a   U R L   p a r a m e t e r   ( i e :   h t t p : / / m y s i t e . c o m / t a b c o n t e n t . h t m ? t a b i n t e r f a c e i d = 0 )    
  
 / / / / N O   N E E D   T O   E D I T   B E L O W / / / / / / / / / / / / / / / / / / / / / / / /  
  
 f u n c t i o n   d d t a b c o n t e n t ( t a b i n t e r f a c e i d ) {  
 	 t h i s . t a b i n t e r f a c e i d = t a b i n t e r f a c e i d   / / I D   o f   T a b   M e n u   m a i n   c o n t a i n e r  
 	 t h i s . t a b s = d o c u m e n t . g e t E l e m e n t B y I d ( t a b i n t e r f a c e i d ) . g e t E l e m e n t s B y T a g N a m e ( " a " )   / / G e t   a l l   t a b   l i n k s   w i t h i n   c o n t a i n e r  
 	 t h i s . e n a b l e t a b p e r s i s t e n c e = t r u e  
 	 t h i s . h o t t a b s p o s i t i o n s = [ ]   / / A r r a y   t o   s t o r e   p o s i t i o n   o f   t a b s   t h a t   h a v e   a   " r e l "   a t t r   d e f i n e d ,   r e l a t i v e   t o   a l l   t a b   l i n k s ,   w i t h i n   c o n t a i n e r  
 	 t h i s . c u r r e n t T a b I n d e x = 0   / / I n d e x   o f   c u r r e n t l y   s e l e c t e d   h o t   t a b   ( t a b   w i t h   s u b   c o n t e n t )   w i t h i n   h o t t a b s p o s i t i o n s [ ]   a r r a y  
 	 t h i s . s u b c o n t e n t i d s = [ ]   / / A r r a y   t o   s t o r e   i d s   o f   t h e   s u b   c o n t e n t s   ( " r e l "   a t t r   v a l u e s )  
 	 t h i s . r e v c o n t e n t i d s = [ ]   / / A r r a y   t o   s t o r e   i d s   o f   a r b i t r a r y   c o n t e n t s   t o   e x p a n d / c o n t a c t   a s   w e l l   ( " r e v "   a t t r   v a l u e s )  
 	 t h i s . s e l e c t e d C l a s s T a r g e t = " l i n k "   / / k e y w o r d   t o   i n d i c a t e   w h i c h   t a r g e t   e l e m e n t   t o   a s s i g n   " s e l e c t e d "   C S S   c l a s s   ( " l i n k p a r e n t "   o r   " l i n k " )  
 }  
  
 d d t a b c o n t e n t . g e t C o o k i e = f u n c t i o n ( N a m e ) {    
 	 v a r   r e = n e w   R e g E x p ( N a m e + " = [ ^ ; ] + " ,   " i " ) ;   / / c o n s t r u c t   R E   t o   s e a r c h   f o r   t a r g e t   n a m e / v a l u e   p a i r  
 	 i f   ( d o c u m e n t . c o o k i e . m a t c h ( r e ) )   / / i f   c o o k i e   f o u n d  
 	 	 r e t u r n   d o c u m e n t . c o o k i e . m a t c h ( r e ) [ 0 ] . s p l i t ( " = " ) [ 1 ]   / / r e t u r n   i t s   v a l u e  
 	 r e t u r n   " "  
 }  
  
 d d t a b c o n t e n t . s e t C o o k i e = f u n c t i o n ( n a m e ,   v a l u e ) {  
 	 d o c u m e n t . c o o k i e   =   n a m e + " = " + v a l u e + " ; p a t h = / "   / / c o o k i e   v a l u e   i s   d o m a i n   w i d e   ( p a t h = / )  
 }  
  
 d d t a b c o n t e n t . p r o t o t y p e = {  
  
 	 e x p a n d i t : f u n c t i o n ( t a b i d _ o r _ p o s i t i o n ) {   / / P U B L I C   f u n c t i o n   t o   s e l e c t   a   t a b   e i t h e r   b y   i t s   I D   o r   p o s i t i o n ( i n t )   w i t h i n   i t s   p e e r s  
 	 	 t h i s . c a n c e l a u t o r u n ( )   / / s t o p   a u t o   c y c l i n g   o f   t a b s   ( i f   r u n n i n g )  
 	 	 v a r   t a b r e f = " "  
 	 	 t r y {  
 	 	 	 i f   ( t y p e o f   t a b i d _ o r _ p o s i t i o n = = " s t r i n g "   & &   d o c u m e n t . g e t E l e m e n t B y I d ( t a b i d _ o r _ p o s i t i o n ) . g e t A t t r i b u t e ( " r e l " ) )   / / i f   s p e c i f i e d   t a b   c o n t a i n s   " r e l "   a t t r  
 	 	 	 	 t a b 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 ( t a b i d _ o r _ p o s i t i o n )  
 	 	 	 e l s e   i f   ( p a r s e I n t ( t a b i d _ o r _ p o s i t i o n ) ! = N a N   & &   t h i s . t a b s [ t a b i d _ o r _ p o s i t i o n ] . g e t A t t r i b u t e ( " r e l " ) )   / / i f   s p e c i f i e d   t a b   c o n t a i n s   " r e l "   a t t r  
 	 	 	 	 t a b r e f = t h i s . t a b s [ t a b i d _ o r _ p o s i t i o n ]  
 	 	 }  
 	 	 c a t c h ( e r r ) { a l e r t ( " I n v a l i d   T a b   I D   o r   p o s i t i o n   e n t e r e d ! " ) }  
 	 	 i f   ( t a b r e f ! = " " )   / / i f   a   v a l i d   t a b   i s   f o u n d   b a s e d   o n   f u n c t i o n   p a r a m e t e r  
 	 	 	 t h i s . e x p a n d t a b ( t a b r e f )   / / e x p a n d   t h i s   t a b  
 	 } ,  
  
 	 c y c l e i t : f u n c t i o n ( d i r ,   a u t o r u n ) {   / / P U B L I C   f u n c t i o n   t o   m o v e   f o w a r d   o r   b a c k w a r d s   t h r o u g h   e a c h   h o t   t a b   ( t a b i n s t a n c e . c y c l e i t ( ' f o w a r d / b a c k ' )   )  
 	 	 i f   ( d i r = = " n e x t " ) {  
 	 	 	 v a r   c u r r e n t T a b I n d e x = ( t h i s . c u r r e n t T a b I n d e x < t h i s . h o t t a b s p o s i t i o n s . l e n g t h - 1 ) ?   t h i s . c u r r e n t T a b I n d e x + 1   :   0  
 	 	 }  
 	 	 e l s e   i f   ( d i r = = " p r e v " ) {  
 	 	 	 v a r   c u r r e n t T a b I n d e x = ( t h i s . c u r r e n t T a b I n d e x > 0 ) ?   t h i s . c u r r e n t T a b I n d e x - 1   :   t h i s . h o t t a b s p o s i t i o n s . l e n g t h - 1  
 	 	 }  
 	 	 i f   ( t y p e o f   a u t o r u n = = " u n d e f i n e d " )   / / i f   c y c l e i t ( )   i s   b e i n g   c a l l e d   b y   u s e r ,   v e r s u s   a u t o r u n ( )   f u n c t i o n  
 	 	 	 t h i s . c a n c e l a u t o r u n ( )   / / s t o p   a u t o   c y c l i n g   o f   t a b s   ( i f   r u n n i n g )  
 	 	 t h i s . e x p a n d t a b ( t h i s . t a b s [ t h i s . h o t t a b s p o s i t i o n s [ c u r r e n t T a b I n d e x ] ] )  
 	 } ,  
  
 	 s e t p e r s i s t : f u n c t i o n ( b o o l ) {   / / P U B L I C   f u n c t i o n   t o   t o g g l e   p e r s i s t e n c e   f e a t u r e  
 	 	 	 t h i s . e n a b l e t a b p e r s i s t e n c e = b o o l  
 	 } ,  
  
 	 s e t s e l e c t e d C l a s s T a r g e t : f u n c t i o n ( o b j s t r ) {   / / P U B L I C   f u n c t i o n   t o   s e t   w h i c h   t a r g e t   e l e m e n t   t o   a s s i g n   " s e l e c t e d "   C S S   c l a s s   ( " l i n k p a r e n t "   o r   " l i n k " )  
 	 	 t h i s . s e l e c t e d C l a s s T a r g e t = o b j s t r   | |   " l i n k "  
 	 } ,  
  
 	 g e t s e l e c t e d C l a s s T a r g e t : f u n c t i o n ( t a b r e f ) {   / / R e t u r n s   t a r g e t   e l e m e n t   t o   a s s i g n   " s e l e c t e d "   C S S   c l a s s   t o  
 	 	 r e t u r n   ( t h i s . s e l e c t e d C l a s s T a r g e t = = ( " l i n k p a r e n t " . t o L o w e r C a s e ( ) ) ) ?   t a b r e f . p a r e n t N o d e   :   t a b r e f  
 	 } ,  
  
 	 u r l p a r a m s e l e c t : f u n c t i o n ( t a b i n t e r f a c e i d ) {  
 	 	 v a r   r e s u l t = w i n d o w . l o c a t i o n . s e a r c h . m a t c h ( n e w   R e g E x p ( t a b i n t e r f a c e i d + " = ( \ \ d + ) " ,   " i " ) )   / / c h e c k   f o r   " ? t a b i n t e r f a c e i d = 2 "   i n   U R L  
 	 	 r e t u r n   ( r e s u l t = = n u l l ) ?   n u l l   :   p a r s e I n t ( R e g E x p . $ 1 )   / / r e t u r n s   n u l l   o r   i n d e x ,   w h e r e   i n d e x   ( i n t )   i s   t h e   s e l e c t e d   t a b ' s   i n d e x  
 	 } ,  
  
 	 e x p a n d t a b : f u n c t i o n ( t a b r e f ) {  
 	 	 v a r   s u b c o n t e n t i d = t a b r e f . g e t A t t r i b u t e ( " r e l " )   / / G e t   i d   o f   s u b c o n t e n t   t o   e x p a n d  
 	 	 / / G e t   " r e v "   a t t r   a s   a   s t r i n g   o f   I D s   i n   t h e   f o r m a t   " , j o h n , g e o r g e , t r e y , e t c , "   t o   e a s i l y   s e a r c h   t h r o u g h  
 	 	 v a r   a s s o c i a t e d r e v i d s = ( t a b r e f . g e t A t t r i b u t e ( " r e v " ) ) ?   " , " + t a b r e f . g e t A t t r i b u t e ( " r e v " ) . r e p l a c e ( / \ s + / ,   " " ) + " , "   :   " "  
 	 	 t h i s . e x p a n d s u b c o n t e n t ( s u b c o n t e n t i d )  
 	 	 t h i s . e x p a n d r e v c o n t e n t ( a s s o c i a t e d r e v i d s )  
 	 	 f o r   ( v a r   i = 0 ;   i < t h i s . t a b s . l e n g t h ;   i + + ) {   / / L o o p   t h r o u g h   a l l   t a b s ,   a n d   a s s i g n   o n l y   t h e   s e l e c t e d   t a b   t h e   C S S   c l a s s   " s e l e c t e d "  
 	 	 	 t h i s . g e t s e l e c t e d C l a s s T a r g e t ( t h i s . t a b s [ i ] ) . c l a s s N a m e = ( t h i s . t a b s [ i ] . g e t A t t r i b u t e ( " r e l " ) = = s u b c o n t e n t i d ) ?   " s e l e c t e d "   :   " "  
 	 	 }  
 	 	 i f   ( t h i s . e n a b l e t a b p e r s i s t e n c e )   / / i f   p e r s i s t e n c e   e n a b l e d ,   s a v e   s e l e c t e d   t a b   p o s i t i o n ( i n t )   r e l a t i v e   t o   i t s   p e e r s  
 	 	 	 d d t a b c o n t e n t . s e t C o o k i e ( t h i s . t a b i n t e r f a c e i d ,   t a b r e f . t a b p o s i t i o n )  
 	 	 t h i s . s e t c u r r e n t t a b i n d e x ( t a b r e f . t a b p o s i t i o n )   / / r e m e m b e r   p o s i t i o n   o f   s e l e c t e d   t a b   w i t h i n   h o t t a b s p o s i t i o n s [ ]   a r r a y  
 	 } ,  
  
 	 e x p a n d s u b c o n t e n t : f u n c t i o n ( s u b c o n t e n t i d ) {  
 	 	 f o r   ( v a r   i = 0 ;   i < t h i s . s u b c o n t e n t i d s . l e n g t h ;   i + + ) {  
 	 	 	 v a r   s u b c o n t e n t = d o c u m e n t . g e t E l e m e n t B y I d ( t h i s . s u b c o n t e n t i d s [ i ] )   / / c a c h e   c u r r e n t   s u b c o n t e n t   o b j   ( i n   f o r   l o o p )  
 	 	 	 s u b c o n t e n t . s t y l e . d i s p l a y = ( s u b c o n t e n t . i d = = s u b c o n t e n t i d ) ?   " b l o c k "   :   " n o n e "   / / " s h o w "   o r   h i d e   s u b   c o n t e n t   b a s e d   o n   m a t c h i n g   i d   a t t r   v a l u e  
 	 	 }  
 	 } ,  
  
 	 e x p a n d r e v c o n t e n t : f u n c t i o n ( a s s o c i a t e d r e v i d s ) {  
 	 	 v a r   a l l r e v i d s = t h i s . r e v c o n t e n t i d s  
 	 	 f o r   ( v a r   i = 0 ;   i < a l l r e v i d s . l e n g t h ;   i + + ) {   / / L o o p   t h r o u g h   r e v   a t t r i b u t e s   f o r   a l l   t a b s   i n   t h i s   t a b   i n t e r f a c e  
 	 	 	 / / i f   a n y   v a l u e s   s t o r e d   w i t h i n   a s s o c i a t e d r e v i d s   m a t c h e s   o n e   w i t h i n   a l l r e v i d s ,   e x p a n d   t h a t   D I V ,   o t h e r w i s e ,   c o n t r a c t   i t  
 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( a l l r e v i d s [ i ] ) . s t y l e . d i s p l a y = ( a s s o c i a t e d r e v i d s . i n d e x O f ( " , " + a l l r e v i d s [ i ] + " , " ) ! = - 1 ) ?   " b l o c k "   :   " n o n e "  
 	 	 }  
 	 } ,  
  
 	 s e t c u r r e n t t a b i n d e x : f u n c t i o n ( t a b p o s i t i o n ) {   / / s t o r e   c u r r e n t   p o s i t i o n   o f   t a b   ( w i t h i n   h o t t a b s p o s i t i o n s [ ]   a r r a y )  
 	 	 f o r   ( v a r   i = 0 ;   i < t h i s . h o t t a b s p o s i t i o n s . l e n g t h ;   i + + ) {  
 	 	 	 i f   ( t a b p o s i t i o n = = t h i s . h o t t a b s p o s i t i o n s [ i ] ) {  
 	 	 	 	 t h i s . c u r r e n t T a b I n d e x = i  
 	 	 	 	 b r e a k  
 	 	 	 }  
 	 	 }  
 	 } ,  
  
 	 a u t o r u n : f u n c t i o n ( ) {   / / f u n c t i o n   t o   a u t o   c y c l e   t h r o u g h   a n d   s e l e c t   t a b s   b a s e d   o n   a   s e t   i n t e r v a l  
 	 	 t h i s . c y c l e i t ( ' n e x t ' ,   t r u e )  
 	 } ,  
  
 	 c a n c e l a u t o r u n : f u n c t i o n ( ) {  
 	 	 i f   ( t y p e o f   t h i s . a u t o r u n t i m e r ! = " u n d e f i n e d " )  
 	 	 	 c l e a r I n t e r v a l ( t h i s . a u t o r u n t i m e r )  
 	 } ,  
  
 	 i n i t : f u n c t i o n ( a u t o m o d e p e r i o d ) {  
 	 	 v a r   p e r s i s t e d t a b = d d t a b c o n t e n t . g e t C o o k i e ( t h i s . t a b i n t e r f a c e i d )   / / g e t   p o s i t i o n   o f   p e r s i s t e d   t a b   ( a p p l i c a b l e   i f   p e r s i s t e n c e   i s   e n a b l e d )  
 	 	 v a r   s e l e c t e d t a b = - 1   / / C u r r e n t l y   s e l e c t e d   t a b   i n d e x   ( - 1   m e a n i n g   n o n e )  
 	 	 v a r   s e l e c t e d t a b f r o m u r l = t h i s . u r l p a r a m s e l e c t ( t h i s . t a b i n t e r f a c e i d )   / / r e t u r n s   n u l l   o r   i n d e x   f r o m :   t a b c o n t e n t . h t m ? t a b i n t e r f a c e i d = i n d e x  
 	 	 t h i s . a u t o m o d e p e r i o d = a u t o m o d e p e r i o d   | |   0  
 	 	 f o r   ( v a r   i = 0 ;   i < t h i s . t a b s . l e n g t h ;   i + + ) {  
 	 	 	 t h i s . t a b s [ i ] . t a b p o s i t i o n = i   / / r e m e m b e r   p o s i t i o n   o f   t a b   r e l a t i v e   t o   i t s   p e e r s  
 	 	 	 i f   ( t h i s . t a b s [ i ] . g e t A t t r i b u t e ( " r e l " ) ) {  
 	 	 	 	 v a r   t a b i n s t a n c e = t h i s  
 	 	 	 	 t h i s . h o t t a b s p o s i t i o n s [ t h i s . h o t t a b s p o s i t i o n s . l e n g t h ] = i   / / s t o r e   p o s i t i o n   o f   " h o t "   t a b   ( " r e l "   a t t r   d e f i n e d )   r e l a t i v e   t o   i t s   p e e r s  
 	 	 	 	 t h i s . s u b c o n t e n t i d s [ t h i s . s u b c o n t e n t i d s . l e n g t h ] = t h i s . t a b s [ i ] . g e t A t t r i b u t e ( " r e l " )   / / s t o r e   i d   o f   s u b   c o n t e n t   ( " r e l "   a t t r   v a l u e )  
 	 	 	 	 t h i s . t a b s [ i ] . o n c l i c k = f u n c t i o n ( ) {  
 	 	 	 	 	 t a b i n s t a n c e . e x p a n d t a b ( t h i s )  
 	 	 	 	 	 t a b i n s t a n c e . c a n c e l a u t o r u n ( )   / / s t o p   a u t o   c y c l i n g   o f   t a b s   ( i f   r u n n i n g )  
 	 	 	 	 	 r e t u r n   f a l s e  
 	 	 	 	 }  
 	 	 	 	 i f   ( t h i s . t a b s [ i ] . g e t A t t r i b u t e ( " r e v " ) ) {   / / i f   " r e v "   a t t r   d e f i n e d ,   s t o r e   e a c h   v a l u e   w i t h i n   " r e v "   a s   a n   a r r a y   e l e m e n t  
 	 	 	 	 	 t h i s . r e v c o n t e n t i d s = t h i s . r e v c o n t e n t i d s . c o n c a t ( t h i s . t a b s [ i ] . g e t A t t r i b u t e ( " r e v " ) . s p l i t ( / \ s * , \ s * / ) )  
 	 	 	 	 }  
 	 	 	 	 i f   ( s e l e c t e d t a b f r o m u r l = = i   | |   t h i s . e n a b l e t a b p e r s i s t e n c e   & &   s e l e c t e d t a b = = - 1   & &   p a r s e I n t ( p e r s i s t e d t a b ) = = i   | |   ! t h i s . e n a b l e t a b p e r s i s t e n c e   & &   s e l e c t e d t a b = = - 1   & &   t h i s . g e t s e l e c t e d C l a s s T a r g e t ( t h i s . t a b s [ i ] ) . c l a s s N a m e = = " s e l e c t e d " ) {  
 	 	 	 	 	 s e l e c t e d t a b = i   / / S e l e c t e d   t a b   i n d e x ,   i f   f o u n d  
 	 	 	 	 }  
 	 	 	 }  
 	 	 }   / / E N D   f o r   l o o p  
 	 	 i f   ( s e l e c t e d t a b ! = - 1 )   / / i f   a   v a l i d   d e f a u l t   s e l e c t e d   t a b   i n d e x   i s   f o u n d  
 	 	 	 t h i s . e x p a n d t a b ( t h i s . t a b s [ s e l e c t e d t a b ] )   / / e x p a n d   s e l e c t e d   t a b   ( e i t h e r   f r o m   U R L   p a r a m e t e r ,   p e r s i s t e n t   f e a t u r e ,   o r   c l a s s = " s e l e c t e d "   c l a s s )  
 	 	 e l s e   / / i f   n o   v a l i d   d e f a u l t   s e l e c t e d   i n d e x   f o u n d  
 	 	 	 t h i s . e x p a n d t a b ( t h i s . t a b s [ t h i s . h o t t a b s p o s i t i o n s [ 0 ] ] )   / / J u s t   s e l e c t   f i r s t   t a b   t h a t   c o n t a i n s   a   " r e l "   a t t r  
 	 	 i f   ( p a r s e I n t ( t h i s . a u t o m o d e p e r i o d ) > 5 0 0   & &   t h i s . h o t t a b s p o s i t i o n s . l e n g t h > 1 ) {  
 	 	 	 t h i s . a u t o r u n t i m e r = s e t I n t e r v a l ( f u n c t i o n ( ) { t a b i n s t a n c e . a u t o r u n ( ) } ,   t h i s . a u t o m o d e p e r i o d )  
 	 	 }  
 	 }   / / E N D   i n t ( )   f u n c t i o n  
  
 }   / / E N D   P r o t o t y p e   a s s i g n m e n t 
