ÿþ 
  
 / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  
                         D a t e  
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /  
  
 f u n c t i o n   m a k e A r r a y ( )   {  
         f o r   ( i   =   0 ;   i < m a k e A r r a y . a r g u m e n t s . l e n g t h ;   i + + )  
                 t h i s [ i   +   1 ]   =   m a k e A r r a y . a r g u m e n t s [ i ] ;  
 }  
  
 f u n c t i o n   m a k e A r r a y 0 ( )   {  
         f o r   ( i   =   0 ;   i < m a k e A r r a y 0 . a r g u m e n t s . l e n g t h ;   i + + )  
                 t h i s [ i ]   =   m a k e A r r a y 0 . a r g u m e n t s [ i ] ;  
 }  
  
 f u n c t i o n   y 2 k ( n u m b e r )   {   r e t u r n   ( n u m b e r   <   1 0 0 0 )   ?   n u m b e r   +   1 9 0 0   :   n u m b e r ;   }  
  
 v a r   m o n t h s   =   n e w   m a k e A r r a y ( ' / 1 / ' , ' / 2 / ' , ' / 3 / ' , ' / 4 / ' , ' / 5 / ' , ' / 6 / ' , ' / 7 / ' , ' / 8 / ' , ' / 9 / ' , ' / 1 0 / ' , ' / 1 1 / ' , ' / 1 2 / ' ) ;  
 v a r   d a y s   =   n e w   m a k e A r r a y 0 ( ' C h ç  N h ­t ' , ' T h é  H a i ' , ' T h é  B a ' , ' T h é  T °' , ' T h é  N m ' , ' T h é  S á u ' , ' T h é  B £y ' ) ;  
  
 v a r   t o d a y   =   n e w   D a t e ( ) ;  
 v a r   d a y       =   d a y s [ t o d a y . g e t D a y ( ) ] ;  
 v a r   d a t e     =   t o d a y . g e t D a t e ( ) ;  
 v a r   m o n t h   =   t o d a y . g e t M o n t h ( )   +   1 ;  
 v a r   y e a r     =   y 2 k ( t o d a y . g e t Y e a r ( ) ) ;  
  
 f u n c t i o n   d i s p l a y D a t e ( )  
 {  
 	 d o c u m e n t . w r i t e ( d a y   +   ' ,   '   +   d a t e   +   '   ' +   m o n t h s [ m o n t h ]   +   '   ' +   y e a r ) ;  
 }  
  
 f u n c t i o n   d i s p l a y T i m e ( ) {  
   i f   ( ! d o c u m e n t . l a y e r s & & ! 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  
   v a r   D i g i t a l = n e w   D a t e ( )  
   v a r   h o u r s = D i g i t a l . g e t H o u r s ( )  
   v a r   m i n u t e s = D i g i t a l . g e t M i n u t e s ( )  
   v a r   s e c o n d s = D i g i t a l . g e t S e c o n d s ( )  
   v a r   d n = " A M "    
   i f   ( h o u r s > 1 2 ) {  
   d n = " P M "  
   h o u r s = h o u r s - 1 2  
   }  
   i f   ( h o u r s = = 0 )  
   h o u r s = 1 2  
   i f   ( m i n u t e s < = 9 )  
   m i n u t e s = " 0 " + m i n u t e s  
   i f   ( s e c o n d s < = 9 )  
   s e c o n d s = " 0 " + s e c o n d s  
 m y c l o c k = h o u r s + " : " + m i n u t e s + " : "  
   + s e c o n d s + "   " + d n + " < / b > < / f o n t > "  
 i f   ( d o c u m e n t . l a y e r s ) {  
 d o c u m e n t . l a y e r s . l i v e c l o c k . d o c u m e n t . w r i t e ( m y c l o c k )  
 d o c u m e n t . l a y e r s . l i v e c l o c k . d o c u m e n t . c l o s e ( )  
 }  
 e l s e   i f   ( d o c u m e n t . a l l )  
 l i v e c l o c k . i n n e r H T M L = m y c l o c k  
 e l s e   i f   ( d o c u m e n t . g e t E l e m e n t B y I d )  
 d o c u m e n t . g e t E l e m e n t B y I d ( " l i v e c l o c k " ) . i n n e r H T M L = m y c l o c k  
 s e t T i m e o u t ( " d i s p l a y T i m e ( ) " , 1 0 0 0 )  
   }  
    
   / /   C r e a t e d   b y :   R o b e r t   S u p p e n b a c h   : : w e b d e v e l . d e e z h o s t s . n e t  
  
 v a r   t o S c r o l l = n e w   A r r a y ( )  
 v a r   i e = d o c u m e n t . a l l  
 v a r   d o m = d o c u m e n t . g e t E l e m e n t B y I d  
 v a r   f i r s t N e w s _ o b j ;  
 v a r   s e c o n d N e w s _ o b j ;  
  
 f u n c t i o n   n e w s S c r o l l ( n a m e ) {  
     v a r   c = t h i s ;   c . n a m e = n a m e ;   c . m c = 0 ;   c . i = 2 ;  
     r e t u r n   t h i s ;  
 }  
  
 n e w s S c r o l l . p r o t o t y p e . a d d I t e m   =   f u n c t i o n ( t e x t , l i n k , f o n t , f o n t S i z e , f o n t S t y l e ) {  
     v a r   c   =   t h i s ;  
     i f   ( l i n k   ! = ' ' ) {  
         i f   ( f o n t   ! =   ' ' )  
             t o S c r o l l [ c . m c ] = " < a   h r e f = ' " + l i n k + " ' > < f o n t   f a c e = ' " + f o n t + " '   s i z e = ' " + f o n t S i z e + " '   C l a s s = ' " + f o n t S t y l e + " ' > " + t e x t + " < / f o n t > < / a > " ;  
         e l s e  
             t o S c r o l l [ c . m c ] = " < a   h r e f = ' " + l i n k + " ' > < f o n t   C l a s s = ' " + f o n t S t y l e + " ' > " + t e x t + " < / f o n t > < / a > " ;  
     }  
     e l s e   {    
         i f   ( f o n t   ! =   ' ' )  
             t o S c r o l l [ c . m c ] = " < f o n t   f a c e = ' " + f o n t + " '   s i z e = ' " + f o n t S i z e + " '   C l a s s = ' " + f o n t S t y l e + " ' > " + t e x t + " < / f o n t > " ;  
         e l s e  
             t o S c r o l l [ c . m c ] = " < f o n t   C l a s s = ' " + f o n t S t y l e + " ' > " + t e x t + " < / f o n t > " ;  
     }  
     c . m c + + ;  
 }  
  
 n e w s S c r o l l . p r o t o t y p e . c o n s t r u c t   =   f u n c t i o n ( ) {  
     v a r   c   =   t h i s ;   t h e W i d t h   =   c . s c r o l l e r w i d t h ;   t h e H e i g h t = c . s c r o l l e r h e i g h t ;   t h e b g C o l o r   =   c . s c r o l l e r b g c o l o r ;   t h e B a c k g r o u n d   = c . s c r o l l e r b a c k g r o u n d ;   t h e D e l a y = c . s c r o l l e r d e l a y ;  
     s c r o l l _ o b j = e v a l ( c . n a m e ) ;                  
     i f   ( i e | | d o m ) {  
         d o c u m e n t . w r i t e l n ( ' < d i v   i d = " m a i n 2 "   s t y l e = " p o s i t i o n : r e l a t i v e ; w i d t h : ' + t h e W i d t h + ' ; h e i g h t : ' + t h e H e i g h t + ' ; o v e r f l o w : h i d d e n ; b a c k g r o u n d - c o l o r : ' + t h e b g C o l o r + '   ; b a c k g r o u n d - i m a g e : u r l ( ' + t h e B a c k g r o u n d + ' ) " > ' )  
         d o c u m e n t . w r i t e l n ( ' < d i v   s t y l e = " p o s i t i o n : a b s o l u t e ; w i d t h : ' + t h e W i d t h + ' ; h e i g h t : ' + t h e H e i g h t + ' ; c l i p : r e c t ( 0   ' + t h e W i d t h + '   ' + t h e H e i g h t + '   0 ) ; l e f t : 0 ; t o p : 0 " > ' )  
         d o c u m e n t . w r i t e l n ( ' < d i v   i d = " f i r s t N e w s "   s t y l e = " p o s i t i o n : a b s o l u t e ; w i d t h : ' + t h e W i d t h + ' ; l e f t : 0 ; t o p : 1 " > ' )  
         d o c u m e n t . w r i t e ( t o S c r o l l [ 0 ] )  
         d o c u m e n t . w r i t e l n ( ' < / d i v > ' )  
         d o c u m e n t . w r i t e l n ( ' < d i v   i d = " s e c o n d N e w s "   s t y l e = " p o s i t i o n : a b s o l u t e ; w i d t h : ' + t h e W i d t h + ' ; l e f t : 0 ; t o p : 0 ; v i s i b i l i t y : h i d d e n " > ' )  
         d o c u m e n t . w r i t e ( t o S c r o l l [ d y n d e t e r m i n e = ( t o S c r o l l . l e n g t h = = 1 ) ?   0   :   1 ] )  
         d o c u m e n t . w r i t e l n ( ' < / d i v > ' )  
         d o c u m e n t . w r i t e l n ( ' < / d i v > ' )  
         d o c u m e n t . w r i t e l n ( ' < / d i v > ' )  
     }  
 }  
  
 n e w s S c r o l l . p r o t o t y p e . m o v e   =   f u n c t i o n ( w h i c h d i v ) {  
     v a r   c   =   t h i s ;   t h e D e l a y   =   c . s c r o l l e r d e l a y ;   t h e H e i g h t   =   c . s c r o l l e r h e i g h t ;    
     s c r o l l _ o b j = e v a l ( c . n a m e ) ;  
     t d i v = e v a l ( w h i c h d i v )  
  
     i f   ( p a r s e I n t ( t d i v . s t y l e . t o p ) > 0 & & p a r s e I n t ( t d i v . s t y l e . t o p ) < = 5 ) {  
         t d i v . s t y l e . t o p = 0 + " p x "  
         s e t T i m e o u t ( " s c r o l l _ o b j . m o v e ( t d i v ) " , t h e D e l a y )  
         s e t T i m e o u t ( " s c r o l l _ o b j . m o v e 2 ( s e c o n d N e w s _ o b j ) " , t h e D e l a y )  
         / / d o c u m e n t . w r i t e ( ' G o t   M i l k ? ' )  
     r e t u r n  
     }  
     i f   ( p a r s e I n t ( t d i v . s t y l e . t o p ) > = t d i v . o f f s e t H e i g h t * - 1 ) {  
         t d i v . s t y l e . t o p = p a r s e I n t ( t d i v . s t y l e . t o p ) - 5 + " p x "  
         s e t T i m e o u t ( " s c r o l l _ o b j . m o v e ( t d i v ) " , 5 0 )  
     }  
     e l s e   {  
         t d i v . s t y l e . t o p = p a r s e I n t ( t h e H e i g h t ) + " p x "  
         t d i v . i n n e r H T M L = t o S c r o l l [ c . i ]  
         i f   ( c . i = = t o S c r o l l . l e n g t h - 1 )  
             c . i = 0  
         e l s e  
             c . i + +  
     }  
 }  
  
 n e w s S c r o l l . p r o t o t y p e . m o v e 2   =   f u n c t i o n ( w h i c h d i v ) {  
     v a r   c   =   t h i s ;   t h e D e l a y   =   c . s c r o l l e r d e l a y ;   t h e H e i g h t =   c . s c r o l l e r h e i g h t ;  
     s c r o l l _ o b j = e v a l ( c . n a m e ) ;  
     t d i v 2 = e v a l ( w h i c h d i v )  
  
     i f   ( p a r s e I n t ( t d i v 2 . s t y l e . t o p ) > 0 & & p a r s e I n t ( t d i v 2 . s t y l e . t o p ) < = 5 ) {  
         t d i v 2 . s t y l e . t o p = 0 + " p x "  
         s e t T i m e o u t ( " s c r o l l _ o b j . m o v e 2 ( t d i v 2 ) " , t h e D e l a y )  
         s e t T i m e o u t ( " s c r o l l _ o b j . m o v e ( f i r s t N e w s _ o b j ) " , t h e D e l a y )  
         r e t u r n  
     }  
     i f   ( p a r s e I n t ( t d i v 2 . s t y l e . t o p ) > = t d i v 2 . o f f s e t H e i g h t * - 1 ) {  
         t d i v 2 . s t y l e . t o p = p a r s e I n t ( t d i v 2 . s t y l e . t o p ) - 5 + " p x "  
         s e t T i m e o u t ( " s c r o l l _ o b j . m o v e 2 ( s e c o n d N e w s _ o b j ) " , 5 0 )  
     }  
     e l s e   {  
         t d i v 2 . s t y l e . t o p = p a r s e I n t ( t h e H e i g h t ) + " p x "  
         t d i v 2 . i n n e r H T M L = t o S c r o l l [ c . i ]  
         i f   ( c . i = = t o S c r o l l . l e n g t h - 1 )  
             c . i = 0  
         e l s e  
             c . i + +  
     }  
 }  
  
 n e w s S c r o l l . p r o t o t y p e . s t a r t S c r o l l   =   f u n c t i o n ( ) {  
     v a r   c   =   t h i s ;  
     s c r o l l _ o b j = e v a l ( c . n a m e ) ;                  
      
     i f   ( t o S c r o l l . l e n g t h   > 2 )  
         c . i   =   2 ;  
     e l s e  
         c . i   =   0 ;  
      
     f i r s t N e w s _ o b j = i e ?   f i r s t N e w s   :   d o c u m e n t . g e t E l e m e n t B y I d ( " f i r s t N e w s " )  
     s e c o n d N e w s _ o b j = i e ?   s e c o n d N e w s   :   d o c u m e n t . g e t E l e m e n t B y I d ( " s e c o n d N e w s " )  
     s e t T i m e o u t ( " s c r o l l _ o b j . m o v e ( f i r s t N e w s _ o b j ) " , c . s c r o l l e r D e l a y ) ;  
     s e c o n d N e w s _ o b j . s t y l e . t o p = t h e H e i g h t ;  
     s e c o n d N e w s _ 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 '  
 } 
