function actualizaPaises()
{ 
	// Primero borro todos los valores
	$('Selectpaises').options.length = 0;					 
	
	var selectedArray =eval("ArrayPaisesZona"+$('Selectzonasgeograficas').options[$('Selectzonasgeograficas').selectedIndex].value); 
	//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 = "0";    
      Primera = false;
    }else{
      aux = selectedArray[i];
      var a = aux.split("|");
      var Texto = a[0];
      var Valor =a[1];
    }             
    eval($('Selectpaises').options[i]=new Option(Texto));        
    $('Selectpaises').options[i].value = Valor;   
  }
}

function actualizaPaisesOtros()
{ 
	// Primero borro todos los valores
	$('Selectpaises').options.length = 0;					 
	
	var selectedArray =eval("ArrayPaisesZona"+$('Selectzonasgeograficas').options[$('Selectzonasgeograficas').selectedIndex].value); 
	//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 = "0";    
      Primera = false;
    }else{
      aux = selectedArray[i];
      var a = aux.split("|");
      var Texto = a[0];
      var Valor =a[1];
    }             
    eval($('Selectpaises').options[i]=new Option(Texto));        
    $('Selectpaises').options[i].value = Valor;   
  }
  //eval($('Selectpaises').options[i]="Otro pais");        
  //$('Selectpaises').options[i].value = "-1";   
}


function mostrarOtroPais()
{
  if(($('Selectpaises').options[$('Selectpaises').selectedIndex].value)=="-1"){
    $('DivOtropais').style.display="block";
  }
}



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";  
  }
  
}

