//principal

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}

// Java Document

//buscar proceso

var xmlHttp
function bqUsuarios(por1,cuando1)
{ 	
	xmlHttp=GetXmlHttpObject()
	
	if (xmlHttp==null)
	{
		alert ("Browser no soporta HTTP Request")
		return
	}
	
	var url="admin/lista.php"
	url=url+"?selec="+por1+"&textfield="+cuando1
	xmlHttp.onreadystatechange=stateChanged
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
	document.getElementById("resultados").innerHTML = xmlHttp.responseText
	} 
}


//mostrar caja archivos

function mfile(as,bs,le,te)
{ 	
	xmlHttp=GetXmlHttpObject()
	
	if (xmlHttp==null)
	{
		alert ("Browser no soporta HTTP Request")
		return
	}
	
	var url="archivos.php"
	url=url+"?idet="+as+"&id_="+bs
	xmlHttp.onreadystatechange=stateChanged2
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)

	function stateChanged2() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 
		conte = document.getElementById("res")
		with(conte.style)
		  {
		    display = "";
		    position = "absolute";
		    left = le+10;
		    top = te+10;
		  }
		  conte.innerHTML = xmlHttp.responseText; 
		} 
	}
}

function bqdto1(por1,cuando1)
{ 	
	xmlHttp=GetXmlHttpObject()
	
	if (xmlHttp==null)
	{
		alert ("Browser no soporta HTTP Request")
		return
	}
	
	var url="complementos/bqd.php"
	url=url+"?selec="+por1+"&textfield="+cuando1
	xmlHttp.onreadystatechange=stateChanged20
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
function stateChanged20() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
	document.getElementById("resultados").innerHTML = xmlHttp.responseText
	} 
}
}

function mfile1(as,bs,le,te)
{ 	
	xmlHttp=GetXmlHttpObject()
	
	if (xmlHttp==null)
	{
		alert ("Browser no soporta HTTP Request")
		return
	}
	
	var url="archivos1.php"
	url=url+"?idet="+as+"&id_="+bs
	xmlHttp.onreadystatechange=stateChanged5
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)

	function stateChanged5() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 
		conte = document.getElementById("res")
		with(conte.style)
		  {
		    display = "";
		    position = "absolute";
		    left = le+10;
		    top = te+10;
		  }
		  conte.innerHTML = xmlHttp.responseText; 
		} 
	}
}
