function showEncuesta($id,$result){
    var xmlHttp;
    xmlHttp = checkCapabilities();
		
    xmlHttp.onreadystatechange=function(){
        if(xmlHttp.readyState < 4){ 
            document.getElementById("widEncuesta").innerHTML = "<div align='center'><br><br><img src='images/various/loading.gif'><br><br></div>";
        } 
        if(xmlHttp.readyState == 4){
            document.getElementById("widEncuesta").innerHTML = xmlHttp.responseText;
        } 
    }
    xmlHttp.open("GET",baseURL+"showEncuesta.php?id="+$id+"&showResult="+$result,true);   
     
    xmlHttp.send(null);	
}

function encuestaVotar($id){
    var xmlHttp;
    var $votar;
    var $seleccionado;
    
    xmlHttp = checkCapabilities();
    $frm    = document.getElementById('frmEncuesta');
    $votar  = $frm.opcionEnc;
    
    for($i=0;$i < $votar.length; $i++){
        if($votar[$i].checked)
            $seleccionado = $votar[$i].value;
    }
    
    xmlHttp.onreadystatechange=function(){
        if(xmlHttp.readyState < 4){ 
            document.getElementById("widEncuesta").innerHTML = "<div align='center'><br><br><img src='images/various/loading.gif'><br><br></div>";
        } 
        if(xmlHttp.readyState == 4){
            document.getElementById("widEncuesta").innerHTML = xmlHttp.responseText;
        } 
    }
    xmlHttp.open("GET",baseURL+"showEncuesta.php?id="+$id+"&option="+$seleccionado,true);   
     
    xmlHttp.send(null);	    
}
