Title.prototype = {
	initialize : function(elm_title, calendar){
		this.element  = elm_title;
		this.calendar = calendar;
		
		this.create_html();
		this.print_html();
	},
	
	create_html : function(){
		var year  = this.calendar.year;
		var month = this.calendar.month;
		var today = this.calendar.today;
		var week  = this.calendar.week_today;
		
		this.inner_html = year + "年";
		
		if(month + 1 < 10){
			this.inner_html += " " + (month + 1);
		}else{
			this.inner_html += (month + 1);
		}
		
		this.inner_html += "月";
		
		if(today > 0){
			this.inner_html += "の予約状況．．．" + today + "日(" + week_table[ week ] + ")現在";
		}
	},
	
	print_html : function(){
		this.element.innerHTML = this.inner_html;
	}
}

function Title(elm_title, calendar){
	this.initialize(elm_title, calendar);
}