ÿþv a r   p i c w i n = 0 ;                                         / *   g l o b a l e   p i c w i n - V a r i a b l e   * /  
  
  
 / *   F e n s t e r   s c h l i e s s e n :   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   * /  
 f u n c t i o n   c l o s e _ p i c t u r e ( )  
 {  
     i f   ( p i c w i n )                                                             / *   w e n n   e x i s t e n t   * /  
         i f   ( ! p i c w i n . c l o s e d )                                     / *   w e n n   n o c h   o f f e n   * /  
             p i c w i n . c l o s e ( ) ;                                                         / *   m a c h   z u   * /  
 }  
  
 / *   F e n s t e r   o e f f n e n :   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   * /  
 f u n c t i o n   o P i c ( p i c n a m e , b g c o l o r )  
 {  
  
     c l o s e _ p i c t u r e ( ) ;                                                               / *   m a c h   z u   * /  
     i f   ( ! b g c o l o r )    
         b g c o l o r = " # F F F F F F " ;  
  
     p i c w i n = o p e n ( " " , " p i c w i n " , " w i d t h = 7 0 0 , h e i g h t = 5 0 0 , r e s i z a b l e = y e s , s t a t u s = n o , t o o l b a r = n o , m e n u b a r = n o , l o c a t i o n = n o , a d d r e s s = n o , s c r o l l b a r s = y e s " ) ;  
     p i c w i n . d o c u m e n t . o p e n ( " t e x t / h t m l " , " r e p l a c e " ) ;    
     p i c w i n . d o c u m e n t . w r i t e ( " < h t m l > \ n < h e a d > \ n " ) ;  
     p i c w i n . d o c u m e n t . w r i t e ( " < t i t l e > A r c h i t e k t u r   N a w r a t   "   +   p i c n a m e   +   " < / t i t l e > \ n " ) ;  
     p i c w i n . d o c u m e n t . w r i t e ( " < / h e a d > \ n " ) ;  
     p i c w i n . d o c u m e n t . w r i t e ( " < b o d y   o n L o a d = \ " o p e n e r . p i c t u r e _ s i z e ( w i n d o w , 0 ) \ " " ) ;  
     p i c w i n . d o c u m e n t . w r i t e ( "   s t y l e = \ " b a c k g r o u n d : " + b g c o l o r + " ;   m a r g i n : 0 p x ;   p a d d i n g : 1 0 p x ; \ " > \ n " ) ;  
     p i c w i n . d o c u m e n t . w r i t e ( " < p   a l i g n = c e n t e r > < i m g   s r c = \ " " ) ;  
     p i c w i n . d o c u m e n t . w r i t e ( p i c n a m e   +   " \ " " ) ;  
  
     v a r   b i l d   =   n e w   I m a g e ( ) ;  
     b i l d . s r c   =   p i c n a m e ;    
  
     i f   ( ( b i l d . w i d t h > s c r e e n . w i d t h - 5 0 )   | |   ( b i l d . h e i g h t > s c r e e n . h e i g h t - 8 0 ) )   {  
 	 i f   ( ( ( s c r e e n . w i d t h   -   5 0 )   /   b i l d . w i d t h   )     <  
                     ( ( s c r e e n . h e i g h t   -   8 2 )   /   b i l d . h e i g h t ) )    
 	 {  
 	         p i c w i n . d o c u m e n t . w r i t e ( "   w i d t h =   7 0 0 " ) 	 / * ( "   w i d t h = \ " "   +   ( s c r e e n . w i d t h - 1 0 0 ) ) ; * /  
 	 }   e l s e   {  
 	         p i c w i n . d o c u m e n t . w r i t e ( "   h e i g h t = 5 0 0 " ) 	 / * ( "   h e i g h t = \ " "   +   ( s c r e e n . h e i g h t - 1 0 0 ) ) ; * /  
 	 }  
     }  
     p i c w i n . d o c u m e n t . w r i t e ( "   h s p a c e = \ " 0 \ "   v s p a c e = \ " 0 \ " > < / p > " ) ;  
     p i c w i n . d o c u m e n t . w r i t e ( " < / b o d y > \ n < / h t m l > " ) ;  
 	 / *   D o k u m e n t   s c h l i e s s e n :   * /  
     p i c w i n . d o c u m e n t . c l o s e ( ) ;  
  
 }  
  
 / *   F e n s t e r d a t e n   e v a l u i e r e n   u n d   F e n s t e r g r o e s s e   s e t z e n :   - - - - -   * /  
 f u n c t i o n   p i c t u r e _ s i z e ( p i c w i n , i m g n u m )  
 {  
     v a r   i m a g e = p i c w i n . d o c u m e n t . i m a g e s [ i m g n u m ] ;  
     v a r   a u f l X = ( s c r e e n . w i d t h - i m a g e . w i d t h - 5 0 ) / 2 ;  
     v a r   a u f l Y = ( s c r e e n . h e i g h t - i m a g e . h e i g h t - 8 5 ) / 2 ;  
     v a r   l = i m a g e . w i d t h + 1 0 0 ;  
     v a r   h = i m a g e . h e i g h t + 1 6 2 ;  
  
     i f   ( i m a g e . w i d t h < 1 )  
     {  
         t h i s . s e t T i m e o u t ( " p i c t u r e _ s i z e ( p i c w i n , " + i m g n u m + " ) ; " , 2 0 0 ) ;  
         r e t u r n ;  
     }  
  
     p i c w i n . r e s i z e T o ( l , h - 3 0 ) ;  
     p i c w i n . m o v e T o ( a u f l X , a u f l Y ) ;  
  
     p i c w i n . f o c u s ( ) ;  
 }  
 
