function progressPercent(percentage) {
  document.getElementById('progressbar').style.width =  parseInt(percentage*2)+"px";
  document.getElementById('progressbar').innerHTML= "<div align='center'>"+percentage+"%</div>"
}

// Clears all checkboxes in the given form
function selectNone(theForm) {
  elementList = Form.getElements(theForm);
  elementList.each(function(element) {
    if (element.type == "checkbox") {
      element.checked = false;
    }
  })
}

// Ticks all checkboxes in the given form
function selectAll(form) {
  elementList = Form.getElements(form);
  elementList.each(function(element) {
    if (element.type == "checkbox") {
      element.checked = true;
    }
  })
}
