/* SCHEDULE出力クラス */ classSchedule = function(){ this.cal = new Array(); this.cal.push(this.setRec("2008/5/10","","","")); this.cal.push(this.setRec("2008/5/11","ショップイベント","schedule/day.php?d=2008/5/11","")); this.cal.push(this.setRec("2008/5/12","","","")); this.cal.push(this.setRec("2008/5/13","","","")); this.cal.push(this.setRec("2008/5/14","","","")); this.cal.push(this.setRec("2008/5/15","","","")); this.cal.push(this.setRec("2008/5/16","","","")); this.ckMonth = new Array(false,false,false,false,false,false,false,false,false,false,false,false); this.tmpDate = new Object(); this.dayCode = new Array("D88C8C","545454","545454","545454","545454","545454","5F73B0"); this.dayChar = new Array("日","月","火","水","木","金","土"); this.html = "\n"; this.endTags = "
\n"; this.putHtml(); } var cp = classSchedule.prototype; cp.setRec = function(d,e,l,w){ var obj = new Object(); var dArray = d.split("/"); var yy = dArray[0]; var mm = dArray[1]-1; var dd = dArray[2]; var dObj = new Date(yy,mm,dd); obj.date = dObj; obj.event = e; obj.link = l; obj.win = w; return obj; } cp.setMonth = function(m){ var tag = ""; if(!this.ckMonth[m]){ tag += ""; tag += " "; tag += (m+1); tag += "月\n"; this.ckMonth[m] = true; } return tag; } cp.makeDateObj = function(dObj){ this.tmpDate.year = dObj.getFullYear(); this.tmpDate.month = dObj.getMonth(); this.tmpDate.date = dObj.getDate(); this.tmpDate.day = dObj.getDay(); } cp.isNull = function(str){ var ret = false; if(str == "" || str == null || str == " " || str ==" "){ ret = true; } return ret; } cp.setEvent = function(num){ var tag = ""; var evtag = ""; var ev = this.cal[num].event; var link = this.cal[num].link; var win = this.cal[num].win; var evArray = ev.split(","); var linkArray = link.split(","); var evlen = evArray.length; var winArray = win.split(","); for(var i=0 ; i" + evArray[i] + ""; if(!this.isNull(linkArray[i]) && linkArray[i]!=""){ if(this.isNull(winArray[i])){ tag = tag + "" + evtag + ""; } else{ tag = tag + "" + evtag + ""; } } else { tag = tag + evtag; } if (i"; } } } return tag; } cp.putHtml = function(){ var rec = this.cal.length; for(var i=0 ; i " + d + "(" + dch + ")\n"; this.html += "" + this.setEvent(i) + "\n"; this.html += "\n"; } this.html += this.endTags; document.write(this.html); } delete cp; // End of Class File