
var url = "areaProveedores/listadoConvocatoria.php?pagina=";  
var http = getXmlHttpObject(); 

function handleHttpResponse(){ 
	document.getElementById("cargador").style.visibility = "visible";
    if (http.readyState == 1){ 
     //   document.getElementById('cargador').innerHTML = "Cargando..."; 
    } 
    if (http.readyState == 4){ 
        results = http.responseText; 
        document.getElementById('main').innerHTML = results; 
		document.getElementById("cargador").style.visibility = "hidden";
    } 
} 

function sendQuerystring(pagina){ 
    http.open("POST", url + pagina, true); 
    http.onreadystatechange = handleHttpResponse; 
	
	nom=document.buscar.txtproducto.value;
	codigo=document.buscar.txtcodigo.value;
	entidad=document.buscar.txtentidad.value;	
	tipo=document.buscar.tipoBusqueda.value;
	rubro=document.buscar.cboRubro.options[document.buscar.cboRubro.selectedIndex].value;
	grupo=document.buscar.Cbogrupo.options[document.buscar.Cbogrupo.selectedIndex].value;
	depto=document.buscar.Depto_residencia.options[document.buscar.Depto_residencia.selectedIndex].value;

	
	http.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	http.send("txtproducto="+nom+"&cboRubro="+rubro+"&Cbogrupo="+grupo+"&txtcodigo="+codigo+"&txtentidad="+entidad+"&tipoBusqueda="+tipo+"&Depto_residencia="+depto);
   // http.send(null); 
} 

function getXmlHttpObject(){ 
    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; 
} 

