ÿþv a r   m a x n u m = 3 0 1  
 v a r   c u r n u m = 1  
 v a r   n e w s t a r t = 2 9 0  
 v a r   r a n d o m n u m = 0  
 v a r   a u t o v a r = 0  
 v a r   t m o u t  
 v a r   c t r = 0  
 v a r   b a s e U R L = " h t t p : / / l a l i t k u m a r . i n / m u k t a k / " ;  
  
 f u n c t i o n   f i n d r e c ( )  
 {  
  
 v a r   f i n d n u m = 0  
 f i n d n u m = p r o m p t ( " P l e a s e   e n t e r   N u m b e r   o f   t h e   M u k t a k   t h a t   y o u   w a n t   t o   s e e : \ n ( N u m b e r   s h o u l d   b e   b e t w e e n   1   a n d   " + m a x n u m + " ) " , " " )  
  
 i f ( f i n d n u m = = n u l l )  
 r e t u r n ;  
  
 / / / / / / /     c h e c k   f o r   v a l i d   n u m e r i c   s t r i n g s 	  
  
       v a r   s t r V a l i d C h a r s   =   " 0 1 2 3 4 5 6 7 8 9 . - " ;  
       v a r   s t r C h a r ;  
       v a r   b l n R e s u l t   =   t r u e ;  
  
 v a r   s t r S t r i n g = f i n d n u m  
  
       i f   ( s t r S t r i n g . l e n g t h   = =   0 )  
 {  
 a l e r t ( " P l e a s e   e n t e r   a   n u m b e r   b e t w e e n   1   a n d   "   + m a x n u m )  
 / / d o c u m e n t . a l l . p a g e n a m e . f o c u s ( )  
 r e t u r n   f a l s e  
 }  
  
       / /     t e s t   s t r S t r i n g   c o n s i s t s   o f   v a l i d   c h a r a c t e r s   l i s t e d   a b o v e  
       f o r   ( i   =   0 ;   i   <   s t r S t r i n g . l e n g t h   & &   b l n R e s u l t   = =   t r u e ;   i + + )  
             {  
             s t r C h a r   =   s t r S t r i n g . c h a r A t ( i ) ;  
             i f   ( s t r V a l i d C h a r s . i n d e x O f ( s t r C h a r )   = =   - 1 )  
                   {  
 a l e r t ( " P l e a s e   e n t e r   n u m b e r s   o n l y   b e t w e e n   1   a n d   " + m a x n u m ) ;  
 r e t u r n ;  
                   }  
             }  
  
 / / / / / / / /   n u m e r i c   c h e c k   o v e r  
  
  
 i f   ( f i n d n u m > m a x n u m | | f i n d n u m < = 0 )  
 { a l e r t ( " P l e a s e   e n t e r   a   n u m b e r   b e t w e e n   1   a n d   "   +   m a x n u m ) ;  
 r e t u r n ; }  
  
 i f ( f i n d n u m ! = " " )  
 {  
 p a r e n t . m a i n _ f r a m e . l o c a t i o n . h r e f = b a s e U R L   +   f i n d n u m ;  
 c u r n u m = p a r s e I n t ( f i n d n u m )  
 d i s p l a y p a g e n a m e ( ) ;  
 }  
 }  
  
  
  
  
 f u n c t i o n   g o n e x t ( )  
 {  
 c u r n u m = c u r n u m + 1  
 p a r e n t . m a i n _ f r a m e . l o c a t i o n . h r e f = b a s e U R L + c u r n u m ;  
 d o c u m e n t . a l l . p a g e n a m e . v a l u e = c u r n u m ;  
 d i s p l a y p a g e n a m e ( ) ;  
 c h a n g e s t a t e ( ) ;  
 }  
  
 f u n c t i o n   g o p r e v ( )  
 {  
 c u r n u m = c u r n u m - 1  
 p a r e n t . m a i n _ f r a m e . l o c a t i o n . h r e f = b a s e U R L + c u r n u m ;  
 d o c u m e n t . a l l . p a g e n a m e . v a l u e = c u r n u m  
 d i s p l a y p a g e n a m e ( ) ;  
 c h a n g e s t a t e ( ) ;  
 }  
  
  
  
 f u n c t i o n   c h a n g e s t a t e ( )  
 {  
 d o c u m e n t . a l l . n e x t b t . d i s a b l e d = f a l s e ;  
 d o c u m e n t . a l l . p r e v b t . d i s a b l e d = f a l s e ;  
 i f   ( c u r n u m = = m a x n u m | | c u r n u m > m a x n u m )  
 {  
 d o c u m e n t . a l l . n e x t b t . d i s a b l e d = t r u e ;  
 d o c u m e n t . a l l . p r e v b t . d i s a b l e d = f a l s e ;  
 r e t u r n ;  
 }  
 i f   ( c u r n u m = = 0 | | c u r n u m = = 1 )  
 {  
 d o c u m e n t . a l l . n e x t b t . d i s a b l e d = f a l s e ;  
 d o c u m e n t . a l l . p r e v b t . d i s a b l e d = t r u e ;  
 r e t u r n ;  
 }  
 d o c u m e n t . a l l . n e x t b t . d i s a b l e d = f a l s e ;  
 d o c u m e n t . a l l . p r e v b t . d i s a b l e d = f a l s e ;  
 }  
  
  
  
 f u n c t i o n   I s N u m e r i c ( )  
       / /     c h e c k   f o r   v a l i d   n u m e r i c   s t r i n g s 	  
       {  
       v a r   s t r V a l i d C h a r s   =   " 0 1 2 3 4 5 6 7 8 9 . - " ;  
       v a r   s t r C h a r ;  
       v a r   b l n R e s u l t   =   t r u e ;  
  
 s t r S t r i n g = d o c u m e n t . a l l . p a g e n a m e . v a l u e  
  
       i f   ( s t r S t r i n g . l e n g t h   = =   0 )  
 {  
 a l e r t ( " P l e a s e   e n t e r   a   n u m b e r   b e t w e e n   1   a n d   "   + m a x n u m )  
 d o c u m e n t . a l l . p a g e n a m e . f o c u s ( )  
 r e t u r n   f a l s e  
 }  
  
       / /     t e s t   s t r S t r i n g   c o n s i s t s   o f   v a l i d   c h a r a c t e r s   l i s t e d   a b o v e  
       f o r   ( i   =   0 ;   i   <   s t r S t r i n g . l e n g t h   & &   b l n R e s u l t   = =   t r u e ;   i + + )  
             {  
             s t r C h a r   =   s t r S t r i n g . c h a r A t ( i ) ;  
             i f   ( s t r V a l i d C h a r s . i n d e x O f ( s t r C h a r )   = =   - 1 )  
                   {  
 a l e r t ( " P l e a s e   e n t e r   n u m b e r s   o n l y   b e t w e e n   1   a n d   " + m a x n u m ) ;  
 d o c u m e n t . a l l . p a g e n a m e . f o c u s ( )  
 r e t u r n ;  
                   }  
             }  
 f i n d r e c ( )  
 }  
  
  
 f u n c t i o n   d i s p l a y p a g e n a m e ( )  
 {  
 d o c u m e n t . a l l . m n u m b e r . v a l u e = c u r n u m   +   "   /   "   +   m a x n u m  
 d o c u m e n t . a l l . p a g e n a m e . v a l u e = c u r n u m  
 }  
  
  
 f u n c t i o n   s e e r a n d o m ( )  
 {  
  
 / / h e r e   m u l t i p l i c a t i o n   w i t h   m a x n u m   d i c t a t e s   t h a t   t h e   r a n d o m   n u m b e r   s h o u l d   f a l l   b e t w e e n   0   a n d   m a x n u m .  
  
 f o r ( v a r   c t r = 0 ; c t r = 2 0 0 ; c t r = c t r + 1 )  
 {  
 v a r   r a n d o m n u m b e r = M a t h . f l o o r ( M a t h . r a n d o m ( ) * m a x n u m + 1 )  
 i f ( r a n d o m n u m b e r ! = r a n d o m n u m   & &   r a n d o m n u m b e r ! = 0 )  
 {  
 r a n d o m n u m = r a n d o m n u m b e r ;  
 p a r e n t . m a i n _ f r a m e . l o c a t i o n . h r e f = b a s e U R L   +   r a n d o m n u m b e r ;  
 d o c u m e n t . a l l . p a g e n a m e . v a l u e = r a n d o m n u m b e r ;  
 c u r n u m = p a r s e I n t ( d o c u m e n t . a l l . p a g e n a m e . v a l u e )  
 d i s p l a y p a g e n a m e ( ) ;  
 c h a n g e s t a t e ( ) ;  
 b r e a k ;  
 }  
 }  
  
 i f ( a u t o v a r = = 1 )  
 {  
 t m o u t = s e t T i m e o u t ( " s e e r a n d o m ( ) " , d o c u m e n t . a l l . s h o w t i m e . v a l u e ) 	  
 d o c u m e n t . a l l . s h o w m s g . v a l u e = " 8	M	5	$	:   ,	&	2	  	>	0	@	  9	H	"  
 d o c u m e n t . a l l . s t a r t b t . d i s a b l e d = t r u e  
 d o c u m e n t . a l l . s t o p b t . d i s a b l e d = f a l s e  
 d o c u m e n t . a l l . s t o p b t . s t y l e . c l a s s n a m e = " s t o p b t o n "  
 d o c u m e n t . a l l . s h o w t i m e . d i s a b l e d = t r u e  
 d o c u m e n t . a l l . n e w _ l i s t . d i s a b l e d = t r u e  
 d o c u m e n t . a l l . r a n d o m b t . d i s a b l e d = t r u e  
 d o c u m e n t . a l l . f i n d b t . d i s a b l e d = t r u e  
 d o c u m e n t . a l l . n e x t b t . d i s a b l e d = t r u e  
 d o c u m e n t . a l l . p r e v b t . d i s a b l e d = t r u e  
 d o c u m e n t . a l l . s t a r t b t . s r c = " i m a g e s / s h o w o n . g i f "  
 d o c u m e n t . a l l . s t o p b t . s t y l e . d i s p l a y = " i n l i n e " ;  
 }  
  
 }  
  
  
  
 f u n c t i o n   s t a r t s h o w ( )  
 {  
 a u t o v a r = 1 ;  
 a l e r t ( " P L E A S E   N O T E :   A u t o   c h a n g e   i s   g o i n g   t o   s t a r t   n o w . \ n \ n T o   v i e w   o t h e r   p a g e s   i n   M u k t a k   S a a g a r ,   y o u   w i l l   h a v e   t o   S T O P   A u t o   c h a n g e . " ) ;  
 }  
  
  
 f u n c t i o n   s t o p s h o w ( )  
 {  
 c l e a r T i m e o u t ( t m o u t ) ;  
 a u t o v a r = 0 ;  
 d o c u m e n t . a l l . s h o w m s g . v a l u e = " 8	M	5	$	:   ,	&	2	  0	A		>	  9	A		  9	H	"  
 d o c u m e n t . a l l . s t a r t b t . d i s a b l e d = f a l s e  
 d o c u m e n t . a l l . s t o p b t . d i s a b l e d = t r u e  
 d o c u m e n t . a l l . s h o w t i m e . d i s a b l e d = f a l s e  
 d o c u m e n t . a l l . n e w _ l i s t . d i s a b l e d = f a l s e  
 d o c u m e n t . a l l . r a n d o m b t . d i s a b l e d = f a l s e  
 c h a n g e s t a t e ( )  
 d o c u m e n t . a l l . f i n d b t . d i s a b l e d = f a l s e  
 d o c u m e n t . a l l . s t a r t b t . s r c = " i m a g e s / p l a y - i c o n . p n g "  
 d o c u m e n t . a l l . s t o p b t . s t y l e . d i s p l a y = " n o n e " ;  
 }  
  
 f u n c t i o n   i n i t _ c o n t r o l s ( )  
 {  
 d o c u m e n t . a l l . s t o p b t . d i s a b l e d = t r u e  
 d o c u m e n t . a l l . s h o w m s g . d i s a b l e d = t r u e  
 d o c u m e n t . a l l . s h o w m s g . v a l u e = " 8	M	5	$	:   ,	&	2	  0	A		>	  9	A		  9	H	"  
 }  
  
  
 f u n c t i o n   x ( )  
 {  
 d o c u m e n t . a l l . p a g e n a m e . f o c u s ( )  
 }  
  
  
 f u n c t i o n   g o t o n e w ( )  
 {  
 v a r   f i n d n u m = 0  
 f i n d n u m = d o c u m e n t . a l l . n e w _ l i s t . v a l u e  
 i f   ( f i n d n u m > m a x n u m )  
 { a l e r t ( " P l e a s e   e n t e r   a   n u m b e r   b e t w e e n   1   a n d   "   +   m a x n u m ) ;  
 d o c u m e n t . a l l . p a g e n a m e . f o c u s ( ) ;  
 r e t u r n ; }  
  
 i f ( f i n d n u m ! = " " )  
 {  
 p a r e n t . m a i n _ f r a m e . l o c a t i o n . h r e f = b a s e U R L + f i n d n u m ;  
 d o c u m e n t . a l l . p a g e n a m e . v a l u e = f i n d n u m ;  
 c u r n u m = p a r s e I n t ( f i n d n u m )  
 d i s p l a y p a g e n a m e ( ) ;  
 c h a n g e s t a t e ( )  
 }  
 }  
  
  
 f u n c t i o n   n e w _ s t a r t ( )  
 {  
 v a r   s t r g ;  
  
 s t r g = " < s e l e c t   n a m e = n e w _ l i s t   s t y l e = ' f o n t - s i z e :   1 2 p x '   o n c h a n g e = ' g o t o n e w ( ) ' > < o p t i o n   v a l u e = ' '   u n s e l e c t a b l e > (		  	>	5	M	/	  .	K	$	@	< / o p t i o n > "  
 f o r ( x = n e w s t a r t ; x < = m a x n u m ; x + + )  
 {  
 s t r g = s t r g + " < o p t i o n   v a l u e = " + x + " > " + x + " < / o p t i o n > "  
 }  
 s t r g = s t r g + " < / s e l e c t > "  
  
 / / s t r g = " < i n p u t   t y p e = b u t t o n   n a m e = n e w s t   v a l u e = ' N e w   M u k t a k s   ( " + n e w s t a r t + " - " + m a x n u m + " ) '   o n c l i c k = g o t o n e w ( " + n e w s t a r t + " ) > "  
 / / s t r g = " < a   h r e f = ' " + n e w s t a r t + " . h t m '   c l a s s = f o o t e r l n k   t a r g e t = ' m a i n _ f r a m e ' > N e w   M u k t a k s   ( " + n e w s t a r t + " - " + m a x n u m + " ) < / a > "  
 d o c u m e n t . w r i t e ( s t r g ) ;  
 }  
  
  
 f u n c t i o n   N e w M u k t a k L i s t ( )  
 {  
 v a r   s t r g ;  
  
 s t r g = " "  
 f o r ( x = n e w s t a r t ; x < = m a x n u m ; x + + )  
 {  
 s t r g = s t r g + " < a   h r e f = " + x + " . h t m   t a r g e t = m a i n _ f r a m e > " + x + " < / a > < b r > < b r > "  
 }  
  
 d o c u m e n t . w r i t e ( s t r g ) ;  
 }  
  
  
 f u n c t i o n   O p e n N e w M u k t a k F r a m e ( )  
 {  
 p a r e n t . i n n e r s e t . c o l s = " 5 0 , * "  
 p a r e n t . l e f t _ f r a m e . l o c a t i o n . h r e f = " n e w _ m u k t a k . h t m "  
 d o c u m e n t . a l l . p a g e n a m e . v a l u e = " "  
 d o c u m e n t . a l l . m n u m b e r . v a l u e = " "  
 s t o p s h o w ( )  
 }  
  
 f u n c t i o n   O p e n L e f t F r a m e ( )  
 {  
 p a r e n t . i n n e r s e t . c o l s = " 2 0 0 , * "  
 p a r e n t . l e f t _ f r a m e . l o c a t i o n . h r e f = " l e k h a k _ i n d . h t m "  
 d o c u m e n t . a l l . p a g e n a m e . v a l u e = " "  
 d o c u m e n t . a l l . m n u m b e r . v a l u e = " "  
 s t o p s h o w ( )  
 }  
  
 f u n c t i o n   O p e n S e a r c h P a g e ( )  
 {  
 p a r e n t . m a i n _ f r a m e . l o c a t i o n . h r e f = " s i t e s e a r c h . h t m "  
 d o c u m e n t . a l l . p a g e n a m e . v a l u e = " "  
 d o c u m e n t . a l l . m n u m b e r . v a l u e = " "  
 s t o p s h o w ( )  
 }  
  
  
 f u n c t i o n   m u k t a k R e f ( w r i t e r , c o m m e n t , s e n d e r ) {  
  
 v a r   r e f = ' < t a b l e   c l a s s = " d e t t a b l e "   w i d t h = " 9 0 0 "   s t y l e = " b o r d e r - c o l l a p s e :   c o l l a p s e "   b o r d e r c o l o r = " # 1 1 1 1 1 1 "   c e l l p a d d i n g = " 2 "   c e l l s p a c i n g = " 0 " > < t r > < t d   w i d t h = " 1 6 6 "   c l a s s = " h e a d c e l l "   a l i g n = " r i g h t " > 2	G			/ 2	G		?		>	  : < / t d > < t d   w i d t h = " 6 9 4 "   c l a s s = " w r i t e r " > 	.	@	0	  	A	8	0	K	  < / t d > < / t r > < t r > < t d   w i d t h = " 1 6 6 "   c l a s s = " h e a d c e l l "   a l i g n = " r i g h t " > 	?	*	M	*	#	@	  /   8		&	0	M	-	  : < / t d > < t d   w i d t h = " 6 9 4 "   c l a s s = " c o m m e n t s " > & n b s p ; < / t d > < / t r > < t r > < t d   w i d t h = " 1 6 6 "   c l a s s = " h e a d c e l l "   a l i g n = " r i g h t " > *	M	0	G	7		  : < / t d > < t d   w i d t h = " 6 9 4 "   c l a s s = " s u b m i t t e r " > < s p a n   l a n g = " e n - u s " > 2	2	?	$	  	A	.	>	0	< / s p a n > < / t d > < / t r > < / t a b l e > '  
  
 d o c u m e n t . w r i t e ( r e f ) ;  
 }  
  
 
