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