<!-- // Hide from old browsers
/**************************************************
// js_check_and_submit_tempenr() will check to see if
// all required fields are filled in.  If not,
// it will pop up an alert to the user specifying
// which fields must be entered.
***************************************************/
function js_check_and_submit_tempenr(tempenr) 
{
   //window.alert("In js_check_and_submit_tempenr()");
   var wrkcnt = "0";
   var wrkaction = "";
   
   wrkaction = tempenr.saction.value;
      
   // checks to see if a class has been selected
   for (var i=1;i<=tempenr.rowcnt.value;i++) {
      if (eval("tempenr.enrollclass"+i).checked) {
	     wrkcnt = wrkcnt+1;
   	  }
   }
   
   // if the student has not selected any classes
   if (wrkaction == 'saveit') {
      if (wrkcnt == '0') {
	     window.alert('You must select a class.');
		 return(false);
	  }
   }
   // if the student has not selected any classes or has no classes saved in PDIRegistration_Temp
   if (wrkaction == 'enroll') {
      if ((wrkcnt == '0') && (tempenr.enrtempcnt.value == '0')) {
	     window.alert('You must select a class to enroll.');
		 return(false);
	  }
   }
   
   tempenr.submit();
 
}
// End hide -->