function enfocar_control(IDcontrol){
	
	document.getElementById(IDcontrol).focus();
	
	return (true);
}

function bloquearControl(ContrId){
	document.getElementById(ContrId).disabled = true;
	return (true);
}

function desbloquearControl(ContrId){
	document.getElementById(ContrId).disabled = false;
	return (true);
}

function ListBox_vaciar(lbID, agregDef){
	if (typeof(agregDef)== "undefined"){
		ag = true;
	}
	else{
		ag = agregDef;
	}

	//document.getElementById(lbID).options.length = 0;
	var nodo = document.getElementById(lbID);
	
	while (nodo.firstChild){
		nodo.removeChild(nodo.firstChild);
	}
	
	if (ag)
		ListBox_agregar(lbID, '', '', true); /* probar*/
}

function ListBox_agregar(lbID, opcion, valor, seleccionado){
	if (typeof(seleccionado)== "undefined"){
		seleccionado = false;
	}
	
	objSel = document.getElementById(lbID);
	objSel.options[objSel.options.length] = new Option(opcion, valor, seleccionado);
}
