function stopError() {
  return true;
}
window.onerror = stopError;

function vote(query_string) {
	answid = get_radio_value('voteform', 'vote');
	window.open('/vote.php?id='+query_string+'&answid='+answid, '', 'width=500, height=450, location=no, menubar=no, resizable=no, scrollbars=yes, status=no');
}

function get_radio_value(form_name, element) {
   for (var i=0; i < document.forms[form_name].elements[element].length; i++) {
      if (document.forms[form_name].elements[element][i].checked) {
         var rad_val = document.forms[form_name].elements[element][i].value;
         return rad_val;
      }
   }
   return 1;
}
