function actualizaPaises()
{ 
	// Primero borro todos los valores
	document.Formbusqpaissur.Selectpaises.options.length = 0;					
	
	var selectedArray = eval("ArrayPaisesZona"+document.Formbusqpaissur.Selectzonasgeograficas.options[document.Formbusqpaissur.Selectzonasgeograficas.selectedIndex].value);
	
	var Primera = true;
  for (var i=0; i < selectedArray.length; i++) {
    if(Primera){    
      var Texto = selectedArray[i];
      var Valor = "";    
      Primera = false;
    }else{
      aux = selectedArray[i];
      var a = aux.split("|");
      var Texto = a[0];
      var Valor =a[1];
    }     
    eval("document.Formbusqpaissur.Selectpaises.options[i]="+"new Option('"+ Texto+"')");    
    document.Formbusqpaissur.Selectpaises.options[i].value = Valor;   
  }
}

function ocultar(capavisible,capaocultar){  
  document.getElementById(capavisible).style.display="block";  
  document.getElementById(capaocultar).style.display="none";
  document.getElementById('DivtablaPaisSurbuscador').style.display="none";
}

function ocultardesglose(capamostrar){
  
  if(capamostrar!="DivFondos"){
    if(document.getElementById("DivFondos")){
      document.getElementById("DivFondos").style.display="none";  
    }
  }
  if(capamostrar!="DivRecursos"){
    if(document.getElementById("DivRecursos")){
      document.getElementById("DivRecursos").style.display="none";
    }
  }
  if(capamostrar!="DivGastos"){
    if(document.getElementById("DivGastos")){
      document.getElementById("DivGastos").style.display="none";
    }
  }
  if(capamostrar!="DivApoyo"){
    if(document.getElementById("DivApoyo")){
      document.getElementById("DivApoyo").style.display="none";      
    }
  }
  if(document.getElementById(capamostrar).style.display=="block"){    
    document.getElementById(capamostrar).style.display="none";  
  }else{    
    document.getElementById(capamostrar).style.display="block";  
  }
  
}

