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