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