var onlyTimeA = true;

function showList(deQue){
   
    if(deQue == "paises"){
        $('panelPais').style.visibility = 'visible';
        new Effect.Opacity('panelPais', { from: 0, to: 0.9, duration: 1.5 });
        $('panelPais').show();
        $('pais').blur();
    }
    else if(deQue == "estados"){
        $('panel').style.visibility = 'visible';
        $('panel').show();
        new Effect.Opacity('panel', { from: 0, to: 0.9, duration: 2.5 });
        $('cboEstado').blur();
    }
    new Effect.Opacity('content', { from: 1, to: 0.3 });
}

//function onSelectTopico(){
//    var ePais = document.getElementById("select1");
//    ePais.innerHTML = "";
//    var option = document.createElement("option");
//    option.innerHTML = selected;
//    var eSelect = "";
//    for(var i=0; i<topicosText.length;i++){
//        if(topicos[i].text == selected){
//            eSelect = topicos[i].value;
//            i = topicosText.length + 1;
//        }
//    }
//    option.setAttribute("value", eSelect);
//    ePais.appendChild(option);
//    new Effect.Puff('panel');
//    new Effect.Opacity('content', { from: 0.3, to: 1 });
//}

function onSelectPais(){
    var ePais = document.getElementById("pais");
    ePais.innerHTML = "";
    var option = document.createElement("option");
    option.innerHTML = selected;
    option.setAttribute("value", selected);
    ePais.appendChild(option);
    new Effect.Puff('panelPais');
    new Effect.Opacity('content', { from: 0.3, to: 1 });
    if(selected.indexOf("xico") == -1){
       $("cboEstado").innerHTML = "";
       var option = document.createElement("option");
       option.innerHTML = "Internacional";
       option.setAttribute("value", "Internacional");
       $("cboEstado").appendChild(option);
       $("cboEstado").disabled = true;
   }else{
       $("cboEstado").innerHTML = "";
       var option = document.createElement("option");
       option.innerHTML = "Distrito Federal";
       option.setAttribute("value", "Distrito Federal");
       $("cboEstado").appendChild(option);
       $("cboEstado").disabled = false;
   }
    new Effect.Opacity('panelPais', { from: 1, to: 0, duration: 1.5});
}

function onSelectEstado(){
    var ePais = document.getElementById("cboEstado");
    ePais.innerHTML = "";
    var option = document.createElement("option");
    option.innerHTML = selected;
    option.setAttribute("value", selected);
    ePais.appendChild(option);
    new Effect.Puff('panel');
    new Effect.Opacity('content', { from: 0.3, to: 1 });
    new Effect.Opacity('panel', { from: 1, to: 0, duration: 1.5});
}