// Turn off the alert pop up
wf.showAlertOnError = false;
 
// Tap into the validation routine and do our Ajax stuff
wf.functionName_formValidation = "myCustomValidation";
function myCustomValidation (evt) {
	if(wf.formValidation(evt)) new Ajax.Updater('result', 'sendinstantemail.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() {
			//Make the Progress Bar Appear
			new Effect.Appear('progress');
			document.getElementById('txtauthor').value = '';
			document.getElementById('txtemail').value = '';
			document.getElementById('txttel').value = '';
			document.getElementById('txttext').value = '';
			document.getElementById('security_code').value = '';
		}
		function handelrequest() {
				new Effect.Fade('progress');
				new Effect.BlindUp('form');
				new Effect.Appear('result');
}

