function validit()
{

   if(document.InputForm.FirstName.value == "")
   {
      alert("Please enter your first name.");
      document.InputForm.FirstName.focus();
      return false;
   }

   if(document.InputForm.LastName.value == "")
   {
      alert("Please enter your last name.");
      document.InputForm.LastName.focus();
      return false;
   }

   if(document.InputForm.Address.value == "")
   {
      alert("Please enter your address.");
      document.InputForm.Address.focus();
      return false;
   }

   if(document.InputForm.City.value == "")
   {
      alert("Please enter your city.");
      document.InputForm.City.focus();
      return false;
   }

  if (document.InputForm.State.selectedIndex == 0)
  {
    alert("Please select your state.");
    document.InputForm.State.focus();
    return (false);
  }

   if(document.InputForm.Zip.value == "")
   {
      alert("Please enter your zip code.");
      document.InputForm.Zip.focus();
      return false;
   }

// phone
   if(document.InputForm.Phone1.value == "")
   {
      alert("Please enter a phone number.");
      document.InputForm.Phone1.focus();
      return false;
   }

// validate email address
   if(document.InputForm.Email.value == "")
   {
      alert("Please enter your email address.");
      document.InputForm.Email.focus();
      return false;
   }

   if(document.InputForm.Email.value != "")
   {
      if(document.InputForm.Email.value.indexOf("@") == -1)
      {
         alert('Your email address is invalid it must contain @.');
         document.InputForm.Email.focus();
         return false;
      }  
   }

// SDSMT
	if(document.InputForm.Degree1.value == "")
	{
		alert("Please enter your SDSM&T degree.");
		document.InputForm.Degree1.focus();
		return false;
	}

   var radioSelected = false;
   for (i = 0;  i < document.InputForm.Type1.length;  i++)
   {
      if (document.InputForm.Type1[i].checked)
      {
        radioSelected = true;
        ckType1 = i + 1;
      }
   }
   if (!radioSelected)
   {
      alert("Please tell us your degree type.");
      document.InputForm.Type1[0].focus();
      return false;
   }

	if(document.InputForm.Year1.value == "")
	{
		alert("Please enter the year of your SDSM&T degree.");
		document.InputForm.Year1.focus();
		return false;
	}


// Work

	if(document.InputForm.Workplace.value == "")
	{
		alert("Please enter your workplace.");
		document.InputForm.Workplace.focus();
		return false;
	}

	if(document.InputForm.Location.value == "")
	{
		alert("Please enter the location of your workplace.");
		document.InputForm.Location.focus();
		return false;
	}


// Email Body

	em = '<p>';
	em += document.InputForm.FirstName.value + ' ' + document.InputForm.LastName.value;
	em += ', ';
	em += document.InputForm.Email.value;
	em += ', has registered for the SMART program.</p>';
	em += '<p>They have identified that they would like to volunteer for the following SMART activities...</p>';
	em += '<ul>';
		if (document.InputForm.CoHost.checked)
		{
			em += '<li>Co-hosting college fairs with SDSM&T representatives</li>';
		}
		if (document.InputForm.Host.checked)
		{
			em += '<li>Hosting college fairs on own for SDSM&T</li>';
		}
		if (document.InputForm.Classroom.checked)
		{
			em += '<li>Classrooms discussions at local schools</li>';
		}
		if (document.InputForm.viaPhone.checked)
		{
			em += '<li>Contact prospective students via phone</li>';
		}
		if (document.InputForm.viaEmail.checked)
		{
			em += '<li>Contact prospective students via email</li>';
		}
		if (document.InputForm.viaLetter.checked)
		{
			em += '<li>Contact prospective students via letter</li>';
		}
		if (document.InputForm.Identify.checked)
		{
			em += '<li>Identify prospective students</li>';
		}
		if (document.InputForm.Business.checked)
		{
			em += '<li>Host an event at your home or place of business</li>';
		}
		if (document.InputForm.Scholarship.checked)
		{
			em += '<li>Presenting scholarships</li>';
		}
		if (document.InputForm.Shadow.checked)
		{
			em += '<li>Work shadow</li>';
		}
	em += '</ul>';
	
   document.InputForm.email_body.value = em;

// Email header information

   from = document.InputForm.Email.value;
   document.InputForm.email_from.value = from;
   
   cc = document.InputForm.Email.value;
   document.InputForm.email_cc.value = cc;

   subj = 'SMART Registration - ' + document.InputForm.FirstName.value + ' ' + document.InputForm.LastName.value;
   document.InputForm.email_subject.value = subj;

   return true;

}

