The alert works so I know my array is being filled but is the last part of the function imposible or am I doing wrong?

Thanks

<html>
<head>
<script>
function show(){
txtTestA.style.display='block'
if (x > 2){
txtTestB.style.display='block';}
if (x > 4){
txtTestC.style.display='block';}
var x = txtText1.value
var tst = new Array(x)
for (i=1; i<x; i++){
tst[i]= new Array()
tst[i]="txtTest"+i;}
alert(tst[2])
tst[i].style.visibility='visible';}
</script>
</head>
<body>
Enter a number:<input name=txtText1 size=3>
<input type=button onClick="show();" value="Click" name=button1>
<table border="0" cellspacing="5">
<tr id="txtTestA" style="DISPLAY: none">
<td id="txtTest1" style="VISIBILITY: hidden">1</td>
<td id="txtTest2" style="VISIBILITY: hidden">2</td>
</tr>
<tr id="txtTestB" style="DISPLAY: none">
<td id="txtTest3" style="VISIBILITY: hidden">3</td>
<td id="txtTest4" style="VISIBILITY: hidden">4</td>
</tr>
<tr id="txtTestC" style="DISPLAY: none">
<td id="txtTest5" style="VISIBILITY: hidden">5</td>
<td id="txtTest6" style="VISIBILITY: hidden">6</td>
</tr>
</table>
</body>
</html>