/**
 * @author juanjosefrancopenaranda
 */
function addCargo(){
    cargo = document.getElementById("lst_cargo");
    lista = document.getElementById("cargo_selected");
    exp = document.getElementById("exper").value;
    if (cargo.options.length > 0) {

		lista.style.display="inline";
        
        
        for (var i = (cargo.options.length - 1); i >= 0; i--) {
            if (cargo.options[i].selected) {
				var newopt = document.createElement('option');
        		newopt.setAttribute('selected', 'true');
        		newopt.setAttribute('value', cargo.options[i].value + ":" + exp);
        		newopt.innerHTML = cargo.options[i].innerHTML + ":" + exp;
        		lista.appendChild(newopt);
                cargo.options[i] = null;
				break;
            }
        }
    }
}

function addMaterias(){
    materias = document.getElementById("lst_conocimientos");
    lista = document.getElementById("materias_selected");
    exp = document.getElementById("nivel").value;
    if (materias.options.length > 0) {
    	
		lista.style.display="inline";
       
        
        for (var i = (materias.options.length - 1); i >= 0; i--) {
            if (materias.options[i].selected) {
                 var newopt = document.createElement('option');
        		newopt.setAttribute('selected', 'true');
        		newopt.setAttribute('value', materias.options[i].value + ":" + exp);
        		newopt.innerHTML = materias.options[i].innerHTML + ":" + exp;
        		lista.appendChild(newopt);
				materias.options[i] = null;
            }
        }
    }
}

function selecAll(lstOpt){
	for (var i = (lstOpt.options.length - 1); i >= 0; i--) {
		lstOpt.options[i].selected = true;
	}
}


