
/*
window.onload = function(){
	prova();
};


function prova(url) {
	alert("Ciao!");
}

*/

function carica() {
	new Effect.Appear('propagazione');
	
	//div di destinazione
	var dest = $('propagazione');
	
	new Ajax.Request('dati_solari.php', {
		method: 'get',
		onSuccess: function(transport){
			var response = transport.responseText || "Nessun testo...";
			//alert("Success! \n\n" + response);
			dest.update(response);
		},
		onFailure: function(){
			dest.update("Errore caricamento dati.");
		},
		
		/* --------Questa funzione crea sempre problemi in IE7-------- */
		onCreate: function(){
			//alert("Caricamento..." + $F('propagazione'));
			dest.innerHTML = "<img src='img/loading.gif' style='margin-left:auto; margin-right:auto; display:block;' alt='Caricamento...'></img>";
		}
	});
}


function chiudi() {
	new Effect.Puff('propagazione', { duration: 1.0});
}
