  	function ExecSuscribe(){
		if (ajax_now == 1) return;
		ajax_now = 1;
		f = detect('suscribe_lat');
		email = f.value;
		datatosend = 'email=' + encodeURIComponent(email) + '&nocache=' + Math.random();
		ajax.open('POST', lat_url + "ajax_front_suscribe.php", true);
		ajax.onreadystatechange = SuscribeResult;
		ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		ajax.send(datatosend);
		Dleft = Math.round((document.documentElement.clientWidth/2) + (360)) + "px";
		Dtop = getAnchorPosition('lateral_form_link_1');
		f = detect('div_wait_lat');
		f.style.top = Dtop.y - 80 + "px";
		f.style.left = Dleft;
		f.style.display = 'block';
		f.style.visibility = 'visible';
	}

 	function ExecPresup(){
		if (ajax_now == 1) return;
		ajax_now = 1;
		f = detect('empresa_lat');
		empresa = f.value;
		f = detect('nombre_lat');
		nombre = f.value;
		f = detect('email_lat');
		email = f.value;
		f = detect('telefono_lat');
		telefono = f.value;
		f = detect('servicio_lat');
		servicio = f.value;
		f = detect('detalles_lat');
		detalles = f.value;
		datatosend = 'empresa=' + encodeURIComponent(empresa) + '&nombre=' + encodeURIComponent(nombre) + '&email=' + encodeURIComponent(email) + '&telefono=' + encodeURIComponent(telefono) + '&servicio=' + encodeURIComponent(servicio) + '&detalles=' + encodeURIComponent(detalles) + '&nocache=' + Math.random();
		ajax.open('POST', lat_url + "ajax_front_presup.php", true);
		ajax.onreadystatechange = PresupResult;
		ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		ajax.send(datatosend);
		Dleft = Math.round((document.documentElement.clientWidth/2) + (360)) + "px";
		Dtop = getAnchorPosition('lateral_form_link_2');
		f = detect('div_wait_lat');
		f.style.top = Dtop.y - 150 + "px";
		f.style.left = Dleft;
		f.style.display = 'block';
		f.style.visibility = 'visible';
	}
	
	function SuscribeResult(){
		if (ajax.readyState==4) {
			if (ajax.status == 200) {
			  	is_ok = ajax.responseText;
				f = detect('div_wait_lat');
				f.style.display = 'none';
				f.style.visibility = 'hidden';
		 		if (is_ok == 1) {
					f = detect('suscribe_lat');
					f.value = "";
			  		alert("La suscripción se ha realizado con éxito. En breve comenzará a recibir nuestro boletín electrónico.");
			  	} else if (is_ok == 2) {
					f = detect('suscribe_lat');
					f.focus();
			  		alert("El correo electrónico que ha especificado ya se encuentra registrado para recibir nuestro boletín electrónico. Por favor, especifique otra dirección electrónica.");
				} else {
					f = detect('suscribe_lat');
					f.focus();
			  		alert("A ocurrido un error al intentar registrar la nueva suscripción. Por favor, inténtelo nuevamente.");
			  	}
			} else {
				f = detect('suscribe_lat');
				f.focus();
			  	alert("A ocurrido un error al intentar registrar la nueva suscripción. Por favor, inténtelo nuevamente.");
			}
			ajax_now = 0;
		}
	}

	function PresupResult(){
		if (ajax.readyState==4) {
			if (ajax.status == 200) {
			  	is_ok = ajax.responseText;
				f = detect('div_wait_lat');
				f.style.display = 'none';
				f.style.visibility = 'hidden';
		 		if (is_ok == 1) {
					f = detect('empresa_lat');
					f.value = "";
					f = detect('nombre_lat');
					f.value = "";
					f = detect('email_lat');
					f.value = "";
					f = detect('telefono_lat');
					f.value = "";
					f = detect('detalles_lat');
					f.value = "";
			  		alert("Su solicitud de presupuesto se ha registrado exitosamente. En breve le contactaremos.");
				} else {
					f = detect('empresa_lat');
					f.focus();
			  		alert("A ocurrido un error al intentar registrar su solicitud. Por favor, inténtelo nuevamente.");
			  	}
			} else {
				f = detect('empresa_lat');
				f.focus();
			  	alert("A ocurrido un error al intentar registrar su solicitud. Por favor, inténtelo nuevamente.");
			}
			ajax_now = 0;
		}
	}


