prova così:

codice:
<table cellspacing="0" cellpadding="0" height="21" bgcolor="#EFEFEF">
	<tr>
	<script type="text/javascript">
	function WriteCols(val){
	<%
		For z = 0 to Ubound(cTarArray,2)
	%>	
document.getElementById('livello').innerHTML="<td class='TD5' align='center'><a href='cicio.asp?id=" + val + "' class='link_ambito' onFocus='this.blur()'><%=cTarArray(1,z)%><\/a><\/td>";
	<%
		Next
	%>
	}
	</script>
	</tr>
</table>
ovviamente nel body metti un div con id "livello".

ciao