function filterInput(e) {
   // Get the regular expression to test against for this particular object
   regAllow = (e)?eval(e.allow):eval(event.srcElement.allow);
   if (event.keyCode == 13) {
	// Do nothing, i.e. allow.
	} else {
	// Check for valid input, if invalid, cancel this event.
	if (!String.fromCharCode(event.keyCode).match(regAllow)) event.returnValue=false;
	}
	}
