ÿþ 
  
 f u n c t i o n   G e t Q u e s t i o n ( I D ,   L a n g ,   T y p e ,   R o w I D ,   P a r e n t I D ,   A n s w e r )   {  
         / /   f u n c t i o n   G e t Q u e s t i o n ( I D )   {  
          
         v a r   t e m p l a t e   =   " < d i v   c l a s s = ' q u e s t i o n T i t l e C o n t e n t ' > < d i v   c l a s s = ' q u e s t i o n T i t l e ' > @ t i t l e @ < / d i v > < d i v   c l a s s = ' b u t t o n Y e s '   s t y l e = ' b u t t o n Y e s _ 1 '   o n c l i c k = ' G e t Q u e s t i o n ( @ Y E S I D @ , "   +   L a n g   +   " , "   +   T y p e   +   " , "   +   R o w I D   +   " , "   +   I D   +   " , - 2 ) ' > @ Y e s A n s w e r @ < / d i v > < d i v   i d = ' b u t t o n N o '     c l a s s = ' b u t t o n N o '   s t y l e = ' b u t t o n N o _ 1 '   o n c l i c k = ' G e t Q u e s t i o n ( @ N O I D @ , "   +   L a n g   +   " , "   +   T y p e   +   " , "   +   R o w I D   +   " , "   +   I D   +   " , - 3 ) ' > @ N o A n s w e r @ < / d i v > < / d i v > " ;  
         v a r   w e b M e t h o d   =   ' V o t i n g Q u e s t i o n s . a s m x / G e t Q u e s t i o n ' ;  
         v a r   p a r a m e t e r s   =   " { ' Q u e s t i o n I D ' : "   +   I D   +   " , ' L a n g ' : "   +   L a n g   +   " , ' T y p e ' : "   +   T y p e   +   " , ' R o w I D ' : "   +   R o w I D   +   " , ' P a r e n t I D ' : "   +   P a r e n t I D   +   " , ' A n s w e r ' : "   +   A n s w e r   +   " } " ;  
         / /       v a r   p a r a m e t e r s   =   " { ' Q u e s t i o n I D ' : "   +   I D   +   " , ' L a n g ' : 1 , ' T y p e ' : 0 , ' R o w I D ' : 0 } " ;  
         $ . a j a x ( {  
                 t y p e :   " P O S T " ,  
                 c o n t e n t T y p e :   " a p p l i c a t i o n / j s o n ;   c h a r s e t = u t f - 8 " ,  
                 u r l :   w e b M e t h o d ,  
                 d a t a :   p a r a m e t e r s ,  
                 d a t a T y p e :   " j s o n " ,  
                 s u c c e s s :   f u n c t i o n ( r e s p o n s e )   {  
                         v a r   g e t I t e m   =   r e s p o n s e . d ;  
  
                         i f   ( L a n g   = =   1 )   {  
                                 t e m p l a t e   =   t e m p l a t e . r e p l a c e ( " @ Y e s A n s w e r @ " ,   " Y e s " ) ;  
                                 t e m p l a t e   =   t e m p l a t e . r e p l a c e ( " @ N o A n s w e r @ " ,   " N o " ) ;  
                         }  
  
                         i f   ( L a n g   = =   2 )   {  
                                 t e m p l a t e   =   t e m p l a t e . r e p l a c e ( " @ Y e s A n s w e r @ " ,   " F9E" ) ;  
                                 t e m p l a t e   =   t e m p l a t e . r e p l a c e ( " @ N o A n s w e r @ " ,   " D'" ) ;  
                         }  
  
  
                         i f   ( g e t I t e m . Y e s   = =   - 4 )   {  
                                 t e m p l a t e   =   t e m p l a t e . r e p l a c e ( " b u t t o n Y e s _ 1 " ,   " d i s p l a y : n o n e " ) ;  
                         }  
                         e l s e   {  
                                 t e m p l a t e   =   t e m p l a t e . r e p l a c e ( " @ Y E S I D @ " ,   g e t I t e m . Y e s ) ;  
                         }  
  
                         i f   ( g e t I t e m . N o   = =   - 4 )   {  
                                 t e m p l a t e   =   t e m p l a t e . r e p l a c e ( " b u t t o n N o _ 1 " ,   " d i s p l a y : n o n e " ) ;  
                         }  
                         e l s e   {  
                                 t e m p l a t e   =   t e m p l a t e . r e p l a c e ( " @ N O I D @ " ,   g e t I t e m . N o ) ;  
                         }  
  
                      
  
                         t e m p l a t e   =   t e m p l a t e . r e p l a c e ( " @ t i t l e @ " ,   g e t I t e m . Q u e s t i o n ) ;  
                         i f   ( I D   >   0 )   {  
                                 $ ( " # q u e s t i o n C o n t e n t " ) . c s s ( " d i s p l a y " ,   " b l o c k " ) ;  
                                 $ ( " # q u e s t i o n C o n t e n t " ) . a n i m a t e ( {   o p a c i t y :   0   } ) ;  
                                  
                         }  
  
                         s e t T i m e o u t (  
                             f u n c t i o n ( )   {  
                         $ ( " # q u e s t i o n C o n t e n t " ) . c s s ( " d i s p l a y " ,   " b l o c k " ) ;  
                                     $ ( " # q u e s t i o n C o n t e n t " ) . h t m l ( t e m p l a t e ) ;  
                             } ,   3 0 0 ) ;  
  
                         i f   ( I D   >   0 )   {  
                                 $ ( " # q u e s t i o n C o n t e n t " ) . a n i m a t e ( {   o p a c i t y :   1 0   } ) ;  
                         }  
  
                 } ,  
                 e r r o r :   f u n c t i o n ( e )   {  
  
                 }  
         } ) ;  
 }  
  
 $ . f n . w a i t   =   f u n c t i o n ( t i m e ,   t y p e )   {  
         t i m e   =   t i m e   | |   1 0 0 0 ;  
         t y p e   =   t y p e   | |   " f x " ;  
         r e t u r n   t h i s . q u e u e ( t y p e ,   f u n c t i o n ( )   {  
                 v a r   s e l f   =   t h i s ;  
                 s e t T i m e o u t ( f u n c t i o n ( )   {  
                         $ ( s e l f ) . d e q u e u e ( ) ;  
                 } ,   t i m e ) ;  
         } ) ;  
 } ; 
