ÿþf u n c t i o n   a l i g n ( )   {   v a r   l m t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c e n t r a g e ' ) ;   v a r   c o n t a i n e r   =   d o c u m e n t . d o c u m e n t E l e m e n t ;   i f ( l m t   & &   c o n t a i n e r )   {   v a r   c o n t a i n e r H e i g h t ;   i f   ( c o n t a i n e r . i n n e r W i d t h )   {   c o n t a i n e r H e i g h t   =   c o n t a i n e r . i n n e r H e i g h t ;   }   e l s e   {   c o n t a i n e r H e i g h t   =   c o n t a i n e r . c l i e n t H e i g h t ;   }   v a r   l m t H e i g h t ;   i f   ( l m t . i n n e r W i d t h )   {   l m t H e i g h t   =   l m t . i n n e r H e i g h t ;   }   e l s e   {   l m t H e i g h t   =   l m t . o f f s e t H e i g h t ;   }   v a r   y   =   M a t h . c e i l ( ( c o n t a i n e r H e i g h t   -   l m t H e i g h t )   /   2 ) ;   i f ( y   <   0 )   {   y   =   0 ;   }   l m t . s t y l e . p o s i t i o n   =   " r e l a t i v e " ;   l m t . s t y l e . t o p   =   y   +   " p x " ;   }   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 . b o d y . s t y l e . v i s i b i l i t y   =   ' v i s i b l e ' ;   }   }   f u n c t i o n   a d d e v e n t ( o b j , e v t , f n , c a p t ) {   i f ( o b j . a d d E v e n t L i s t e n e r )   {   o b j . a d d E v e n t L i s t e n e r ( e v t ,   f n ,   c a p t ) ;   r e t u r n   t r u e ;   }   e l s e   i f ( o b j . a t t a c h E v e n t )   {   o b j . a t t a c h E v e n t ( ' o n ' + e v t ,   f n ) ;   r e t u r n   t r u e ;   }   e l s e   r e t u r n   f a 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 s B y T a g N a m e )   {   a d d e v e n t ( w i n d o w ,   ' l o a d ' ,   a l i g n ,   f a l s e ) ;   a d d e v e n t ( w i n d o w ,   ' r e s i z e ' ,   a l i g n ,   f a l s e ) ;   }  
 
