

function FormValid() {

if (document.registerform.pwd.value != document.registerform.pwd2.value){
	alert("Your passwords do not match, please try again.");
	document.registerform.pwd.value = "";
	document.registerform.pwd2.value = "";
	return false;
}
	
var validChar = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
var validNum = "0123456789";

  if (document.registerform.name.value == "")
  {
    alert("Please enter a value for the \"Teacher First Name\" field.");
    document.registerform.name.focus();
    return (false);
  }

  if (document.registerform.lname.value == "")
  {
    alert("Please enter a value for the \"Teacher Last Name\" field.");
    document.registerform.lname.focus();
    return (false);
  }  

  if (document.registerform.sphone.value == "")
  {
    alert("Please enter a value for the \"School Phone\" field.");
    document.registerform.sphone.focus();
    return (false);
  }


  var checkOK = validNum+"() -";
  var checkStr = document.registerform.sphone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit, blanks and \"()-\" characters in the \"Phone\" fields.");
    document.registerform.sphone.focus();
    return (false);
  }

  if (document.registerform.hphone.value == "")
  {
    alert("Please enter a value for the \"Home Phone\" field.");
    document.registerform.hphone.focus();
    return (false);
  }


  var checkOK = validNum+"() -";
  var checkStr = document.registerform.hphone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit, blanks and \"()-\" characters in the \"Phone\" fields.");
    document.registerform.hphone.focus();
    return (false);
  }


  if (document.registerform.usr.value == "")
  {
    alert("Please enter a value for the \"Login Name\" field.");
    document.registerform.usr.focus();
    return (false);
  }

  if (document.registerform.usr.value.length < 6)
  {
    alert("Please enter at least 6 characters in the \"Login Name\" field.");
    document.registerform.usr.focus();
    return (false);
  }
  
  
var checkOK = validNum + validChar;
  var checkStr = document.registerform.usr.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letters and numbers in the \"Login Name\" field.");
    document.registerform.usr.focus();
    return (false);
  }
  
  
  

  if (document.registerform.pwd.value == "")
    {
      alert("Please enter a value for the \"Password\" field.");
      document.registerform.pwd.focus();
      return (false);
    }

    if (document.registerform.pwd.value.length < 6)
    {
      alert("Please enter at least 6 characters in the \"Password\" field.");
      document.registerform.pwd.focus();
      return (false);
    }
var checkOK = validNum + validChar;
  var checkStr = document.registerform.pwd.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letters and numbers in the \"Password\" field.");
    document.registerform.pwd.focus();
    return (false);
  }

  if (document.registerform.district.value == "")
    {
     alert("Please choose your district");
      document.registerform.district.focus();

      return (false);
  }


  if (document.registerform.school.value.length < 1)
    {
     alert("School Not Found.  Please contact the SCMEA office.");
      document.registerform.school.focus();

      return (false);
  }



  if (document.registerform.email.value == "" ) {
  	alert("Please enter a valid e-mail address");
  		document.registerform.email.focus();
  		return(false);
  	}


var ch = false;
	for(var i = 0; i<document.registerform.ens.length; i++) {
		if (document.registerform.ens[i].checked) {
			ch = true;
			break;
		}
}
	if (!ch){
		alert("Please select an Ensemble");
		return false;
	}




document.registerform.EnrollA.style.display='none';


return(true);
}

