function updatePollSelection(G){var F=new ajax_connect(ROOT_PATH+"ajax/ajax_col_poll.php","POST");F.setVars("func=process_poll");F.setVars("pollid",G);var B=$$("#opinionPoll input[type=radio]");var C="";var E=0;var A="";var D=0;B.each(function(I,H){if(I.checked==true){D=I.getProperty("value")}});F.setVars("poll_answer",D);F.onComplete(function(M){if(M.type=="xml"){var J=0;for(i=0;i<M.data.getElementsByTagName("row").length;i++){J=J+parseFloat(_xmlfetch(M.data,"tally",i))}var L=0;var H=0;var K="";for(i=0;i<M.data.getElementsByTagName("row").length;i++){var N=_xmlfetch(M.data,"poll_option",i);var I=parseInt(_xmlfetch(M.data,"tally",i));H=I/J;L=H*100;L=Math.round(L);K+='<div class="option_radio">'+N+": "+_lang("polls","opinion_tally",[I,L])+'</div><div id="result_'+i+'"><img src="images/graph_left_1.gif" /><img src="images/graph_middle_1.gif" width="'+L+'" height="10" /><img src="images/graph_right_1.gif" /></div>'}K+=' <div class="option_radio">'+_lang("polls","opinion_total")+J+"</div>"}$("results_container").setHTML(K);$("poll_vote").setStyle("display","none");$("poll_results").setStyle("display","block")});F.sendData()};
