ÿþ< ! - -   P a s t e   t h i s   c o d e   i n t o   a n   e x t e r n a l   J a v a S c r i p t   f i l e   n a m e d :   c e n t e r e d P o p u p . j s     - - >  
  
 / *   T h i s   s c r i p t   a n d   m a n y   m o r e   a r e   a v a i l a b l e   f r e e   o n l i n e   a t  
 T h e   J a v a S c r i p t   S o u r c e   : :   h t t p : / / j a v a s c r i p t . i n t e r n e t . c o m  
 U p d a t e d   b y :   M i k e   W e i n e r   : :   h t t p : / / w w w . w e a r e b e n t . c o m    
 O r i g i n a l   a u t h o r :   E r i c   K i n g   ( e r i c _ a n d r e w _ k i n g @ h o t m a i l . c o m )  
 L a s t   U p d a t e d :   M a y   2 0 0 6  
  
 C h a n g e s :   A d d e d   p a r a m e t e r s   f o r   o p t i o n a l   s c r o l l b a r s ,   r e s i z a b l i l i t y ,  
 m e n u b a r ,   t o o l b a r ,   a d d r e s s b a r ,   s t a t u s b a r ,   f u l l s c r e e n .   A l s o   t w e a k e d   t h e  
 i m p l e m e n t a t i o n   a   b i t   -   l i n k s   w i l l   n o w   g i v e   t h e   u s e r   a   p o p u p   w i n d o w  
 e v e n   i f   J a v a S c r i p t   i s   d i s a b l e d .  
  
 N o t e s :   S o m e   p a r a m e t e r s   a r e   n o t   c r o s s - b r o w s e r   c a p a b l e   ( e . g .   f u l l s c r e e n ) .  
 B r o w s e r s   t h a t   d o   n o t   s u p p o r t   t h e s e   a b i l i t i e s   w i l l   i g n o r e   t h e m .  
  
 U s a g e :   T h e   l i n k   i s   w r i t t e n   a s   f o l l o w s :    
 o n c l i c k = " n e w W i n d o w ( t h i s . h r e f ,   ' p o p u p ' ,   6 0 0 ,   5 0 0 ,   1 ,   1 ,   0 ,   0 ,   0 ,   1 ,   0 ) ;  
  
 U s a g e   D e s c r i p t i o n :  
 " t h i s . h r e f "   r e f e r s   t o   t h e   U R L   g i v e n   i n   t h e   " a "   t a g ;   " ' p o p u p ' "   i s   t h e   n a m e   o f   t h e   p o p u p   w i n d o w ;  
 6 0 0   i s   t h e   w i d t h   o f   t h e   p o p u p   w i n d o w ;   5 0 0   i s   t h e   h e i g h t   o f   t h e   p o p u p   w i n d o w ;   t h e   n u m b e r s   t h a t  
 f o l l o w   d e s i g n a t e   w h e t h e r   a   p r o p e r t y   i s   t u r n e d   o n   ( " 1 " )   o r   o f f   ( " 0 " ) ,   i n   t h i s   o r d e r :  
 s c r o l l b a r s ,   r e s i z a b l e ,   m e n u b a r ,   t o o l b a r ,   a d d r e s s b a r ,   s t a t u s b a r ,   f u l l s c r e e n  
 * /  
  
 f u n c t i o n   n e w W i n d o w ( a _ s t r _ w i n d o w U R L ,   a _ s t r _ w i n d o w N a m e ,   a _ i n t _ w i n d o w W i d t h ,   a _ i n t _ w i n d o w H e i g h t ,   a _ b o o l _ s c r o l l b a r s ,   a _ b o o l _ r e s i z a b l e ,   a _ b o o l _ m e n u b a r ,   a _ b o o l _ t o o l b a r ,   a _ b o o l _ a d d r e s s b a r ,   a _ b o o l _ s t a t u s b a r ,   a _ b o o l _ f u l l s c r e e n )   {  
     v a r   i n t _ w i n d o w L e f t   =   ( s c r e e n . w i d t h   -   a _ i n t _ w i n d o w W i d t h )   /   2 ;  
     v a r   i n t _ w i n d o w T o p   =   ( s c r e e n . h e i g h t   -   a _ i n t _ w i n d o w H e i g h t )   /   2 ;  
     v a r   s t r _ w i n d o w P r o p e r t i e s   =   ' h e i g h t = '   +   a _ i n t _ w i n d o w H e i g h t   +   ' , w i d t h = '   +   a _ i n t _ w i n d o w W i d t h   +   ' , t o p = '   +   i n t _ w i n d o w T o p   +   ' , l e f t = '   +   i n t _ w i n d o w L e f t   +   ' , s c r o l l b a r s = '   +   a _ b o o l _ s c r o l l b a r s   +   ' , r e s i z a b l e = '   +   a _ b o o l _ r e s i z a b l e   +   ' , m e n u b a r = '   +   a _ b o o l _ m e n u b a r   +   ' , t o o l b a r = '   +   a _ b o o l _ t o o l b a r   +   ' , l o c a t i o n = '   +   a _ b o o l _ a d d r e s s b a r   +   ' , s t a t u s b a r = '   +   a _ b o o l _ s t a t u s b a r   +   ' , f u l l s c r e e n = '   +   a _ b o o l _ f u l l s c r e e n   +   ' ' ;  
     v a r   o b j _ w i n d o w   =   w i n d o w . o p e n ( a _ s t r _ w i n d o w U R L ,   a _ s t r _ w i n d o w N a m e ,   s t r _ w i n d o w P r o p e r t i e s )  
         i f   ( p a r s e I n t ( n a v i g a t o r . a p p V e r s i o n )   > =   4 )   {  
             o b j _ w i n d o w . w i n d o w . f o c u s ( ) ;  
         }  
 }  
 
