I need help to only validate form elements that are NOT hidden on my form.

I have my html form with <td style="display:hidden;"></td> and based upon
the users selection will "show" the appropriate form element. However, when
I do my field validation and loop through pick up all elements, I need to
exclude elements that are hidden.

The way I change that property in Javascript is
eval("document.myForm.myElement" + x + ".style.display = ''")
eval("document.myForm.AnotherElement" + x + ".style.display = 'none'")

(the reason for the x is I have 10 lines of the same info, displaying 1 line
at a time as I loop through..)


I have tried to reverse this by

myVar = eval("document.myForm.myElement" + x + ".style.display")

But this does not seem to work.

Any help is much appreciated....

Chris