@cavicchiandrea
var iTabId = 0, tabella = null, nTabLen = document.form1.tab.length; è un'unica dichiarazione, non puoi mettere il ";".