// JavaScript Document

	function sendRequest() {

		new Ajax.Request("contatti/send.php", {
			   method: 'post',
			   postBody: "nome="+$F("nome")+"&email="+$F("email")+"&messaggio="+$F("messaggio")+"&titolo="+$F("titolo"),
			   onComplete: showResponse

		});
	}



	function showResponse(req)
	{
	   
	   
	   var res=/message was received/;
	  
	   if(req.responseText.match(res))
	   {
		
		$('errors').style.color="black";
	   }else{
		
		$('errors').style.color="#000";
	   }
	   
	    $('errors').innerHTML=  req.responseText;
	}
