wf.showAlertOnError = false;
wf.functionName_formValidation = "myCustomValidation";

function myCustomValidation (evt) {
	if (wf.formValidation(evt)) new Ajax.Updater(
            'result', 'sendmail.php', 
            {
                 onLoading:function(request){sendmail()}
                ,onComplete:function(request){handelrequest()}
                ,parameters:Form.serialize(document.forms['contact'])
                ,insertion:Insertion.Bottom
                ,asynchronous:true
            }
        );
	return wf.utilities.XBrowserPreventEventDefault(evt);
}

function sendmail() {
    new Effect.Appear('progress');
}

function handelrequest() {
        new Effect.Fade('progress');
        new Effect.BlindUp('contact');
        new Effect.Appear('result');
}