var form = new CheckSubmit();
form.setForm("alumniform");

form.addField("ba_NAME", "Name", "req");
form.addField("bi_TELEPHONE", "Telephone", "req");
form.addField("bj_UB_DEGREE_YEAR", "UB Degree and Year", "req");
form.addField("bx_NEWS", "The News", "min=5", "Please include the news you wish to share.");

function fieldCount(field, maxlength, output)
{
   if (!maxlength) maxlength = 500;

   var count = maxlength - field.value.length;
   if (count < 0)
   {
      alert ("Your message is too long.  It cannot exceed " + maxlength + " characters.");
      field.value = field.value.substring(0, maxlength);
      count = 0;
      field.scrollTop = field.scrollHeight;
   }

   if (output)
   {
      var x = new obj(output);
      x.value = count;
   }
}

function obj(name)
{
   return document.getElementById(name);
}
