I am creating the following using an array called $validate

Code:
<script Language="JavaScript">

function validateForm(theForm) {

		if (!validRequired(theForm.form[company_name],"Company Name",true)) return false;
			if (!validRequired(theForm.form[contact_name],"Contact Name",true)) return false;
			if (!validRequired(theForm.form[phone_number],"Phone Number",true)) return false;
			if (!validRequired(theForm.form[address],"Address",true)) return false;
			if (!validRequired(theForm.form[city],"City",true)) return false;
			if (!validRequired(theForm.form[zip],"Zip",true)) return false;
	
	return true;
}
</script>
Each field in my form is set to: form[field_name]. This is so when they submit I can grab the form array and it has all the fields they submitted. This seems to cause a problem with this javascript. It gives me an error at the first validRequired where form[company_name] is. Does anyone know what the problem could be?