function getCheckedValue(radioObj) {
  if(!radioObj)
    return "";
  var radioLength = radioObj.length;
  if(radioLength == undefined)
    if(radioObj.checked)
      return radioObj.value;
    else
      return "";
  for(var i = 0; i < radioLength; i++) {
    if(radioObj[i].checked) {
      return radioObj[i].value;
    }
  }
  return "";
}

function doVote(thisWebblock, voteoption, link) {
  $("#wb_" + thisWebblock).fadeTo("fast", 0.1);
  $.ajax({
  type: "POST",
  url: link,
    data: {thisWebblock:[thisWebblock],
           voteoption:[getCheckedValue(voteoption)],
           link:[link]},
    success: function(html){
               $("#wb_" + thisWebblock).html(html);
               $("#wb_" + thisWebblock).fadeTo("slow", 1.0);
             }
  });
}

