ÿþ/ / p r e - l o a d   i m a g e s  
 v a r   I m g 1   =   n e w   I m a g e ( ) ;  
 I m g 1 . s r c   =   ' . / i m a g e s / l o g o s / v n a . p n g ' ;  
 v a r   I m g 2   =   n e w   I m a g e ( ) ;  
 I m g 2 . s r c   =   ' . / i m a g e s / l o g o s / N C C . p n g ' ;  
 v a r   I m g 3   =   n e w   I m a g e ( ) ;  
 I m g 3 . s r c   =   ' . / i m a g e s / l o g o s / r o t a b l a t o r . j p g ' ;  
 v a r   I m g 4   =   n e w   I m a g e ( ) ;  
 I m g 4 . s r c   =   ' # ' ;  
 v a r   I m g 5   =   n e w   I m a g e ( ) ;  
 I m g 5 . s r c   =   ' . / i m a g e s / l o g o s / a a d v . g i f ' ;  
 v a r   I m g 6   =   n e w   I m a g e ( ) ;  
 I m g 6 . s r c   =   ' . / i m a g e s / l o g o s / g r a n d - o p e n i n g . j p g ' ;  
 v a r   I m g 7   =   n e w   I m a g e ( ) ;  
 I m g 7 . s r c   =   ' . / i m a g e s / l o g o s / G S P _ s m . j p g ' ;  
  
  
 f u n c t i o n   R i g h t ( s t r ,   n )   {  
         i f   ( n   < =   0 )  
                 r e t u r n   " " ;  
         e l s e   i f   ( n   >   S t r i n g ( s t r ) . l e n g t h )  
                 r e t u r n   s t r ;  
         e l s e   {  
                 v a r   i L e n   =   S t r i n g ( s t r ) . l e n g t h ;  
                 r e t u r n   S t r i n g ( s t r ) . s u b s t r i n g ( i L e n ,   i L e n   -   n ) ;  
         }  
 }  
  
 f u n c t i o n   m a k e N e w s ( c ,   l ,   f ,   i )   {  
         t h i s . c o p y   =   c ;  
         t h i s . l i n k   =   l ;  
         t h i s . f o l l o w   =   f ;  
         t h i s . i m g   =   i ;  
         t h i s . w r i t e   =   w r i t e N e w s ;  
 }  
  
 f u n c t i o n   w r i t e N e w s ( )   {  
         v a r   s t r   =   ' ' ;  
         i f   ( R i g h t ( t h i s . i m g . s r c , 1 )   ! =   " # " )   {  
                 s t r   + =   ' < a   h r e f = " '   +   t h i s . l i n k   +   ' " t a r g e t = " _ b l a n k " > ' ;  
                 s t r   + =   ' < i m g   c l a s s = " c e n t e r e d I m a g e "   b o r d e r = " 0 "   s r c = " '   +   t h i s . i m g . s r c   +   ' " > < / a > ' ;  
         }  
         s t r   + =   t h i s . c o p y ;  
         i f   ( t h i s . l i n k   ! =   " # " )   {  
                 s t r   + =   ' < b r / > < a   h r e f = " '   +   t h i s . l i n k   +   ' "   t a r g e t = " _ b l a n k " > '   +   t h i s . f o l l o w   +   ' < / a > ' ;  
         }  
         r e t u r n   s t r ;  
 }  
  
 v a r   n e w s A r r a y   =   n e w   A r r a y ( ) ;  
 / / n e w s A r r a y [ 0 ]   =   n e w   m a k e N e w s ( " 2 n d   T a m   D u c   S c i e n t i f i c   D a y   f o r   C a r d i o v a s c u l a r   D i s e a s e   & n d a s h ;   1 0 t h   O c t o b e r   2 0 0 9 < b r / > " ,   ' h t t p : / / w w w . t a m d u c h e a r t h o s p i t a l . c o m / t i n k h a c - h o i t h a o . h t m l ' ,   ' M o r e   I n f o ' ,   I m g 1 ) . w r i t e ( ) ;  
 n e w s A r r a y [ 0 ]   =   n e w   m a k e N e w s ( " N e w l y   o b t a i n e d   G o o d   S t o r a g e   P r a c t i c e   ( G S P )   c e r t i f i c a t i o n   b y   V i e t n a m   M i n i s t r y   o f   H e a l t h < b r / > " ,   ' h t t p : / / w w w . h o a n g d u c . n e t / i m a g e s / l o g o s / G S P . j p g ' ,   ' ' ,   I m g 7 ) . w r i t e ( ) ;  
 / / n e w s A r r a y [ 1 ]   =   n e w   m a k e N e w s ( " 3 r d   N a t i o n a l   C o n g r e s s   o f   I n t e r v e n t i o n a l   C a r d i o l o g y < u l > < l i > H o s t :   V i e t n a m   N a t i o n a l   H e a r t   A s s o c i a t i o n < / l i > < l i > E x p e c t e d   T i m e :   1 4 - 1 5   O c t o b e r ,   2 0 0 9 < / l i > < l i > V e n u e :   M e l i a   H a n o i   H o t e l   & a m p ;   C o n v e n t i o n   C e n t e r   < a   h r e f = ' h t t p : / / w w w . m e l i a h a n o i . c o m '   t a r g e t = ' _ b l a n k ' > w w w . m e l i a h a n o i . c o m < / a > < / l i > < l i > H o a n g   D u c & # 8 2 1 7 ; s   s p o n s o r i n g   1 5 K   U S D   f o r   t h i s   e v e n t   ( S i l v e r   s p o n s o r ) < / l i > < / u l > " ,   ' # ' ,   ' ' ,   I m g 2 ) . w r i t e ( ) ;  
 / / n e w s A r r a y [ 1 ]   =   n e w   m a k e N e w s ( " H o a n g   D u c   i s   o p e n i n g   a   n e w   b r a n c h   i n   D a   N a n g   O c t   2 0 1 0 < u l > < l i > A d d r e s s :     6 0   L ê   L ãi ,   P h °Ýn g   T h ¡c h   T h a n g      Q u ­n   H £i   C h â u ,   T P .   à   N µn g . < / l i > < l i > P h o n e :     0 5 1 1 3   8 3 8   1 1 1 < / l i > < l i > F a x   :     0 5 1 1 3   8 3 8   9 6 8 < / l i > < / u l > < b r / > " ,   ' # ' ,   ' ' ,   I m g 6 ) . w r i t e ( ) ;  
  
 / / n e w s A r r a y [ 2 ]   =   n e w   m a k e N e w s ( " H o a n g   D u c   d o n a t e s   a   R o t a b l a t o r   s y s t e m   t o   C h o   R a y   h o s p i t a l   & m d a s h ;   a   2 0 K   U S D   v a l u e < b r / > " ,   ' # ' ,   ' ' ,   I m g 3 ) . w r i t e ( ) ;  
 / / n e w s A r r a y [ 1 ]   =   n e w   m a k e N e w s ( " S a t e l l i t e   M e e t i n g   L A D S   2 0 0 9 < u l   s t y l e = ' l i s t - s t y l e - t y p e : n o n e ; ' > < l i > I n c o r p o r a t i n g   t h e   I n a u g u r a l   M e e t i n g   o f   t h e   A s i a n   A c a d e m y   o f   D e r m a t o l o g y   & a m p ;   V e n e r e o l o g y < / l i > < l i > 6 t h   t o   7 t h   N o v e m b e r   2 0 0 9 < / l i > < l i > H a n o i ,   V i e t n a m < / l i > < / u l > " ,   ' h t t p : / / w w w . a s i a n d e r m . o r g /   ' ,   ' M o r e   I n f o ' ,   I m g 5 ) . w r i t e ( ) ;  
 / / n e w s A r r a y [ 2 ]   =   n e w   m a k e N e w s ( " D r .   J o a c h i m   M i r o   w o r k s h o p   S e p   3 0   & n d a s h ;   O c t   1   i n   H C M C < b r / > " ,   ' # ' ,   ' ' ,   I m g 4 ) . w r i t e ( ) ;  
  
 v a r   n I n d e x   =   0 ;  
 v a r   t i m e r I D   =   n u l l ;  
 f u n c t i o n   r o t a t e N e w s ( ) {  
 	 v a r   l e n   =   n e w s A r r a y . l e n g t h ;  
 	 i f ( n I n d e x   > =   l e n )  
 	 	 n I n d e x   =   0 ;  
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' s t o r i e s ' ) . i n n e r H T M L   =   n e w s A r r a y [ n I n d e x ] ;  
 	 n I n d e x + + ;  
 	 t i m e r I D   =   s e t T i m e o u t ( ' r o t a t e N e w s ( ) ' , 6 0 0 0 ) ;  
 }  
 f u n c t i o n   p a u s e N e w s ( )   {  
 	 i f   ( t i m e r I D   ! =   n u l l )   {  
 	 	 c l e a r T i m e o u t ( t i m e r I D ) ;  
 	 	 t i m e r I D   =   n u l l ;  
 	 	 d o c u m e n t . b o d y . s t y l e . c u r s o r   =   ' p r o g r e s s ' ;  
 	 }  
 }  
  
 f u n c t i o n   p l a y N e w s ( )   {  
 	 i f   ( t i m e r I D   = =   n u l l )   {  
 	         t i m e r I D   =   s e t T i m e o u t ( ' r o t a t e N e w s ( ) ' ,   1 0 0 0 ) ;  
 	         d o c u m e n t . b o d y . s t y l e . c u r s o r   =   ' d e f a u l t ' ;  
 	 }  
 }  
 
