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