window.addEvent('domready', function() {

$('forma').addEvent( 'submit', function(e)
{
	e = new Event(e);
	e.stop();

	$('forma').set('send', {
		onSuccess: function(responseText)
		{
			var ats = new Array();
			ats = responseText.split("\n");

			if( ats[0] == 'ok' )
			{
				$('forma').addClass('success');
				$('forma').set( 'html', ats[1] );
			}
			else
			{
				alert(ats[0]);
			}
		}
	});
	$('forma').send(); //Sends the form.
});

});
