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