
	function sendRequest() {

		new Ajax.Request("email_form_process.php", {
			   method: 'post',
			   postBody: "name="+$F("name")+"&email="+$F("email")+"&message="+$F("message")+"&telephone="+$F("telephone"),
			   onComplete: showResponse

		});
	}
	
	
	
	function sendRequest_product() {

		new Ajax.Request("email_form_process.php", {
			   method: 'post',
			   postBody: "name="+$F("name")+"&email="+$F("email")+"&message="+$F("message")+"&telephone="+$F("telephone")+"&product_uri="+$F("product_uri"),
			   onComplete: showResponse

		});
	}
	
	
	
	function sendRequest_newsletter() {

		new Ajax.Request("email_form_process.php", {
			   method: 'post',
			   postBody: "nemail="+$F("nemail"),
			   onComplete: showResponse_newsletter

		});		
		
	}
	


	function showResponse(req)
	{
	   $('errors').style.borderStyle= "none";
	   
	   var res=/message was received/;
	  
	   if(req.responseText.match(res))
	   {
		$('errors').style.borderColor= "green";
		$('errors').style.color="green";
	   }else{
		$('errors').style.borderColor= "green";
		$('errors').style.color="green";
	   }
	   
	   $('errors').style.borderSize= "1";
	   $('errors').innerHTML=  req.responseText;
	}
	
	
	function showResponse_newsletter(req)
	{
	   $('errors2').style.borderStyle= "none";
	   
	   var res=/message was received/;
	  
	   if(req.responseText.match(res))
	   {
		$('errors2').style.borderColor= "green";
		$('errors2').style.color="green";
	   }else{
		$('errors2').style.borderColor= "green";
		$('errors2').style.color="green";
	   }
	   
	   $('errors2').style.borderSize= "1";
	   $('errors2').innerHTML=  req.responseText;
	}




