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