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