/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function saveResultPoll(id_poll){
    key_poll = id_poll;
    var radio = document.getElementById('radio_rta_value');
    if(radio != null){
        PollAjax.saveResultPollOption(id_poll,radio.value, viewDataResult);
    }
}

function viewDataResult(data){
    if(data != 'OK'){
        //Ext.MessageBox.alert('Información', "Error Interno");
        alert(data);
    }else{
        parent.location = "index.jsp?option=net.comtor.cms.frontend.component.pagefactory.PollComponentPageFactory&action=view-votes&key="+key_poll;
    }
}
function viewVotesResult(id_poll){
    parent.location = "index.jsp?option=net.comtor.cms.frontend.component.pagefactory.PollComponentPageFactory&action=view-votes&key="+id_poll;
}

function changeHiddenValueRadio(idRadio){
    var radio_rta_value = document.getElementById('radio_rta_value');
    if(radio_rta_value != null){
        radio_rta_value.value = idRadio;
    }
}
