function checkEnroll(strForm,name,pattern,invalid,dispname)
{
        // value of form field being checked
strVal = document.forms[strForm][name].value;
reExp = new RegExp(pattern);    // The RegExp object (JS 1.2+) 
if (reExp.test(strVal))         // value matches expected pattern
        return(invalid);         // return old value back
else                    // if not the expected pattern Append description of current field that failed the test.
	return(invalid + "\n" + dispname); 
}


