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