// 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('resultados', 'enviar-albergue.php',{onLoading:function(request){sendmail()},onComplete:function(request){googleanalytics();handelrequest()},parameters:Form.serialize(document.forms['modo_albergue']), insertion:Insertion.Bottom, asynchronous:true});
	return wf.utilities.XBrowserPreventEventDefault(evt);
}
		function sendmail() {
			//Make the Progress Bar Appear
			new Effect.Appear('progress');
		}
		function googleanalytics() {
			urchinTracker('/reservas/modo-albergue/gracias.htm');
			return ConversionCount();
				try {
				var pageTracker=_gat._getTracker("UA-70481-6");
				pageTracker._trackPageview("/2450829246/goal");
				}catch(err){}
		}
		function handelrequest() {
			// Fade the Progress Bar
				new Effect.Fade('progress');
			// Make the form itsef wipe up
				new Effect.BlindUp('form');
			// Show the result!
				new Effect.Appear('resultados');
			//Highlight
				new Effect.Pulsate ('resultados');
		}