(function(){ function createCounter(){ var n = 0; return function() { return n++; }; } counter = createCounter(); var module = function(){ this.idNum = counter(); } module.prototype.attach = function(tabNum, html){ var tabName = "" if (tabNum == 1){ tabName = "Omote"; } else { tabName = "Ura"; } this.id = "sub" + tabName + this.idNum; div = document.createElement("div"); div.setAttribute("id", this.id); div.setAttribute("class", "module"); div.className = "module"; div.innerHTML = html; document.getElementById("subtab0" + tabNum).appendChild(div); } module.prototype.addCssRule = function(selector, rule){ var ss = document.styleSheets[0]; if (document.all) { ss.addRule("#subtabSec #" + this.id + " " + selector, rule); } else { ss.insertRule("#subtabSec #" + this.id + " " + selector + " {" + rule + "}", ss.cssRules.length); } } if (document.getElementById("subOmote1") || document.getElementById("subUra1")){ return; } document.write("