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