var backtabact = "#4B0082"; var backtabnact = "#D3D3D3"; var colortabact = "#ffffff"; var colortabnact = "#191970"; var numschede = 3; function attiva(tab,scheda,colore,bcolore) { tabdaattivare = document.getElementById(tab); schedadaattivare = document.getElementById(scheda); tabdaattivare.style.color = colore; tabdaattivare.style.background = bcolore; schedadaattivare.style.zIndex = 2; } function disattiva(colore,bcolore,numschede) { for (i = 1;i<=numschede;i++) { tabdadisattivare = document.getElementById("tab" + i); schedadadisattivare = document.getElementById("scheda" + i); tabdadisattivare.style.color = colore; tabdadisattivare.style.background = bcolore; schedadadisattivare.style.zIndex = 1; } }