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