function FormPValid() {

	
	
var validChar = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
var validNum = "0123456789";

  if (document.registerform.name.value == "")
  {
    alert("Please enter a value for the First Name field.");
    document.registerform.name.focus();
    return (false);
  }

   if (document.registerform.lname.value == "")
  {
    alert("Please enter a value for the Last Name field.");
    document.registerform.lname.focus();
    return (false);
  } 

  if (document.registerform.sphone.value == "")
  {
    alert("Please enter a value for the \"School Phone\" field.");
    document.registerform.sphone.focus();
    return (false);
  }


  var checkOK = validNum+"() -";
  var checkStr = document.registerform.sphone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit, blanks and \"()-\" characters in the \"Phone\" fields.");
    document.registerform.sphone.focus();
    return (false);
  }

  if (document.registerform.hphone.value == "")
  {
    alert("Please enter a value for the \"Home Phone\" field.");
    document.registerform.hphone.focus();
    return (false);
  }


  var checkOK = validNum+"() -";
  var checkStr = document.registerform.hphone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit, blanks and \"()-\" characters in the \"Phone\" fields.");
    document.registerform.hphone.focus();
    return (false);
  }


  if (document.registerform.pwd.value == "")
    {
      alert("Please enter a value for the \"Password\" field.");
      document.registerform.pwd.focus();
      return (false);
    }

    if (document.registerform.pwd.value.length < 6)
    {
      alert("Please enter at least 6 characters in the \"Password\" field.");
      document.registerform.pwd.focus();
      return (false);
    }
var checkOK = validNum + validChar;
  var checkStr = document.registerform.pwd.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letters and numbers in the \"Password\" field.");
    document.registerform.pwd.focus();
    return (false);
  }



  if (document.registerform.school.value.length < 1)
    {
     alert("Please enter your school name");
      document.registerform.school.focus();

      return (false);
  }

var checkOK = validNum + validChar + "'. ";
  var checkStr = document.registerform.school.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letters and numbers in the \"School\" field.");
    document.registerform.pwd.focus();
    return (false);
  }



  if (document.registerform.email.value == "" ) {
  	alert("Please enter a valid e-mail address");
  		document.registerform.email.focus();
  		return(false);
  	}





return(true);
}


function FormAValid() {

	
	
var validChar = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
var validNum = "0123456789";

  if (document.registerform.name.value == "")
  {
    alert("Please enter a value for the \"AVP Name\" field.");
    document.registerform.name.focus();
    return (false);
  }

  

  if (document.registerform.sphone.value == "")
  {
    alert("Please enter a value for the \"School Phone\" field.");
    document.registerform.sphone.focus();
    return (false);
  }


  var checkOK = validNum+"() -ext.";
  var checkStr = document.registerform.sphone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit, blanks and \"()-\" characters in the \"Phone\" fields.");
    document.registerform.sphone.focus();
    return (false);
  }

  if (document.registerform.hphone.value == "")
  {
    alert("Please enter a value for the \"Home Phone\" field.");
    document.registerform.hphone.focus();
    return (false);
  }


  var checkOK = validNum+"() -";
  var checkStr = document.registerform.hphone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit, blanks and \"()-\" characters in the \"Phone\" fields.");
    document.registerform.hphone.focus();
    return (false);
  }


  if (document.registerform.pwd.value == "")
    {
      alert("Please enter a value for the \"Password\" field.");
      document.registerform.pwd.focus();
      return (false);
    }

    if (document.registerform.pwd.value.length < 6)
    {
      alert("Please enter at least 6 characters in the \"Password\" field.");
      document.registerform.pwd.focus();
      return (false);
    }
var checkOK = validNum + validChar;
  var checkStr = document.registerform.pwd.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letters and numbers in the \"Password\" field.");
    document.registerform.pwd.focus();
    return (false);
  }

  if (document.registerform.email.value == "" ) {
  	alert("Please enter a valid e-mail address");
  		document.registerform.email.focus();
  		return(false);
  	}

   return(true);
}

