ÿþf u n c t i o n   S h o w M e n u ( n u m ,   m e n u ,   m a x )  
                 {  
                                 / / s t a r t i n g   a t   o n e ,   l o o p   t h r o u g h   u n t i l   t h e   n u m b e r   c h o s e n   b y   t h e   u s e r  
                                 f o r ( i   =   1 ;   i   < =   n u m ;   i + + ) {  
                                                 / / a d d   n u m b e r   o n t o   e n d   o f   m e n u  
                                                 v a r   m e n u 2   =   m e n u   +   i ;  
                                                 / / c h a n g e   v i s i b i l i t y   t o   b l o c k ,   o r   ' v i s i b l e '  
                                                 d o c u m e n t . g e t E l e m e n t B y I d ( m e n u 2 ) . s t y l e . d i s p l a y   =   ' b l o c k ' ;  
                                 }  
                                 / / m a k e   a   n u m b e r   o n e   m o r e   t h a n   t h e   n u m b e r   i n p u t e d  
                                 v a r   n u m 2   =   n u m ;  
                                 n u m 2 + + ;  
                                 / / h i d e   m e n u s   i f   t h e   v i e w e r   s e l e c t s   a   n u m b e r   l o w e r  
                                 / / t h i s   w i l l   h i d e   e v e r y   n u m b e r   b e t w e e n   t h e   s e l e c t e d   n u m b e r   a n d   t h e   m a x i m u m  
                                 / / e x .     i f   3   i s   s e l e c t e d ,   h i d e   t h e   < d i v >   c e l l s   f o r   4 ,   5 ,   a n d   6  
                                 / / l o o p   u n t i l   m a x   i s   r e a c h e d  
                                 w h i l e ( n u m 2   < =   m a x ) {  
                                                 v a r   m e n u 3   =   m e n u   +   n u m 2 ;  
                                                 / / 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 ( m e n u 3 ) . s t y l e . d i s p l a y   =   ' n o n e ' ;  
                                                 / / a d d   o n e   t o   l o o p  
                                                 n u m 2 = n u m 2 + 1 ;  
                                 }  
                 } 
