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