function acf_sendMail() {
	var url = $('acfForm').action +"?ajax=true";
	var pars = "&" + Form.serialize($('acfForm'));
	if (($("acfText").value == '') || ($("acfName").value == '') || ($("acfEmail").value == '') ) {
		alert('Please fill in all required fields'); } else {
	new AjaxContact('acf_container', url, pars); }
}

//ajax request
var AjaxContact = Class.create();
AjaxContact.prototype = {
	initialize: function(el, url, par){
		this.url = url;
		this.par = par;
		this.tid = $(el);
		this.result = $('acf_result');
		this.respond = '';
		this.before();
	},
	before: function(){
		this.tid.parentNode.className = "acf_working";
		new fx.Opacity(this.tid, {duration: 300, onComplete: this.request.bind(this) }).custom(1, 0.3);//moo.fx
	},
	request: function(){
		new Ajax.Request(this.url, {method: 'post', parameters: this.par, onComplete: this.post.bind(this) });
	},
	post: function(request){
		this.result.innerHTML = request.responseText;
		new fx.Opacity(this.tid, {duration: 300, onComplete: this.after.bind(this) }).custom(0.3, 1);//moo.fx
	},
	after: function(){
		this.tid.parentNode.className = "";
		this.result.style.display = "block";
	}
};