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