
function fmrCotizar(baseurl) {

	var pais = $("pais").value;
	var personas = $("personas").value;
	var fecha_nacimiento = $("ano").value + "-" + $("mes").value + "-" + $("dia").value;
	var fecha_salida = $("fecha_salida").value;
	var fecha_regreso = $("fecha_regreso").value;
	var telefono = $("ctz_telefono").value;
	var nombre = $("ctz_nombre").value;
	var apellido = $("ctz_apellido").value;
	var mail = $("ctz_mail").value;
	
	$("html_paso_2").update('<img src="'+baseurl+'/img/working.gif" />');

	var poststr = "?pais=" + encodeURI(pais)
				+ "&personas=" + personas
				+ "&fecha_nacimiento=" + fecha_nacimiento
				+ "&fecha_salida=" + fecha_salida
				+ "&fecha_regreso=" + fecha_regreso
				+ "&telefono=" + telefono
				+ "&nombre=" + nombre
				+ "&apellido=" + apellido
				+ "&mail=" + encodeURI(mail);
	
	var url = 'ajax.php';

	//Execute ajax request
	var myAjax = new Ajax.Request(
		url,
		{
		method: 'post',
		parameters: poststr,
		onComplete: function(req){
			if (req.status != 200) {
				pnshowajaxerror(req.responseText);
				return;
			}
			var update = new Array();	
			var resp_text = req.responseText;
			update = resp_text.split('|');
			if(update[0] == "error")
			{
				$("datos_cotizar").update("");
				$("msg_error").update(update[1]);
			}
			else
			{
				//Update response
				$("msg_error").update('');
				$("datos_cotizar").update(update[0]);
				new Effect.Opacity('datos_cotizar', { from: 0, to: 1, duration: 1.2 });
				$("html_paso_2").update(update[1]);
				Modalbox.show(update[2], {title: "Datos para la Cotizaci&oacute;n", width: 600});
				if(update[3] == "0")
				{
					var s=s_gi('wall.wallaby-group');s.linkTrackVars='events';s.linkTrackEvents='event11';s.events='event11';s.tl(this,'o','cotizar');
				}
			}
		}
	});
}
