ÿþf u n c t i o n   R O b j ( e a ) { v a r   L S = " " ; v a r   Q S = n e w   O b j e c t ( ) ; v a r   u n = " u n d e f i n e d " ; v a r   x = n u l l ; v a r   f = " f u n c t i o n " ; v a r   n = " n u m b e r " ; v a r   r = " s t r i n g " ; v a r   e 1 = " E R R O R : I n d e x   o u t   o f   r a n g e   i n \ r \ n R e q u e s t . Q u e r y S t r i n g " ; v a r   e 2 = " E R R O R : W r o n g   n u m b e r   o f   a r g u m e n t s   o r   i n v a l i d   p r o p e r t y   a s s i g n m e n t \ r \ n R e q u e s t . Q u e r y S t r i n g " ; v a r   e 3 = " E R R O R : O b j e c t   d o e s n ' t   s u p p o r t   t h i s   p r o p e r t y   o r   m e t h o d \ r \ n R e q u e s t . Q u e r y S t r i n g . K e y " ; v a r   d U = w i n d o w . d e c o d e U R I C o m p o n e n t ? 1 : 0 ;  
 f u n c t i o n   E r r ( a r g ) { i f ( e a ) { a l e r t ( " R e q u e s t   O b j e c t : \ r \ n " + a r g ) } } ;  
 f u n c t i o n   U R I D ( t ) { v a r   d = " " ; i f ( t ) { f o r ( v a r   i = 0 ; i < t . l e n g t h ; + + i ) { v a r   c = t . c h a r A t ( i ) ; d + = ( c = = " + " ? "   " : c ) } } r e t u r n ( d U ? d e c o d e U R I C o m p o n e n t ( d ) : u n e s c a p e ( d ) ) } ;  
 f u n c t i o n   O L ( o ) { v a r   l = 0 ; f o r ( v a r   i   i n   o ) { i f ( t y p e o f   o [ i ] ! = f ) { l + + } } ; r e t u r n   l } ;  
 f u n c t i o n   A K ( k e y ) { v a r   a u k = t r u e ; f o r ( v a r   u   i n   Q S ) { i f ( t y p e o f   Q S [ u ] ! = f & & u . t o S t r i n g ( ) . t o L o w e r C a s e ( ) = = k e y . t o L o w e r C a s e ( ) ) { a u k = f a l s e ; r e t u r n   u } } i f ( a u k ) { Q S [ k e y ] = n e w   O b j e c t ( ) ; Q S [ k e y ] . t o S t r i n g = f u n c t i o n ( ) { r e t u r n   T S ( Q S [ k e y ] ) } ; Q S [ k e y ] . C o u n t = f u n c t i o n ( ) { r e t u r n   O L ( Q S [ k e y ] ) } ; Q S [ k e y ] . C o u n t . t o S t r i n g = f u n c t i o n ( ) { r e t u r n   O L ( Q S [ k e y ] ) . t o S t r i n g ( ) } ; Q S [ k e y ] . I t e m = f u n c t i o n ( e ) { i f ( t y p e o f   e = = u n ) { r e t u r n   Q S [ k e y ] } e l s e   { i f ( t y p e o f   e = = n ) { v a r   a = Q S [ k e y ] [ M a t h . c e i l ( e ) ] ; i f ( t y p e o f   a = = u n ) { E r r ( e 1 + " ( \ " " + k e y + " \ " ) . I t e m ( " + e + " ) " ) } ; r e t u r n   a } e l s e   { E r r ( " E R R O R : E x p e c t i n g   n u m e r i c   i n p u t   i n \ r \ n R e q u e s t . Q u e r y S t r i n g ( \ " " + k e y + " \ " ) . I t e m ( \ " " + e + " \ " ) " ) } } } ; Q S [ k e y ] . I t e m . t o S t r i n g = f u n c t i o n ( e ) { i f ( t y p e o f   e = = u n ) { r e t u r n   Q S [ k e y ] . t o S t r i n g ( ) } e l s e   { v a r   a = Q S [ k e y ] [ e ] ; i f ( t y p e o f   a = = u n ) { E r r ( e 1 + " ( \ " " + k e y + " \ " ) . I t e m ( " + e + " ) " ) } ; r e t u r n   a . t o S t r i n g ( ) } } ; Q S [ k e y ] . K e y = f u n c t i o n ( e ) { v a r   t = t y p e o f   e ; i f ( t = = r ) { v a r   a = Q S [ k e y ] [ e ] ; r e t u r n ( t y p e o f   a ! = u n & & a & & a . t o S t r i n g ( ) ? e : " " ) } e l s e   { E r r ( e 3 + " ( " + ( e ? e : " " ) + " ) " ) } } ; Q S [ k e y ] . K e y . t o S t r i n g = f u n c t i o n ( ) { r e t u r n   x } } ; r e t u r n   k e y } ;  
 f u n c t i o n   A V T K ( k e y , v a l ) { i f ( k e y ! = " " ) { v a r   k e y = A K ( k e y ) ; v a r   l = O L ( Q S [ k e y ] ) ; Q S [ k e y ] [ l + 1 ] = v a l } } ;  
 f u n c t i o n   T S ( o ) { v a r   s = " " ; f o r ( v a r   i   i n   o ) { v a r   t y = t y p e o f   o [ i ] ; i f ( t y = = " o b j e c t " ) { s + = T S ( o [ i ] ) } e l s e   i f ( t y ! = f ) { s + = o [ i ] + " ,   " } } ; v a r   l = s . l e n g t h ; i f ( l > 1 ) { r e t u r n ( s . s u b s t r i n g ( 0 , l - 2 ) ) } r e t u r n ( s = = " " ? x : s ) } ;  
 f u n c t i o n   K M ( k , o ) { v a r   k = k . t o L o w e r C a s e ( ) ; f o r ( v a r   u   i n   o ) { i f ( t y p e o f   o [ u ] ! = f & & u . t o S t r i n g ( ) . t o L o w e r C a s e ( ) = = k ) { r e t u r n   u } } } i f ( w i n d o w . l o c a t i o n & & w i n d o w . l o c a t i o n . s e a r c h ) { L S = w i n d o w . l o c a t i o n . s e a r c h ; v a r   l = L S . l e n g t h ; i f ( l > 0 ) { L S = L S . s u b s t r i n g ( 1 , l ) ; v a r   p r e A m p A t = 0 ; v a r   a m p A t = - 1 ; v a r   e q A t = - 1 ; v a r   k = 0 ; v a r   s k i p = f a l s e ; f o r ( v a r   i = 0 ; i < l ; + + i ) { v a r   c = L S . c h a r A t ( i ) ; i f ( L S . c h a r A t ( p r e A m p A t ) = = " = " | | ( p r e A m p A t = = 0 & & i = = 0 & & c = = " = " ) ) { s k i p = t r u e } i f ( c = = " = " & & e q A t = = - 1 & & ! s k i p ) { e q A t = i } i f ( c = = " & " & & a m p A t = = - 1 ) { i f ( e q A t ! = - 1 ) { a m p A t = i } i f ( s k i p ) { p r e A m p A t = i + 1 } ; s k i p = f a l s e } i f ( a m p A t > e q A t ) { A V T K ( U R I D ( L S . s u b s t r i n g ( p r e A m p A t , e q A t ) ) , U R I D ( L S . s u b s t r i n g ( e q A t + 1 , a m p A t ) ) ) ; p r e A m p A t = a m p A t + 1 ; e q A t = a m p A t = - 1 ; + + k } } i f ( L S . c h a r A t ( p r e A m p A t ) ! = " = " & & ( p r e A m p A t ! = 0 | | i ! = 0 | | c ! = " = " ) ) { i f ( p r e A m p A t ! = l ) { i f ( e q A t ! = - 1 ) { A V T K ( U R I D ( L S . s u b s t r i n g ( p r e A m p A t , e q A t ) ) , U R I D ( L S . s u b s t r i n g ( e q A t + 1 , l ) ) ) } e l s e   i f ( p r e A m p A t ! = l - 1 ) { A V T K ( U R I D ( L S . s u b s t r i n g ( p r e A m p A t , l ) ) , " " ) } } i f ( l = = 1 ) { A V T K ( L S . s u b s t r i n g ( 0 , 1 ) , " " ) } } } } ; v a r   T C = O L ( Q S ) ; i f ( ! T C ) { T C = 0 } ; Q S . t o S t r i n g = f u n c t i o n ( ) { r e t u r n   L S . t o S t r i n g ( ) } ; Q S . C o u n t = f u n c t i o n ( ) { r e t u r n ( T C ? T C : 0 ) } ; Q S . C o u n t . t o S t r i n g = f u n c t i o n ( ) { r e t u r n ( T C ? T C . t o S t r i n g ( ) : " 0 " ) } ; Q S . I t e m = f u n c t i o n ( e ) { i f ( t y p e o f   e = = u n ) { r e t u r n   L S } e l s e   { i f ( t y p e o f   e = = n ) { v a r   e = M a t h . c e i l ( e ) ; v a r   c = 0 ; f o r ( v a r   i   i n   Q S ) { i f ( t y p e o f   Q S [ i ] ! = f & & + + c = = e ) { r e t u r n   Q S [ i ] } } ; E r r ( e 1 + " ( ) . I t e m ( " + e + " ) " ) } e l s e   { r e t u r n   Q S [ K M ( e , Q S ) ] } } ; r e t u r n   x } ; Q S . I t e m . t o S t r i n g = f u n c t i o n ( ) { r e t u r n   L S . t o S t r i n g ( ) } ; Q S . K e y = f u n c t i o n ( e ) { v a r   t = t y p e o f   e ; i f ( t = = n ) { v a r   e = M a t h . c e i l ( e ) ; v a r   c = 0 ; f o r ( v a r   i   i n   Q S ) { i f ( t y p e o f   Q S [ i ] ! = f & & + + c = = e ) { r e t u r n   i } } } e l s e   i f ( t = = r ) { v a r   e = K M ( e , Q S ) ; v a r   a = Q S [ e ] ; r e t u r n ( t y p e o f   a ! = u n & & a & & a . t o S t r i n g ( ) ? e : " " ) } e l s e   { E r r ( e 2 + " ( ) . K e y ( " + ( e ? e : " " ) + " ) " ) } ; E r r ( e 1 + " ( ) . I t e m ( " + e + " ) " ) } ; Q S . K e y . t o S t r i n g = f u n c t i o n ( ) { E r r ( e 2 + " ( ) . K e y " ) } ; t h i s . Q u e r y S t r i n g = f u n c t i o n ( k ) { i f ( t y p e o f   k = = u n ) { r e t u r n   Q S } e l s e   { i f ( t y p e o f   k = = n ) { r e t u r n   Q S . I t e m ( k ) } ; v a r   k = K M ( k , Q S ) ; i f ( t y p e o f   Q S [ k ] = = u n ) { t = n e w   O b j e c t ( ) ; t . C o u n t = f u n c t i o n ( ) { r e t u r n   0 } ; t . C o u n t . t o S t r i n g = f u n c t i o n ( ) { r e t u r n   " 0 " } ; t . t o S t r i n g = f u n c t i o n ( ) { r e t u r n   x } ; t . I t e m = f u n c t i o n ( e ) { r e t u r n   x } ; t . I t e m . t o S t r i n g = f u n c t i o n ( ) { r e t u r n   x } ; t . K e y = f u n c t i o n ( e ) { E r r ( e 3 + " ( " + ( e ? e : " " ) + " ) " ) } ; t . K e y . t o S t r i n g = f u n c t i o n ( ) { r e t u r n   x } ; r e t u r n   t } e l s e   { r e t u r n   Q S [ k ] } } } ; t h i s . Q u e r y S t r i n g . t o S t r i n g = f u n c t i o n ( ) { r e t u r n   L S . t o S t r i n g ( ) } ; t h i s . Q u e r y S t r i n g . C o u n t = f u n c t i o n ( ) { r e t u r n ( T C ? T C : 0 ) } ; t h i s . Q u e r y S t r i n g . C o u n t . t o S t r i n g = f u n c t i o n ( ) { r e t u r n ( T C ? T C . t o S t r i n g ( ) : " 0 " ) } ; t h i s . Q u e r y S t r i n g . I t e m = f u n c t i o n ( e ) { i f ( t y p e o f   e = = u n ) { r e t u r n   L S . t o S t r i n g ( ) } e l s e   { i f ( t y p e o f   e = = n ) { v a r   e = M a t h . c e i l ( e ) ; v a r   c = 0 ; f o r ( v a r   i   i n   Q S ) { i f ( t y p e o f   Q S [ i ] ! = f & & + + c = = e ) { r e t u r n   Q S [ i ] } } ; E r r ( e 1 + " . I t e m ( " + e + " ) " ) } e l s e   { r e t u r n   Q S [ K M ( e , Q S ) ] } } i f ( t y p e o f   e = = n ) { E r r ( e 1 + " . I t e m ( " + e + " ) " ) } ; r e t u r n   x } ; t h i s . Q u e r y S t r i n g . I t e m . t o S t r i n g = f u n c t i o n ( ) { r e t u r n   L S . t o S t r i n g ( ) } ; t h i s . Q u e r y S t r i n g . K e y = f u n c t i o n ( e ) { v a r   t = t y p e o f   e ; i f ( t = = n ) { v a r   e = M a t h . c e i l ( e ) ; v a r   c = 0 ; f o r ( v a r   i   i n   Q S ) { i f ( t y p e o f   Q S [ i ] = = " o b j e c t " & & ( + + c = = e ) ) { r e t u r n   i } } } e l s e   i f ( t = = r ) { v a r   e = K M ( e , Q S ) ; v a r   a = Q S [ e ] ; r e t u r n ( t y p e o f   a ! = u n & & a & & a . t o S t r i n g ( ) ? e : " " ) } e l s e   { E r r ( e 2 + " . K e y ( " + ( e ? e : " " ) + " ) " ) } ; E r r ( e 1 + " . I t e m ( " + e + " ) " ) } ; t h i s . Q u e r y S t r i n g . K e y . t o S t r i n g = f u n c t i o n ( ) { E r r ( e 2 + " . K e y " ) } ; t h i s . V e r s i o n = 1 . 4 ; t h i s . A u t h o r = " A n d r e w   U r q u h a r t   ( h t t p : / / a n d r e w u . c o . u k ) " } ; v a r   R e q u e s t = n e w   R O b j ( f a l s e ) ;  
 f u n c t i o n   c o n t r o l j a v a ( ) { v a r   b b = d o c u m e n t . g e t E l e m e n t B y I d ( ' t i t l e a s l i ' ) ; b b . i n n e r H T M L = ' /1Ì'A*  F1E  'A2'1' ; b b . s t y l e . f o n t S i z e = ' 2 0 p t ' ; b b . s t y l e . f o n t W e i g h t = ' 7 0 0 ' ; t i t l e a s l i . s t y l e . c o l o r = ' # F F F F F F ' } ;  
 f u n c t i o n   l o a d i f r a m e ( ) { v a r   a = R e q u e s t . Q u e r y S t r i n g ( " p g l o a d " ) ; i f ( S t r i n g ( a ) ! = " n u l l " ) { f r a m e s . i f r m . l o c a t i o n . h r e f = a + " . h t m ? r a n d = " + M a t h . r a n d o m ( ) } e l s e { f r a m e s . i f r m . l o c a t i o n . h r e f = " n e w d o w n l o a d . h t m ? r a n d = " + M a t h . r a n d o m ( ) } } ;  
 
