 // var jsel;
function enviar_ajax(urll,sen,funci) 
{
	var enProceso = false; // lo usamos para ver si hay un proceso activo
	var httpp = getHTTPObject(); // Creamos el objeto XMLHttpRequest
	this.enviarr=function()
	{
		var results;
		if(sen=='') 
		{
			sen=null
		} 
		if (!enProceso && httpp) 
		{
			//  alert(document.body.style.)
			//  jsel = document.createElement('div');
			//	jsel.style.position="absolute";
			//	jsel.style.top="0px";
			//	jsel.style.left="0px";
			//	jsel.setAttribute('id',"anillo2");
			//	jsel.style.zIndex="20"; 
			//	bh=document.body.scrollHeight;
			//	bw=document.body.scrollWidth;
			//  jsel.innerHTML='<table border="1"><tr><td width="'+bw+'" height="'+bh+'" style="background:repeat">Cargando....</td></tr></table>';
			//  document.body.appendChild(jsel);
			//  document.getElementById('cargando').style.visibility="visible";
			//  var valor = escape(document.getElementById("emailUsuario").value);
			//  var url = "";
			//  alert("okas0")
			httpp.open("POST", urll, true);  
			// httpp.setRequestHeader("Accept-language", "sp");
			httpp.setRequestHeader("Accept-Charset", "ISO-8859-1");
			httpp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			httpp.onreadystatechange = function handleHttpResponse() 
			{
				if (httpp.readyState == 4) 
				{
					if (httpp.status == 200) 
					{
						if (httpp.responseText.indexOf('invalid') == -1) 
						{
							//  Armamos un array, usando la coma para separar elementos
							//  alert( http.responseText)
							//  results = http.responseText.split(",");
							results = httpp.responseText;
							//  alert()
							//  resul=results
							//  document.mi.ajax.value = results;
							//  alert(results);
							//  return results;
							//  evento_ajax(results);
							str_str=results;
							eval(funci+'(str_str)');
							enProceso = false;
							//  window.document.cargando.style.visibility="hidden";
							//  document.getElementById('cargando').style.visibility="hidden";
							//document.body.removeChild(jsel)
						}
					}
				}
				//  return  results;
				//  otrasfunciones();
			}
			enProceso = true;
			sen=local_escape(sen);
			//alert(sen);
			httpp.send(sen);
			//setInterval("prueba('fgd')",1000);
		}
	}
}

function getHTTPObject() 
{
	var xmlhttp;
	/*@cc_on
	@if (@_jscript_version >= 5)
	try {
	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	try {
	xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (E) { xmlhttp = false; }
	}
	@else
	xmlhttp = false;
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined') 
	{
		try 
		{
			xmlhttp = new XMLHttpRequest();
		} 
		catch (e) 
		{ 
			xmlhttp = false; 
		}
	}
	return xmlhttp;
}

function ver(ds)
{
	return ds;	
}

//var enProceso = false; // lo usamos para ver si hay un proceso activo
//var http = getHTTPObject(); // Creamos el objeto XMLHttpRequest

