  function checkForm(form)
  {
  
  	if(form.RightPower.selectedIndex > 0) {
    // an option has been selected
	  } else {
    // no option selected
      alert("Please select Power for the right eye (OD)");
      form.RightPower.focus();
      return false;	
	  }
 
   	if(form.RightBase.selectedIndex > 0) {
    // an option has been selected
	  } else {
    // no option selected
      alert("Please select Base Curve for the right eye (OD)");
      form.RightBase.focus();
      return false;	
	  }
  
 
  	if(form.LeftPower.selectedIndex > 0) {
    // an option has been selected
	  } else {
    // no option selected
      alert("Please select Power for the left eye (OS)");
      form.LeftPower.focus();
      return false;	
	  }

  	if(form.LeftBase.selectedIndex > 0) {
    // an option has been selected
	  } else {
    // no option selected
      alert("Please select Base Curve for the left eye (OS)");
      form.LeftBase.focus();
      return false;	
	  }
  
    // validation fails if the input is blank
    if(form.DoctorName.value == '') {
      alert("Please provide the doctor's name");
      form.DoctorName.focus();
      return false;
    }

    if(form.DoctorPhone.value == '') {
      alert("Please provide the doctor's phone number");
      form.DoctorPhone.focus();
      return false;
    }
	
    if(form.PatientName.value == '') {
      alert("Please provide the patient's name");
      form.PatientName.focus();
      return false;
    }
	
    if(form.PatientPhone.value == '') {
      alert("Please provide the patient's phone number");
      form.PatientPhone.focus();
      return false;
    }		
	

	
    
    // validation was successful
    return true;
  }