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