function checkform( thisform ) {

if (thisform.id24_Course.value==null || thisform.id24_Course.value=="") 
{
   alert ("Please enter a Course number. (e.g. OSHA 2015 Hazardous Materials)");
   thisform.id24_Course.focus();
   return false;
   }


if (thisform.id25_Location.value==null || thisform.id25_Location.value=="") {
   alert ("Please enter the location of the Course. (e.g. Seattle)");
   thisform.id25_Location.focus();
   return false;
   }


 
if (thisform.id26_Dates.value==null || thisform.id26_Dates.value=="") {
   alert ("Please enter the date of the Course. (e.g. 2/4-7, 2005)");
   thisform.id26_Dates.focus();
   return false;
   }
   
if (thisform.id01_ID.value==null || thisform.id01_ID.value=="") {
   alert ("Please enter the first 4 letters of your last name.");
   thisform.id01_ID.focus();
   return false;
   }

//check length. Used 2 because some last names may be shorter than 4 letters
if (thisform.id01_ID.value.length < 2) {
   alert ("Please enter a minimum of 2 letters");
   thisform.id01_ID.focus();
   return false;
   }

if (thisform.id02_ID.value==null || thisform.id02_ID.value=="") {
   alert ("Please enter the month and day of your birthdate (e.g. mmdd)");
   thisform.id02_ID.focus();
   return false;
   }

//check length is 4
if (thisform.id02_ID.value.length != 4) {
   alert ("Please enter your birthday in the format of mmdd");
   thisform.id02_ID.focus();
   return false;
   }

if (thisform.id03_Name.value==null || thisform.id03_Name.value=="") {
   alert ("Please enter your full name.");
   thisform.id03_Name.focus();
   return false;
   }

 
if (thisform.id09_Address.value==null || thisform.id09_Address.value=="") {
   alert ("Please enter your street address.");
   thisform.id09_Address.focus();
   return false;
   }
   
if (thisform.id10_City.value==null || thisform.id10_City.value=="") {
   alert ("Please enter the city.");
   thisform.id10_City.focus();
   return false;
   }


if (thisform.id11_State.value==null || thisform.id11_State.value=="") {
   alert ("Please enter the state.");
   thisform.id11_State.focus();
   return false;
   }


if (thisform.id12_Zip.value==null || thisform.id12_Zip.value=="") {
   alert ("Please enter the zip code.");
   thisform.id12_Zip.focus();
   return false;
   }

 
if (thisform.id13_Phone.value==null || thisform.id13_Phone.value=="") {
   alert ("Please enter your daytime phone.");
   thisform.id13_Phone.focus();
   return false;
   }
      
   
if (thisform.id15_Email.value==null || thisform.id15_Email.value=="") {
   alert ("Please enter a valid email.");
   thisform.id15_Email.focus();
   return false;
   }

// validate email is a valid email

var emailstr=thisform.id15_Email.value
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(emailstr)==false){
alert ("The email address you entered is not a valid email address.");
thisform.id15_Email.focus();
return false;
}


//end



// validate payment
myOption = -1;
for (i=0; i<thisform.id20_Payment.length; i++) {
	if (thisform.id20_Payment[i].checked) {
	myOption = i;
	}
}

if (myOption == -1) {
alert("You must select a method of payment.");
return false;
}

// **************************** end of payment validation **************
   
return true;

}


