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