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