function checkCompareBoxes() {
 var theForm = document.getElementById('compare')
 err2 = ''
 err = ''
 for(z=0; z<theForm.length;z++){
  if(theForm[z].type == 'checkbox' && theForm[z].checked == true){
  if(err2 == 'no'){err = 'no'}
  err2 = 'no';
  }
 }
 if (err == 'no'){theForm.submit()}else{alert ("You must select two or more products to compare.")}
}
