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