function drawPollChart(strQues, strAns, strPerAns, strVotes, strSize, imgPath) {
var arrAns=strAns.split(",");
var arrPerAns=strPerAns.split(",");
var calc

var barchart1 ='<b>' + strQues + '</b><br><br>';
for (var idx=0;idx<arrAns.length; idx++) {
	calc = Math.round(arrPerAns[idx]/strVotes*100)
    barchart1 = barchart1 + arrAns[idx] + 
    			'<br><img border="0" '+
               'src="' + imgPath + '" width="' + Math.round(calc * (strSize + 0.4)) +
               '" height="15">&nbsp;' + calc + '%<br><br>';
}
	barchart1 = barchart1 + '<i>Total number of votes</i>:' + strVotes 
document.write(barchart1);
}

function validatePoll(pageform) {

var optSel = false;
for (i=0;i<pageform.answer.length;i++) {
	if (pageform.answer[i].checked) {
	optSel = true;
	}
}
if (optSel == false) {
	alert("You did not select any options") ;
	return false;
	}
	return true;
}


