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