function ajax_div_call (url, flag, target, form) { 
	 
	 if(!flag){ // no parametri
		 
	  new Effect.Fade(target, { // the id of the <DIV> containing the photos 
      duration: 0.8, 
      fps: 50, 
      afterFinish: function() { 
        document.getElementById(target).style.display = 'none';
        new Ajax.Updater(target,url, { // URL for next <IMG> tag 
          asynchronous: true,
		  method: 'get',
          onSuccess: function() { 
            new Effect.Appear(target, {
              duration: 0.8,
              fps: 50,
              queue:'end'
            })
           } 
        }) 
      } 
    }) 	 
	} // end if
	
	else { // con parametri
		
		var pars = $(form).serialize()
		new Effect.Fade(target, { // the id of the <DIV> containing the photos 
		  duration: 0.5, 
		  fps: 50, 
		  afterFinish: function() { 
			document.getElementById(target).style.display = 'none';
			new Ajax.Updater(target,url, { // URL for next <IMG> tag 
			  asynchronous: true,
			  method: 'get',
			  parameters: pars,
			  onSuccess: function() { 
				new Effect.Appear(target, {
				  duration: 0.5,
				  fps: 50,
				  queue:'end'
				})
			   } 
			}) 
		  } 
		}) 	
		
		}
		
}

function ajax_menu_call (url, target) { 
	 

		 
	  new Effect.BlindUp(target, { // the id of the <DIV> containing the photos 
      duration: 0.8, 
      fps: 50, 
      afterFinish: function() { 
        document.getElementById(target).style.display = 'none';		
        new Ajax.Updater(target,url, { // URL for next <IMG> tag 
          asynchronous: true,
		  method: 'get',
          onSuccess: function() { 
            new Effect.BlindDown(target, {
              duration: 0.8,
              fps: 50,
			  afterFinish: function(){
			  if(url=='installazioni.php'){
			  $('prima_col').appear({ duration: 1.0, queue:'end' });
			  $('seconda_col').appear({ duration: 1.0, queue:'end' });
			  $('terza_col').appear({ duration: 1.0, queue:'end' });		  
		  	  }},
              queue:'end'
            })
           }
   
        }) 
      } 
    }) 
	 

		
}


