ÿþv a r   f o l d e r   =   " " ;  
 v a r   l a n g c o d e s = [ " j p " ,   " h t t p : / / w w w . h o n e y c a t c o s m e t i c s . j p " ,   " j a " ,   " h t t p : / / w w w . h o n e y c a t c o s m e t i c s . j p " ] ;  
 / *  
 A d d s   t h e   l a n g u a g e   l i n k s   t o   t h e   b o t t o m   o f   t h e   p a g e .  
 * /  
 f u n c t i o n   a d d L a n g u a g e L i n k s ( )  
 {  
         / / C r e a t e   D I V   t a g  
         v a r   d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " D I V " ) ;  
         d i v . s e t A t t r i b u t e ( " i d " ,   " s e l e c t L a n g u a g e D i v " ) ;  
         d i v . c l a s s N a m e   =   " s t y l e 1 " ;  
         d i v . s t y l e . t e x t A l i g n   =   " l e f t " ;  
         d i v . s t y l e . f o n t S i z e   =   " 8 p t " ;  
          
         / / C r e a t e   E n g l i s h   l i n k  
         v a r   e n g l i s h   =   d o c u m e n t . c r e a t e E l e m e n t ( " A " ) ;  
         e n g l i s h . s e t A t t r i b u t e ( " h r e f " ,   " / "   +   f o l d e r   +   " i n d e x 1 . h t m l " ) ;  
         e n g l i s h . s e t A t t r i b u t e ( " t i t l e " ,   " I n t e r n a t i o n a l " ) ;  
         e n g l i s h . i n n e r H T M L   =   " I n t e r n a t i o n a l " ;  
          
         / / C r e a t e   J a p a n e s e   l i n k  
         v a r   j a p a n e s e   =   d o c u m e n t . c r e a t e E l e m e n t ( " A " ) ;  
         j a p a n e s e . s e t A t t r i b u t e ( " h r e f " ,   " h t t p : / / w w w . h o n e y c a t c o s m e t i c s . j p " ) ;  
         j a p a n e s e . s e t A t t r i b u t e ( " t i t l e " ,   " J a p a n " ) ;  
         j a p a n e s e . i n n e r H T M L   =   " J a p a n " ;  
          
         / / A d d   l i n k s   t o   d i v   t a g  
         d i v . a p p e n d C h i l d ( d o c u m e n t . c r e a t e T e x t N o d e ( " C o u n t r y   S i t e s :   " ) ) ;  
         d i v . a p p e n d C h i l d ( e n g l i s h ) ;  
         d i v . a p p e n d C h i l d ( d o c u m e n t . c r e a t e T e x t N o d e ( "   |   " ) ) ;  
         d i v . a p p e n d C h i l d ( j a p a n e s e ) ;  
         d i v . a p p e n d C h i l d ( d o c u m e n t . c r e a t e E l e m e n t ( " B R " ) ) ;  
         d i v . a p p e n d C h i l d ( d o c u m e n t . c r e a t e E l e m e n t ( " B R " ) ) ;  
          
         d o c u m e n t . g e t E l e m e n t s B y T a g N a m e ( ' b o d y ' ) [ 0 ] . a p p e n d C h i l d ( d i v ) ;  
 }  
  
 / * *  
   *   C o d e   t h a t   d e t e c t s   t h e   l a n g u a g e   o f   t h e   b r o w s e r   a n d  
   *   f o r w a r d s   t h e   u s e r   t o   t h e   a p p r o p r i a t e   l a n g u a g e   l a n d i n g  
   *   p a g e .  
   * /  
 f u n c t i o n   f o r w a r d M a i n P a g e ( )  
 {  
         v a r   l a n g C o d e   =   n a v i g a t o r . l a n g u a g e   | |   n a v i g a t o r . s y s t e m L a n g u a g e ;  
         v a r   l a n g   =   l a n g C o d e . t o L o w e r C a s e ( ) ;  
         l a n g   =   l a n g . s u b s t r ( 0 , 2 ) ;    
         v a r   d e s t   =   w i n d o w . l o c a t i o n . h r e f ;  
         f o r   ( i = 0 ;   i   <   l a n g c o d e s . l e n g t h ; i + = 2 )  
         {  
                 i f   ( l a n g = = l a n g c o d e s [ i ] )  
                 {        
                         d e s t = l a n g c o d e s [ i + 1 ] ;  
                         i f   ( d e s t   ! =   w i n d o w . l o c a t i o n . h r e f )  
                         {  
                                 w i n d o w . l o c a t i o n . r e p l a c e   ?   w i n d o w . l o c a t i o n . r e p l a c e ( d e s t )   : w i n d o w . l o c a t i o n = d e s t ;  
                                 r e t u r n ;  
                         }  
                 }  
         }  
         / / I f   n o   p a g e   t o   f o r w a r d   t o ,   f o r w a r d   t o   d e f a u l t   p a g e  
         d e s t   =   " / "   +   f o l d e r   +   " i n d e x 1 . h t m l " ;  
         w i n d o w . l o c a t i o n . r e p l a c e   ?   w i n d o w . l o c a t i o n . r e p l a c e ( d e s t )   : w i n d o w . l o c a t i o n = d e s t ;  
         r e t u r n ;  
 }  
  
 a d d L a n g u a g e L i n k s ( ) ;  
 
