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