function doAjaxSearchPopulateTemplate(url,element) {
	selectAElementToPopulate = element;
	
	var trSelect = selectAElementToPopulate.parentNode.parentNode;
	var tableSelect = trSelect.parentNode.parentNode;
	
	//borrar todos los tr desde el trSelect hasta el tr que contiene name="separator"
	while (tableSelect.rows[trSelect.rowIndex + 1].getAttribute("name") != "separator") {
		tableSelect.deleteRow(trSelect.rowIndex + 1);
	}

	//colocar cargando
	var aRow = tableSelect.insertRow(trSelect.rowIndex + 1);
	var tdSection = aRow.insertCell(0);

	tdSection.innerHTML = LBL_LOADING;
	tdSection.setAttribute("colspan","2");
	
	AjAX_POOL.processNext(new AjaxCaller('GET',url + element.options[element.selectedIndex].value,null,processXmlSearchPopulateRelated,true,false));
}

//------------------------------------------------------------------------------

function processXmlSearchPopulateRelated(xml,elementSelect) {
	var result = false;
	if (xml != null && xml.getElementsByTagName("load").length != 0) {
		var toLoad = xml.getElementsByTagName("load").item(0);
		var toLoadType = toLoad.getAttribute("type");

		if (LOAD_TABLE == toLoadType) {
			var xmlTable = toLoad.getElementsByTagName("table").item(0);
			var xmlRows = xmlTable.getElementsByTagName("row");
		
			var trSelect = selectAElementToPopulate.parentNode.parentNode;
			var tableSelect = trSelect.parentNode.parentNode;
			
			//borrar todos los tr desde el trSelect hasta el tr que contiene name="separator"
			while (tableSelect.rows[trSelect.rowIndex + 1].getAttribute("name") != "separator") {
				tableSelect.deleteRow(trSelect.rowIndex + 1);
			}

			for (var i = 0; xmlRows != null && i < xmlRows.length; i++) {
				var xmlRow = xmlRows.item(i);
				var xmlCells = xmlRow.getElementsByTagName("cell");
				
				var nameSection = xmlCells.item(0).firstChild.nodeValue;
				var nameInput = xmlCells.item(1).firstChild.nodeValue;
				var valueInput = (xmlCells.item(2).firstChild != null)?xmlCells.item(2).firstChild.nodeValue:"";

				var aRow = tableSelect.insertRow(trSelect.rowIndex + 1 + i);
				var tdSection = aRow.insertCell(0);
				var tdInput = aRow.insertCell(1);
		
				tdSection.innerHTML = nameSection + ":";
				
				tdInput.innerHTML = "<input name=\"" + nameInput + "\" style=\"width:100%\" value=\"" + valueInput + "\">";
			}
		
			result = true;
		}
	}
	
	if (result == true) return true;
	
	alert("Ops! Nothing to load");
	return false;
}