
<!--	
	var hideObjs = new Array();
	var parentObj;
	var panelObj = new Object();
	var flagyearMonth;
	var flagDay;
	var ssid = "";
	var seid = "";
	var objBody;
	var dummyframe;
	// \u5165\u529b\u88dc\u52a9\u6a5f\u80fd\u306e\u8ffd\u52a0\u306e\u4ed5\u69d8\u5909\u66f4
	var air_pac_flag = "";
	
	// \u822a\u7a7a\u306e\u51fa\u767a\u65e5\u9078\u629e\u7bc4\u56f2\u4ed5\u69d8\u5909\u66f4 2009/01/15 WANGCT start
	function initParam(from,to){
		if(null != from && "" != from) {
			departure_BeforeDay = from*1;
		}
		if(null != to && "" != to) {
			departure_AfterDay = to*1;
		}
	}
	function initCalendar1(from,to) {
		initParam(from,to);
		initDate();
		var c = this.changeCalendar();
		var innerHtml = '<table summary="" cellspacing="0" id="calendar">'+c+'</table>';
		$('calendar').innerHTML = innerHtml; 
	}
	// \u822a\u7a7a\u306e\u51fa\u767a\u65e5\u9078\u629e\u7bc4\u56f2\u4ed5\u69d8\u5909\u66f4 2009/01/15 WANGCT end
	if(navigator.userAgent.indexOf("MSIE") != -1 && !window.opera){
		dummyframe = document.createElement("iframe");
		dummyframe.setAttribute('scrolling ','no');
		dummyframe.setAttribute('frameborder ',0);
		dummyframe.setAttribute('id','dummyframe');
		// [\uff08B\uff09B0434] 2008\u5e749\u670811\u65e5 zhaoaiqing start
		//dummyframe.setAttribute('src',"blank.html");
		//var url = location.protocol+"//"+location.host+"/DFR01TOP01V00.html";
		dummyframe.setAttribute('src',"javascript:false;");
		// [\uff08B\uff09B0434] 2008\u5e749\u670811\u65e5 zhaoaiqing end
	}
		
	function openPanelType01(pId,trg,disp){
	
		panelObj = document.getElementById(pId);
		var targetPos = new Object();
		var targetH = trg.offsetHeight;
		var targetW = trg.offsetWidth;
	
		if(dummyframe){
			objBody = document.getElementsByTagName("body").item(0);
			objBody.appendChild(dummyframe);
		}
	
		if(disp == 'open'){
	
			targetPos.x = getElementPos(trg).x;
			targetPos.y = getElementPos(trg).y;
	
			panelObj.style.position = 'absolute';
			panelObj.style.display = 'block';
	
			var panelObjH = panelObj.offsetHeight;
			var panelObjW = panelObj.offsetWidth;
	
			
			if(pId == 'js-panel-calendar'){
				targetPos.y = targetPos.y - (panelObjH / 2);
	
			
			}else if(pId == 'js-panel-list-city'){
				targetPos.y = targetPos.y + targetH;
				panelObjW = targetW - 2;
				panelObj.style.width = panelObjW + 'px';
	
			
			}else if(pId == 'js-panel-list-air'){
				targetPos.y = targetPos.y;
				targetPos.x = targetPos.x -20;
			}
	
			if(dummyframe){
				dummyframe.style.position = "absolute";
				dummyframe.style.top =  targetPos.y + 'px';
				dummyframe.style.left = targetPos.x + 'px';
				dummyframe.style.width = panelObjW;
				dummyframe.style.height = panelObjH;
				dummyframe.style.zIndex = 998;
			}
	
			panelObj.style.top = targetPos.y + 'px';
			panelObj.style.left = targetPos.x + 'px';
			panelObj.style.zIndex = 999;
	
		}else if(disp == 'close' && pId == 'js-panel-calendar'){
			parentObj = trg.parentNode.parentNode;
			if(parentObj.className != 'closed-area'){
				var defBg = (parentObj.style.backgroundColor) ? parentObj.style.backgroundColor :"#FFF";
				parentObj.style.backgroundColor = '#dd0';
				var timer = setTimeout('closePanelType01("'+defBg+'")',300);
			}else{
				closePanelType01();
			}
	
		}else if(disp == 'close'){
			closePanelType01();
		}
	}
	function getElementPos(elem){
		var obj = new Object();
		do {
			obj.x = (!obj.x) ? elem.offsetLeft : obj.x + elem.offsetLeft;
			obj.y = (!obj.y) ? elem.offsetTop : obj.y + elem.offsetTop;
		} while((elem = elem.offsetParent) != null);
		return {x:obj.x, y:obj.y };
	}

	function closePanelType01(bgcolor){
		if(bgcolor){
			parentObj.style.backgroundColor = bgcolor;
		}
		panelObj.style.display = 'none';
	
		var len = hideObjs.length;
		for(var i = 0; i<len; i++){
			hideObjs[i].style.visibility = 'visible';
		}
		if(dummyframe){
			objBody.removeChild(dummyframe);
		}
		delete hideObjs;
	}
	
	//  \u3064\u3051\u52a0\u3048\u308b 
	function addIgnoreType(ob1,ob2){
		while(ob1.length > 1 && parseInt(ob1.substr(0,1)) == 0){
			ob1 = ob1.substr(1);
		}
		while(ob2.length > 1 && parseInt(ob2.substr(0,1)) == 0){
			ob2 = ob2.substr(1);
		}
		return (parseInt(ob1) + parseInt(ob2));
	}
	
	//  \u65e5\u4ed8\u3092\u6a19\u6e96\u5316\u8868\u793a\u3059\u308b  	
	function dateFormat(yearMonth,date){
		var currDate = new Date(yearMonth.substr(0,4),(yearMonth.substr(4,2)-0-1),date);
		var currDateStr = yearMonth.substr(0,4)+"\u5e74"+(currDate.getMonth() + 1)+"\u6708"+toWeekDayString(currDate)
		document.write(currDateStr);
	}	
	// \u66dc\u65e5\u3092\u6a19\u6e96\u5316\u8868\u793a\u3059\u308b  	
	function toWeekDayString(objDate){   
		return 	objDate.getDate()+"\u65e5"+['\uff08\u65e5\uff09','\uff08\u6708\uff09','\uff08\u706b\uff09','\uff08\u6c34\uff09','\uff08\u6728\uff09','\uff08\u91d1\uff09','\uff08\u571f\uff09'][objDate.getDay()];
	}
	//  \u65e5\u4ed8\u3092\u6a19\u6e96\u5316\u3059\u308b  	
	Date.prototype.toString = function() { 
		var dtStart = this;
		var  years  =  dtStart.getFullYear();  
		var  months  = dtStart.getMonth() + 1;
		var  dates  =  dtStart.getDate(); 
		var  timeValue  =  years;
		timeValue += ((months  <  10)  ?  "/0"  :  "/")  +  months;
		timeValue += ((dates  <  10)  ?  "/0"  :  "/")  +  dates;
		return timeValue;
	}
	//  \u5e74\u3068\u6708\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3092\u30af\u30ea\u30a8\u30fc\u30c8\u3057\u307e\u3059  
	function init_DepartureYearMonthOptions(departureYearMonth_Id,departureYearMonth_Vaule) {
		
		var currDate = nowDate.DateAdd('d',departure_BeforeDay);
		var endDate = nowDate.DateAdd('d',departure_AfterDay);
		if(departureYearMonth_Vaule == "") {
			departureYearMonth_Vaule = currDate.getFullYear()+""+(((currDate.getMonth() + 1)  <  10)  ?  "0"  :  "")  +  (currDate.getMonth() + 1);
		}
		while(true) {
			if(currDate.toString().substr(0,7)>endDate.toString().substr(0,7)) {				
				break;
			} 
			var  months  =  currDate.getMonth() + 1;
			var  LABEL  =  currDate.getFullYear()+'\u5e74'+((months  <  10)  ?  "0"  :  "")  +  months+'\u6708'; 
			var  value  =  currDate.getFullYear()+""+((months  <  10)  ?  "0"  :  "")  +  months; 
			// \u53d6\u5f97\u3057\u305f\u5e74\u3068\u6708  
			if(value == departureYearMonth_Vaule){
				$(departureYearMonth_Id).options.add(new Option(LABEL,value));
				$(departureYearMonth_Id).options[$(departureYearMonth_Id).options.length-1].selected = "selected";
				
			}
			// \u53d6\u5f97\u3057\u305f\u5e74\u3068\u6708\u304c\u3042\u308a\u307e\u305b\u3093  
			else{
				$(departureYearMonth_Id).options.add(new Option(LABEL,value));
			}
			currDate = currDate.DateAdd('m',1);
		}	
		
	}
	function init_DepartureDayOptions(departureYearMonth_Id,departureDay_Id,departureDay_Value) {
		changeDepartureDayOptions(departureYearMonth_Id,departureDay_Id,departureDay_Value);
	}
	//  \u65e5\u4ed8\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3092\u30af\u30ea\u30a8\u30fc\u30c8\u3057\u307e\u3059  	
	function changeDepartureDayOptions(departureYearMonth_Id,departureDayID,departureDay_Value){
		$(departureDayID).options.length=0;
		var currDateStr = nowDate.DateAdd('d',departure_BeforeDay).toString();
		var endDateStr = nowDate.DateAdd('d',departure_AfterDay).toString();
		var yearMonthStr = $(departureYearMonth_Id).value;
		var days = new Date(yearMonthStr.substr(0,4),yearMonthStr.substr(4,2),0).getDate()
		for(var i= 0;i<days;i++){
			var objDate = new Date(yearMonthStr.substr(0,4),yearMonthStr.substr(4,2)-0-1,(i+1));
			// \u8a31\u53ef\u65e5\u4ed8\u304c\u3042\u308a\u307e\u305b\u3093  
			if(currDateStr>objDate.toString()) {
				continue;
			}
			// \u8a31\u53ef\u65e5\u4ed8\u3092\u8d85\u904e\u3059\u308b  
			if(endDateStr<objDate.toString()) {
				break;
			}
			
			var LABEL = toWeekDayString(objDate);
			// \u9078\u629e\u3057\u305f\u65e5\u4ed8  
			if((i+1) == departureDay_Value){
				var j = i+1;
				if(j < 10){
					j = '0' + j;
				}
				$(departureDayID).options.add(new Option(LABEL,(j)));
				$(departureDayID).options[$(departureDayID).options.length-1].selected = "selected";
				
			}
			//  \u9078\u629e\u3057\u305f\u65e5\u4ed8\u304c\u3042\u308a\u307e\u305b\u3093  
			else{
				$(departureDayID).options.add(new Option(LABEL,(((i+1)<10)?"0":"")+(i+1)));
			}			
			
		}
		
		var segIndex = departureDayID.split('_');
		if (segIndex[1]=="hotel"){
			change_checkout();
			
		}
		if(segIndex.length == 3) {
			change_chickout(segIndex[1],segIndex[2]);
			// \u5165\u529b\u88dc\u52a9\u6a5f\u80fd\u306e\u8ffd\u52a0\u306e\u4ed5\u69d8\u5909\u66f4
			initHotelsDateOption(segIndex[1],segIndex[2]);
		}
		
		if (segIndex[0] != null && segIndex[0] == 'in') {
			if ($('form_id')!=null){
				if ($('form_id').value=="DFR01HTL03V00_Form" || $('form_id').value=="DFR01HTL03V05_Form") {	
					checkOutDateChange('0');
				}
				if ($('form_id').value=="DFR01HTL03V01_Form") {
					if (segIndex[3] != null && segIndex[3] == 'all') {
						checkOutDateChange('1');
					}
					if (segIndex[3] != null && segIndex[3] == '1') {
						checkOutDateChange('2');
					}
				}
			}
		}
		
	}
	//  \u201douterHTML\u201d\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u3001\u4e88\u51e6\u7406\u3092\u884c\u3046\u3002
	if(window.HTMLElement){
	  var _emptyTags = {
	    'img': true,
	    'br': true,
	    'input': true,
	    'meta': true,
	    'link': true,
	    'param': true,
	    'hr': true
	  };
	  HTMLElement.prototype.__defineGetter__('outerHTML', function(){
	    var attrs = this.attributes;
	    var str = "<" + this.tagName;
	    for(var i=0; i<attrs.length; i++){
	      str += " " + attrs[i].name + "=\"" + attrs[i].value + "\"";
	    }
	    
	    if(_emptyTags[this.tagName]) return str + " />";
	    return str + ">" + this.innerHTML + "</" + this.tagName + ">";
	  });
	  HTMLElement.prototype.__defineSetter__('outerHTML', function(sHTML){
	    var r = this.ownerDocument.createRange();
	    r.setStartBefore(this);
	    var df = r.createContextualFragment(sHTML);
	    this.parentNode.replaceChild(df, this);
	  });
	}
	//  \u9069\u5f53\u4f4d\u7f6e\u306bCalendar\u30d1\u30cd\u30eb\u3092\u958b\u304f  
	function openCalendar(pId,trg,disp,yearMonth,day,flag){
		// \u5165\u529b\u88dc\u52a9\u6a5f\u80fd\u306e\u8ffd\u52a0\u306e\u4ed5\u69d8\u5909\u66f4
		air_pac_flag = flag;
	
		panelObj = document.getElementById(pId);
		var targetPos = new Object();
		var targetH = trg.offsetHeight;
		var targetW = trg.offsetWidth;	
		// \u30ec\u30a4\u30a2\u30a6\u30c8\u306e\u5c64	
		if(dummyframe){
			objBody = document.getElementsByTagName("body").item(0);
			objBody.appendChild(dummyframe);
		}
		//  \u30d1\u30cd\u30eb\u3092\u958b\u304f
		if(disp == 'open'){
	
			targetPos.x = getElementPos(trg).x;
			targetPos.y = getElementPos(trg).y;
	
			panelObj.style.position = 'absolute';
			panelObj.style.display = 'block';
	
			var panelObjH = panelObj.offsetHeight;
			var panelObjW = panelObj.offsetWidth;
	
			flagyearMonth = yearMonth;
			flagDay = day;
			initDate();
			changeDatePanel(2);
			targetPos.y = targetPos.y - (panelObjH / 2);
			//  \u30ec\u30a4\u30a2\u30a6\u30c8\u306e\u5c64  
			if(dummyframe){
				dummyframe.style.position = "absolute";
				dummyframe.style.top =  targetPos.y + 'px';
				dummyframe.style.left = targetPos.x + 'px';
				dummyframe.style.width = panelObjW;
				dummyframe.style.height = panelObjH;
				dummyframe.style.zIndex = 998;
			}
	
			panelObj.style.top = targetPos.y + 'px';
			panelObj.style.left = targetPos.x + 'px';
			panelObj.style.zIndex = 999;
			
			
		}
		// \u30d1\u30cd\u30eb\u3092\u9589\u3081\u308b  	
		else if(disp == 'close'){
			parentObj = trg.parentNode.parentNode;
			if(parentObj.className != 'closed-area'){
				var defBg = (parentObj.style.backgroundColor) ? parentObj.style.backgroundColor :"#FFF";
				parentObj.style.backgroundColor = '#dd0';
				var timer = setTimeout('closePanelType01("'+defBg+'")',300);
			}else{
				closePanelType01();
			}	
		}
	}
	// \u4f4d\u7f6e\u3092\u78ba\u5b9a\u3059\u308b  	
	function getElementPos(elem){
		var obj = new Object();
		do {
			obj.x = (!obj.x) ? elem.offsetLeft : obj.x + elem.offsetLeft;
			obj.y = (!obj.y) ? elem.offsetTop : obj.y + elem.offsetTop;
		} while((elem = elem.offsetParent) != null);
		return {x:obj.x, y:obj.y };
	}
	//  Calendar\u30d1\u30cd\u30eb\u3092\u9589\u3081\u308b  
	function closePanelType01(bgcolor){
		if(bgcolor){
			parentObj.style.backgroundColor = bgcolor;
		}
		panelObj.style.display = 'none';
	
		var len = hideObjs.length;
		for(var i = 0; i<len; i++){
			hideObjs[i].style.visibility = 'visible';
		}
		if(dummyframe){
			objBody.removeChild(dummyframe);
		}
		delete hideObjs;
	}	
	//  \u30ec\u30b3\u30fc\u30c9\u3092\u30af\u30ea\u30a8\u30fc\u30c8\u3057\u307e\u3059
	function iden(i,strToAdd,flag,id,year, month, day){	
		var str = "";
		var sid = startDate.getFullYear() + "" + oneToTwo(addIgnoreType(startDate.getMonth(),1)) +""+ oneToTwo(startDate.getDate());
		var eid = terminalDate.getFullYear() + "" + oneToTwo(addIgnoreType(terminalDate.getMonth() ,1)) +""+ oneToTwo(terminalDate.getDate());
		// \u3053\u306e\u4f4d\u7f6e\u306b\u306f\u65e5\u4ed8\u304c\u3042\u308a\u307e\u3059
		if(flag == 1){
			// \u9078\u629e\u7bc4\u56f2\u5185
			if(sid <= id + oneToTwo(strToAdd) && eid >= id + oneToTwo(strToAdd)){
				if(ssid != "" && seid != "" && ssid <= id + oneToTwo(strToAdd) && seid >= id + oneToTwo(strToAdd)){
					if(ssid == id + oneToTwo(strToAdd)){
						str += "<td class=\"startof\">";
					}else if(seid == id + oneToTwo(strToAdd)){
						str += "<td class=\"endof\">";
					}else{
						str += "<td class=\"selected\">";
					}
					// \u65e5\u66dc\u65e5
					if(i == 0 || isHoliday(year, month, day)){
						str += "<p class=\"sun\"><a href=\"javascript:void(0);\" id = \"" + id + oneToTwo(strToAdd) + "\" onclick=\"calendarClick(this.id);openPanelType01('js-panel-calendar',this,'close');return false;\">" + strToAdd + "</a></p></td>";
					}
					// \u571f\u66dc\u65e5
					else if(i == 6){
						str += "<p class=\"sat\"><a href=\"javascript:void(0);\" id = \"" + id + oneToTwo(strToAdd) + "\" onclick=\"calendarClick(this.id);openPanelType01('js-panel-calendar',this,'close');return false;\">" + strToAdd + "</a></p></td>";
					}
					// \u65e5\u66dc\u65e5\u3068\u571f\u66dc\u65e5\u306e\u5916
					else {
						str += "<p><a href=\"javascript:void(0);\" id = \"" + id + oneToTwo(strToAdd) + "\" onclick=\"calendarClick(this.id);openPanelType01('js-panel-calendar',this,'close');return false;\">" + strToAdd + "</a></p></td>";
					}
				}
				else{
					// \u65e5\u66dc\u65e5
					if(i == 0 || isHoliday(year, month, day)){
						str += "<td><p class=\"sun\"><a href=\"javascript:void(0);\" id = \"" + id + oneToTwo(strToAdd) + "\" onclick=\"calendarClick(this.id);openPanelType01('js-panel-calendar',this,'close');return false;\">" + strToAdd + "</a></p></td>";
					}
					// \u571f\u66dc\u65e5
					else if(i == 6){
						str += "<td><p class=\"sat\"><a href=\"javascript:void(0);\" id = \"" + id + oneToTwo(strToAdd) + "\" onclick=\"calendarClick(this.id);openPanelType01('js-panel-calendar',this,'close');return false;\">" + strToAdd + "</a></p></td>";
					}
					// \u65e5\u66dc\u65e5\u3068\u571f\u66dc\u65e5\u306e\u5916
					else {
						str += "<td><p><a href=\"javascript:void(0);\" id = \"" + id + oneToTwo(strToAdd) + "\" onclick=\"calendarClick(this.id);openPanelType01('js-panel-calendar',this,'close');return false;\">" + strToAdd + "</a></p></td>";
					}
				}
			}
			// \u9078\u629e\u7bc4\u56f2\u306e\u5916
			else{
					str += "<td class=\"passed\"><p>" + strToAdd + "</p></td>";
			}
		}
		//  \u3053\u306e\u4f4d\u7f6e\u306b\u306f\u65e5\u4ed8\u304c\u3042\u308a\u307e\u305b\u3093  
		else {
			// \u65e5\u66dc\u65e5  
			if(i == 0 || isHoliday(year, month, day)){
				str += "<td class=\"blank\"><p class=\"sun\">" + strToAdd + "</p></td>";
			}
			//  \u571f\u66dc\u65e5
			else if(i == 6){
				str += "<td class=\"blank\"><p class=\"sat\">" + strToAdd + "</p></td>";
			}
			//  \u65e5\u66dc\u65e5\u3068\u571f\u66dc\u65e5\u306e\u5916
			else {
				str += "<td class=\"blank\"><p>" + strToAdd + "</p></td>";
			}
		}
		return str;
	}
	// Calendar\u30d1\u30cd\u30eb\u3092\u5909\u66f4\u3057\u307e\u3059  	
	function changeCalendar(){
			var str = "";
			str += "<colgroup>";
			str += "	<col title=\"" + currentViewDate.getFullYear() + "\u5e74" + oneToTwo(addIgnoreType(currentViewDate.getMonth() ,1)) + "\u6708" + "\" />";
			str += "	<col title=\"" + currentViewDate.getFullYear() + "\u5e74" + oneToTwo(addIgnoreType(currentViewDate.getMonth() ,2)) + "\u6708" + "\" />";
			str += "	<col title=\"" + currentViewDate.getFullYear() + "\u5e74" + oneToTwo(addIgnoreType(currentViewDate.getMonth() ,3)) + "\u6708" + "\" />";
			str += "</colgroup>";
			str += "<tr>";
			var fDay = new Date(nowDate.getFullYear(), nowDate.getMonth(), nowDate.getDate());
			for(var row = 0; row < 3; row++){	
					if(row == 0){
						str += "<td class=\"first\">";					
					} else if(row == 1){
						str += "<td class=\"second\">";
					} else if(row == 2){
						str += "<td class=\"third\">";
					}
					str += "<table summary=\"\" cellspacing=\"0\" id = \"" + "table_" + row + "\">";
					str += reDraw(currentViewDate);
					str += "</table>";
					str += "</td>";
					currentViewDate.setMonth(currentViewDate.getMonth() + 1);
			}
			currentViewDate.setMonth(currentViewDate.getMonth() - 3);
			
			str += "</tr>";
			str += "<tr>";
			str += "<td colspan=\"3\" class=\"closed-area\"><p><a href=\"javascript:void(0);\" onclick=\"openPanelType01('js-panel-calendar',this,'close');return false;\">\u9589\u3058\u308b</a></p></td>";
			str += "</tr>";
			return str;
	}
	//  1\u6708\u9593\u65e5\u4ed8\u3092\u30af\u30ea\u30a8\u30fc\u30c8\u3057\u307e\u3059  	
	function reDraw(currentViewDate){
		if($('departureYearMonth0') != null && $('departureYearMonth1') != null && $('departureDay0') != null && $('departureDay1') != null){
			ssid = $('departureYearMonth0').value.substr(0,4) + oneToTwo($('departureYearMonth0').value.substr(4,2)) + $('departureDay0').value.substr(0,2);
			seid = $('departureYearMonth1').value.substr(0,4) + oneToTwo( $('departureYearMonth1').value.substr(4,2)) + $('departureDay1').value.substr(0,2);
		}
		// \u7247\u9053
		if($("viewGroupPanelC0") != null && $("viewGroupPanelC0").style.display != 'none'){
			seid = ssid;
		}
		var str = "";
		str += "<caption>" + currentViewDate.getFullYear() + "\u5e74" + addIgnoreType(currentViewDate.getMonth() ,1) + "\u6708" + "</caption>";
		str += "<colgroup>";
		str += "<col title=\"\u65e5\u66dc\u65e5\" style=\"width:15%;\" />";
		str += "<col title=\"\u6708\u66dc\u65e5\" style=\"width:14%;\" />";
		str += "<col title=\"\u706b\u66dc\u65e5\" style=\"width:14%;\" />";
		str += "<col title=\"\u6c34\u66dc\u65e5\" style=\"width:14%;\" />";
		str += "<col title=\"\u6728\u66dc\u65e5\" style=\"width:14%;\" />";
		str += "<col title=\"\u91d1\u66dc\u65e5\" style=\"width:14%;\" />";
		str += "<col title=\"\u571f\u66dc\u65e5\" style=\"width:15%;\" />";
		str += "</colgroup>";
		str += "<tr>";
		str += "<th scope=\"col\" class=\"sun\"><p>\u65e5</p></th>";
		str += "<th scope=\"col\"><p>\u6708</p></th>";
		str += "<th scope=\"col\"><p>\u706b</p></th>";
		str += "<th scope=\"col\"><p>\u6c34</p></th>";
		str += "<th scope=\"col\"><p>\u6728</p></th>";
		str += "<th scope=\"col\"><p>\u91d1</p></th>";
		str += "<th scope=\"col\" class=\"sat\"><p>\u571f</p></th>";
		str += "</tr>";
		
		var fDay = new Date(currentViewDate.getFullYear(),currentViewDate.getMonth(),1);
		var day1 = fDay.getDay();
		str += "<tr>";
		for(var i = 0; i < day1; i++){
			str += iden(i, "&nbsp;",0,currentViewDate.getFullYear() + "" + oneToTwo(addIgnoreType(currentViewDate.getMonth() ,1)),fDay.getFullYear(), fDay.getMonth()+1, fDay.getDate());
		}
		for(var i = day1; i < 7; i++){
			str += iden(i, fDay.getDate(),1,currentViewDate.getFullYear() + "" + oneToTwo(addIgnoreType(currentViewDate.getMonth() ,1)),fDay.getFullYear(), fDay.getMonth()+1, fDay.getDate());
			fDay.setDate(fDay.getDate() + 1);
		}
		str += "</tr>";
		
		var nextMonth = (new Date(currentViewDate.getFullYear(),addIgnoreType(currentViewDate.getMonth() ,1),1)).getMonth();
		var line = 1;
		while (fDay.getMonth() != nextMonth){
			str += "<tr>";
			var j = 0;
			while(j < 7 && fDay.getMonth() != nextMonth){
				str += iden(j, fDay.getDate(),1,currentViewDate.getFullYear() + "" + oneToTwo(addIgnoreType(currentViewDate.getMonth() ,1)),fDay.getFullYear(), fDay.getMonth()+1, fDay.getDate());
				fDay.setDate(fDay.getDate() + 1);
				j++;
			}
			while(j < 7){
				str += iden(j, "&nbsp;",0,currentViewDate.getFullYear() + "" + oneToTwo(addIgnoreType(currentViewDate.getMonth() ,1)),fDay.getFullYear(), fDay.getMonth()+1, fDay.getDate());
				j++;
			}
			str += "</tr>";
			line++;
		}
		while(line < 6){
			str += "<tr>";
			var j = 0;
			while(j < 7){
				str += iden(j, "&nbsp;",0,currentViewDate.getFullYear() + "" + oneToTwo(addIgnoreType(currentViewDate.getMonth() ,1)),fDay.getFullYear(), fDay.getMonth()+1, fDay.getDate());
				j++;
			}
			str += "</tr>";
			line++;
		}
		return str;
	}
	var startDate;
	var terminalDate;
	var viewStartDate;
	var viewEndDate;
	var currentViewDate;
	// \u65e5\u4ed8\u521d\u5024  	
	function initDate(){
		startDate = new Date(nowDate.getFullYear(), nowDate.getMonth(), nowDate.getDate());
		terminalDate = new Date(nowDate.getFullYear(), nowDate.getMonth(), nowDate.getDate());	
		startDate.setDate(startDate.getDate() + departure_BeforeDay);
		terminalDate.setDate(terminalDate.getDate() + departure_AfterDay);
		if(flagyearMonth != null && flagyearMonth != "" && $(flagyearMonth) != null){
			viewStartDate = new Date($(flagyearMonth).value.substr(0,4), addIgnoreType($(flagyearMonth).value.substr(4,2), -1), 1);
			viewEndDate = new Date($(flagyearMonth).value.substr(0,4), addIgnoreType($(flagyearMonth).value.substr(4,2), -1), 1);
			currentViewDate = new Date($(flagyearMonth).value.substr(0,4), addIgnoreType($(flagyearMonth).value.substr(4,2), -1), 1);
		}else{
			viewStartDate = new Date(startDate.getFullYear(), startDate.getMonth(), 1);
			viewEndDate = new Date(startDate.getFullYear(), startDate.getMonth(), 1);
			currentViewDate = new Date(startDate.getFullYear(), startDate.getMonth(), 1);
		}		

		viewEndDate.setMonth(viewEndDate.getMonth() + 2);
	}
	// \u6708\u306b\u5f93\u306bREDRAW  	
	function changeDatePanel(flag){
		var varDate = new Date(nowDate.getFullYear(), nowDate.getMonth(), nowDate.getDate());
		var str = "";
		//  \u6708\u3092\u5897\u3048\u308b
		if(flag == 1){
			if(!(terminalDate.getFullYear() == viewEndDate.getFullYear() && terminalDate.getMonth() == viewEndDate.getMonth())){
				currentViewDate.setMonth(currentViewDate.getMonth() + 1);
				for(var row = 0; row < 3; row++){	
					str = "<table summary=\"\" cellspacing=\"0\" id = \"" + "table_" + row + "\">";
					str += reDraw(currentViewDate);
					str += "</table>";
					document.getElementById("table_" + row).outerHTML = str;
					currentViewDate.setMonth(currentViewDate.getMonth() + 1);
				}
				currentViewDate.setMonth(currentViewDate.getMonth() - 3);
				viewStartDate.setMonth(viewStartDate.getMonth() + 1);
				viewEndDate.setMonth(viewEndDate.getMonth() + 1);
			}
		}
		// \u6708\u3092\u6e1b\u5c11\u3059\u308b
		else if(flag == 0){
			if(!(startDate.getFullYear() == viewStartDate.getFullYear() && startDate.getMonth() == viewStartDate.getMonth())){
				currentViewDate.setMonth(currentViewDate.getMonth() - 1);
				for(var row = 0; row < 3; row++){	
					str = "<table summary=\"\" cellspacing=\"0\" id = \"" + "table_" + row + "\">";
					str += reDraw(currentViewDate);
					str += "</table>";
					document.getElementById("table_" + row).outerHTML = str;
					currentViewDate.setMonth(currentViewDate.getMonth() + 1);
				}
				currentViewDate.setMonth(currentViewDate.getMonth() - 3);
				viewStartDate.setMonth(viewStartDate.getMonth() - 1);
				viewEndDate.setMonth(viewEndDate.getMonth() - 1);	
			}
		}
		//  \u4ee5\u4e0a\u306e\u60c5\u6cc1\u306e\u5916  
		else {
			for(var row = 0; row < 3; row++){	
				str = "<table summary=\"\" cellspacing=\"0\" id = \"" + "table_" + row + "\">";
				str += reDraw(currentViewDate);
				str += "</table>";
				document.getElementById("table_" + row).outerHTML = str;
				currentViewDate.setMonth(currentViewDate.getMonth() + 1);
			}
			currentViewDate.setMonth(currentViewDate.getMonth() - 3);
		}
	}
	// 1\u3064CHAR\u304b\u3089\uff12\u3064CHAR\u307e\u3067\u306b\u8ee2\u63db\u3059\u308b
	function oneToTwo(str){
		//  \u4f8b\u3048\u3070\uff1a01\u3088\u308a\u306b\u30011\u3067\u3059
		str = "" + str;  
		if(str.length == 1){
			str = "0" + "" + str;
		}
		return str;
	}
	//  \u9078\u629e\u5024\u3092\u6a19\u6e96\u5316\u3059\u308b	
	function calendarClick(id){
		$(flagyearMonth).value = id.substr(0,6);
		var _DayVal = id.substr(6,2);
		changeDepartureDayOptions(flagyearMonth,flagDay,_DayVal);
		
		// \u6d77\u5916\u822a\u7a7a\u5238 \u691c\u7d22 \u5fa9\u8def \u73fe\u5730\u51fa\u767a\u65e5
		if(flagyearMonth == 'departureYearMonth1' || flagyearMonth == 'departureYearMonth1A'){
			if($('departureYearMonth1') != null && $('departureYearMonth1A') != null){
				if(flagyearMonth == 'departureYearMonth1'){
					$('departureYearMonth1A').value = $(flagyearMonth).value;
					changeDepartureDayOptions('departureYearMonth1A','departureDay1A',_DayVal);
				}
				else{
					$('departureYearMonth1').value = $(flagyearMonth).value;
					changeDepartureDayOptions('departureYearMonth1','departureDay1',_DayVal);
				}
			}
		}
		// \u5165\u529b\u88dc\u52a9\u6a5f\u80fd\u306e\u8ffd\u52a0\u306e\u4ed5\u69d8\u5909\u66f4 start
		if(air_pac_flag == "air") {
			changeDate(flagyearMonth.charAt(flagyearMonth.length-1));
		}
		if(air_pac_flag == "pac1") {
			changePacDate();
		}
		if(air_pac_flag == "pac2") {
			initAirsDateOption(flagyearMonth.charAt(flagyearMonth.length-1));
		}
		// \u4ed5\u69d8\u5909\u66f4 2008/12/25 WANGCT start
		if(air_pac_flag == "pac3") {
			changeDepartureDate();
		}
		// \u4ed5\u69d8\u5909\u66f4 2008/12/25 WANGCT end
		// \u5165\u529b\u88dc\u52a9\u6a5f\u80fd\u306e\u8ffd\u52a0\u306e\u4ed5\u69d8\u5909\u66f4 end
	}
	
	/*
	* <p>\u6642\u9593\u8a08\u7b97</p>
	* @param strInterval
	*          y Year , m Month ,d Day Hour 
	* @param Number
	*          \u8ffd\u52a0\u6570
	*/	
	Date.prototype.DateAdd = function(strInterval, Number){    
    	var dtTmp = this;   
    	switch (strInterval){      
        	case 'd' :return new Date(Date.parse(dtTmp) + (86400000 * Number));   
        	case 'm' :return new Date(dtTmp.getFullYear(), (dtTmp.getMonth()) + Number, 1);   
        	case 'y' :return new Date((dtTmp.getFullYear() + Number), dtTmp.getMonth(), dtTmp.getDate());   
    	}   
	} 
	
	function initCalendar() {
		initDate();
		var c = this.changeCalendar();
		
		var innerHtml = '<table summary="" cellspacing="0" id="calendar">'+c+'</table>';
		$('calendar').innerHTML = innerHtml; 
	}
//-->
