	// selectMonth
	// selectDate
	// calDivName
	var myCalendar = null;
	function LoadCalendar(calDivName, input_month, input_date) {

			myCalendar = new YAHOO.widget.Calendar(calDivName, calDivName,
												{ pagedate:input_month,
												  selected:input_date,
												  navigator:true});

//			myCalendar.customConfig =
//					function() {
//						var jpDayStr = ["日","月","火","水","木","金","土"];
//						var jpMonth = ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"];
//						this.Config.Locale.MONTHS_SHORT = jpMonth;
//						this.Config.Locale.MONTHS_LONG = jpMonth;
//						this.Config.Locale.WEEKDAYS_1CHAR = jpDayStr;
//						this.Config.Locale.WEEKDAYS_SHORT = jpDayStr;
//						this.Config.Locale.WEEKDAYS_MEDIUM = jpDayStr;
//						this.Config.Locale.WEEKDAYS_LONG = jpDayStr;
//					}
//			myCalendar.setupConfig();

			var jpMonth = ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"];
			var jpDayStr = ["日","月","火","水","木","金","土"];

			myCalendar.cfg.setProperty("MULTI_SELECT", false); // 複数日を選択（true : 選択可能、false : 選択不可）
			myCalendar.cfg.setProperty("SHOW_WEEKDAYS", true); // 曜日を表示
			myCalendar.cfg.setProperty("MONTHS_SHORT", jpMonth);
			myCalendar.cfg.setProperty("MONTHS_LONG", jpMonth);
			myCalendar.cfg.setProperty("WEEKDAYS_1CHAR", jpDayStr);
			myCalendar.cfg.setProperty("WEEKDAYS_SHORT", jpDayStr);
			myCalendar.cfg.setProperty("WEEKDAYS_MEDIUM", jpDayStr);
			myCalendar.cfg.setProperty("WEEKDAYS_LONG", jpDayStr);
			myCalendar.cfg.setProperty("START_WEEKDAY", 1); // 一番左に表示される曜日を指定（0〜6）
			myCalendar.cfg.setProperty("SHOW_WEEK_HEADER", false); // 番号を週の先頭に表示（true : する、false : しない）
			myCalendar.cfg.setProperty("SHOW_WEEK_FOOTER", false); // 週番号を週の末尾に表示（true : する、false : しない）
			myCalendar.cfg.setProperty("HIDE_BLANK_WEEKS", false); // 空白の週を表示しない

			myCalendar.render();
			myCalendar.selectEvent.subscribe(OnSelect, myCalendar, true);

			myCalendar.hide();
			document.getElementById(myCalendar.id + "Button").value = "入力";
			document.getElementById(myCalendar.id + "Button").onclick = OnBtnClick;
//			el = myCalendar.createCloseButton();
		//	el.innerHTML = "閉じる";
	}

	function OnBtnClick() {
		if (myCalendar != null) {
			if (document.getElementById(myCalendar.id + "Button").value == "入力") {
				myCalendar.show();
				document.getElementById(myCalendar.id + "Button").value = "閉じる";
			} else {
				myCalendar.hide();
				document.getElementById(myCalendar.id + "Button").value = "入力";
			}
		}
	}

	function OnSelect(eventName, selectDate) {
//		alert(selectDate);
//		alert("2008,1,1".replace(/,/g, "/"));
//		alert(1);
//		sel_d = selectDate.replace(",", "/");
//		alert(2);
//		alert("selectDate.length:" + selectDate.length);
//		alert("selectDate[0].length:" + selectDate[0].length);
//		alert("selectDate[0]:" + selectDate[0]);
//		alert("selectDate[0][0].length:" + selectDate[0][0].length);
		if (selectDate.length == 1 && selectDate[0].length == 1 && selectDate[0][0].length == 3) {
			document.getElementById(this.id + "Year").value = selectDate[0][0][0];
			document.getElementById(this.id + "Month").value = selectDate[0][0][1];
			document.getElementById(this.id + "Day").value = selectDate[0][0][2];
			document.getElementById(this.id + "Display").innerHTML = selectDate[0][0][0] + "/" + selectDate[0][0][1] + "/" + selectDate[0][0][2];
		} else {
			document.getElementById(this.id + "Year").value = "";
			document.getElementById(this.id + "Month").value = "";
			document.getElementById(this.id + "Day").value = "";
			document.getElementById(this.id + "Display").innerHTML = "";
		}

		this.hide();
		document.getElementById(this.id + "Button").value = "入力";
	}
