function SwitchNewsTag2(id,num,count) { machineClass(id,count); document.getElementById("tagname_" + id + num).className = "sb01"; document.getElementById(id + num).style.display = ""; } function machineClass(id,count) { for(i=1;i<=count;i++) { document.getElementById("tagname_" + id + i).className = "sb02"; document.getElementById(id + i).style.display = "none"; } } -->