I have this script

Code HTML4Strict:
<head>
<style type="text/css">
.correct_field
	{
		padding-right:18px;
		background:url("http://www.sitepoint.com/forums/images/correct_field.png") no-repeat 100% 0;
	}
.incorrect_field
	{		
		padding-right:18px;
		background:url("http://www.sitepoint.com/forums/images/incorrect_field.png") no-repeat 100% 0;
	}		
</style>
<script type="text/javascript">
var thefield;
var thevalue;
var NOnumbershere=new RegExp(/\d/);
var NOsymbolshere=new RegExp(/[+.,*ª!"·$%&()= ?¿¡º^`´ç;:_-]/);
function check_text_field(event)
	{
		thefield=event;
		thevalue=thefield.value;
		numbers();
	}
function numbers(event)
	{
if (NOnumbershere.test(thevalue) == true)
{
thefield.className="incorrect_field";
}
	}
</script>
</head>
<body>
<input type="text" id="test" onchange="check_text_field(this)" />
</body>

Which does not work, what I am trying to acomplish is set the class of an object, if I do the whole thing inside a function it all works, however if I create another function that calls a second function it does not, how could I use the object that fired the event in the numbers() function?