function confirmAction(text) {

	if (!confirm(text))
	{
		return false;
	}

}

function saveAjaxGet(url,target,params){

     var pars = params;

     var myAjax = new Ajax.Updater(target, url, {
		 
		 method: 'get',
		onCreate: function() { 

			 //showLoader('loadingsearch');
			//loadBox(target);

			 new Effect.Opacity($(target), {duration: 0.2,from: 1.0, to: 0.4});
				 },
		onComplete: function() { 
			 //hideLoader('loadingsearch');
			 new Effect.Opacity($(target), {duration: 0.2,from: 0.4, to: 1.0});

			 },
		//onSuccess: function(){alert("Success! \n\n");},
		onFailure: function(){ alert('errore caricamento dati') },
		 parameters: pars
			 
		 });
		//execJS(ajax.responseText);
		//t = $(target).innerHTML;
		//t = execJS(t);
		//$(target).innerHTML = t;

}

	function loadBox(id) {

		container = $(id);
		
		container.style.position='relative';
	
		var loadingContainer = document.createElement("div");
		loadingContainer.setAttribute('id','loadingContainer');
		container.appendChild(loadingContainer);
		loadingContainer.className = 'loadingContainer';

	}

	
	function showDiv(divvo)
	{
	   new Effect.Appear($(divvo), {duration: 0.2});
	}

		function hideDiv(divvo)
		{
		   new Effect.Fade($(divvo), {duration: 0.2});
		}


	//Event.observe(window, 'load', loadHeader, false);
