ÿþ/ /   J a v a S c r i p t   D o c u m e n t 
 
 / /   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   v a l i d a z i o n e   d a t a 
 
 v a r   M O N T H _ N A M E S = n e w   A r r a y ( ' J a n u a r y ' , ' F e b r u a r y ' , ' M a r c h ' , ' A p r i l ' , ' M a y ' , ' J u n e ' , ' J u l y ' , ' A u g u s t ' , ' S e p t e m b e r ' , ' O c t o b e r ' , ' N o v e m b e r ' , ' D e c e m b e r ' , ' J a n ' , ' F e b ' , ' M a r ' , ' A p r ' , ' M a y ' , ' J u n ' , ' J u l ' , ' A u g ' , ' S e p ' , ' O c t ' , ' N o v ' , ' D e c ' ) ; v a r   D A Y _ N A M E S = n e w   A r r a y ( ' S u n d a y ' , ' M o n d a y ' , ' T u e s d a y ' , ' W e d n e s d a y ' , ' T h u r s d a y ' , ' F r i d a y ' , ' S a t u r d a y ' , ' S u n ' , ' M o n ' , ' T u e ' , ' W e d ' , ' T h u ' , ' F r i ' , ' S a t ' ) ; 
 
 f u n c t i o n   L Z ( x ) { r e t u r n ( x < 0 | | x > 9 ? " " : " 0 " ) + x } 
 
 f u n c t i o n   i s D a t e ( v a l , f o r m a t ) { v a r   d a t e = g e t D a t e F r o m F o r m a t ( v a l , f o r m a t ) ; i f ( d a t e = = 0 ) { r e t u r n   f a l s e ; } r e t u r n   t r u e ; } 
 
 f u n c t i o n   c o m p a r e D a t e s ( d a t e 1 , d a t e f o r m a t 1 , d a t e 2 , d a t e f o r m a t 2 ) { v a r   d 1 = g e t D a t e F r o m F o r m a t ( d a t e 1 , d a t e f o r m a t 1 ) ; v a r   d 2 = g e t D a t e F r o m F o r m a t ( d a t e 2 , d a t e f o r m a t 2 ) ; i f ( d 1 = = 0   | |   d 2 = = 0 ) { r e t u r n   - 1 ; } e l s e   i f ( d 1   >   d 2 ) { r e t u r n   1 ; } r e t u r n   0 ; } 
 
 f u n c t i o n   f o r m a t D a t e ( d a t e , f o r m a t ) { f o r m a t = f o r m a t + " " ; v a r   r e s u l t = " " ; v a r   i _ f o r m a t = 0 ; v a r   c = " " ; v a r   t o k e n = " " ; v a r   y = d a t e . g e t Y e a r ( ) + " " ; v a r   M = d a t e . g e t M o n t h ( ) + 1 ; v a r   d = d a t e . g e t D a t e ( ) ; v a r   E = d a t e . g e t D a y ( ) ; v a r   H = d a t e . g e t H o u r s ( ) ; v a r   m = d a t e . g e t M i n u t e s ( ) ; v a r   s = d a t e . g e t S e c o n d s ( ) ; v a r   y y y y , y y , M M M , M M , d d , h h , h , m m , s s , a m p m , H H , H , K K , K , k k , k ; v a r   v a l u e = n e w   O b j e c t ( ) ; i f ( y . l e n g t h   <   4 ) { y = " " + ( y - 0 + 1 9 0 0 ) ; } v a l u e [ " y " ] = " " + y ; v a l u e [ " y y y y " ] = y ; v a l u e [ " y y " ] = y . s u b s t r i n g ( 2 , 4 ) ; v a l u e [ " M " ] = M ; v a l u e [ " M M " ] = L Z ( M ) ; v a l u e [ " M M M " ] = M O N T H _ N A M E S [ M - 1 ] ; v a l u e [ " N N N " ] = M O N T H _ N A M E S [ M + 1 1 ] ; v a l u e [ " d " ] = d ; v a l u e [ " d d " ] = L Z ( d ) ; v a l u e [ " E " ] = D A Y _ N A M E S [ E + 7 ] ; v a l u e [ " E E " ] = D A Y _ N A M E S [ E ] ; v a l u e [ " H " ] = H ; v a l u e [ " H H " ] = L Z ( H ) ; i f ( H = = 0 ) { v a l u e [ " h " ] = 1 2 ; } e l s e   i f ( H > 1 2 ) { v a l u e [ " h " ] = H - 1 2 ; } e l s e { v a l u e [ " h " ] = H ; } v a l u e [ " h h " ] = L Z ( v a l u e [ " h " ] ) ; i f ( H > 1 1 ) { v a l u e [ " K " ] = H - 1 2 ; } e l s e { v a l u e [ " K " ] = H ; } v a l u e [ " k " ] = H + 1 ; v a l u e [ " K K " ] = L Z ( v a l u e [ " K " ] ) ; v a l u e [ " k k " ] = L Z ( v a l u e [ " k " ] ) ; i f ( H   >   1 1 ) { v a l u e [ " a " ] = " P M " ; } e l s e { v a l u e [ " a " ] = " A M " ; } v a l u e [ " m " ] = m ; v a l u e [ " m m " ] = L Z ( m ) ; v a l u e [ " s " ] = s ; v a l u e [ " s s " ] = L Z ( s ) ; w h i l e ( i _ f o r m a t   <   f o r m a t . l e n g t h ) { c = f o r m a t . c h a r A t ( i _ f o r m a t ) ; t o k e n = " " ; w h i l e ( ( f o r m a t . c h a r A t ( i _ f o r m a t ) = = c )   & & ( i _ f o r m a t   <   f o r m a t . l e n g t h ) ) { t o k e n   + =   f o r m a t . c h a r A t ( i _ f o r m a t + + ) ; } i f ( v a l u e [ t o k e n ]   ! =   n u l l ) { r e s u l t = r e s u l t   +   v a l u e [ t o k e n ] ; } e l s e { r e s u l t = r e s u l t   +   t o k e n ; } } r e t u r n   r e s u l t ; } 
 
 f u n c t i o n   _ i s I n t e g e r ( v a l ) { v a r   d i g i t s = " 1 2 3 4 5 6 7 8 9 0 " ; f o r ( v a r   i = 0 ; i   <   v a l . l e n g t h ; i + + ) { i f ( d i g i t s . i n d e x O f ( v a l . c h a r A t ( i ) ) = = - 1 ) { r e t u r n   f a l s e ; } } r e t u r n   t r u e ; } 
 
 f u n c t i o n   _ g e t I n t ( s t r , i , m i n l e n g t h , m a x l e n g t h ) { f o r ( v a r   x = m a x l e n g t h ; x > = m i n l e n g t h ; x - - ) { v a r   t o k e n = s t r . s u b s t r i n g ( i , i + x ) ; i f ( t o k e n . l e n g t h   <   m i n l e n g t h ) { r e t u r n   n u l l ; } i f ( _ i s I n t e g e r ( t o k e n ) ) { r e t u r n   t o k e n ; } } r e t u r n   n u l l ; } 
 
 f u n c t i o n   g e t D a t e F r o m F o r m a t ( v a l , f o r m a t ) { v a l = v a l + " " ; f o r m a t = f o r m a t + " " ; v a r   i _ v a l = 0 ; v a r   i _ f o r m a t = 0 ; v a r   c = " " ; v a r   t o k e n = " " ; v a r   t o k e n 2 = " " ; v a r   x , y ; v a r   n o w = n e w   D a t e ( ) ; v a r   y e a r = n o w . g e t Y e a r ( ) ; v a r   m o n t h = n o w . g e t M o n t h ( ) + 1 ; v a r   d a t e = 1 ; v a r   h h = n o w . g e t H o u r s ( ) ; v a r   m m = n o w . g e t M i n u t e s ( ) ; v a r   s s = n o w . g e t S e c o n d s ( ) ; v a r   a m p m = " " ; w h i l e ( i _ f o r m a t   <   f o r m a t . l e n g t h ) { c = f o r m a t . c h a r A t ( i _ f o r m a t ) ; t o k e n = " " ; w h i l e ( ( f o r m a t . c h a r A t ( i _ f o r m a t ) = = c )   & & ( i _ f o r m a t   <   f o r m a t . l e n g t h ) ) { t o k e n   + =   f o r m a t . c h a r A t ( i _ f o r m a t + + ) ; } i f ( t o k e n = = " y y y y "   | |   t o k e n = = " y y "   | |   t o k e n = = " y " ) { i f ( t o k e n = = " y y y y " ) { x = 4 ; y = 4 ; } i f ( t o k e n = = " y y " ) { x = 2 ; y = 2 ; } i f ( t o k e n = = " y " ) { x = 2 ; y = 4 ; } y e a r = _ g e t I n t ( v a l , i _ v a l , x , y ) ; i f ( y e a r = = n u l l ) { r e t u r n   0 ; } i _ v a l   + =   y e a r . l e n g t h ; i f ( y e a r . l e n g t h = = 2 ) { i f ( y e a r   >   7 0 ) { y e a r = 1 9 0 0 + ( y e a r - 0 ) ; } e l s e { y e a r = 2 0 0 0 + ( y e a r - 0 ) ; } } } e l s e   i f ( t o k e n = = " M M M " | | t o k e n = = " N N N " ) { m o n t h = 0 ; f o r ( v a r   i = 0 ; i < M O N T H _ N A M E S . l e n g t h ; i + + ) { v a r   m o n t h _ n a m e = M O N T H _ N A M E S [ i ] ; i f ( v a l . s u b s t r i n g ( i _ v a l , i _ v a l + m o n t h _ n a m e . l e n g t h ) . t o L o w e r C a s e ( ) = = m o n t h _ n a m e . t o L o w e r C a s e ( ) ) { i f ( t o k e n = = " M M M " | | ( t o k e n = = " N N N " & & i > 1 1 ) ) { m o n t h = i + 1 ; i f ( m o n t h > 1 2 ) { m o n t h   - =   1 2 ; } i _ v a l   + =   m o n t h _ n a m e . l e n g t h ; b r e a k ; } } } i f ( ( m o n t h   <   1 ) | | ( m o n t h > 1 2 ) ) { r e t u r n   0 ; } } e l s e   i f ( t o k e n = = " E E " | | t o k e n = = " E " ) { f o r ( v a r   i = 0 ; i < D A Y _ N A M E S . l e n g t h ; i + + ) { v a r   d a y _ n a m e = D A Y _ N A M E S [ i ] ; i f ( v a l . s u b s t r i n g ( i _ v a l , i _ v a l + d a y _ n a m e . l e n g t h ) . t o L o w e r C a s e ( ) = = d a y _ n a m e . t o L o w e r C a s e ( ) ) { i _ v a l   + =   d a y _ n a m e . l e n g t h ; b r e a k ; } } } e l s e   i f ( t o k e n = = " M M " | | t o k e n = = " M " ) { m o n t h = _ g e t I n t ( v a l , i _ v a l , t o k e n . l e n g t h , 2 ) ; i f ( m o n t h = = n u l l | | ( m o n t h < 1 ) | | ( m o n t h > 1 2 ) ) { r e t u r n   0 ; } i _ v a l + = m o n t h . l e n g t h ; } e l s e   i f ( t o k e n = = " d d " | | t o k e n = = " d " ) { d a t e = _ g e t I n t ( v a l , i _ v a l , t o k e n . l e n g t h , 2 ) ; i f ( d a t e = = n u l l | | ( d a t e < 1 ) | | ( d a t e > 3 1 ) ) { r e t u r n   0 ; } i _ v a l + = d a t e . l e n g t h ; } e l s e   i f ( t o k e n = = " h h " | | t o k e n = = " h " ) { h h = _ g e t I n t ( v a l , i _ v a l , t o k e n . l e n g t h , 2 ) ; i f ( h h = = n u l l | | ( h h < 1 ) | | ( h h > 1 2 ) ) { r e t u r n   0 ; } i _ v a l + = h h . l e n g t h ; } e l s e   i f ( t o k e n = = " H H " | | t o k e n = = " H " ) { h h = _ g e t I n t ( v a l , i _ v a l , t o k e n . l e n g t h , 2 ) ; i f ( h h = = n u l l | | ( h h < 0 ) | | ( h h > 2 3 ) ) { r e t u r n   0 ; } i _ v a l + = h h . l e n g t h ; } e l s e   i f ( t o k e n = = " K K " | | t o k e n = = " K " ) { h h = _ g e t I n t ( v a l , i _ v a l , t o k e n . l e n g t h , 2 ) ; i f ( h h = = n u l l | | ( h h < 0 ) | | ( h h > 1 1 ) ) { r e t u r n   0 ; } i _ v a l + = h h . l e n g t h ; } e l s e   i f ( t o k e n = = " k k " | | t o k e n = = " k " ) { h h = _ g e t I n t ( v a l , i _ v a l , t o k e n . l e n g t h , 2 ) ; i f ( h h = = n u l l | | ( h h < 1 ) | | ( h h > 2 4 ) ) { r e t u r n   0 ; } i _ v a l + = h h . l e n g t h ; h h - - ; } e l s e   i f ( t o k e n = = " m m " | | t o k e n = = " m " ) { m m = _ g e t I n t ( v a l , i _ v a l , t o k e n . l e n g t h , 2 ) ; i f ( m m = = n u l l | | ( m m < 0 ) | | ( m m > 5 9 ) ) { r e t u r n   0 ; } i _ v a l + = m m . l e n g t h ; } e l s e   i f ( t o k e n = = " s s " | | t o k e n = = " s " ) { s s = _ g e t I n t ( v a l , i _ v a l , t o k e n . l e n g t h , 2 ) ; i f ( s s = = n u l l | | ( s s < 0 ) | | ( s s > 5 9 ) ) { r e t u r n   0 ; } i _ v a l + = s s . l e n g t h ; } e l s e   i f ( t o k e n = = " a " ) { i f ( v a l . s u b s t r i n g ( i _ v a l , i _ v a l + 2 ) . t o L o w e r C a s e ( ) = = " a m " ) { a m p m = " A M " ; } e l s e   i f ( v a l . s u b s t r i n g ( i _ v a l , i _ v a l + 2 ) . t o L o w e r C a s e ( ) = = " p m " ) { a m p m = " P M " ; } e l s e { r e t u r n   0 ; } i _ v a l + = 2 ; } e l s e { i f ( v a l . s u b s t r i n g ( i _ v a l , i _ v a l + t o k e n . l e n g t h ) ! = t o k e n ) { r e t u r n   0 ; } e l s e { i _ v a l + = t o k e n . l e n g t h ; } } } i f ( i _ v a l   ! =   v a l . l e n g t h ) { r e t u r n   0 ; } i f ( m o n t h = = 2 ) { i f (   ( ( y e a r % 4 = = 0 ) & & ( y e a r % 1 0 0   ! =   0 )   )   | | ( y e a r % 4 0 0 = = 0 )   ) { i f ( d a t e   >   2 9 ) { r e t u r n   0 ; } } e l s e { i f ( d a t e   >   2 8 ) { r e t u r n   0 ; } } } i f ( ( m o n t h = = 4 ) | | ( m o n t h = = 6 ) | | ( m o n t h = = 9 ) | | ( m o n t h = = 1 1 ) ) { i f ( d a t e   >   3 0 ) { r e t u r n   0 ; } } i f ( h h < 1 2   & &   a m p m = = " P M " ) { h h = h h - 0 + 1 2 ; } e l s e   i f ( h h > 1 1   & &   a m p m = = " A M " ) { h h - = 1 2 ; } v a r   n e w d a t e = n e w   D a t e ( y e a r , m o n t h - 1 , d a t e , h h , m m , s s ) ; r e t u r n   n e w d a t e . g e t T i m e ( ) ; } 
 
 f u n c t i o n   p a r s e D a t e ( v a l ) { v a r   p r e f e r E u r o = ( a r g u m e n t s . l e n g t h = = 2 ) ? a r g u m e n t s [ 1 ] : f a l s e ; g e n e r a l F o r m a t s = n e w   A r r a y ( ' y - M - d ' , ' M M M   d ,   y ' , ' M M M   d , y ' , ' y - M M M - d ' , ' d - M M M - y ' , ' M M M   d ' ) ; m o n t h F i r s t = n e w   A r r a y ( ' M / d / y ' , ' M - d - y ' , ' M . d . y ' , ' M M M - d ' , ' M / d ' , ' M - d ' ) ; d a t e F i r s t   = n e w   A r r a y ( ' d / M / y ' , ' d - M - y ' , ' d . M . y ' , ' d - M M M ' , ' d / M ' , ' d - M ' ) ; v a r   c h e c k L i s t = n e w   A r r a y ( ' g e n e r a l F o r m a t s ' , p r e f e r E u r o ? ' d a t e F i r s t ' : ' m o n t h F i r s t ' , p r e f e r E u r o ? ' m o n t h F i r s t ' : ' d a t e F i r s t ' ) ; v a r   d = n u l l ; f o r ( v a r   i = 0 ; i < c h e c k L i s t . l e n g t h ; i + + ) { v a r   l = w i n d o w [ c h e c k L i s t [ i ] ] ; f o r ( v a r   j = 0 ; j < l . l e n g t h ; j + + ) { d = g e t D a t e F r o m F o r m a t ( v a l , l [ j ] ) ; i f ( d ! = 0 ) { r e t u r n   n e w   D a t e ( d ) ; } } } r e t u r n   n u l l ; } 
 
 
 
 f u n c t i o n   a g g i u n g i _ i t i n ( ) { 
 
 	 v a r   s = d o c u m e n t . g e t E l e m e n t B y I d ( " t i p o _ i t i n " ) ; 
 
         s . o p t i o n s [ s . o p t i o n s . l e n g t h ]   =   n e w   O p t i o n ( d o c u m e n t . g e t E l e m e n t B y I d ( " n u o v o _ i n i t " ) . 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 ( " n u o v o _ i n i t " ) . v a l u e ) ; 
 
         s . s e l e c t e d I n d e x = s . o p t i o n s . l e n g t h - 1 ; 
 
 } 
 
 
 
 f u n c t i o n   n a s c o n d i _ 2 0 k m ( ) { 
 
 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " t u t t o " ) . c h e c k e d ) 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " k m 2 0 " ) . s t y l e . v i s i b i l i t y = ' h i d d e n ' ; 
 
 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 ( " k m 2 0 " ) . s t y l e . v i s i b i l i t y = ' v i s i b l e ' ; 
 
 } 
 
 
 
 f u n c t i o n   n u o v o _ t i p o ( ) { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " n u o v o _ i t " ) . s t y l e . v i s i b i l i t y = ' v i s i b l e ' ; 
 
 } 
 
 
 
 f u n c t i o n   i n v i a _ n e w s l e t t e r ( ) { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " n e w s l e t t e r " ) . a c t i o n = " a d m i n _ n e w s l e t t e r . p h p " ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " n e w s l e t t e r " ) . t a r g e t = " _ s e l f " ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " n e w s l e t t e r " ) . I n v i a . v a l u e = " I n v i a " ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " n e w s l e t t e r " ) . s u b m i t ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   a n t e p r i m a _ n e w s l e t t e r ( ) { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " n e w s l e t t e r " ) . a c t i o n = " a n t e p r i m a _ n e w s l e t t e r . p h p " ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " n e w s l e t t e r " ) . t a r g e t = " _ b l a n k " ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " n e w s l e t t e r " ) . s u b m i t ( ) ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " n e w s l e t t e r " ) . a c t i o n = " a d m i n _ n e w s l e t t e r . p h p " ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " n e w s l e t t e r " ) . t a r g e t = " _ s e l f " ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " n e w s l e t t e r " ) . s u b m i t ( ) ; 
 
 } 
 
 
 
 
 
 f u n c t i o n   e l i m i n a _ c a m e r a ( ) 
 { 
 
 	 i f   ( w i n d o w . c o n f i r m ( t o p . l i n g u a [ 0 ] ) ) { 
 	 	 l o c a t i o n . r e p l a c e ( " e l i m i n a _ c a m e r a . p h p " ) ; 
 
 } 
 
 
 
 
 
 } 
 
 f u n c t i o n   c e r c a _ n e w s ( p a g , i d _ d i v ) { 
 
 
 
 i d _ d i v _ e r r o r e = i d _ d i v ; 
 
 l o a d X M L D o c ( ' a j a x _ n e w s . p h p ? p a g = ' + p a g ) ; 
 
 
 
 } 
 
 
 
 f u n c t i o n   n e w s ( i d , d i v ) { 
 
 	 i d _ d i v _ e r r o r e = d i v ; 
 	 l o a d X M L D o c ( ' d e t t _ n e w s . p h p ? i d = ' + i d ) ; 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( i d _ d i v _ e r r o r e ) . f o c u s ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   g r a f i c o ( d a t a 1 , i d _ c a m e r a , n c , n s , i d _ d i v ) 
 { 
 
 	 i d _ d i v _ e r r o r e = i d _ d i v ; 
 	 v a r   d a t a 2 
 	 v a r   d   =   n e w   D a t e ( ) 
 	 d . s e t T i m e ( g e t D a t e F r o m F o r m a t ( d a t a 1 . v a l u e , " d d / M M / y " ) + 5 * 8 6 4 0 0 * 1 0 0 0 ) 
 	 v a r   m = p a r s e I n t ( d . g e t M o n t h ( ) ) + 1 ; 
 	 v a r   g = p a r s e I n t ( d . g e t D a t e ( ) ) ; 
 
 	 i f   ( m < 1 0 ) { 
 	 	 m = ' 0 ' + m ; 
 	 } 
 
 	 i f   ( g < 1 0 ) { 
 	 	 g = ' 0 ' + g ; 
 	 } 
 
 	 d a t a 2 = d . g e t F u l l Y e a r ( ) + ' - ' + m + ' - ' + g ; 
 	 l o a d X M L D o c ( ' a j a x _ g r a f i c o . p h p ? i d = ' + i d _ c a m e r a + ' & n s = ' + n s + ' & d a t a i n i z i o = ' + d a t a 2 + ' & n c = ' + n c + ' & n u m = 3 0 ' ) ; 
 
 } 
 
 f u n c t i o n   e l i m i n a _ t a r ( d a t a , i d _ c a m ) 
 { 
 	 i f   ( w i n d o w . c o n f i r m ( t o p . l i n g u a [ 1 ] ) ) { 
 	 	 i d _ d i v _ e r r o r e = " t a r i f f a e l _ " + i d _ c a m ; 
 	 	 l o a d X M L D o c ( ' e l i m i n a _ t a r . p h p ? i d _ c a m = ' + i d _ c a m + ' & d a t a = ' + d a t a ) ; 
 	 } 
 } 
 
 f u n c t i o n   v i s u a l _ a l b e r o ( ) { 
 
 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' a l b e r o ' ) . s t y l e . d i s p l a y = = ' n o n e ' ) { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' a l b e r o ' ) . s t y l e . d i s p l a y = ' b l o c k ' ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' r a d i c e ' ) . i n n e r H T M L = " -   G u i d a   i n c o m i n g " ; 
 
 } 
 
 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 ( ' a l b e r o ' ) . s t y l e . d i s p l a y = ' n o n e ' ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' r a d i c e ' ) . i n n e r H T M L = " +   G u i d a   i n c o m i n g " 
 
 } 
 
 } 
 
 f u n c t i o n   v i s u a l _ a l b e r o 2 ( ) { 
 
 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' a l b e r o _ a v a n z a t o ' ) . s t y l e . d i s p l a y = = ' n o n e ' ) { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' a l b e r o _ a v a n z a t o ' ) . s t y l e . d i s p l a y = ' b l o c k ' ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' r a d i c e _ a v a n z a t o ' ) . i n n e r H T M L = " -   G u i d a   A v a n z a t a " ; 
 
 } 
 
 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 ( ' a l b e r o _ a v a n z a t o ' ) . s t y l e . d i s p l a y = ' n o n e ' ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' r a d i c e _ a v a n z a t o ' ) . i n n e r H T M L = " +   G u i d a   a v a n z a t a " 
 
 } 
 
 } 
 
 
 
 f u n c t i o n   a g g i o r n a T D ( ) 
 { 
 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ c a m _ ' ) . i n n e r H T M L = t o p . l i n g u a [ 2 ] + '   < b > ' + d o c u m e n t . g e t E l e m e n t B y I d ( ' i d _ c a m ' ) . v a l u e + ' < b > ' ; 
 
 } 
 
 
 
 f u n c t i o n   c e r c a _ d a _ i t ( ) 
 { 
 	 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 m i ' ) . c l i c k ( ) ; 
 } 
 
 f u n c t i o n   i t i n e r a r i o ( i d , i d _ d i v , i n t e r n o ) 
 { 
 	 i d _ d i v _ e r r o r e = i d _ d i v ; 
 	 i d _ d i v _ e r r o r e = i d _ d i v ; 
 	 i f   ( ! ( i n t e r n o   = =   ' s i ' ) ) { 
 	 	 v a r   i n t e r n o   =   ' n o ' ; 
 	 } 
 	 l o a d X M L D o c ( ' a j a x / d e t t _ i t i n e r a r i o . p h p ? i d = ' + i d + ' & i n t e r n o = ' + i n t e r n o ) ; 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( i d _ d i v ) . f o c u s ( ) ; 
 } 
 
 f u n c t i o n   c e r c a _ i t i n ( n _ p a g , i d _ d i v , s e l e c , i n t e r n o ) 
 { 
 
 	 v a r   l o c = " " ; 
 	 v a r   s e l _ l o c = d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l _ l o c 1 ' ) ; 
 	 i f   ( s e l _ l o c   ! =   n u l l ) { 
 	 	 v a r   l o c = s e l _ l o c . o p t i o n s [ s e l _ l o c . s e l e c t e d I n d e x ] . v a l u e ; 
 	 }   e l s e   { 
 	 	 s e l _ l o c = d o c u m e n t . g e t E l e m e n t B y I d ( ' h _ l o c ' ) ; 
 	 	 i f   ( s e l _ l o c   ! =   n u l l ) { 
 	 	 	 v a r   l o c   =   s e l _ l o c . v a l u e ; 
 	 	 } 
 	 } 
 
 	 v a r   s e l _ = d o c u m e n t . g e t E l e m e n t B y I d ( ' t i p o _ i t ' ) ; 
 	 v a r   t i p o = s e l _ . o p t i o n s [ s e l _ . s e l e c t e d I n d e x ] . v a l u e ; 
 	 v a r   s e a r c h = d o c u m e n t . g e t E l e m e n t B y I d ( ' c e r c a ' ) . v a l u e ; 
 	 v a r   t u t t o = " n o " ; 
 	 
 	 v a r   p r o v = " " ; 
 	 i f   ( ( 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 v ' ) ! = n u l l ) ) { 
 	 	 i f   ( 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 v ' ) . t y p e ! = " h i d d e n " ) { 
 	 	 	 v a r   s e l _ p r o v = 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 v ' ) ; 
 	 	 	 p r o v = s e l _ p r o v . o p t i o n s [ s e l _ p r o v . s e l e c t e d I n d e x ] . v a l u e ; 
 	 	 } 
 	 } 
 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' t u t t o ' ) ! = n u l l ) 
 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' t u t t o ' ) . c h e c k e d ) 
 	 	 	 t u t t o = " o k " ; 
 	 i d _ d i v _ e r r o r e = i d _ d i v ; 
 	 i f   ( ! ( i n t e r n o   = =   ' s i ' ) ) { 
 	 	 v a r   i n t e r n o   =   ' n o ' ; 
 	 } 
 
 	 / * 
 	 t o l t o   i l   9 / 0 1 / 2 0 0 8   p e r   f a r   a n d a r e   g l i   i t i n e r a r i   d i s t a n t i   2 0   K m   d a l l a   s t r u t t u r a ,   i n   d e s c _ s t r u t t u r a . p h p 
 
 	 i f   ( p r o v   = =   ' ' ) { 
 	 	 l o c   =   ' ' ; 
 	 } 
 	 * / 
 
 / / 	 a l e r t ( ' a j a x _ i t i n . p h p ? l o c = ' + l o c + ' & t i p o = ' + t i p o + ' & s e a r c h = ' + s e a r c h + ' & p a g = ' + n _ p a g + ' & s e l e c = ' + s e l e c + ' & t u t t o = ' + t u t t o + ' & p r o v = ' + p r o v + ' & i n t e r n o = ' + i n t e r n o ) ; 
 
 	 / /   p e r   f a r   a n d a r e   l e   l i n g u e   c o n   m o t o r e _ i t i n _ n a t a l e . p h p 
 
 	 v a r   c i t t a d i n o   =   n e w   A r r a y ( ' c i d a d ã o ' ,   ' c i t y ' ,   ' S t a d t ' ,   ' c i u d a d a n o ' ,   ' ^' ) ; 
 	 f o r   ( i   =   0 ;   i   <   c i t t a d i n o . l e n g t h ;   i + + )   { 
 	 	 i f   ( c i t t a d i n o [ i ]   = =   t i p o )   { 
 	 	 	 t i p o   =   ' c i t t a d i n o ' ; 
 	 	 } 
 	 } 
 
 	 v a r   a r t e   =   n e w   A r r a y ( ' h i s t o r i c a l - a r t i s t i c ' ) ; 
 	 f o r   ( i   =   0 ;   i   <   a r t e . l e n g t h ;   i + + )   { 
 	 	 i f   ( a r t e [ i ]   = =   t i p o )   { 
 	 	 	 t i p o   =   ' s t o r i c o - a r t i s t i c o ' ; 
 	 	 } 
 	 } 
 
 	 v a r   n a t u r a   =   n e w   A r r a y ( ' n a t u r a l i s t i c ' ,   ' n a t u r a l i s t i s c h ' ) ; 
 	 f o r   ( i   =   0 ;   i   <   n a t u r a . l e n g t h ;   i + + )   { 
 	 	 i f   ( n a t u r a [ i ]   = =   t i p o )   { 
 	 	 	 t i p o   =   ' n a t u r a l i s t i c o ' ; 
 	 	 } 
 	 } 
 
 	 v a r     e v e n t i   =   n e w   A r r a y ( ' f o l k l o r i s t i c o ' ) ; 
 	 f o r   ( i   =   0 ;   i   <   e v e n t i . l e n g t h ;   i + + )   { 
 	 	 i f   ( e v e n t i [ i ]   = =   t i p o )   { 
 	 	 	 t i p o   =   ' f o l k l o r i s t i c o ' ; 
 	 	 } 
 	 } 
 	 l o a d X M L D o c ( ' a j a x _ i t i n . p h p ? l o c = ' + l o c + ' & t i p o = ' + t i p o + ' & s e a r c h = ' + s e a r c h + ' & p a g = ' + n _ p a g + ' & s e l e c = ' + s e l e c + ' & t u t t o = ' + t u t t o + ' & p r o v = ' + p r o v + ' & i n t e r n o = ' + i n t e r n o ) ; 
 
 } 
 
 f u n c t i o n   c e r c a _ c o m m e n t i ( i d s , n o m e _ d i v , p a g ) 
 { 
 	 l o a d X M L D o c ( ' f e e d b a c k / c o m m e n t i _ e l e n c o . p h p ? i d s = ' + i d s + ' & d i v = ' + n o m e _ d i v + ' & n u m = ' + p a g ) ; 
 } 
 
 f u n c t i o n   i n s e r _ c o m m ( u r l , n o m e _ d i v ) 
 { 
 	 i d _ d i v _ e r r o r e = ' c o n f _ c o m m ' ; 
 	 l o a d X M L D o c ( u r l , n o m e _ d i v ) ; 
 	 s e t T i m e o u t ( ' d o c u m e n t . n e w c o m m . r e s e t ( ) ' , 1 5 0 ) ; 
 	 s e t T i m e o u t ( " c a n c e l l a E r r o r e ( ' c o n f _ c o m m ' ) " ,   1 5 0 0 ) ; 
 	 s e t T i m e o u t ( " t o g g l e ( ' i n s e r i s c i ' , ' i n s _ c o m _ t x ' , ' I n s e r i s c i   u n   c o m m e n t o ' , ' C h i u d i ' ) " , 3 0 0 0 ) ; 
 	 
 } 
 
 f u n c t i o n   l o g i n _ u t ( u r l , n o m e _ d i v ) 
 { 
 	 
 	 i d _ d i v _ e r r o r e = ' u s e r n a m e _ n o t i f y 2 ' ; 
 	 l o a d X M L D o c ( u r l ) ; 
 	 s e t T i m e o u t ( ' l o c a t i o n . r e l o a d ( t r u e ) ' , 1 5 0 0 ) ; 
 	 
 	 
 } 
 
 f u n c t i o n   s v u o t a _ l o g i n ( ) { 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' u s e r n a m e _ u t ' ) . 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 a s s _ u t ' ) . v a l u e = " " ; 
 } 
 
 f u n c t i o n   s u c c ( n u m , o r d ) { 
 
 	 f i n e _ u r l   =   d o c u m e n t . l o c a t i o n . p a t h n a m e . s u b s t r ( d o c u m e n t . l o c a t i o n . p a t h n a m e . l e n g t h - 7 ,   7 ) ; 
 	 u r l   =   d o c u m e n t . l o c a t i o n . p a t h n a m e . s p l i t ( " / " ) ; 
 
 	 
 
 	 i f   ( 
 	 	 ( f i n e _ u r l   = =   ' s m i . p h p ' )   | |   ( f i n e _ u r l   = =   ' s p a . p h p ' )   | |   ( u r l [ 1 ]   = =   ' v e t r i n a _ g a r g a n o . p h p ' )   | |   ( u r l [ 1 ]   = =   ' r e s i d e n c e . p h p ' )   | | 
 	 	 ( u r l [ 1 ]   = =   ' v e t r i n a _ s a l e n t o . p h p ' )   | |   ( u r l [ 1 ]   = =   ' v e t r i n a _ m a r e . p h p ' )   | |   ( u r l [ 1 ]   = =   ' v e t r i n a _ m o n t a g n a . p h p ' )   | |   
 	 	 ( u r l [ 1 ]   = =   ' v e t r i n a _ o f f e r t e . p h p ' )   | |   ( u r l [ 2 ]   = =   ' v e t r i n a _ g a r g a n o . p h p ' )   | |   ( u r l [ 2 ]   = =   ' v e t r i n a _ s a l e n t o . p h p ' )   | |   
 	 	 ( u r l [ 2 ]   = =   ' v e t r i n a _ m a r e . p h p ' )   | |   ( u r l [ 2 ]   = =   ' v e t r i n a _ m o n t a g n a . p h p ' )   | |   ( u r l [ 2 ]   = =   ' v e t r i n a _ o f f e r t e . p h p ' )   | | 
 	 	 ( u r l [ 1 ]   = =   ' b e b . p h p ' )   | |   ( u r l [ 2 ]   = =   ' s p e c _ m a r e . p h p ' )   | |   ( u r l [ 2 ]   = =   ' a g r i t u r i s m i . p h p ' )   | |   ( u r l [ 2 ]   = =   ' p o t e n z a . p h p ' )   | |   
 	 	 ( u r l [ 1 ]   = =   ' p o t e n z a . p h p ' )   | |   ( u r l [ 1 ]   = =   ' m a t e r a . p h p ' )   | |   ( u r l [ 2 ]   = =   ' m a t e r a . p h p ' )   | |   ( u r l [ 2 ]   = =   ' t a r a n t o . p h p ' )   | | 
 	 	 ( u r l [ 2 ]   = =   ' c i n q u e _ s t e l l e . p h p ' )   | |   ( u r l [ 2 ]   = =   ' d e s c _ s t r u t t u r a . p h p ' )   | |   ( u r l [ 1 ]   = =   ' d e s c _ s t r u t t u r a . p h p ' ) 
 	 ) { 
 	 	 d o c u m e n t . l o c a t i o n . h r e f = d o c u m e n t . l o c a t i o n . p a t h n a m e + " ? n u m = " + n u m ; 
 	 	 r e t u r n   t r u e ; 
 	 } 
 
 / / 	 a l e r t ( s u b s t r ( d o c u m e n t . l o c a t i o n . h r e f , d o c u m e n t . l o c a t i o n . h r e f . l e n g t h - 1 0 , 5 ) ) ; 
 
 
 	 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 a ' )   = =   n u l l ) 
 	 	 v a r   d a t a 1   =   ' ' ; 
 	 e l s e   
 	 	 v a r   d a t a 1 = d o c u m e n t . g e t E l e m e n t B y I d ( " d a " ) . v a l u e ; 
 
 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' a ' )   = =   n u l l ) 
 	 	 v a r   d a t a 2   =   ' ' ; 
 	 e l s e   
 	 	 v a r   d a t a 2 = d o c u m e n t . g e t E l e m e n t B y I d ( " a " ) . v a l u e ; 
 
 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ p o s t i ' )   ! =   n u l l ) { 	 
 	 	 i f   ( ! _ i s I n t e g e r ( d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ p o s t i ' ) . 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 ( ' n u m _ p o s t i ' ) . v a l u e = " " ; 
 	 	 } 
 
 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ p o s t i ' ) . v a l u e = = " "   & &   ( d a t a 1 ! = " " ) ) { 
 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ p o s t i ' ) . v a l u e = 1 ; 
 	 	 } 
 	 } 
 
 	 i f   ( ( d a t a 1   ! =   ' ' )   & &   ( d a t a 2   ! =   ' ' ) ) { 
 
 	 	 i f   ( ( c o m p a r e D a t e s ( d a t a 1 , " d d / M M / y " , d a t a 2 , " d d / M M / y " ) = = 1 ) | | ( ! _ i s I n t e g e r ( d a t a 2 ) ) | | ( d a t a 1 . v a l u e = = d a t a 2 ) ) { 
 	 	 	 v a r   d   =   n e w   D a t e ( ) 
 	 	 	 d . s e t T i m e ( g e t D a t e F r o m F o r m a t ( d a t a 1 . v a l u e , " d d / M M / y " ) + 8 6 4 0 0 * 1 0 0 0 ) 
 	 	 	 v a r   m = p a r s e I n t ( d . g e t M o n t h ( ) ) + 1 ; 
 	 	 	 v a r   g = p a r s e I n t ( d . g e t D a t e ( ) ) ; 
 	 	 	 i f   ( m < 1 0 ) { 
 	 	 	 	 m = ' 0 ' + m ; 
 	 	 	 } 
 	 	 	 i f   ( g < 1 0 ) { 
 	 	 	 	 g = ' 0 ' + g ; 
 	 	 	 } 
 	 	 	 d a t a 2 . v a l u e = g + ' / ' + m + ' / ' + d . g e t F u l l Y e a r ( ) ; 
 	 	 	 / * 
 	 	 	 i f   ( d a t a 1 ! = " " ) { 
 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ p o s t i ' ) . v a l u e = 1 ; 
 	 	 	 } 
 	 	 	 * / 
 	 	 } 
 	 } 
 
 	 i f   ( ( d a t a 1 ! = " " ) | | d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ p o s t i ' ) . v a l u e ! = " " ) { 
 
 	 	 h i d _ l o c ( ' s e l _ l o c 1 ' , ' h _ l o c ' ) ; 
 	 	 i f   ( o r d   = =   " " ) { 
 	 	 	 o r d   =   " d i s t a n z a " ; 
 	 	 } 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' m o t o r e _ d i _ r i c e r c a ' ) . a c t i o n = " r i s u l t a t i c a m e r a . p h p ? o r d i n e = " + o r d + " & n u m = " + n u m ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' m o t o r e _ d i _ r i c e r c a ' ) . s u b m i t ( ) ; 
 
 	 }   e l s e   { 
 
 	 	 h i d _ l o c ( ' s e l _ l o c 1 ' , ' h _ l o c ' ) ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' m o t o r e _ d i _ r i c e r c a ' ) . a c t i o n = " r i s u l t a t i s t r u t t u r a . p h p ? o r d i n e = " + o r d + " & n u m = " + n u m ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' m o t o r e _ d i _ r i c e r c a ' ) . s u b m i t ( ) ; 
 	 } 
 
 } 
 
 
 
 
 
 f u n c t i o n   a s s e g n a _ d a t a ( s , d ) { 
 
 i f   ( d . v a l u e = = " " ) 
 
 { 
 
 d . v a l u e = s . v a l u e ; 
 
 } 
 
 } 
 
 
 
 f u n c t i o n   c o n f r o n t a 1 ( d a t a 1 , d a t a 2 ) { 
 
 	 / * 
 	 i f   ( t o p . n u m e r o _ r i s u l t a t i   = =   0 ) 
 	 { 
 	 	 a l e r t ( t o p . l i n g u a [ 2 1 ] ) ; 
 	 	 r e t u r n   f a l s e ; 
 	 } 
 	 * / 
 
 	 i f 	 ( 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 v ' ) . v a l u e   = =   ' ' ) { 
 	 	 a l e r t ( t o p . l i n g u a [ 1 7 ] ) ; 
 	 	 r e t u r n   f a l s e ; 
 	 } 
 
 	 i f   ( ! _ i s I n t e g e r ( d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ p o s t i ' ) . 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 ( ' n u m _ p o s t i ' ) . v a l u e = " " ; 
 	 } 
 
 	 i f   ( ( d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ p o s t i ' ) . v a l u e = = " " )   & &   ( d a t a 1 . 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 ( ' n u m _ p o s t i ' ) . v a l u e = 1 ; 
 	 } 
 
 	 i f   (   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ p o s t i ' ) . v a l u e ! = " " )   & &   ( d a t a 1 . v a l u e = = " " )   ) { 
 	 	 t o d a y   =   n e w   D a t e ( ) 
 	 	 v a r   m = p a r s e I n t ( t o d a y . g e t M o n t h ( ) ) + 1 ; 
 	 	 v a r   g = p a r s e I n t ( t o d a y . g e t D a t e ( ) ) ; 
 	 	 i f   ( m < 1 0 ) { 
 	 	 	 m = ' 0 ' + m ; 
 	 	 } 
 	 	 i f   ( g < 1 0 ) { 
 	 	 	 g = ' 0 ' + g ; 
 	 	 } 
 	 	 d a t a 1 . v a l u e = g + ' / ' + m + ' / ' + t o d a y . g e t F u l l Y e a r ( ) ; 
 	 	 d a t a 2 . d i s a b l e d = f a l s e 
 	 	 v a r   d   =   n e w   D a t e ( ) 
 	 	 d . s e t T i m e ( g e t D a t e F r o m F o r m a t ( d a t a 1 . v a l u e , " d d / M M / y " ) + 8 6 4 0 0 * 1 0 0 0 ) 
 	 	 v a r   m = p a r s e I n t ( d . g e t M o n t h ( ) ) + 1 ; 
 	 	 v a r   g = p a r s e I n t ( d . g e t D a t e ( ) ) ; 
 	 	 i f   ( m < 1 0 ) { 
 	 	 	 m = ' 0 ' + m ; 
 	 	 } 
 	 	 i f   ( g < 1 0 ) { 
 	 	 	 g = ' 0 ' + g ; 
 	 	 } 
 	 	 i f   ( d a t a 1 . v a l u e ! = " " ) { 
 	 	 	 d a t a 2 . v a l u e = g + ' / ' + m + ' / ' + d . g e t F u l l Y e a r ( ) ; 
 	 	 } 
 	 } 
 
 	 i f   (   ( c o m p a r e D a t e s ( d a t a 1 . v a l u e , " d d / M M / y " , d a t a 2 . v a l u e , " d d / M M / y " ) = = 1 ) | | ( d a t a 2 . v a l u e = = " " ) | | ( d a t a 1 . v a l u e = = d a t a 2 . v a l u e ) ) { 
 	 	 v a r   d   =   n e w   D a t e ( ) 
 	 	 d . s e t T i m e ( g e t D a t e F r o m F o r m a t ( d a t a 1 . v a l u e , " d d / M M / y " ) + 8 6 4 0 0 * 1 0 0 0 ) 
 	 	 v a r   m = p a r s e I n t ( d . g e t M o n t h ( ) ) + 1 ; 
 	 	 v a r   g = p a r s e I n t ( d . g e t D a t e ( ) ) ; 
 	 	 i f   ( m < 1 0 ) { 
 	 	 	 m = ' 0 ' + m ; 
 	 	 } 
 	 	 i f   ( g < 1 0 ) { 
 	 	 	 g = ' 0 ' + g ; 
 	 	 } 
 	 	 i f   ( d a t a 1 . v a l u e ! = " " ) { 
 	 	 	 d a t a 2 . v a l u e = g + ' / ' + m + ' / ' + d . g e t F u l l Y e a r ( ) ; 
 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ p o s t i ' ) . v a l u e = 1 ; 
 	 	 } 
 	 } 
 
 	 i f   ( ( d a t a 1 . 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 ( ' n u m _ p o s t i ' ) . v a l u e ! = " " ) { 
 	 	 h i d _ l o c ( ' s e l _ l o c 1 ' , ' h _ l o c ' ) ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' m o t o r e _ d i _ r i c e r c a ' ) . a c t i o n = " r i s u l t a t i c a m e r a . p h p " ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' m o t o r e _ d i _ r i c e r c a ' ) . s u b m i t ( ) ; 
 	 }   e l s e   { 	 
 	 	 h i d _ l o c ( ' s e l _ l o c 1 ' , ' h _ l o c ' ) ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' m o t o r e _ d i _ r i c e r c a ' ) . a c t i o n = " r i s u l t a t i s t r u t t u r a . p h p " ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' m o t o r e _ d i _ r i c e r c a ' ) . s u b m i t ( ) ; 
 	 } 
 
 } 
 
 
 
 f u n c t i o n   o r d i n a ( o r d ) 
 
 { 
 
 
 
 
 
 v a r   d a t a 1 = d o c u m e n t . g e t E l e m e n t B y I d ( " d a " ) ; 
 
 v a r   d a t a 2 = d o c u m e n t . g e t E l e m e n t B y I d ( " a " ) ; 
 
 i f   ( ! _ i s I n t e g e r ( d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ p o s t i ' ) . 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 ( ' n u m _ p o s t i ' ) . v a l u e = " " ; 
 
 } 
 
 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ p o s t i ' ) . v a l u e = = " "   & &   ( d a t a 1 . 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 ( ' n u m _ p o s t i ' ) . v a l u e = 1 ; 
 
 } 
 
   i f   (   ( c o m p a r e D a t e s ( d a t a 1 . v a l u e , " d d / M M / y " , d a t a 2 . v a l u e , " d d / M M / y " ) = = 1 ) | | ( d a t a 2 . v a l u e = = " " ) | | ( d a t a 1 . v a l u e = = d a t a 2 . v a l u e ) ) 
 
     { 
 
 v a r   d   =   n e w   D a t e ( ) 
 
 d . s e t T i m e ( g e t D a t e F r o m F o r m a t ( d a t a 1 . v a l u e , " d d / M M / y " ) + 8 6 4 0 0 * 1 0 0 0 ) 
 
 v a r   m = p a r s e I n t ( d . g e t M o n t h ( ) ) + 1 ; 
 
 v a r   g = p a r s e I n t ( d . g e t D a t e ( ) ) ; 
 
 i f   ( m < 1 0 ) 
 
 { 
 
 m = ' 0 ' + m ; 
 
 } 
 
 
 
 i f   ( g < 1 0 ) 
 
 { 
 
 g = ' 0 ' + g ; 
 
 } 
 
 
 
             i f   ( d a t a 1 . 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 ( ' n u m _ p o s t i ' ) . v a l u e = 1 ; 
 
                       d a t a 2 . v a l u e = g + ' / ' + m + ' / ' + d . g e t F u l l Y e a r ( ) ; 
 
 
 
             } 
 
     } 
 
     i f   ( ( d a t a 1 . 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 ( ' n u m _ p o s t i ' ) . v a l u e ! = " " ) 
 
     { 
 
             h i d _ l o c ( ' s e l _ l o c 1 ' , ' h _ l o c ' ) ; 
 
             d o c u m e n t . g e t E l e m e n t B y I d ( ' m o t o r e _ d i _ r i c e r c a ' ) . a c t i o n = " r i s u l t a t i c a m e r a . p h p ? o r d i n e = " + o r d . v a l u e + " & n u m = " + 0 ; 
 
             d o c u m e n t . g e t E l e m e n t B y I d ( ' m o t o r e _ d i _ r i c e r c a ' ) . s u b m i t ( ) ; 
 
     } 
 
     e l s e 
 
     { 
 
 
 
             h i d _ l o c ( ' s e l _ l o c 1 ' , ' h _ l o c ' ) ; 
 
             d o c u m e n t . g e t E l e m e n t B y I d ( ' m o t o r e _ d i _ r i c e r c a ' ) . a c t i o n = " r i s u l t a t i s t r u t t u r a . p h p ? o r d i n e = " + o r d . v a l u e + " & n u m = " + 0 ; 
 
             d o c u m e n t . g e t E l e m e n t B y I d ( ' m o t o r e _ d i _ r i c e r c a ' ) . s u b m i t ( ) ; 
 
 
 
     } 
 
 
 
 
 
 } 
 
 
 
 f u n c t i o n   c o n f r o n t a ( d a t a 1 , d a t a 2 , e r r o r e ) 
 { 
 	 
 	 i f   ( c o m p a r e D a t e s ( d a t a 1 . v a l u e , " d d / M M / y " , d a t a 2 . v a l u e , " d d / M M / y " ) = = 1 ) { 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) . i n n e r H T M L = t o p . l i n g u a [ 3 ] ; 
 	 	 r e t u r n   f a l s e ; 
 	 } 
 	 r e t u r n   t r u e ; 
 
 } 
 
 
 
 f u n c t i o n   v e r i f _ d a t e ( i n p u t , e r r o r e ) 
 { 
 
 	 v a r   r e g e x   =   n e w   R e g E x p ( " [ / - ] " ) ; 
 	 v a r   d a t e   =   i n p u t . s p l i t ( r e g e x ) ; 
 	 v a r   n b J o u r s   =   n e w   A r r a y ( ' ' , 3 1 , 2 8 , 3 1 , 3 0 , 3 1 , 3 0 , 3 1 , 3 1 , 3 0 , 3 1 , 3 0 , 3 1 ) ; 
 	 v a r   r e s u l t   =   t r u e ; 
 
 	 i f   (   d a t e [ ' 2 ' ] % 4   = =   0   & &   d a t e [ ' 2 ' ] % 1 0 0   >   0   | |   d a t e [ ' 2 ' ] % 4 0 0   = =   0   ) 
 	 	 n b J o u r s [ ' 2 ' ]   =   2 9 ; 
 
 	 i f (   i s N a N ( d a t e [ ' 2 ' ] )   ) { 
 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) )   
 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) . i n n e r H T M L = t o p . l i n g u a [ 4 ] ; 
 	 	 r e s u l t = f a l s e ; 
 	 } 
 
 	 i f   (   i s N a N ( d a t e [ ' 1 ' ] )   | |   d a t e [ ' 1 ' ]   >   1 2   | |   d a t e [ ' 1 ' ]   <   1   ) { 
 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) )   
 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) . i n n e r H T M L = t o p . l i n g u a [ 4 ] ; 
 	 	 r e s u l t = f a l s e ; 
 	 } 
 
 	 i f   (   i s N a N ( d a t e [ ' 0 ' ] )   | |   d a t e [ ' 0 ' ]   >   n b J o u r s [ M a t h . r o u n d ( d a t e [ ' 1 ' ] ) ]   | |   d a t e [ ' 0 ' ]   <   1   ) { 
 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) )   
 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) . i n n e r H T M L = t o p . l i n g u a [ 4 ] ; 
 	 	 r e s u l t = f a l s e ; 
 	 } 	 
 
 	 i f   ( r e s u l t ) { 
 	 	 v a r   d = n e w   D a t e ( ) ; 
 	 	 v a r   m = p a r s e I n t ( d . g e t M o n t h ( ) ) + 1 ; 
 	 	 v a r   g = p a r s e I n t ( d . g e t D a t e ( ) ) ; 
 
 	 	 i f   ( m < 1 0 ) { 
 	 	 	 m = ' 0 ' + m ; 
 	 	 } 
 
 	 	 i f   ( g < 1 0 ) { 
 	 	 	 g = ' 0 ' + g ; 
 	 	 } 
 
 	 	 v a r   g = g + ' / ' + m + ' / ' + d . g e t F u l l Y e a r ( ) ; 
 
 	 	 i f   ( c o m p a r e D a t e s ( g , " d d / M M / y " , i n p u t , " d d / M M / y " ) = = 1 ) { 
 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) . i n n e r H T M L = t o p . l i n g u a [ 5 ] ; 
 	 	 	 r e s u l t = f a l s e ; 
 	 	 } 
 	 } 
 
 	 r e t u r n   r e s u l t ; 
 
 } 
 
 
 
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - a j a x - - - - - - - - - - - - 
 
 
 
 f u n c t i o n   l o a d X M L D o c ( u r l ) { 
 
 	 v a r   i e _ b a s t ; 
 	 i f   ( u r l . i n d e x O f ( ' ? ' ) = = - 1 ) 
 	 	 i e _ b a s t = u r l + ' ? ' ; 
 	 e l s e 
 	 	 i e _ b a s t = u r l + ' & ' ; 
 	 i e _ b a s t = i e _ b a s t + " r a n d = " + e s c a p e ( M a t h . r a n d o m ( ) ) ; 
 
 	 / /   c o d i c e   p e r   M o z i l l a ,   e t c . 
 	 i f   ( w i n d o w . X M L H t t p R e q u e s t ) { 
 	 	 x m l h t t p = n e w   X M L H t t p R e q u e s t ( ) ; 
         i f   ( u r l . s u b s t r i n g ( 0 , 9 ) = = ' c o n f _ l o g i ' ) { 
         x m l h t t p . o p e n ( ' G E T ' , i e _ b a s t , f a l s e ) ;   }   / / c u p p i l e k k i a   m o d i f i c a t o   i n   f a l s e   p e r c h è   n o n   a n d a v a   l a   r e q u e s t   c o n   f i r e f o x 
         e l s e   {   x m l h t t p . o p e n ( ' G E T ' , i e _ b a s t , t r u e ) ;   } 
 	 	 x m l h t t p . o n r e a d y s t a t e c h a n g e = x m l h t t p C h a n g e ; 
 	 	 
 	 	 i f   ( t o p . t i p o _ l i n g u a   = =   " j p " ) {   
 	 	 	 x m l h t t p . s e t R e q u e s t H e a d e r ( " C o n t e n t - T y p e " ,   " t e x t / x m l ;   c h a r s e t = U T F - 8 ; " ) ; 
 	 	 }   e l s e   {   
 	 	 	 x m l h t t p . s e t R e q u e s t H e a d e r ( " C o n t e n t - T y p e " ,   " t e x t / x m l ;   i s o - 8 8 5 9 - 1 ; " ) ; 
 	 	 }   
 	 	 x m l h t t p . s e n d ( n u l l ) ; 
 	 } 
 
 	 / /   c o d i c e   p e r     I E x p l o r e 
 
 	 e l s e   i f   ( w i n d o w . A c t i v e X O b j e c t ) { 
 
 	 	 x m l h t t p = n e w   A c t i v e X O b j e c t ( ' M s x m l 2 . X M L H T T P ' ) ; 
 	 	 i f   ( x m l h t t p ) { 
             x m l h t t p . o n r e a d y s t a t e c h a n g e = x m l h t t p C h a n g e ; 
 	     x m l h t t p . o p e n ( ' G E T ' , i e _ b a s t , f a l s e ) ; 
 	 	 	 
 	 	 	 
 	 	 	 i f   ( t o p . t i p o _ l i n g u a   = =   " j p " ) {   
 	 	 	 	 x m l h t t p . s e t R e q u e s t H e a d e r ( " C o n t e n t - T y p e " ,   " t e x t / x m l ;   c h a r s e t = U T F - 8 ; " ) ; 
 	 	 	 }   e l s e   {   
 	 	 	 	 x m l h t t p . s e t R e q u e s t H e a d e r ( " C o n t e n t - T y p e " ,   " t e x t / x m l ;   i s o - 8 8 5 9 - 1 ; " ) ; 
 	 	 	 }   
 	 	 	 x m l h t t p . s e n d ( ) ; 
 	 	 } 
 	 } 
 } 
 
 
 
 f u n c t i o n   x m l h t t p C h a n g e ( ) 
 { 
 
 	 / /   i f   x m l h t t p   s h o w s   \ " l o a d e d \ " 
 
 	 i f   ( x m l h t t p . r e a d y S t a t e = = 4 ) { 
 
 
 
 	 	 / /   i f   \ " O K \ " 
 
 	 	 i f   ( i d _ d i v _ e r r o r e = = ' c l i c k _ b a n ' ) { 
 	 	 	 r e t u r n ; 
 	 	 } 
 
 	 	 i f   ( i d _ d i v _ e r r o r e = = ' a d ' ) { 
 
 	 	 	 i d _ d i v _ e r r o r e = " d r o p _ a r e a _ 2 " ; 
 	 	 	 v a r   s t r 1 1 = ' d r o p _ a r e a . p h p ? a j a x = s i ' ; 
 	 	 	 l o a d X M L D o c ( s t r 1 1 ) ; 
 	 	 	 r e t u r n ; 
 	 	 } 
 
 	 	 i f   ( i d _ d i v _ e r r o r e . i n d e x O f ( ' t a r i f f a e l ' ) = = 0 ) { 
 
 	 	 	 v a r   i d = i d _ d i v _ e r r o r e . s u b s t r ( i d _ d i v _ e r r o r e . l a s t I n d e x O f ( ' _ ' ) + 1 ) 
 	 	 	 v i s u a l i z z a _ o f f ( i d ) ; 
 	 	 	 r e t u r n ; 
 	 	 } 
 
 	 	 i f   ( x m l h t t p . s t a t u s = = 2 0 0 ) { 
 
 	 	 	 / /   . . . i l   v o s t r o   c o d i c e . . . 
 	 	 	 v a r   R   =   d o c u m e n t . g e t E l e m e n t B y I d ( i d _ d i v _ e r r o r e ) ; 
 	 	 	 R . i n n e r H T M L   =   x m l h t t p . r e s p o n s e T e x t ; 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " d e t t a g l i _ n e w s " ) { 
 	 	 	 	 c e r c a _ n e w s ( 0 , ' r i s _ n e w s ' ) 
 	 	 	 } 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " d e t t a g l i _ i t i n " ) { 
 
 	 	 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( " i d _ i t i n e r a r i o " ) . v a l u e = = " s i " ) { 
 	 	 	 	 	 r i c a r i c a P r o v 2 ( " B A " ) ; 
 	 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " i d _ i t i n e r a r i o " ) . v a l u e = " n o " ; 
 	 	 	 	 } 
 	 	 	 } 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " r i s _ c o m m e n t i " ) { 
 
 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " r i s _ c o m m e n t i " ) . v a l u e = ' s i ' ; 
 	 	 	 } 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " c o n f _ c o m m " ) { 
 
 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " c o n f _ c o m m " ) . v a l u e = ' s i ' ; 
 	 	 	 } 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " i n s e r i s c i " ) { 
 
 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " i n s e r i s c i " ) . v a l u e = ' s i ' ; 
 	 	 	 } 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " v o t i " ) { 
 
 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " v o t i " ) . v a l u e = ' s i ' ; 
 	 	 	 } 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " u s e r n a m e _ n o t i f y 2 " ) { 
 
 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " u s e r n a m e _ n o t i f y 2 " ) . v a l u e = ' s i ' 	 	 	 	 
 	 	 	 } 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " i n s e r _ r e c " ) { 
 
 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " i n s e r _ r e c " ) . v a l u e = ' s i ' ; 
 	 	 	 } 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " a j a x _ a l e r t " ) { 
 	 	 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( i d _ d i v _ e r r o r e ) . i n n e r H T M L . i n d e x O f ( ' I m p o s s i b i l e ' ) = = - 1 ) { 
 	 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " a d d _ t a r i f f a " ) . d i s a b l e d = f a 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 ( " i m g _ a d d _ t a r i f f a " ) . s t y l e . d i s p l a y = ' b l o c k ' ; 
 	 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " u p l o a d " ) . s t y l e . d i s p l a y = ' b l o c k ' ; 
 	 	 	 	 } 	 	 	 
 	 	 	 } 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e . i n d e x O f ( ' e r r o r _ o f f _ ' ) ! = - 1 ) { 
 	 	 	 	 v a r   i d = i d _ d i v _ e r r o r e . s u b s t r ( i d _ d i v _ e r r o r e . l a s t I n d e x O f ( ' _ ' ) + 1 ) 
 	 	 	 	 v i s u a l _ f o r m ( i d ) ; 
 	 	 	 	 v i s u a l i z z a _ o f f ( i d ) ; 
 	 	 	 } 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " s e l e z i o n a _ l o c " ) { 
 	 	 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l _ l o c 1 ' ) ! = n u l l ) { 
 	 	 	 	 	 v a r   i i ; 
 	 	 	 	 	 f o r   ( i i = 0 ; i i < d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l _ l o c 1 ' ) . o p t i o n s . l e n g t h ; i i + + ) { 
 
 	 	 	 	 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l _ l o c 1 ' ) . o p t i o n s [ i i ] . 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 ( ' h _ l o c ' ) . 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 ( ' s e l _ l o c 1 ' ) . o p t i o n s [ i i ] . s e l e c t e d = t r u e ; 
 	 	 	 	 	 	 } 
 	 	 	 	 	 } 
 	 	 	 	 	 n u m e r o R i s u l t a t i ( ) ; 
 	 	 	 	 } 
 	 	 	 } 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " s e l e z i o n a _ l o c _ s t r u t " ) { 
 	 	 	 	 v a r   i i ; 
 	 	 	 	 f o r   ( i i = 0 ; i i < d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l _ l o c 1 ' ) . o p t i o n s . l e n g t h ; i i + + ) { 
 
 	 	 	 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l _ l o c 1 ' ) . o p t i o n s [ i i ] . 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 ( ' h _ l o c ' ) . 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 ( ' s e l _ l o c 1 ' ) . o p t i o n s [ i i ] . s e l e c t e d = t r u e ; 
 	 	 	 	 	 } 
 	 	 	 	 } 
 	 	 	 } 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " s o t t o c a t e g o r i a _ m o d " ) { 
 	 	 	 	 v a r   i i ; 
 	 	 	 	 f o r   ( i i = 0 ; i i < d o c u m e n t . g e t E l e m e n t B y I d ( ' s o t t o c a t ' ) . o p t i o n s . l e n g t h ; i i + + ) { 
 
 	 	 	 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' s o t t o c a t ' ) . o p t i o n s [ i i ] . 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 ( ' s o t t o _ c ' ) . 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 ( ' s o t t o c a t ' ) . o p t i o n s [ i i ] . s e l e c t e d = t r u e ; 
 	 	 	 	 	 } 
 	 	 	 	 } 
 	 	 	 } 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = ' d r o p _ a r e a _ 2 ' ) { 
 	 	 	 	 p o s i z i o n a ( ) ; 
 	 	 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' n o m e _ s t r _ ' + c a g a _ n u m [ 4 ] ) ! = n u l l ) 
 	 	 	 	 	 s t r 4 = ' s e t t a _ g r a f i c o . p h p ? p a d r e = 4 & i d = ' + c a g a _ n u m [ 4 ] + ' & n s = ' + d o c u m e n t . g e t E l e m e n t B y I d ( ' n o m e _ s t r _ ' + c a g a _ n u m [ 4 ] ) . v a l u e + ' & d a t a i n i z i o = ' + d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t a _ i n i z i o _ ' + c a g a _ n u m [ 4 ] ) . v a l u e + ' & n c = ' + d o c u m e n t . g e t E l e m e n t B y I d ( ' n o m e _ c a m _ ' + c a g a _ n u m [ 4 ] ) . v a l u e ; 
 
 	 	 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' n o m e _ s t r _ ' + c a g a _ n u m [ 3 ] ) ! = n u l l ) 
 	 	 	 	 	 s t r 3 = ' s e t t a _ g r a f i c o . p h p ? p a d r e = 3 & i d = ' + c a g a _ n u m [ 3 ] + ' & n s = ' + d o c u m e n t . g e t E l e m e n t B y I d ( ' n o m e _ s t r _ ' + c a g a _ n u m [ 3 ] ) . v a l u e + ' & d a t a i n i z i o = ' + d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t a _ i n i z i o _ ' + c a g a _ n u m [ 3 ] ) . v a l u e + ' & n u m = ' + d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ g g _ ' + c a g a _ n u m [ 3 ] ) . v a l u e + ' & n c = ' + d o c u m e n t . g e t E l e m e n t B y I d ( ' n o m e _ c a m _ ' + c a g a _ n u m [ 3 ] ) . v a l u e ; 
 
 	 	 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' n o m e _ s t r _ ' + c a g a _ n u m [ 2 ] ) ! = n u l l ) 
 	 	 	 	 	 s t r 2 = ' s e t t a _ g r a f i c o . p h p ? p a d r e = 2 & i d = ' + c a g a _ n u m [ 2 ] + ' & n s = ' + d o c u m e n t . g e t E l e m e n t B y I d ( ' n o m e _ s t r _ ' + c a g a _ n u m [ 2 ] ) . v a l u e + ' & d a t a i n i z i o = ' + d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t a _ i n i z i o _ ' + c a g a _ n u m [ 2 ] ) . v a l u e + ' & n u m = ' + d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ g g _ ' + c a g a _ n u m [ 2 ] ) . v a l u e + ' & n c = ' + d o c u m e n t . g e t E l e m e n t B y I d ( ' n o m e _ c a m _ ' + c a g a _ n u m [ 2 ] ) . v a l u e ; 
 
 	 	 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' n o m e _ s t r _ ' + c a g a _ n u m [ 1 ] ) ! = n u l l ) 
 	 	 	 	 	 s t r 1 = ' s e t t a _ g r a f i c o . p h p ? p a d r e = 1 & i d = ' + c a g a _ n u m [ 1 ] + ' & n s = ' + d o c u m e n t . g e t E l e m e n t B y I d ( ' n o m e _ s t r _ ' + c a g a _ n u m [ 1 ] ) . v a l u e + ' & d a t a i n i z i o = ' + d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t a _ i n i z i o _ ' + c a g a _ n u m [ 1 ] ) . v a l u e + ' & n c = ' + d o c u m e n t . g e t E l e m e n t B y I d ( ' n o m e _ c a m _ ' + c a g a _ n u m [ 1 ] ) . v a l u e ; 
 	 	 	 } 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " d r o p _ a r e a 1 " | | i d _ d i v _ e r r o r e = = " d r o p _ a r e a 2 " | | i d _ d i v _ e r r o r e = = " d r o p _ a r e a 3 " | | i d _ d i v _ e r r o r e = = " d r o p _ a r e a 4 " ) { 
 	 	 	 	 i = i d _ d i v _ e r r o r e . s u b s t r ( i d _ d i v _ e r r o r e . l a s t I n d e x O f ( ' e a ' ) + 2 ) ; 
 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v _ d r a g ' + c a g a _ n u m [ i ] ) . s t y l e . p o s i t i o n = ' r e l a t i v e ' ; 
 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v _ d r a g ' + c a g a _ n u m [ i ] ) . s t y l e . l e f t = ' 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 ( ' d i v _ d r a g ' + c a g a _ n u m [ i ] ) . s t y l e . t o p = ' 0 p x ' ; 
 	 	 	 	 v a r   j = p a r s e I n t ( i ) + 1 ; 
 	 	 	 	 c ( j ) ; 
 	 	 	 } 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " l o g _ d i v "   & &   d o c u m e n t . g e t E l e m e n t B y I d ( i d _ d i v _ e r r o r e ) . i n n e r H T M L ! = t o p . l i n g u a [ 2 0 ] ) 
 	 	 	 	 s e l f . l o c a t i o n . r e p l a c e ( " l o g i n _ u t e n t e . p h p " ) ;   
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " l o g _ d i v 0 "   & &   d o c u m e n t . g e t E l e m e n t B y I d ( i d _ d i v _ e r r o r e ) . i n n e r H T M L ! = t o p . l i n g u a [ 6 ] ) 
 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' r e n e w _ u s e r ' ) . i n n e r 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 ( ' u s e r n a m e _ u t ' ) . v a l u e ; 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " l o g _ d i v 2 "   & &   d o c u m e n t . g e t E l e m e n t B y I d ( i d _ d i v _ e r r o r e ) . i n n e r H T M L = = t o p . l i n g u a [ 7 ] ) 
 	 	 	 	 s e l f . l o c a t i o n . r e p l a c e ( " i n d e x . p h p " ) ; 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " i n f o _ s t r u t t _ d i v _ p a s 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 _ d i v _ e r r o r e ) . i n n e r H T M L ! = t o p . l i n g u a [ 6 ] ) 
 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' r e n e w _ u s e r ' ) . i n n e r 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 ( ' u s e r n a m e ' ) . v a l u e ; 
 
 	 	 	 i f   ( i d _ d i v _ e r r o r e = = " r i s _ r i c e r c a " ) { 
 	 	 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' t i p o _ i t ' ) . 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 B y I d ( ' t i p o _ i t ' ) . s t y l e . t o p = p o s i t i o n 2 ( ' c a s a _ s e l e c t ' , ' t ' ) + ' p x ' ; 
 	 	 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' t i p o _ i t ' ) . s t y l e . l e f t = p o s i t i o n 2 ( ' c a s a _ s e l e c t ' , ' l ' ) + 2 0 0 + ' p x ' ; 
 	 	 	 	 } 
 	 	 	 } 
 	 	 }   
 	 	 e l s e 
 	 	 { 
 	 	 	 a l e r t ( t o p . l i n g u a [ 8 ] +   x m l h t t p . s t a t u s ) 
 	 	 } 
 
 	 } 
 
 } 
 
 
 
 f u n c t i o n   p o s i t i o n 2 ( i d , p ) { 
 
                                 v a r   c t l = d o c u m e n t . g e t E l e m e n t B y I d ( i d ) ; 
 
 	 	 	 	 v a r   a T a g   =   d o c u m e n t . g e t E l e m e n t B y I d ( i d ) ; 
 
                                 v a r   l e f t p o s = 0 ; 
 
                                 v a r   t o p p o s = 0 ; 
 
 	 	 	 	 d o   { 
 
 	 	 	 	 	 a T a g   =   a T a g . o f f s e t P a r e n t ; 
 
                                         l e f t p o s 	 + =   a T a g . o f f s e t L e f t ; 
 
 	 	 	 	 	 t o p p o s   + =   a T a g . o f f s e t T o p ; 
 
 	 	 	 	 }   w h i l e ( ( a T a g . t a g N a m e ! = " B O D Y " ) & & ( a T a g . t a g N a m e ! = " H T M L " ) ) ; 
 
 
 
 
 
                                 i f   ( p = = " l " ) 
 
                                 { 
 
                                         r e t u r n   l e f t p o s + c t l . o f f s e t L e f t ; 
 
                                 } 
 
                                 e l s e 
 
                                         r e t u r n   t o p p o s + c t l . o f f s e t T o p ; 
 
 
 
 
 
                                   } 
 
 
 
 f u n c t i o n   d o _ l o a d ( u r l ) { 
 
 i f   ( w i n d o w . c o n f i r m ( ' C o n f e r m a r e   l \ ' e l i m i n a z i o n e ? ' ) )   l o a d X M L D o c ( u r l ) ; 
 
 } 
 
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 f u n c t i o n   c a n c e l l a E r r o r e ( i d _ d i v _ e r r o r e ) { 
 
 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( i d _ d i v _ e r r o r e ) )   d o c u m e n t . g e t E l e m e n t B y I d ( i d _ d i v _ e r r o r e ) . i n n e r H T M L = " " ; 
 
 } 
 
 
 
 f u n c t i o n   c h e c k E m a i l A d d r e s s ( f i e l d , e r r o r e ) 
 { 
 	 v a r   g o o d E m a i l   =   f i e l d . v a l u e . m a t c h ( / \ b ( ^ ( \ S + @ ) . + ( ( \ . c o m ) | ( \ . n e t ) | ( \ . e d u ) | ( \ . m i l ) | ( \ . g o v ) | ( \ . o r g ) | ( \ . . { 2 , 2 } ) ) $ ) \ b / g i ) ; 
 	 i f   ( g o o d E m a i l ) { 
 	 	 r e t u r n   t r u e ; 
 	 }   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 ( e r r o r e ) . i n n e r H T M L = t o p . l i n g u a [ 9 ] ; 
 	 	 f i e l d . f o c u s ( ) ; 
 	 	 f i e l d . s e l e c t ( ) ; 
 	 	 r e t u r n   f a l s e ; 
 	 } 
 } 
 
 f u n c t i o n   I s D o u b l e ( f i e l d , e r r o r e ) 
 / /     c h e c k   f o r   v a l i d   n u m e r i c   s t r i n g s 
 { 
 
 	 v a r   s t r V a l i d C h a r s   =   " 0 1 2 3 4 5 6 7 8 9 . " ; 
 	 v a r   s t r C h a r ; 
 	 v a r   b l n R e s u l t   =   t r u e ; 
 	 v a r   s t r S t r i n g   =   f i e l d . v a l u e 
 	 i f   ( s t r S t r i n g . l e n g t h   = =   0 )   { 
 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) )   d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 	 	 r e t u r n   f a l s e ; 
 	 } 
 
 	 / /     t e s t   s t r S t r i n g   c o n s i s t s   o f   v a l i d   c h a r a c t e r s   l i s t e d   a b o v e 
 	 f o r   ( i   =   0 ;   i   <   s t r S t r i n g . l e n g t h   & &   b l n R e s u l t   = =   t r u e ;   i + + ) { 
 	 	 s t r C h a r   =   s t r S t r i n g . c h a r A t ( i ) ; 
 	 	 i f   ( s t r V a l i d C h a r s . i n d e x O f ( s t r C h a r )   = =   - 1 ) { 
 	 	 	 b l n R e s u l t   =   f a l s e ; 
 	 	 } 
 	 } 
 
 	 i f   ( ! b l n R e s u l t ) { 
 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) )   
 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) . i n n e r H T M L = t o p . l i n g u a [ 1 1 ] ; 
 	 	 f i e l d . f o c u s ( ) 
 	 	 f i e l d . s e l e c t ( ) 
 	 } 
 	 r e t u r n   b l n R e s u l t ; 
 } 
 
 
 
 f u n c t i o n   I s N u m e r i c ( f i e l d , e r r o r e ) 
 
       / /     c h e c k   f o r   v a l i d   n u m e r i c   s t r i n g s 
 
       { 
 
       v a r   s t r V a l i d C h a r s   =   " 0 1 2 3 4 5 6 7 8 9 " ; 
 
       v a r   s t r C h a r ; 
 
       v a r   b l n R e s u l t   =   t r u e ; 
 
       v a r   s t r S t r i n g   =   f i e l d . v a l u e 
 
       i f   ( s t r S t r i n g . l e n g t h   = =   0 )   { 
 
           i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) )   d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
             r e t u r n   f a l s e ; 
 
             } 
 
 
 
       / /     t e s t   s t r S t r i n g   c o n s i s t s   o f   v a l i d   c h a r a c t e r s   l i s t e d   a b o v e 
 
       f o r   ( i   =   0 ;   i   <   s t r S t r i n g . l e n g t h   & &   b l n R e s u l t   = =   t r u e ;   i + + ) 
 
             { 
 
             s t r C h a r   =   s t r S t r i n g . c h a r A t ( i ) ; 
 
             i f   ( s t r V a l i d C h a r s . i n d e x O f ( s t r C h a r )   = =   - 1 ) 
 
                   { 
 
                   b l n R e s u l t   =   f a l s e ; 
 
                   } 
 
             } 
 
     i f   ( ! b l n R e s u l t ) 
 
     { 
 
           i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) )   d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) . i n n e r H T M L = t o p . l i n g u a [ 1 1 ] ; 
 
         f i e l d . f o c u s ( ) 
 
         f i e l d . s e l e c t ( ) 
 
     } 
 
   r e t u r n   b l n R e s u l t ; 
 
     } 
 
 
 
 f u n c t i o n   I s _ v o i d   ( f i e l d , e r r o r e ) 
 
       / /     c h e c k   f o r   v a l i d   n u m e r i c   s t r i n g s 
 
       { 
 
       v a r   b l n R e s u l t   =   t r u e ; 
 
       v a r   s t r S t r i n g   =   f i e l d . v a l u e ; 
 
       i f   ( s t r S t r i n g . l e n g t h   = =   0 )   { 
 
           i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) )   d o c u m e n t . g e t E l e m e n t B y I d ( e r r o r e ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
             r e t u r n   f a l s e ; 
 
             } 
 
 
 
   r e t u r n   b l n R e s u l t ; 
 
     } 
 
 
 
 / /   p e r   i l   f o r m   d e l l e   c a m e r e   ( r e g i s t r a z i o n e ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 
 
 f u n c t i o n   a b i l i t a _ b u t ( ) { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' s u b ' ) . d i s a b l e d = f a l s e ; 
 
 } 
 
 
 
 f u n c t i o n   r i c a r i c a P r o v ( i d d , l o c a l i t a ) 
 { 
 
 / / 	 v i s u a l i z z a _ n u m _ s t e l l e ( ) ; 
 
 	 v a r   s e l = d o c u m e n t . g e t E l e m e n t B y I d ( i d d ) ; 
 	 v a r   p r o v = s e l . o p t i o n s [ s e l . s e l e c t e d I n d e x ] . v a l u e ; 
 	 i d _ d i v _ e r r o r e = " s e l e z i o n a _ l o c " ; 
 
 	 i f   ( p r o v   ! =   ' ' ) { 
 	 	 i f ( n a v i g a t o r . a p p N a m e   = =   ' M i c r o s o f t   I n t e r n e t   E x p l o r 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 e l e z i o n a _ l o c _ t e s t o ' ) . s t y l e . d i s p l a y   =   ' i n l i n e ' ; 
 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l e z i o n a _ l o c _ t e s t o ' ) . i n n e r 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 ( ' s e l e z i o n a _ l o c _ t e s t o _ n a s c o s t o ' ) . i n n e r 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 ( ' s e l e z i o n a _ l o c ' ) . s t y l e . d i s p l a y   =   ' i n l i n e ' ; 
 	 	 }   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 ( ' s e l e z i o n a _ l o c _ t e s t o ' ) . s t y l e . d i s p l a y   =   ' t a b l e - c e l l ' ; 
 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l e z i o n a _ l o c ' ) . s t y l e . d i s p l a y   =   ' t a b l e - c e l l ' ; 
 	 	 } 
 	 	 i f   ( l o c a l i t a   = =   n u l l ) 
 	 	 { 	 
 	 	 	 l o a d X M L D o c ( ' c o m u n i _ s e l . p h p ? p r o v = ' + p r o v + ' & l i n g u a = ' + t o p . t i p o _ l i n g u a ) ; 
 	 	 }   e l s e   { 
 	 	 	 l o a d X M L D o c ( ' c o m u n i _ s e l . p h p ? p r o v = ' + p r o v + ' & l i n g u a = ' + t o p . t i p o _ l i n g u a + ' & l o c a l i t a = ' + l o c a l i t a ) ; 
 	 	 } 
 	 }   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 ( ' s e l e z i o n a _ l o c _ t e s t o ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l e z i o n a _ l o c ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 	 	 n u m e r o R i s u l t a t i ( ) ; 
 	 } 
 	 
 } 
 
 f u n c t i o n   r i c a r i c a P r o v 1 ( i d , l o c a l i t a ) 
 
 { 
 
 
 
 v a r   s e l = d o c u m e n t . g e t E l e m e n t B y I d ( i d ) ; 
 
 v a r   p r o v = s e l . o p t i o n s [ s e l . s e l e c t e d I n d e x ] . v a l u e ; 
 
 i d _ d i v _ e r r o r e = " s e l e z i o n a _ l o c _ s t r u t " ; 
 
 i f   ( l o c a l i t a   = =   n u l l ) 
 	 	 { 	 
 	 	 	 l o a d X M L D o c ( ' c o m u n i _ s e l . p h p ? p r o v = ' + p r o v + ' & l i n g u a = ' + t o p . t i p o _ l i n g u a ) ; 
 	 	 }   e l s e   { 
 	 	 	 l o a d X M L D o c ( ' c o m u n i _ s e l . p h p ? p r o v = ' + p r o v + ' & l i n g u a = ' + t o p . t i p o _ l i n g u a + ' & l o c a l i t a = ' + l o c a l i t a ) ; 
 	 	 } 
 
 } 
 
 
 
 f u n c t i o n   h i d _ l o c ( i d s , i d d ) 
 { 
 
 	 v a r   s e l = d o c u m e n t . g e t E l e m e n t B y I d ( i d s ) ; 
 	 i f   ( s e l   ! =   n u l l ) { 
 	 	 i f   ( s e l . s e l e c t e d I n d e x   = =   - 1 ) 
 	 	 { 
 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( i d d ) . v a l u e   =   ' ' ; 
 	 	 }   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 ( i d d ) . v a l u e = s e l . o p t i o n s [ s e l . s e l e c t e d I n d e x ] . v a l u e ; 
 	 	 } 
 	 }   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 ( i d d ) . v a l u e   =   ' ' ; 
 	 } 
 } 
 
 
 
 
 
 
 
 f u n c t i o n   v a l i d a t e _ f o r m 3 ( ) 
 { 
 
 	 v e d i C o d i c e ( ) ; 
 
 	 v a r   n o m e = d o c u m e n t . g e t E l e m e n t B y I d ( " i d _ i t i n " ) . v a l u e ; 
 	 v a r   s u b m = t r u e ; 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' s u b ' ) . d i s a b l e d = t r u e ; 
 	 
 	 i f   ( n o m e = = " " )   { 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " i d _ i t i n _ n o t i f y " ) . i n n e r H T M L = " C a m p o   a s s e n t e ! " ; 
 	 	 s u b m = f a l s e ; 
 	 } 
 
 
 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' n u o v a _ s o t _ c a t ' ) ) { 
 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' n u o v a _ s o t _ c a t ' ) . v a l u e = = ' ' ) { 
 	 	 	 v a r   s e l = d o c u m e n t . g e t E l e m e n t B y I d ( ' s o t t o c a t ' ) ; 
 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' s o t t o _ c ' ) . v a l u e = s e l . o p t i o n s [ s e l . s e l e c t e d I n d e x ] . v a l u e ; 
 	 	 }   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 ( ' s o t t o _ c ' ) . 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 ( ' n u o v a _ s o t _ c a t ' ) . v a l u e ; 
 	 	 } 
 	 } 
 
 
 	 i f   ( s u b m ) { 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " i t i n e r _ r e g _ f o r m " ) . s u b m i t ( ) ; 
 	 }   e l s e   ; 
 
 
 } 
 
 f u n c t i o n   v a l i d a t e _ f o r m _ r e c ( ) 
 { 
 
 	 v e d i C o d i c e ( ' g e n e r a l e ' , ' t x t _ g e n ' ) ; 
 	 v e d i C o d i c e ( ' a c c o g l i e n z a ' , ' t x t _ a c c ' ) ; 
 	 v e d i C o d i c e ( ' p u l i z i a ' , ' t x t _ p u l ' ) ; 
 	 v e d i C o d i c e ( ' c o n f o r t ' , ' t x t _ c o n f ' ) ; 
 	 v e d i C o d i c e ( ' c o n d i z i o n e ' , ' t x t _ c o n d ' ) ; 
 
 	 v a r   v o t o _ a c c = d o c u m e n t . g e t E l e m e n t B y I d ( " a c c " ) . v a l u e ; 
 	 v a r   v o t o _ p u l = d o c u m e n t . g e t E l e m e n t B y I d ( " p u l " ) . v a l u e ; 
 	 v a r   v o t o _ c o n f = d o c u m e n t . g e t E l e m e n t B y I d ( " c o n f " ) . v a l u e ; 
 	 v a r   v o t o _ c o n d = d o c u m e n t . g e t E l e m e n t B y I d ( " c o n d " ) . v a l u e ; 
 
 	 v a r   s u b m = t r u e ; 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' s u b ' ) . d i s a b l e d = t r u e ; 
 	 
 
 	 i f   ( s u b m ) { 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( " r e c _ r e g _ f o r m " ) . s u b m i t ( ) ; 
 	 }   
 
 
 } 
 
 
 
 
 
 f u n c t i o n   v a l i d a t e _ f o r m 4 ( ) { 
 v e d i C o d i c e ( ) ; 
 v a r   n o m e = d o c u m e n t . g e t E l e m e n t B y I d ( " i d _ i t i n " ) . v a l u e ; 
 v a r   s u b m = t r u e ; 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' s u b ' ) . d i s a b l e d = t r u e ; 
 
 i f   ( s u b m ) { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " i t i n e r _ r e g _ f o r m _ u k " ) . s u b m i t ( ) ; 
 } e l s e   ; 
 
 } 
 
 
 
 
 
 f u n c t i o n   v a l i d a t e _ f o r m 5 ( ) { 
 v e d i C o d i c e ( ) ; 
 v a r   n o m e = d o c u m e n t . g e t E l e m e n t B y I d ( " i d _ i t i n " ) . v a l u e ; 
 v a r   s u b m = t r u e ; 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' s u b ' ) . d i s a b l e d = t r u e ; 
 
 i f   ( s u b m ) { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " i t i n e r _ r e g _ f o r m _ d e " ) . s u b m i t ( ) ; 
 } e l s e   ; 
 
 } 
 
 f u n c t i o n   v a l _ n u m ( ) { 
 	 i f   ( ! I s N u m e r i c ( d o c u m e n t . g e t E l e m e n t B y I d ( " n u m " ) , ' n u m _ n o t i f y ' ) )   { 
 	 	 a l e r t ( ' I n s e r i s c i   u n   v a l o r e   n u m e r i c o ! ' ) ; 
 	 } 
 } 
 
 
 
 f u n c t i o n   v a l _ p r e z z o ( ) { 
 
 i f   ( ! I s N u m e r i c ( 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 z z o " ) , ' p r e z z o _ n o t i f y ' ) )   { 
 
 } 
 
 } 
 
 
 
 
 
 f u n c t i o n   v a l _ p o s t i ( ) { 
 
 	 i f   ( ! I s N u m e r i c ( d o c u m e n t . g e t E l e m e n t B y I d ( " p o s t i " ) , ' p o s t i _ n o t i f y ' ) )   { 
 	 	 a l e r t ( ' I n s e r i s c i   u n   v a l o r e   n u m e r i c o ! ' ) ; 
 	 } 
 
 } 
 
 
 
 f u n c t i o n   v a l _ i d _ c a m ( ) { 
 
 v a r   f i e l d = d o c u m e n t . g e t E l e m e n t B y I d ( " i d _ c a m " ) . v a l u e ; 
 
 i f   ( f i e l d = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " i d _ c a m _ n o t i f y " ) . i n n e r H T M L = " C a m p o   a s s e n t e ! " ; 
 
 } 
 
 } 
 
 
 
 / /   p e r   i l   f o r m   d e l l ' u t e n t e   ( r e g i s t r a z i o n e ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 f u n c t i o n   v a l i d a _ o f f e r t a ( i d ) 
 
 { 
 
 v a r   l o c ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " d a t a _ o f f _ " + i d ) . o n c h a n g 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 z z o _ o f f _ " + i d ) . o n c h a n g e ( ) ; 
 
 i f   ( ( d o c u m e n t . g e t E l e m e n t B y I d ( ' e r r o r e _ d a t a _ o f f ' + i d ) . i n n e r 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 ( ' e r r o r e _ p r e z z o _ o f f ' + i d ) . i n n e r H T M L = = " " ) ) 
 
 i d _ d i v _ e r r o r e = " e r r o r _ o f f _ " + i d ; 
 
 l o c = " s a l v a _ o f f e r t a . p h p ? i d _ c a m = " + i d + " & d a t a = " + d o c u m e n t . g e t E l e m e n t B y I d ( " d a t a _ o f f _ " + i d ) . v a l u e + " & p r e z z o = " + 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 z z o _ o f f _ " + i d ) . v a l u e ; 
 
 l o a d X M L D o c ( l o c ) ; 
 
 } 
 
 
 
 f u n c t i o n   v a l i d a t e _ f o r m ( ) { 
 
 v a r   s u b m = t r u e ; 
 
 v a r   n o m e = d o c u m e n t . g e t E l e m e n t B y I d ( " n o m e _ u t " ) . v a l u e ; 
 
 v a r   c o g n o m e = d o c u m e n t . g e t E l e m e n t B y I d ( " c o g n o m e _ u t " ) . v a l u e ; 
 
 v a r   m a i l = 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 l _ u t " ) . v a l u e ; 
 
 v a r   u s e r = d o c u m e n t . g e t E l e m e n t B y I d ( " u s e r n a m e _ u t " ) . v a l u e ; 
 
 v a r   t e l = d o c u m e n t . g e t E l e m e n t B y I d ( " t e l _ u t " ) . v a l u e ; 
 
 v a r   p w d = d o c u m e n t . g e t E l e m e n t B y I d ( " p a s s _ u t " ) . v a l u e ; 
 
 v a r   c _ p w d = d o c u m e n t . g e t E l e m e n t B y I d ( " c o n f _ p a s s _ u t " ) . v a l u e ; 
 
 
 
 i f   ( c o g n o m e = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " c o g n o m e _ n o t i f y " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 s u b m = f a l s e ; 
 
 } 
 
 i f   ( n o m e = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " n o m e _ n o t i f y " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 s u b m = f a l s e ; 
 
 
 
 } 
 
 i f   ( p w d = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " p w d _ n o t i f y 1 " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 s u b m = f a l s e ; 
 
 
 
 } 
 
 i f   ( c _ p w d = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " p w d _ n o t i f y 2 " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 s u b m = f a l s e ; 
 
 
 
 } 
 
 i f   ( p w d ! = c _ p w d )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " p w d _ n o t i f y 2 " ) . i n n e r H T M L = t o p . l i n g u a [ 1 2 ] ; 
 
 s u b m = f a l s e ; 
 
 
 
 } 
 
 i f   ( u s e r = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " u s e r n a m e _ n o t i f y 2 " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 s u b m = f a l s e ; 
 
 
 
 } 
 
 
 
 i f   ( ! I s N u m e r i c ( d o c u m e n t . g e t E l e m e n t B y I d ( " t e l _ u t " ) , ' t e l _ n o t i f y ' ) )   { 
 
 s u b m = f a l s e ; 
 
 
 
 } 
 
 
 
 v a r   g o o d E m a i l   =   m a i l . m a t c h ( / \ b ( ^ ( \ S + @ ) . + ( ( \ . c o m ) | ( \ . n e t ) | ( \ . e d u ) | ( \ . m i l ) | ( \ . g o v ) | ( \ . o r g ) | ( \ . . { 2 , 2 } ) ) $ ) \ b / g i ) ; 
 
 i f   ( ! g o o d E m a i l ) { 
 
 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 l _ n o t i f y " ) . i n n e r H T M L = t o p . l i n g u a [ 9 ] ; 
 
 s u b m = f a l s e ; 
 
 
 
 } 
 
 
 
 i f   ( s u b m ) { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " r e g _ f o r m " ) . s u b m i t ( ) ; 
 
 } 
 
 
 
 } 
 
 
 
 f u n c t i o n   v a l _ u s e r ( ) { 
 
 v a r   f i e l d = d o c u m e n t . g e t E l e m e n t B y I d ( " u s e r n a m e _ u t " ) . v a l u e ; 
 
 i f   ( f i e l d = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " u s e r n a m e _ n o t i f y 2 " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 } 
 
 } 
 
 
 
 f u n c t i o n   v a l _ n o m e ( ) { 
 
 v a r   f i e l d = d o c u m e n t . g e t E l e m e n t B y I d ( " n o m e _ u t " ) . v a l u e ; 
 
 i f   ( f i e l d = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " n o m e _ n o t i f y " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 } 
 
 } 
 
 
 
 
 
 f u n c t i o n   v a l _ c o g n o m e ( ) { 
 
 v a r   f i e l d = d o c u m e n t . g e t E l e m e n t B y I d ( " c o g n o m e _ u t " ) . v a l u e ; 
 
 i f   ( f i e l d = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " c o g n o m e _ n o t i f y " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 } 
 
 } 
 
 
 
 f u n c t i o n   v a l _ m a i l ( ) { 
 
 v a r   f i e l d = 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 l _ u t " ) . v a l u e ; 
 
 v a r   g o o d E m a i l   =   f i e l d . m a t c h ( / \ b ( ^ ( \ S + @ ) . + ( ( \ . c o m ) | ( \ . n e t ) | ( \ . e d u ) | ( \ . m i l ) | ( \ . g o v ) | ( \ . o r g ) | ( \ . . { 2 , 2 } ) ) $ ) \ b / g i ) ; 
 
 i f   ( ! g o o d E m a i l ) { 
 
 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 l _ n o t i f y " ) . i n n e r H T M L = t o p . l i n g u a [ 9 ] ; 
 
 } 
 
 } 
 
 
 
 f u n c t i o n   v a l _ t e l ( ) { 
 
 i f   ( ! I s N u m e r i c ( d o c u m e n t . g e t E l e m e n t B y I d ( " t e l _ u t " ) , ' t e l _ n o t i f y ' ) )   { 
 
 } 
 
 } 
 
 
 
 f u n c t i o n   v a l _ p w d ( ) { 
 
 v a r   p w d = d o c u m e n t . g e t E l e m e n t B y I d ( " p a s s _ u t " ) . v a l u e ; 
 
 v a r   c _ p w d = d o c u m e n t . g e t E l e m e n t B y I d ( " c o n f _ p a s s _ u t " ) . v a l u e ; 
 
 i f   ( p w d = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " p w d _ n o t i f y 1 " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 } 
 
 i f   ( c _ p w d = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " p w d _ n o t i f y 2 " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 } 
 
 i f   ( p w d ! = c _ p w d )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " p w d _ n o t i f y 2 " ) . i n n e r H T M L = t o p . l i n g u a [ 1 2 ] ; 
 
 } 
 
 } 
 
 
 
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 
 
 f u n c t i o n   a d d _ t a r i f ( ) { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " a d d _ t a r i f f a " ) . d i s a b l e d = t r u e ; 
 d o c u m e n t . g e t E l e m e n t B y I d ( " i m g _ a d d _ t a r i f f a " ) . s t y l e . d i s p l a y = ' n o n e ' ; 
 
 v a r   n e w _ t r = d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; 
 
 v a r   n e w _ t d = d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
 v a r   n e w _ t a b = d o c u m e n t . c r e a t e E l e m e n t ( " t a b l e " ) ;   v a r   t _ b o d y   =   d o c u m e n t . c r e a t e E l e m e n t ( " t b o d y " ) ; 
 
 v a r   n e w _ t r 1 = d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; v a r   n e w _ t d 1 = d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; v a r   n e w _ t d 2 = d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
 v a r   n e w _ t r 2 = d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; v a r   n e w _ t d 3 = d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; v a r   n e w _ t d 4 = d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
 v a r   n e w _ t r 3 = d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; v a r   n e w _ t d 5 = d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; v a r   n e w _ t d 6 = d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
 v a r   n e w _ t r 4 = d o c u m e n t . c r e a t e E l e m e n t ( " t r " ) ; v a r   n e w _ t d 7 = d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; v a r   n e w _ t d 8 = d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
 v a r   n e w _ t d 9 = d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; v a r   n e w _ t d 1 0 = d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; v a r   n e w _ t d 1 1 = d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; v a r   n e w _ t d 1 2 = d o c u m e n t . c r e a t e E l e m e n t ( " t d " ) ; 
 
 n e w _ t d 1 0 . s e t A t t r i b u t e ( ' i d ' , ' e r r o r e _ d i ' + i d ) ; 
 
 
 
 n e w _ t d 1 1 . s e t A t t r i b u t e ( ' i d ' , ' e r r o r e _ d f ' + i d ) ; 
 
 
 
 n e w _ t d 1 2 . s e t A t t r i b u t e ( ' i d ' , ' e r r o r e _ n ' + i d ) ; 
 
 
 
 n e w _ t d 9 . s e t A t t r i b u t e ( ' i d ' , ' e r r o r e _ p ' + i d ) ; 
 
 
 
 v a r   n e w _ d i v _ e = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
 n e w _ d i v _ e . s e t A t t r i b u t e ( ' i d ' , ' c o n f _ t a r i f f a _ ' + i d ) ; 
 
 
 
 v a r   n e w _ b u t = d o c u m e n t . c r e a t e E l e m e n t ( " i n p u t " ) ; 
 
 v a r   n e w _ b u t 1 = d o c u m e n t . c r e a t e E l e m e n t ( " i n p u t " ) ; 
 
 n e w _ b u t . s e t A t t r i b u t e ( ' t y p e ' , " b u t t o n " ) ; 
 
 n e w _ b u t 1 . s e t A t t r i b u t e ( ' t y p e ' , " b u t t o n " ) ; 
 
 
 
 n e w _ t r . s e t A t t r i b u t e ( ' i d ' , " t a b _ r o w _ " + i d ) ; 
 
 
 
 v a r   n e w _ b l o c k = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
 n e w _ b l o c k . s e t A t t r i b u t e ( " i d " , i d ) ; 
 
 
 
 v a r   n e w _ t i t = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; 
 
 n e w _ t i t . s e t A t t r i b u t e ( " i d " , " t a r i f f a _ " + i d ) ; 
 
 n e w _ t e x t = d o c u m e n t . c r e a t e T e x t N o d e ( " t a r i f f a   " ) ; 
 
 n e w _ t i t . a p p e n d C h i l d ( n e w _ t e x t ) ; 
 
 
 
 v a r   n e w _ i n p u t _ t e x t 1 =   d o c u m e n t . c r e a t e E l e m e n t ( " i n p u t " ) ; 
 
 n e w _ i n p u t _ t e x t 1 . s e t A t t r i b u t e ( ' t y p e ' , ' t e x t ' ) ; 
 
 n e w _ i n p u t _ t e x t 1 . s e t A t t r i b u t e ( ' i d ' , i d + ' t e x t 1 ' ) ; 
 
 n e w _ i n p u t _ t e x t 1 . s e t A t t r i b u t e ( ' s i z e ' , ' 1 0 ' ) ; 
 
 n e w _ i n p u t _ t e x t 1 . s e t A t t r i b u t e ( ' m a x l e n g t h ' , ' 1 0 ' ) ; 
 
 n e w _ i n p u t _ t e x t 1 . s e t A t t r i b u t e ( ' r e a d O n l y ' , ' t r u e ' ) ; 
 
 n e w _ i n p u t _ t e x t 1 . s e t A t t r i b u t e ( ' n a m e ' , i d ) ; 
 
 n e w _ i n p u t _ t e x t 1 . o n c l i c k = f u n c t i o n   ( ) { p o p U p C a l e n d a r ( t h i s ,   t h i s , ' d d / m m / y y y y ' ) ; c a n c e l l a E r r o r e ( n e w _ t d 1 0 . i d ) ; r i a b _ s a v e _ b u t ( t h i s . n a m e ) ; } 
 
 n e w _ i n p u t _ t e x t 1 . o n c h a n g e = f u n c t i o n   ( ) { v e r i f _ d a t e ( t h i s . v a l u e , n e w _ t d 1 0 . i d ) ; } 
 
 
 
 n e w _ t e x t 1 = d o c u m e n t . c r e a t e T e x t N o d e ( "     d a t a   i n i z i o       " ) ; 
 
 
 
 n e w _ t d 1 . a p p e n d C h i l d ( n e w _ t e x t 1 ) ; 
 
 n e w _ t d 2 . a p p e n d C h i l d ( n e w _ i n p u t _ t e x t 1 ) ; 
 
 n e w _ t r 1 . a p p e n d C h i l d ( n e w _ t d 1 ) ; 
 
 n e w _ t r 1 . a p p e n d C h i l d ( n e w _ t d 2 ) ; 
 
 
 
 v a r   n e w _ i n p u t _ t e x t 2 =   d o c u m e n t . c r e a t e E l e m e n t ( " i n p u t " ) ; 
 
 n e w _ i n p u t _ t e x t 2 . s e t A t t r i b u t e ( ' t y p e ' , ' t e x t ' ) ; 
 
 n e w _ i n p u t _ t e x t 2 . s e t A t t r i b u t e ( ' i d ' , i d + ' t e x t 2 ' ) ; 
 
 n e w _ i n p u t _ t e x t 2 . s e t A t t r i b u t e ( ' s i z e ' , ' 1 0 ' ) ; 
 
 n e w _ i n p u t _ t e x t 2 . s e t A t t r i b u t e ( ' m a x l e n g t h ' , ' 1 0 ' ) ; 
 
 n e w _ i n p u t _ t e x t 2 . s e t A t t r i b u t e ( ' r e a d O n l y ' , ' t r u e ' ) ; 
 
 n e w _ i n p u t _ t e x t 2 . s e t A t t r i b u t e ( ' n a m e ' , i d ) ; 
 
 n e w _ i n p u t _ t e x t 2 . o n c l i c k = f u n c t i o n   ( ) { p o p U p C a l e n d a r ( t h i s ,   t h i s , ' d d / m m / y y y y ' ) ; c a n c e l l a E r r o r e ( n e w _ t d 1 1 . i d ) ; r i a b _ s a v e _ b u t ( t h i s . n a m e ) ; } 
 
 n e w _ i n p u t _ t e x t 2 . o n c h a n g e = f u n c t i o n   ( ) { v e r i f _ d a t e ( t h i s . v a l u e , n e w _ t d 1 1 . i d ) ; } 
 
 
 
 n e w _ t e x t 2 = d o c u m e n t . c r e a t e T e x t N o d e ( "     d a t a   f i n e           " ) ; 
 
 
 
 n e w _ t d 3 . a p p e n d C h i l d ( n e w _ t e x t 2 ) ; 
 
 n e w _ t d 4 . a p p e n d C h i l d ( n e w _ i n p u t _ t e x t 2 ) ; 
 
 n e w _ t r 2 . a p p e n d C h i l d ( n e w _ t d 3 ) ; 
 
 n e w _ t r 2 . a p p e n d C h i l d ( n e w _ t d 4 ) ; 
 
 
 
 v a r   n e w _ i n p u t _ t e x t 3 =   d o c u m e n t . c r e a t e E l e m e n t ( " i n p u t " ) ; 
 
 n e w _ i n p u t _ t e x t 3 . s e t A t t r i b u t e ( ' t y p e ' , ' t e x t ' ) ; 
 
 n e w _ i n p u t _ t e x t 3 . s e t A t t r i b u t e ( ' i d ' , i d + ' t e x t 3 ' ) ; 
 
 n e w _ i n p u t _ t e x t 3 . s e t A t t r i b u t e ( ' s i z e ' , ' 1 0 ' ) ; 
 
 n e w _ i n p u t _ t e x t 3 . s e t A t t r i b u t e ( ' m a x l e n g t h ' , ' 1 0 ' ) ; 
 
 n e w _ i n p u t _ t e x t 3 . s e t A t t r i b u t e ( ' n a m e ' , i d ) ; 
 
 n e w _ t e x t 3 = d o c u m e n t . c r e a t e T e x t N o d e ( "       p r e z z o   g i o r n a l i e r o           " ) ; 
 
 n e w _ i n p u t _ t e x t 3 . o n c h a n g e = f u n c t i o n   ( ) { I s D o u b l e ( t h i s , n e w _ t d 9 . i d ) ; } 
 
 n e w _ i n p u t _ t e x t 3 . o n k e y u p = f u n c t i o n   ( ) { r i a b _ s a v e _ b u t ( t h i s . n a m e ) ; } 
 
 n e w _ i n p u t _ t e x t 3 . o n c l i c k = f u n c t i o n   ( ) { c a n c e l l a E r r o r e ( n e w _ t d 9 . i d ) ; r i a b _ s a v e _ b u t ( t h i s . n a m e ) ; } 
 
 n e w _ i n p u t _ t e x t 3 . o n f o c u s = f u n c t i o n   ( ) { c a n c e l l a E r r o r e ( n e w _ t d 9 . i d ) ; r i a b _ s a v e _ b u t ( t h i s . n a m e ) ; } 
 
 
 
 n e w _ t d 5 . a p p e n d C h i l d ( n e w _ t e x t 3 ) ; 
 
 n e w _ t d 6 . a p p e n d C h i l d ( n e w _ i n p u t _ t e x t 3 ) ; 
 
 n e w _ t r 3 . a p p e n d C h i l d ( n e w _ t d 5 ) ; 
 
 n e w _ t r 3 . a p p e n d C h i l d ( n e w _ t d 6 ) ; 
 
 
 
 v a r   n e w _ i n p u t _ t e x t 4 =   d o c u m e n t . c r e a t e E l e m e n t ( " i n p u t " ) ; 
 
 n e w _ i n p u t _ t e x t 4 . s e t A t t r i b u t e ( ' t y p e ' , ' t e x t ' ) ; 
 
 n e w _ i n p u t _ t e x t 4 . s e t A t t r i b u t e ( ' i d ' , i d + ' t e x t 4 ' ) ; 
 
 n e w _ i n p u t _ t e x t 4 . s e t A t t r i b u t e ( ' s i z e ' , ' 2 0 ' ) ; 
 
 / / n e w _ i n p u t _ t e x t 4 . s e t A t t r i b u t e ( ' m a x l e n g t h ' , ' 6 ' ) ; 
 
 n e w _ i n p u t _ t e x t 4 . s e t A t t r i b u t e ( ' n a m e ' , i d ) ; 
 
 n e w _ t e x t 4 = d o c u m e n t . c r e a t e T e x t N o d e ( "       n o m e   t a r i f f a           " ) ; 
 
 n e w _ i n p u t _ t e x t 4 . o n c h a n g e = f u n c t i o n   ( ) { I s _ v o i d ( t h i s , n e w _ t d 1 2 . i d ) ; } 
 
 n e w _ i n p u t _ t e x t 4 . o n k e y u p = f u n c t i o n   ( ) { r i a b _ s a v e _ b u t ( t h i s . n a m e ) ; } 
 
 n e w _ i n p u t _ t e x t 4 . o n c l i c k = f u n c t i o n   ( ) { c a n c e l l a E r r o r e ( n e w _ t d 1 2 . i d ) ; r i a b _ s a v e _ b u t ( t h i s . n a m e ) ; } 
 
 n e w _ i n p u t _ t e x t 4 . o n f o c u s = f u n c t i o n   ( ) { c a n c e l l a E r r o r e ( n e w _ t d 1 2 . i d ) ; r i a b _ s a v e _ b u t ( t h i s . n a m e ) ; } 
 
 
 
 n e w _ t d 7 . a p p e n d C h i l d ( n e w _ t e x t 4 ) ; 
 
 n e w _ t d 8 . a p p e n d C h i l d ( n e w _ i n p u t _ t e x t 4 ) ; 
 
 n e w _ t r 4 . a p p e n d C h i l d ( n e w _ t d 7 ) ; 
 
 n e w _ t r 4 . a p p e n d C h i l d ( n e w _ t d 8 ) ; 
 
 
 
 n e w _ t r 3 . a p p e n d C h i l d ( n e w _ t d 9 ) ; 
 
 n e w _ t r 1 . a p p e n d C h i l d ( n e w _ t d 1 0 ) ; 
 
 n e w _ t r 2 . a p p e n d C h i l d ( n e w _ t d 1 1 ) ; 
 
 n e w _ t r 4 . a p p e n d C h i l d ( n e w _ t d 1 2 ) ; 
 
 
 
 / / n e w _ b u t . s e t A t t r i b u t e ( " i d " , " c a n c e l _ " + i d ) ; 
 
 / / n e w _ b u t . s e t A t t r i b u t e ( " n a m e " , i d ) ; 
 
 n e w _ b u t . s e t A t t r i b u t e ( " v a l u e " , " -   e l i m i n a   - " ) ; 
 
 m y _ s t y l e = n e w _ b u t . s t y l e ; 
 
 m y _ s t y l e . p o s i t i o n = " r e l a t i v e " ; 
 
 m y _ s t y l e . c o l o r = " r e d " ; 
 
 m y _ s t y l e . l e f t = ' 8 3 p x ' ; 
 
 n e w _ b u t . s e t A t t r i b u t e ( " s t y l e " , m y _ s t y l e ) ; 
 
 n e w _ b u t . o n c l i c k = f u n c t i o n   ( ) { r e m _ t a r i f ( t h i s . n a m e ) ; } 
 
 
 
 v a r   n e w _ i m a g e = d o c u m e n t . c r e a t e E l e m e n t ( " i m g " ) ; 
 n e w _ i m a g e . s e t A t t r i b u t e ( " i d " , " c a n c e l _ " + i d ) ; 
 n e w _ i m a g e . s e t A t t r i b u t e ( " n a m e " , i d ) ; 
 n e w _ i m a g e . s e t A t t r i b u t e ( ' s r c ' , " i m a g e s _ i t a / b o t t o n e _ c a n c e l l a . g i f " ) ; 
 n e w _ i m a g e . o n c l i c k = f u n c t i o n   ( ) { r e m _ t a r i f ( t h i s . n a m e ) ; } 
 
 v a r   n e w _ i m a g e 2 = d o c u m e n t . c r e a t e E l e m e n t ( " i m g " ) ; 
 n e w _ i m a g e 2 . s e t A t t r i b u t e ( " i d " , " s a l v a _ " + i d ) ; 
 n e w _ i m a g e 2 . s e t A t t r i b u t e ( " n a m e " , i d ) ; 
 n e w _ i m a g e 2 . s e t A t t r i b u t e ( ' s r c ' , " i m a g e s _ i t a / b o t t o n e _ s a l v a . g i f " ) ; 
 n e w _ i m a g e 2 . o n c l i c k = f u n c t i o n   ( ) { s a v e _ t a r i f ( t h i s . n a m e ) ; } 
 
 / / n e w _ t i t . a p p e n d C h i l d ( n e w _ b u t ) ; 
 
 n e w _ t i t . a p p e n d C h i l d ( n e w _ i m a g e ) ; 
 n e w _ t i t . a p p e n d C h i l d ( n e w _ i m a g e 2 ) ; 
 
 
 
 
 
 
 n e w _ b u t 1 . s e t A t t r i b u t e ( " i d " , " s a l v a _ " + i d ) ; 
 
 / / n e w _ b u t 1 . s e t A t t r i b u t e ( " n a m e " , i d ) ; 
 
 n e w _ b u t 1 . s e t A t t r i b u t e ( " v a l u e " , " -   s a l v a   - " ) ; 
 
 m y _ s t y l e = n e w _ b u t 1 . s t y l e ; 
 
 m y _ s t y l e . p o s i t i o n = " r e l a t i v e " ; 
 
 m y _ s t y l e . c o l o r = " r e d " ; 
 
 m y _ s t y l e . l e f t = ' 8 2 p x ' ; 
 
 n e w _ b u t 1 . s e t A t t r i b u t e ( " s t y l e " , m y _ s t y l e ) ; 
 
 n e w _ b u t 1 . o n c l i c k = f u n c t i o n   ( ) { s a v e _ t a r i f ( t h i s . n a m e ) ; } 
 
 / / n e w _ t i t . a p p e n d C h i l d ( n e w _ b u t 1 ) ; 
 
 
 
 t _ b o d y . a p p e n d C h i l d ( n e w _ t r 4 ) ; 
 
 t _ b o d y . a p p e n d C h i l d ( n e w _ t r 1 ) ; 
 
 t _ b o d y . a p p e n d C h i l d ( n e w _ t r 2 ) ; 
 
 t _ b o d y . a p p e n d C h i l d ( n e w _ t r 3 ) ; 
 
 
 
 n e w _ t a b . a p p e n d C h i l d ( t _ b o d y ) ; 
 
 
 
 n e w _ b l o c k . a p p e n d C h i l d ( n e w _ t i t ) ; 
 
 n e w _ b l o c k . a p p e n d C h i l d ( n e w _ t a b ) ; 
 
 
 
 n e w _ t d . a p p e n d C h i l d ( n e w _ b l o c k ) ; 
 
 n e w _ t r . a p p e n d C h i l d ( n e w _ t d ) ; 
 
 n e w _ b l o c k . a p p e n d C h i l d ( n e w _ d i v _ e ) ; 
 
 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' t r _ t a r i f f e ' ) . g e t E l e m e n t s B y T a g N a m e ( ' t b o d y ' ) [ 0 ] . a p p e n d C h i l d ( n e w _ t r ) ; 
 
 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( i d ) . s t y l e . b o r d e r = " 1 p x   b l a c k   s o l i d " ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( i d ) . s t y l e . w i d t h = " 3 3 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 ( i d ) . s t y l e . h e i g h t = " 1 5 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 ( " t a r i f f a _ " + i d ) . s t y l e . b a c k g r o u n d C o l o r = " # 6 1 8 5 b 5 " ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " t a r i f f a _ " + i d ) . s t y l e . w i d t h = " 3 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 ( " t a r i f f a _ " + i d ) . s t y l e . h e i g h t = " 2 5 p x " ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " t a r i f f a _ " + i d ) . s t y l e . p a d d i n g L e f t = " 2 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 ( " t a r i f f a _ " + i d ) . s t y l e . c o l o r = " # 6 1 8 5 b 5 " ; 
 
 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' e r r o r e _ d i ' + i d ) . s t y l e . c o l o r = ' # f f 0 0 0 0 ' ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' e r r o r e _ d i ' + i d ) . s t y l e . f o n t S i z e = ' 8 p t ' ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' e r r o r e _ d f ' + i d ) . s t y l e . c o l o r = ' # f f 0 0 0 0 ' ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' e r r o r e _ d f ' + i d ) . s t y l e . f o n t S i z e = ' 8 p t ' ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " e r r o r e _ n " + i d ) . s t y l e . c o l o r = ' # f f 0 0 0 0 ' ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' e r r o r e _ n ' + i d ) . s t y l e . f o n t S i z e = ' 8 p t ' ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " e r r o r e _ p " + i d ) . s t y l e . c o l o r = ' # f f 0 0 0 0 ' ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' e r r o r e _ p ' + i d ) . s t y l e . f o n t S i z e = ' 8 p t ' ; 
 
 
 
 
 
 i d + + ; 
 
 } 
 
 
 
 f u n c t i o n   r e m _ t a r i f ( i d ) { 
 
 i d _ d i v _ e r r o r e = " a j a x _ a l e r t " ; 
 
 l o a d X M L D o c ( " c o n f _ r e g _ e l i m i n a . p h p ? i d = " + i d ) ; 
 
 v a r   i d _ r = " t a b _ r o w _ " + i d ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' t b o d y _ t a r ' ) . r e m o v e C h i l d ( d o c u m e n t . g e t E l e m e n t B y I d ( i d _ r ) ) ; 
 
 a l e r t ( ' T a r i f f a   e l i m i n a t a   c o r r e t t a m e n t e ' ) ; 
 
 
 } 
 
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v a l i d a z   t a r i f f e 
 
 
 
 f u n c t i o n   v a l i d a _ t a r i f ( i d ) { / / t h i s . n a m e 
 
 v a r   b o o l = t r u e ; 
 
 v a r   d 1 = d o c u m e n t . g e t E l e m e n t B y I d ( i d + ' t e x t 1 ' ) ; 
 
 v a r   d 2 = d o c u m e n t . g e t E l e m e n t B y I d ( i d + ' t e x t 2 ' ) ; 
 
 v a r   n = d o c u m e n t . g e t E l e m e n t B y I d ( i d + ' t e x t 4 ' ) ; 
 
 v a r   p = d o c u m e n t . g e t E l e m e n t B y I d ( i d + ' t e x t 3 ' ) ; 
 
 v a r   b u t = d o c u m e n t . g e t E l e m e n t B y I d ( ' s a l v a _ ' + i d ) ; 
 
 
 
 i f   ( ! I s _ v o i d ( d 1 , ' e r r o r e _ d i ' + i d   ) | |   ! v e r i f _ d a t e ( d 1 . v a l u e , ' e r r o r e _ d i ' + i d ) )   b o o l = f a l s e ; 
 
 i f   ( ! I s _ v o i d ( d 2 , ' e r r o r e _ d f ' + i d   ) | |   ! v e r i f _ d a t e ( d 2 . v a l u e , ' e r r o r e _ d f ' + i d ) )   b o o l = f a l s e ; 
 
 i f   (   ! I s _ v o i d ( n , ' e r r o r e _ n ' + i d ) )   b o o l = f a l s e ; 
 
 i f   (   ! I s _ v o i d ( p , ' e r r o r e _ p ' + i d )   | |   ! I s D o u b l e ( p , ' e r r o r e _ p ' + i d ) )   b o o l = f a l s e ; 
 
 i f   ( ! c o n f r o n t a ( d 1 , d 2 , ' e r r o r e _ d f ' + i d ) )   b o o l = f a l s e ; 
 
 
 
 i f   ( b o o l = = t r u e )   { 
 
 b u t . d i s a b l e d = t r u e ; 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' e r r o r e _ d i ' + i d ) . i n n e r 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 ( ' e r r o r e _ d f ' + i d ) . i n n e r 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 ( ' e r r o r e _ n ' + i d ) . i n n e r 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 ( ' e r r o r e _ p ' + i d ) . i n n e r H T M L = ' ' ; 
 
 } 
 
 r e t u r n   b o o l ; 
 
 } 
 
 
 
 f u n c t i o n   s a v e _ t a r i f ( i d ) { 
 
 i f   ( v a l i d a _ t a r i f ( i d ) ) { 
 
 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " a d d _ t a r i f f a " ) . d i s a b l e d = f a 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 ( " i m g _ a d d _ t a r i f f a " ) . s t y l e . d i s p l a y = ' b l o c k ' ; 
 
 v a r   d 1 = d o c u m e n t . g e t E l e m e n t B y I d ( i d + ' t e x t 1 ' ) . v a l u e ; 
 
 v a r   d 2 = d o c u m e n t . g e t E l e m e n t B y I d ( i d + ' t e x t 2 ' ) . v a l u e ; 
 
 v a r   n = d o c u m e n t . g e t E l e m e n t B y I d ( i d + ' t e x t 4 ' ) . v a l u e ; 
 
 v a r   p = d o c u m e n t . g e t E l e m e n t B y I d ( i d + ' t e x t 3 ' ) . v a l u e ; 
 
 v a r   l o c = ' c o n f _ r e g _ t a r i f f a . p h p ? i d = ' + i d + ' & n o m e = ' + n + ' & d a t a _ i n i z i o = ' + d 1 + ' & d a t a _ f i n e = ' + d 2 + ' & p r e z z o = ' + p ; 
 
 i d _ d i v _ e r r o r e = ' c o n f _ t a r i f f a _ ' + i d ; 
 
 l o a d X M L D o c ( l o c ) ; 
 
 
 
 } 
 
 / / e l s e   . . . 
 
 } 
 
 
 
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 
 
 f u n c t i o n   r i a b _ s a v e _ b u t ( i d ) { 
 
 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' s a l v a _ ' + i d ) ) { 
 
 v a r   b u t = d o c u m e n t . g e t E l e m e n t B y I d ( ' s a l v a _ ' + i d ) ; 
 
 b u t . d i s a b l e d = f a l s e ; 
 
 } 
 
 } 
 
 
 
 f u n c t i o n   c o n c a t _ v a l u e ( ) { 
 
 v a r   t i p o = d o c u m e n t . g e t E l e m e n t B y I d ( " t i p o _ c a m " ) . v a l u e ; 
 
 v a r   p o s t i = d o c u m e n t . g e t E l e m e n t B y I d ( " p o s t i " ) . v a l u e ; 
 
 v a r   n o m e = d o c u m e n t . g e t E l e m e n t B y I d ( " i d _ c a m " ) . v a l u e ; 
 
 v a r   d e s c = d o c u m e n t . g e t E l e m e n t B y I d ( " d e s c " ) . v a l u e ; 
 
 v a r   n u m = d o c u m e n t . g e t E l e m e n t B y I d ( " n u m " ) . v a l u e ; 
 
 v a r   l o c = ' c o n f _ r e g _ c a m e r a . p h p ? t i p o _ c a m = ' + t i p o + ' & p o s t i = ' + p o s t i + ' & n o m e = ' + n o m e + ' & d e s c = ' + d e s c + ' & n u m = ' + n u m ; 
 
 r e t u r n   l o c ; 
 
 
 
 } 
 
 f u n c t i o n   v i s u a l i z z a _ d i v ( i d , c h i a m a n t e ) 
 { 
 	 i f 	 ( 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 v ' ) . v a l u e   = =   ' ' ) { 
 	 	 a l e r t ( t o p . l i n g u a [ 1 7 ] ) ; 
 	 }   e l s e   { 
 	 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( c h i a m a n t e ) . i n n e r H T M L = = t o p . l i n g u a [ 1 5 ] ) { 
 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( i d ) . s t y l e . d i s p l a y = ' b l o c k ' ; 
 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( c h i a m a n t e ) . i n n e r H T M L = t o p . l i n g u a [ 1 6 ] ; 
 	 	 }   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 ( i d ) . s t y l e . d i s p l a y = ' n o n e ' ; 
 	 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( c h i a m a n t e ) . i n n e r H T M L = t o p . l i n g u a [ 1 5 ] ; 
 	 	 } 
 	 } 	 
 	 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 r o p _ a r e a _ 2 " ) ! = n u l l ) 
 	 	 p o s i z i o n a ( ) ; 
 	 
 } 
 
 
 f u n c t i o n   t o o l _ t i p 1 ( i d , c o l o r e ) { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( i d ) . s t y l e . b a c k g r o u n d C o l o r = c o l o r e ; 
 
 } 
 
 f u n c t i o n   v i s u a l i z z a _ o f f ( i d ) { 
 
 i d _ d i v _ e r r o r e = ' o f f _ ' + i d ; 
 
 l o a d X M L D o c ( ' v i s u a l i z z a _ o f f e r t e . p h p ? i d _ c a m = ' + i d ) ; 
 
 } 
 
 
 f u n c t i o n   v i s u a l i z z a _ d i v 2 ( i d , c h i a m a n t e ) { 
 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( c h i a m a n t e ) . i n n e r H T M L = = ' V i s u a l i z z a   c o m m e n t i ' ) 
 { 
 d o c u m e n t . g e t E l e m e n t B y I d ( i d ) . s t y l e . d i s p l a y = ' b l o c k ' ; 
 d o c u m e n t . g e t E l e m e n t B y I d ( c h i a m a n t e ) . i n n e r H T M L = ' N a s c o n d i   c o m m e n t i ' ; 
 } 
 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 ( i d ) . s t y l e . d i s p l a y = ' n o n e ' ; 
 d o c u m e n t . g e t E l e m e n t B y I d ( c h i a m a n t e ) . i n n e r H T M L = ' V i s u a l i z z a   c o m m e n t i ' ; 
 } 
 
 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 r o p _ a r e a _ 2 " ) ! = n u l l ) 
 p o s i z i o n a ( ) 
 } 
 
 
 f u n c t i o n   n a s c o n d i ( i d ) { 
 
 i d _ d i v _ e r r o r e = ' o f f _ ' + i d ; 
 
 l o a d X M L D o c ( ' r i t o r n a n o . p h p ? i d _ c a m = ' + i d ) ; 
 
 } 
 
 
 
 f u n c t i o n   v i s u a l _ f o r m ( i d ) { 
 
 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' l i n k _ ' + i d ) . i n n e r H T M L ! = ' N a s c o n d i ' ) 
 
 { 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' f o r m _ o f f e r t a _ ' + i d ) . s t y l e . d i s p l a y = ' b l o c k ' ; 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' l i n k _ ' + i d ) . i n n e r H T M L = ' N a s c o n d i ' ; 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' e r r o r _ o f f _ ' + i d ) . i n n e r H T M L = ' ' ; 
 
 } 
 
 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 z z o _ o f f _ ' + i d ) . 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 ( ' d a t a _ o f f _ ' + i d ) . 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 ( ' f o r m _ o f f e r t a _ ' + i d ) . s t y l e . d i s p l a y = ' n o n e ' ; 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' l i n k _ ' + i d ) . i n n e r H T M L = ' I n s e r i s c i   o f f e r t a ' ; 
 
 } 
 
 
 
 } 
 
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - f u n z i o n e   i n f o 
 
 
 
 f u n c t i o n   e c h o _ i n f o ( ) { 
 
   d o c u m e n t . g e t E l e m e n t B y I d ( ' i n f o _ d i v ' ) . i n n e r H T M L = t o p . l i n g u a [ 1 3 ] ; 
 
 
 
 } 
 
 
 
 f u n c t i o n   d e l e t e _ i n f o ( )   { 
 
   d o c u m e n t . g e t E l e m e n t B y I d ( ' i n f o _ d i v ' ) . i n n e r H T M L = " I n f o " ; 
 
 
 
 } 
 
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 f u n c t i o n   d e l _ m e s s ( i d ) { 
 
   d o c u m e n t . g e t E l e m e n t B y I d ( i d ) . i n n e r H T M L = " " ; 
 
 } 
 
 
 
 f u n c t i o n   n u m e r o R i s u l t a t i ( ) 
 { 
 	 
 	 v a r   l o c ; 
 	 v a r   s e l = 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 v ' ) ; 
 	 v a r   p r o v = s e l . o p t i o n s [ s e l . s e l e c t e d I n d e x ] . v a l u e ; 
 
 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' c o n t ' ) = = n u l l )       / / u s a t o   q u a n d o   n n   s e r v e   c o n t a r e   n u m e r i 
 	 	 r e t u r n ; 
 
 	 / / p r o v i n c i a 
 	 l o c = " ? p r o v = " + p r o v ; 
 
 	 / / d e t t a g l i   r i c e r c a   a v a n z a t a 
 	 v a r   i = 0 ; 
 	 v a r   j = 0 ; 
 	 f o r   ( i = 0 ; i < = d o c u m e n t . g e t E l e m e n t B y I d ( ' c o n t ' ) . v a l u e ; i + + ) { 
 	 	 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 e t _ ' + i ) . c h e c k e d = = t r u e ) { 
 / / 	 	 	 l o c = l o c + " & d e t _ " + j + " = " + d o c u m e n t . g e t E l e m e n t B y I d ( ' d e t _ ' + i ) . v a l u e ; 
 	 	 	 l o c = l o c + " & d e t _ " + j + " = " + i ; 
 	 	 	 j + + ; 
 	 	 } 
 	 } 
 	 l o c = l o c + " & n u m _ d e t = " + j ; 
 
 	 / / n u m e r o   p o s t i 
 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ p o s t i ' ) . v a l u e ! =   n u l l ) { 
 	 	 l o c = l o c + " & n u m _ p o s t i = " + d o c u m e n t . g e t E l e m e n t B y I d ( ' n u m _ p o s t i ' ) . v a l u e 
 	 } 
 	 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 a ' ) . v a l u e ! =   n u l l ) { 
 	 	 l o c = l o c + " & d a t a _ d a = " + d o c u m e n t . g e t E l e m e n t B y I d ( ' d a ' ) . v a l u e 
 	 } 
 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' a ' ) . v a l u e ! =   n u l l ) { 
 	 	 l o c = l o c + " & d a t a _ a = " + d o c u m e n t . g e t E l e m e n t B y I d ( ' a ' ) . v a l u e 
 	 } 
 	 / / f i l t r i   t i p o   s t r u t t u r a   e   n u m e r o   s t e l l e   e   n o m e   s t r u t t u r a 
 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' f i l t r o _ t i p o _ s t r u t t u r a ' ) . v a l u e ! =   n u l l ) { 
 	 	 l o c = l o c + " & f i l t r o _ t i p o _ s t r u t t u r a = " + d o c u m e n t . g e t E l e m e n t B y I d ( ' f i l t r o _ t i p o _ s t r u t t u r a ' ) . v a l u e 
 	 } 
 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' f i l t r o _ n u m _ s t e l l e ' ) . v a l u e ! =   n u l l ) { 
 	 	 l o c = l o c + " & f i l t r o _ n u m _ s t e l l e = " + d o c u m e n t . g e t E l e m e n t B y I d ( ' f i l t r o _ n u m _ s t e l l e ' ) . v a l u e 
 	 } 
 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' f i l t r o _ n o m e _ s t r u t t u r a ' ) . v a l u e ! =   n u l l ) { 
 	 	 l o c = l o c + " & f i l t r o _ n o m e _ s t r u t t u r a = " + d o c u m e n t . g e t E l e m e n t B y I d ( ' f i l t r o _ n o m e _ s t r u t t u r a ' ) . v a l u e 
 	 } 
 
 	 f i n e _ u r l   =   d o c u m e n t . l o c a t i o n . p a t h n a m e . s u b s t r ( d o c u m e n t . l o c a t i o n . p a t h n a m e . l e n g t h - 8 ,   8 ) ; 
 
 	 i f   ( f i n e _ u r l   = =   ' m e r a . p h p ' ) { 
 	 	 l o c = " n u l l a " ; 
 / / 	 	 l o c = " a j a x / n u m e r o _ c a m e r e . p h p " + l o c ; 
 / / 	 	 i d _ d i v _ e r r o r e = " n u m _ r i s u l t a t i " ; 
 / / 	 	 l o a d X M L D o c ( l o c ) ; 
 	 }   e l s e   { 
 	 	 l o c = " a j a x / n u m e r o _ s t r u t t u r e . p h p " + l o c ; 
 	 	 i d _ d i v _ e r r o r e = " n u m _ r i s u l t a t i " ; 
 	 	 l o a d X M L D o c ( l o c ) ; 
 	 } 
 
 } 
 
 
 f u n c t i o n   v i s u a l i z z a _ n u m _ s t e l l e ( ) 
 { 
 	 f i l t r o   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' f i l t r o _ t i p o _ s t r u t t u r a ' ) . v a l u e ; 
 	 i f   ( f i l t r o   = =   1 ) { 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' f i l t r o _ n u m _ s t e l l e _ s e l e c t ' ) . s t y l e . d i s p l a y = " b l o c k " ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' f i l t r o _ n u m _ s t e l l e _ t e s t o ' ) . s t y l e . d i s p l a y = " b l o c k " ; 
 	 }   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 ( ' f i l t r o _ n u m _ s t e l l e _ s e l e c t ' ) . s t y l e . d i s p l a y = " n o n e " ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' f i l t r o _ n u m _ s t e l l e _ t e s t o ' ) . s t y l e . d i s p l a y = " n o n e " ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' f i l t r o _ n u m _ s t e l l e ' ) . v a l u e   =   0 ; 
 	 } 
 } 
 
 
 
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - i t i n e r a r i o   m o d i f i c a 
 
 
 
 f u n c t i o n   e r r o r _ m o d _ i t i n ( ) { 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' d i v _ m o d _ i t i n ' ) . i n n e r H T M L = t o p . l i n g u a [ 1 4 ] ; 
 } 
 
 
 
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - m o d i f i c a   u s e r 
 
 
 
 f u n c t i o n   c o n f _ m o d _ u s e r ( u r l ) { 
 
 
 
 v a r   s u b m = t r u e ; 
 
 v a r   n o m e = d o c u m e n t . g e t E l e m e n t B y I d ( " n o m e _ u t " ) . v a l u e ; 
 
 v a r   c o g n o m e = d o c u m e n t . g e t E l e m e n t B y I d ( " c o g n o m e _ u t " ) . v a l u e ; 
 
 v a r   m a i l = 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 l _ u t " ) . v a l u e ; 
 
 v a r   u s e r = d o c u m e n t . g e t E l e m e n t B y I d ( " u s e r n a m e _ u t " ) . v a l u e ; 
 
 v a r   t e l = d o c u m e n t . g e t E l e m e n t B y I d ( " t e l _ u t " ) . v a l u e ; 
 
 
 
 
 
 i f   ( c o g n o m e = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " c o g n o m e _ n o t i f y " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 s u b m = f a l s e ; 
 
 } 
 
 i f   ( n o m e = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " n o m e _ n o t i f y " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 s u b m = f a l s e ; 
 
 
 
 } 
 
 
 
 
 
 i f   ( u s e r = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " u s e r n a m e _ n o t i f y 2 " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 s u b m = f a l s e ; 
 
 
 
 } 
 
 
 
 i f   ( ! I s N u m e r i c ( d o c u m e n t . g e t E l e m e n t B y I d ( " t e l _ u t " ) , ' t e l _ n o t i f y ' ) )   { 
 
 s u b m = f a l s e ; 
 
 
 
 } 
 
 
 
 v a r   g o o d E m a i l   =   m a i l . m a t c h ( / \ b ( ^ ( \ S + @ ) . + ( ( \ . c o m ) | ( \ . n e t ) | ( \ . e d u ) | ( \ . m i l ) | ( \ . g o v ) | ( \ . o r g ) | ( \ . . { 2 , 2 } ) ) $ ) \ b / g i ) ; 
 
 i f   ( ! g o o d E m a i l ) { 
 
 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 l _ n o t i f y " ) . i n n e r H T M L = t o p . l i n g u a [ 9 ] ; 
 
 s u b m = f a l s e ; 
 
 
 
 } 
 
 
 
 i f   ( s u b m ) { 
 
 l o a d X M L D o c ( u r l ) ; 
 
 } 
 
 
 
 } 
 
 
 
 f u n c t i o n   c o n f _ p w d _ u s e r ( u r l ) { 
 
 v a r   s u b m = t r u e ; 
 
 v a r   p w d = d o c u m e n t . g e t E l e m e n t B y I d ( " p w 2 " ) . v a l u e ; 
 
 v a r   c _ p w d = d o c u m e n t . g e t E l e m e n t B y I d ( " p w 3 " ) . v a l u e ; 
 
 i d _ d i v _ e r r o r e = ' i n f o _ s t r u t t _ d i v _ p a s s 2 ' ; 
 
 i f   ( p w d = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " p w d _ n o t i f y 1 " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 s u b m = f a l s e ; 
 
 
 
 } 
 
 i f   ( c _ p w d = = " " )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " p w d _ n o t i f y 2 " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 s u b m = f a l s e ; 
 
 
 
 } 
 
 
 
 i f   ( p w d ! = c _ p w d )   { 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( " p w d _ n o t i f y 2 " ) . i n n e r H T M L = t o p . l i n g u a [ 1 2 ] ; 
 
 s u b m = f a l s e ; 
 
 
 
 } 
 
 i f   ( s u b m ) { 
 
 l o a d X M L D o c ( u r l ) ; 
 
 
 
 } 
 
 
 
 
 
 } 
 
 
 
 f u n c t i o n   c o n f _ c a n c _ u s e r ( u r l ) { 
 
 i f   ( w i n d o w . c o n f i r m ( ' C o n f e r m a r e   l \ ' e l i m i n a z i o n e ? ' ) )   l o a d X M L D o c ( u r l ) ; 
 
 } 
 
 
 
 / /   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - a p p a r t e n g o n a   a l   f o r m   i t i n e r a r i 
 
 
 f u n c t i o n   c e r c a s o t t o c a t e g o r i a ( i d ) 
 { 
 
 	 v a r   s e l = d o c u m e n t . g e t E l e m e n t B y I d ( ' t i p o _ i t i n ' ) ; 
 	 v a r   p r o v = s e l . o p t i o n s [ s e l . s e l e c t e d I n d e x ] . v a l u e ; 
 	 i d _ d i v _ e r r o r e = i d ; 
 	 l o a d X M L D o c ( ' t r o v a _ s o t t o c a t e g o r i a . p h p ? c a t e g o r i a = ' + p r o v ) ; 
 
 } 
 
 
 
 f u n c t i o n   n u o v o ( ) { 
 
 v a r   s e l = d o c u m e n t . g e t E l e m e n t B y I d ( ' s o t t o c a t ' ) ; 
 
 v a r   p r o v = s e l . o p t i o n s [ s e l . s e l e c t e d I n d e x ] . v a l u e ; 
 
 i f   ( p r o v = = ' n u o v o ' ) 
 
   d o c u m e n t . g e t E l e m e n t B y I d ( ' n u o v a _ s o t _ c a t ' ) . s t y l e . d i s p l a y = ' b l o c k ' ; 
 
   e l s e 
 
   s p e g n i ( ) 
 
 } 
 
 
 
 f u n c t i o n   s p e g n i ( ) { 
 
   d o c u m e n t . g e t E l e m e n t B y I d ( ' n u o v a _ s o t _ c a t ' ) . s t y l e . d i s p l a y = ' n o n e ' ; 
 
   d o c u m e n t . g e t E l e m e n t B y I d ( ' n u o v a _ s o t _ c a t ' ) . v a l u e = ' ' ; 
 
 } 
 
 / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - m o d i f i c a   i n f o   s t r u t t u r a 
 
 
 
 f u n c t i o n   c o n f _ m o d _ s t r u t ( u r l ) { 
 
 s u b m = t r u e ; 
 
 i d _ d i v _ e r r o r e = " i n f o _ s t r u t t _ d i v _ p a s s " ; 
 
 v a r   v = d o c u m e n t . g e t E l e m e n t B y I d ( ' u s e r n a m e ' ) . v a l u e ; 
 
 
 
 i f   ( v = = " " )   { 
 
 s u b m = f a 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 ( " i n f o _ s t r u t t _ d i v _ p a s s 0 " ) . i n n e r H T M L = t o p . l i n g u a [ 1 0 ] ; 
 
 
 
 } 
 
 i f   ( s u b m ) { 
 
 l o a d X M L D o c ( u r l ) ; 
 
 
 
 } 
 
 
 
 
 
 } 
 
 
 
 
 
 f u n c t i o n   r e g i s t r a _ m a i l ( v a l o r e ) 
 { 
 	 i d _ d i v _ e r r o r e = " e _ m a i l " ; 
 	 i f   ( c h e c k E m a i l A d d r e s s ( v a l o r e , " e _ m a i l " ) ) { 
 	 	 l o a d X M L D o c ( " p r o v a . p h p ? e m a i l = " + v a l o r e . v a l u e ) ; 
 	 } 
 } 
 
 
 
 
 
 f u n c t i o n   d u p l i c a _ h r e f ( ) 
 { 
 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' h 1 ' ) ! = n u l l ) 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' a 1 ' ) . s t y l e . v i s i b i l i t y = " v i s i b l e " ; 
 	 i f   ( d o c u m e n t . g e t E l e m e n t B y I d ( ' h 2 ' ) ! = n u l l ) 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' a 2 ' ) . s t y l e . v i s i b i l i t y = " v i s i b l e " ; 
 } 
 
 
 
 f u n c t i o n   m y p o p u p ( u r l _ f i l e ) 
 { 
 	 v a r     m y w i n d o w   =   w i n d o w . o p e n   ( u r l _ f i l e , " m y w i n d o w " , " l o c a t i o n = 1 , s t a t u s = 1 , s c r o l l b a r s = 1 , r e s i z a b l e = y e s ,   w i d t h = 4 2 3 , h e i g h t = 3 0 0 " ) ; 
 	 m y w i n d o w . m o v e T o ( 1 0 0 , 2 0 0 ) ; 
 }   
 
 f u n c t i o n   m y p o p u p _ i m g ( u r l _ i m g , l a r g h e z z a , a l t e z z a , i t i n ) 
 { 
 	 m e n o _ e s t e n s i o n e   =   u r l _ i m g . s u b s t r ( 0 , u r l _ i m g . l e n g t h - 4 ) ; 
 	 e s t e n s i o n e   =   u r l _ i m g . s u b s t r ( u r l _ i m g . l e n g t h - 4 ) ; 
 	 l a r g h e z z a   =   5 0 0 ; 
 	 a l t e z z a   =   5 0 0 ; 
 	 v a r   m y w i n d o w   =   w i n d o w . o p e n   ( ' p l a y e r _ i m g _ n e w . p h p ? n o m e = ' + m e n o _ e s t e n s i o n e + ' & e s t = ' + e s t e n s i o n e + ' & i t i n = ' + i t i n , " m y w i n d o w " , " l o c a t i o n = 1 , s t a t u s = 1 , s c r o l l b a r s = 0 , r e s i z a b l e = y e s ,   w i d t h = " + l a r g h e z z a + " , h e i g h t = " + a l t e z z a ) ; 
 	 m y w i n d o w . m o v e T o ( 5 0 , 5 0 ) ; 
 }   
 
 f u n c t i o n   m y p l a y e r _ i m g ( u r l _ i m g , l a r g h e z z a , a l t e z z a , i t i n ) 
 { 
 	 m e n o _ e s t e n s i o n e   =   u r l _ i m g . s u b s t r ( 0 , u r l _ i m g . l e n g t h - 4 ) ; 
 	 e s t e n s i o n e   =   u r l _ i m g . s u b s t r ( u r l _ i m g . l e n g t h - 4 ) ; 
 	 l a r g h e z z a   =   p a r s e I n t ( l a r g h e z z a )   +   3 0 ; 
 	 a l t e z z a   =   p a r s e I n t ( a l t e z z a )   +   3 0 ; 	 
 	 w i n d o w . r e s i z e T o ( l a r g h e z z a , a l t e z z a + 1 0 0 ) ; 
 	 d o c u m e n t . l o c a t i o n . h r e f   =   ' p l a y e r _ i m g _ n e w . p h p ? n o m e = ' + m e n o _ e s t e n s i o n e + ' & e s t = ' + e s t e n s i o n e + ' & i t i n = ' + i t i n ; 
 }   
 
 
 f u n c t i o n   g e t _ h e i g h t ( ) { 
 
 
 
 b r o w s e r n a m e = n a v i g a t o r . a p p N a m e ; 
 
 i f   ( b r o w s e r n a m e . i n d e x O f ( " N e t s c a p e " ) ! = - 1 )   { b r o w s e r n a m e = " N S " } 
 
 e l s e 
 
 { i f   ( b r o w s e r n a m e . i n d e x O f ( " M i c r o s o f t " ) ! = - 1 )   { b r o w s e r n a m e = " M S I E " ; d o c u m e n t . g e t E l e m e n t B y I d ( ' t a b ' ) . s t y l e . t o p = ' - 3 p x ' ; } 
 
 e l s e   { b r o w s e r n a m e = " N / A " } } ; 
 
 
 
 
 
 } 
 
 
 
 f u n c t i o n   s v u o t a ( ) { 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a ' ) . 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 ( ' a ' ) . 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 ( ' n u m _ p o s t i ' ) . v a l u e = " " ; 
 	 f o r   ( v a r   i = 0 ; i < = d o c u m e n t . g e t E l e m e n t B y I d ( ' c o n t ' ) . v a l u e ; i + + ) { 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' d e t _ ' + i ) . c h e c k e d = f a l s e ; 
 	 } 
 	 n u m e r o R i s u l t a t i ( ) ; 
 } 
 
 f u n c t i o n   s v u o t a _ m o t o r e _ i t i n ( ) { 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' c e r c a ' ) . v a l u e = " " ; 
 } 
 
 
 f u n c t i o n   i t i n e r a r i _ b o d y _ o n l o a d ( ) 
 { 
 	 r i c a r i c a P r o v ( ' p r o v ' ) ; 
 	 w i n d o w . s e t T i m e o u t ( " c e r c a _ i t i n ( 0 , ' r i s _ r i c e r c a ' , 0 ) " , 5 0 0 ) ; 
 } 
 
 f u n c t i o n   t o g g l e ( n o m e _ d i v , i d t e x t , t e x t 1 , t e x t 2 )   
 { 
 	 v a r   s t 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 ( n o m e _ d i v ) . s t y l e . d i s p l a y ; 
 	 i f   ( s t a t e   = =   ' n o n e ' )   { 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( n o m e _ d i v ) . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( i d t e x t ) . i n n e r H T M L   =   " < a   h r e f = \ " j a v a s c r i p t : t o g g l e ( ' " + n o m e _ d i v + " ' , ' " + i d t e x t + " ' , ' " + t e x t 1 + " ' , ' " + t e x t 2 + " ' ) ; \ " > " + t e x t 2 + " < / a > " ; 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( n o m e _ d i v ) . f o c u s ( ) ; 
 	 }   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 ( n o m e _ d i v ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( i d t e x t ) . i n n e r H T M L   =   " < a   h r e f = \ " j a v a s c r i p t : t o g g l e ( ' " + n o m e _ d i v + " ' , ' " + i d t e x t + " ' , ' " + t e x t 1 + " ' , ' " + t e x t 2 + " ' ) ; \ " > " + t e x t 1 + " < / a > " ; 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' d e s c r i z i o n e ' ) . f o c u s ( ) ; 
 	 } 
 } 
 
 f u n c t i o n   s c e l t a _ d i v ( n o m e _ d i v ,   l i n g u a ,   i d _ a b b ) 
 { 	 
 	 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 _ c o m m ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' l a s t _ m i n ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' o f f _ c r m ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' r e c e n s i o n e ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' d e s c r i z i o n e ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' d e t t a g l i ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 	 i f   ( i d _ a b b   ! =   4 ) { 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' c a m e r e ' ) . s t y l e . d i s p l a y   =   ' n o n 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 p p a _ e _ m e t e o ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' i t i n e r a r i ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 	 } 
 	 i f   ( n o m e _ d i v   = =   ' d e s c r i z i o n 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 _ c o m m ' ) . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' l a s t _ m i n ' ) . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' o f f _ c r m ' ) . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' r e c e n s i o n e ' ) . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 	 } 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( n o m e _ d i v ) . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( n o m e _ d i v ) . f o c u s ( ) ; 
 	 
 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' i m g _ d e s c r i z i o n e ' ) . s r c   =   ' i m a g e s _ ' + l i n g u a + ' / d i v _ d e s c r i z i o n e . g i f ' ; 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' i m g _ d e t t a g l i ' ) . s r c   =   ' i m a g e s _ ' + l i n g u a + ' / d i v _ d e t t a g l i . g i f ' ; 
 	 i f   ( i d _ a b b   ! =   4 ) { 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' i m g _ c a m e r e ' ) . s r c   =   ' i m a g e s _ ' + l i n g u a + ' / d i v _ c a m e r e . g i f ' ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' i m g _ m a p p a _ e _ m e t e o ' ) . s r c   =   ' i m a g e s _ ' + l i n g u a + ' / d i v _ m a p p a _ e _ m e t e o . g i f ' ; 
 	 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' i m g _ i t i n e r a r i ' ) . s r c   =   ' i m a g e s _ ' + l i n g u a + ' / d i v _ i t i n e r a r i . g i f ' ; 
 	 } 
 
 	 d o c u m e n t . g e t E l e m e n t B y I d ( ' i m g _ ' + n o m e _ d i v ) . s r c   =   ' i m a g e s _ ' + l i n g u a + ' / d i v _ ' + n o m e _ d i v + ' _ b . g i f ' ; 
 
 } 
 
 f u n c t i o n   c o n t a _ c l i c k _ b a n n e r _ a d v ( n u m ) 
 { 
 	 i d _ d i v _ e r r o r e = " c l i c k _ b a n " ; 
 	 l o a d X M L D o c ( " a j a x / c o n t a _ b a n n e r _ a d v . p h p ? i d _ b = " + n u m ) ; 
 } 
 
 
 
 
 
 
 
 v a r   w i n   =   n u l l ; 
 f u n c t i o n   N e w W i n d o w ( m y p a g e , m y n a m e , w , h , s c r o l l ) { 
 L e f t P o s i t i o n   =   ( s c r e e n . w i d t h )   ?   ( s c r e e n . w i d t h - w ) / 2   :   0 ; 
 T o p P o s i t i o n   =   ( s c r e e n . h e i g h t )   ?   ( s c r e e n . h e i g h t - h ) / 2   :   0 ; 
 s e t t i n g s   = 
 ' h e i g h t = ' + h + ' , w i d t h = ' + w + ' , t o p = ' + T o p P o s i t i o n + ' , l e f t = ' + L e f t P o s i t i o n + ' , s c r o l l b a r s = ' + s c r o l l + ' , r e s i z a b l e ' 
 w i n   =   w i n d o w . o p e n ( m y p a g e , m y n a m e , s e t t i n g s ) 
 } 
