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