	function chkZip() {
        var myZip = document.getElementById("zip");

        var pos = myZip.value.search(/^\d{5}$/);

        if (pos != 0) {
          alert("The zip code you entered (" + myZip.value + 
                ") is not in the correct form. \n" +
                "The correct form is: " +
                "ddddd \n" + "Please go back and fix your zip code");
          myZip.focus();
          myZip.select();
          return false;
        } else
          return true;
      }

	function chkCity() {
        var myCity = document.getElementById("city");

        var pos = myCity.value.search(/^[A-Z][a-z]+$/);

        if (pos != 0) {
          alert("The city code you entered (" + myCity.value + 
                ") is not in the correct form. \n" +
                "The correct form is: " +
                "Ww+ \n" + "Please go back and fix your city");
          myCity.focus();
          myCity.select();
          return false;
        } else
          return true;

      }

	function chkSchoolName() {
        var mySchoolName = document.getElementById("schoolName");

        var pos = mySchoolName.value.search(/\W+/);

        if (pos != 0) {
          alert("The school name you entered (" + mySchoolName.value + 
                ") is not in the correct form. \n" +
                "The correct form is: " +
                "\W+ \n" + "Please go back and fix your school name");
          mySchoolName.focus();
          mySchoolName.select();
          return false;
        } else
          return true;
      }

	function chkAddress() {
        var myAddress = document.getElementById("address");

        var pos = myAddress.value.search(/\d+\s[A-Z][a-z]+$/);

        if (pos != 0) {
          alert("The address you entered (" + myAddress.value + 
                ") is not in the correct form. \n" +
                "The correct form is: " +
                "\d+\s[A-Z][a-z]+/$" + "Please go back and fix your school address");
          myAddress.focus();
          myAddress.select();
          return false;
        } else
          return true;
      }

	document.getElementById("zip").onchange = chkZip;
	document.getElementById("city").onchange = chkCity;
	document.getElementById("schoolName").onchange = chkSchoolName;
	document.getElementById("address").onchange = chkAddress;

