function validate(theForm)
{
 barrelOption = -1;
 for (i=theForm.barrel.length-1; i > -1; i--) {
  if (theForm.barrel[i].checked) {
   barrelOption = i; i = -1;
  }
 }
 if (barrelOption == -1) {
  alert("You must select a contour");
  theForm.barrel[0].focus();
  return false;
 }
 
 twistOption = -1;
 for (i=theForm.Twist.length-1; i > -1; i--) {
  if (theForm.Twist[i].checked) {
   twistOption = i; i = -1;
  }
 }
 if (twistOption == -1) {
  alert("You must select a twist");
  theForm.Twist[0].focus();
  return false;
 }
 
 finishOption = -1;
 for (i=theForm.finish.length-1; i > -1; i--) {
  if (theForm.finish[i].checked) {
   finishOption = i; i = -1;
  }
 }
 if (finishOption == -1) {
  alert("You must select a finish");
  theForm.finish[0].focus();
  return false;
 }
  if (theForm.cartridge.value == "")
  {
    alert("Please enter a cartridge for your chamber.");
    theForm.cartridge.focus();
    return false;
  }
  
}