Event.observe(window, "load", init);

function init(e)
{
	Event.observe($("form_newsletter"), "submit", newsMail);
}

function newsMail(e)
{
	new Ajax.Request(e.target.action, {
		method: 'post',
		parameters: {email: $('email').value},
		onComplete: function(r){
				if (r.responseJSON.message)
				{
					alert(r.responseJSON.message);
				}
			}
		}
	);
	Event.stop(e);
}
