
      G_Chr_Onl_Msg    = new String("Letters only Please");
      G_Chr_SpcDsh_Msg = new String("Letters, Space or '-' only Please");

      G_Zip_FrsPrt_Max = 5;
      G_Zip_ScnPrt_Max = 4;

      G_NoEmail_Msg    = new String("To provide updates, we will need a valid emmail address !");
      G_BadEmail_Msg   = new String("Invalid email address; must be of the form x[xxxxx]@y[yyyyyy].[zzzzzz]");

      G_Zip_Err_Msg    = new String("This Part of the Zipcode must be ");

      G_Not_Ned_Msg    = new String("No need for this infomation unless setting up a recurring donation !");

      function lettersOnly(edt, chr, msg)
      {
//alert("lettersOnly(edt, chr, msg)");
        if ( (chr<"A") || (chr>"Z") )
        {
          alert(msg);
          edt.select();
          return false;
        }
        return true;
      }

      function validateMI(mi, chckit)
      {
        if ( mi.value.length > 0 )
        {
          mi.value = mi.value.toUpperCase();
          return lettersOnly(mi, mi.value, G_Chr_Onl_Msg);
        }
        return true;
      }

      function validateSpcDshName(nam, msg)
      {
//alert("validateSpcDshName(nam, msg) -  1");
//alert("msg ="+msg);

        if ( typeof(msg) == "undefined" )
        {
          msg = G_Chr_SpcDsh_Msg;
//alert("msg ="+msg);
        }
        else
        {
          if ( 0 == msg.length )
          {
            msg = G_Chr_SpcDsh_Msg;
          }
        }

        if ( (nam.value.charAt(0) != " ") && (nam.value.charAt(0) != "-") && !lettersOnly(nam, nam.value.toUpperCase().charAt(0), msg) )
        {
          return false;
        }
//alert("validateSpcDshName(nam) - 2");

        for (i=1;i< nam.value.length; i++ )
        {
          if ( (nam.value.charAt(i)!= " ") && (nam.value.charAt(i)!= "-") && !lettersOnly(nam, nam.value.toUpperCase().charAt(i), msg) )
          {
            return false;
          }
        }
//alert("validateSpcDshName(nam) - 3");

        tmp = new String(nam.value)
        nam.value = tmp.toUpperCase().charAt(0)
        for (i=1;i< tmp.length; i++ )
        {
          nam.value += tmp.charAt(i)
        }

        return true;
      }

      function validateFirstName(nam, chckit)
      {
        if ( nam.value.length > 0 )
        {
//alert("validateFirstName(nam)");
          return validateSpcDshName(nam);
        }
        return true;
      }

      function validateLastName(nam, chckit)
      {
//alert("validateLastName(nam)");
        if ( nam.value.length > 0 )
        {
          return validateSpcDshName(nam);
        }
        return true;
      }

      function validateSufix(sfx, chckit)
      {
        if ( sfx.value.length > 0 )
        {
          {
//            alert(G_Not_Ned_Msg);
//            sfx.value="";
          }
        }
        return true;
      }

      function validateBurg(brg, chckit)
      {
        if ( brg.value.length > 0 )
        {
          return validateSpcDshName(brg);
        }
        return true;
      }


      function validateAddress(adr, chckit)
      {
//alert("validateAddress(adr)");
        if ( adr.value.length > 0 )
        {
          return false;
        }
        return true;
      }

      function validateZip(zip, len)
      {
//alert("validateZip(zip)");
//alert("zip.value = "+zip.value);
//alert("zip.value.length = "+zip.value.length);
//alert("len = "+len);
	var bad = false;

	if ( len > zip.value.length )
	{
          alert(G_Zip_Err_Msg+len+" digits");
          zip.select();
          return false;
        }
        else
	{
          for (i=0;i< zip.value.length; i++ )
	  {
//alert("zip.value.charAt(i) = "+zip.value.charAt(i));
            var val = new String(parseInt(zip.value.charAt(i)));
//alert("val = "+val);
            if ( val == "NaN" )
            {
              alert("Digits only");
              zip.select();
              return false;
            }
          }
        }

        return true;
      }

      function validateZip5(zip, chckit)
      {
//alert("validateZip5(zp5)");
        if ( zip.value.length > 0 )
        {
          {
            return validateZip(zip, G_Zip_FrsPrt_Max);
          }
//          else
//          {
//            alert(G_Not_Ned_Msg);
//            zip.value="";
//          }
        }
        return true;
      }

      function validateZip4(zip, chckit)
      {
//alert("validateZip4(zp4)");
        if ( zip.value.length > 0 )
        {
          return validateZip(zip, G_Zip_ScnPrt_Max);
        }
        return true;
      }

      function validateEmail(email, update, msg)
      {
//alert("validateEmail()");
//alert("email = "+email.value);

//alert("msg ="+msg);

        if ( (typeof(msg) == "undefined") || (0 == msg.length) )
        {
          msg = G_BadEmail_Msg;
//alert("msg ="+msg);
        }

        if ( email.value != "" )
        {
          if ( -1 == email.value.indexOf("@") )
          {
            alert(msg);
            email.select();
            return false;
          }
          if ( -1 == email.value.indexOf(".") )
          {
            alert(msg);
            email.select();
            return false;
          }
        }
        else
        if ( update.checked )
        {
          if ( email.value == "" )
          {
            alert(G_NoEmail_Msg);
            email.select();
            return false;
          }
        }

        return true;
      }

