function faq_vote(votingresult) { barsize = 50; percentage = votingresult['percentage']/100; leftbar = Math.round(barsize*percentage); rightbar = barsize - leftbar; barhtml = ""; barhtml += ""; set_html("result_" + votingresult['qid'], barhtml + votingresult['percentage'] + "% said it helped"); }