function DeshabilitarCombo(O, S) {
	var Owner = document.getElementById(O);
	var Slave = document.getElementById(S);
	var Idx = Owner.selectedIndex;

	if (Idx == 0) {
		Slave.selectedIndex = 0;	
		Slave.disabled = true;
	}
	else Slave.disabled = false;	
}

function ObjAjax() {
	var xmlhttp=false;
	try{
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e){
		try{
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(E){
			if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
				xmlhttp=new XMLHttpRequest();
			}
		}
	}
	return xmlhttp; 
}

function InstrumentosCombo(Cbo, Categoria){
	if (Categoria==0) {		
		return;
	}
	var Ajax = ObjAjax();
	var Combo = document.getElementById(Cbo);
	var IDProceso = 1;
	
	Ajax.open("GET", "procesos.php?proc="+IDProceso+"&cat="+Categoria, true);
	Ajax.onreadystatechange=function() {
		if (Ajax.readyState==1) {
			Combo.length=0;
			var nuevaOpcion=document.createElement("option"); 
			nuevaOpcion.value=0;
			nuevaOpcion.innerHTML="Cargando...";
			Combo.appendChild(nuevaOpcion); 
			//Objeto.disabled=true;
		}
		if (Ajax.readyState==4) {
			Combo.innerHTML = Ajax.responseText; //Combo.innerHTML
		}
	}
	Ajax.send(null);
}

