function validate_required(field,alerttxt)
{
with (field)
  {
  if (value==null||value=="")
    {
    alert(alerttxt);return false;
    }
  else
    {
    return true;
    }
  }
}

function validate_form(thisform)
{
with (thisform)
  {
	   if (validate_required(name1,"Name must be filled out!")==false)
	  {name1.focus();return false;}
	  if (validate_required(email1,"Email must be filled out!")==false)
	  {email1.focus();return false;}
	  if (validate_required(pass1,"Password must be filled out!")==false)
	  {pass1.focus();return false;}
	  if (validate_required(school,"School must be filled out!")==false)
	  {school.focus();return false;}
	  if (validate_required(address,"Your address must be filled out!")==false)
	  {address.focus();return false;}
	  if (validate_required(city,"City must be filled out!")==false)
	  {city.focus();return false;}
	  if (validate_required(state,"State must be filled out!")==false)
	  {state.focus();return false;}
	  if (validate_required(poNumber,"Purchase Order Number must be filled out!")==false)
	  {poNumber.focus();return false;}
	  if (validate_required(school_board,"School Board must be filled out!")==false)
	  {school_board.focus();return false;}
	  if (validate_required(school_address,"School address must be filled out!")==false)
	  {school_address.focus();return false;}
	  if (validate_required(school_city,"School city must be filled out!")==false)
	  {school_city.focus();return false;}
	   if (validate_required(school_state,"School state must be filled out!")==false)
	  {school_state.focus();return false;}
	  if (validate_required(school_zip,"School zip code must be filled out!")==false)
	  {school_zip.focus();return false;}

	  if (validate_required(school_phone,"School phone  must be filled out!")==false)
	  {school_phone.focus();return false;}
  }
 
}

