function settab(name, cursel, n) { for (i = 1; i <= n; i++) { var menu = document.getelementbyid(name + i); var con = document.getelementbyid("con-" + name + "-" + i); menu.classname = i == cursel ? "on": ""; con.style.display = i == cursel ? "block": "none"; } } function chosetab(name, cursel, n) { for (i = 1; i <= n; i++) { var menu = document.getelementbyid(name + i); var con = document.getelementbyid("con-" + name + "-" + i); menu.classname = i == cursel ? "up": ""; con.style.display = i == cursel ? "block": "none"; } }