var opyn= $('#opinionpollfilldiv').text().split('~');
// alert(opyn[0]+' '+opyn[1]);
$('#countyes').val(opyn[0]);
$('#countno').val(opyn[1]);
//alert( parseInt(opyn[0])+parseInt(opyn[1]));
var tot=parseInt(opyn[0])+parseInt(opyn[1]);
var perecentyes= (parseInt(opyn[0]) / tot) * 100 ;
var perecentno= (parseInt(opyn[1]) / tot) * 100 ;
// alert(perecentyes+' '+perecentno);
var pyn="'"+perecentyes+"%'";
//alert(pyn);
$('#opinionpollcolordiv').text('yes'); // unless I put some text here(in this case 'yes', the graphic(the red horizontal bar indicating yes % ) is not displayed