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