  var get_buscador;
  
   
function getbuscador() 
{							
    var valorcampo = document.form.provincia.options[document.form.provincia.selectedIndex].value;
    // código para objeto nativo XMLHttpRequest
    if (window.XMLHttpRequest) {
        get_buscador = new XMLHttpRequest();
        get_buscador.onreadystatechange = recibir2;
        get_buscador.open("GET", "/ajax/getbuscador.asp?provincia="+valorcampo,true);
        get_buscador.send(null);
    // código para objeto ActiveX IE/Windows
    } else if (window.ActiveXObject) {
        get_buscador = new ActiveXObject("Microsoft.XMLHTTP");
        if (get_buscador) {
            get_buscador.onreadystatechange = recibir2;
            get_buscador.open("GET", "/ajax/getbuscador.asp?provincia="+valorcampo,true);
            get_buscador.send();
        }
    }
}


     
function recibir2() {   
	var strRes;       
    var arrValores;  
	var mivariable = new Array();
	if (get_buscador.readyState == 4) {	    
		strRes=get_buscador.responseText;
		arrValores=strRes.split("|");
		document.form.categoria.options.length=0;		    
		for(i=0;i<arrValores.length;i++)
		{
			mivariable = arrValores[i].split(";");
			document.form.categoria.options[document.form.categoria.options.length]= new Option(mivariable[1],mivariable[0]); 
		}
	}
}
