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