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