function FormCValid() {

	
	
var validChar = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
var validNum = "0123456789";

  if (document.registerform.name.value == "")
  {
    alert("Please enter a value for the \"AVP Name\" field.");
    document.registerform.name.focus();
    return (false);
  }

  

  if (document.registerform.sphone.value == "")
  {
    alert("Please enter a value for the \"School Phone\" field.");
    document.registerform.sphone.focus();
    return (false);
  }


  var checkOK = validNum+"() -ext.";
  var checkStr = document.registerform.sphone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit, blanks and \"()-\" characters in the \"Phone\" fields.");
    document.registerform.sphone.focus();
    return (false);
  }

  if (document.registerform.hphone.value == "")
  {
    alert("Please enter a value for the \"Home Phone\" field.");
    document.registerform.hphone.focus();
    return (false);
  }


  var checkOK = validNum+"() -";
  var checkStr = document.registerform.hphone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit, blanks and \"()-\" characters in the \"Phone\" fields.");
    document.registerform.hphone.focus();
    return (false);
  }


  if (document.registerform.pwd.value == "")
    {
      alert("Please enter a value for the \"Password\" field.");
      document.registerform.pwd.focus();
      return (false);
    }

    if (document.registerform.pwd.value.length < 6)
    {
      alert("Please enter at least 6 characters in the \"Password\" field.");
      document.registerform.pwd.focus();
      return (false);
    }
var checkOK = validNum + validChar;
  var checkStr = document.registerform.pwd.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letters and numbers in the \"Password\" field.");
    document.registerform.pwd.focus();
    return (false);
  }

  if (document.registerform.email.value == "" ) {
  	alert("Please enter a valid e-mail address");
  		document.registerform.email.focus();
  		return(false);
  	}
  	
	var ch = false;
	for(var i = 0; i<document.registerform.ens.length; i++) {
		if (document.registerform.ens[i].checked) {
			ch = true;
			break;
		}
}
	if (!ch){
		alert("Please select an Ensemble");
		return false;
	}
  

   return(true);
}


function DFormValid() {

if (document.registerform.pwd.value != document.registerform.pwd2.value){
	alert("Your passwords do not match, please try again.");
	document.registerform.pwd.value = "";
	document.registerform.pwd2.value = "";
	return false;
}
	
var validChar = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
var validNum = "0123456789";

  if (document.registerform.name.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    document.registerform.name.focus();
    return (false);
  }

  

  if (document.registerform.sphone.value == "")
  {
    alert("Please enter a value for the \"School Phone\" field.");
    document.registerform.sphone.focus();
    return (false);
  }


  var checkOK = validNum+"() -";
  var checkStr = document.registerform.sphone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit, blanks and \"()-\" characters in the \"Phone\" fields.");
    document.registerform.sphone.focus();
    return (false);
  }

  if (document.registerform.hphone.value == "")
  {
    alert("Please enter a value for the \"Home Phone\" field.");
    document.registerform.hphone.focus();
    return (false);
  }


  var checkOK = validNum+"() -";
  var checkStr = document.registerform.hphone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit, blanks and \"()-\" characters in the \"Phone\" fields.");
    document.registerform.hphone.focus();
    return (false);
  }


  if (document.registerform.usr.value == "")
  {
    alert("Please enter a value for the \"Login Name\" field.");
    document.registerform.usr.focus();
    return (false);
  }

  if (document.registerform.usr.value.length < 6)
  {
    alert("Please enter at least 6 characters in the \"Login Name\" field.");
    document.registerform.usr.focus();
    return (false);
  }
  
  
var checkOK = validNum + validChar;
  var checkStr = document.registerform.usr.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letters and numbers in the \"Login Name\" field.");
    document.registerform.usr.focus();
    return (false);
  }
  
  
  

  if (document.registerform.pwd.value == "")
    {
      alert("Please enter a value for the \"Password\" field.");
      document.registerform.pwd.focus();
      return (false);
    }

    if (document.registerform.pwd.value.length < 6)
    {
      alert("Please enter at least 6 characters in the \"Password\" field.");
      document.registerform.pwd.focus();
      return (false);
    }
var checkOK = validNum + validChar;
  var checkStr = document.registerform.pwd.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letters and numbers in the \"Password\" field.");
    document.registerform.pwd.focus();
    return (false);
  }



  



  if (document.registerform.email.value == "" ) {
  	alert("Please enter a valid e-mail address");
  		document.registerform.email.focus();
  		return(false);
  	}



return(true);
}

