if(document.images) {
	var imgs = new Array();
	imgs[0] = new Image();  imgs[0].src = "/common/img/btn_stay.gif";
	imgs[1] = new Image();  imgs[1].src = "/common/img/btn_stay_ov.gif";
	imgs[2] = new Image();  imgs[2].src = "/common/img/btn_rest.gif";
	imgs[3] = new Image();  imgs[3].src = "/common/img/btn_rest_ov.gif";
}

function sideChg(OBJ, imgNO) {
	if(document.images) {
		if(imgs[imgNO]) {
			OBJ.src = imgs[imgNO].src;
		}
	}
}

function flaChg(ID) {
	OBJ = document.getElementById(ID);
	nowId = ID;
	oldObj = document.getElementById(oldId);

	if(document.images && document.mainph) {
		document.mainph.src = "img/" + ID + ".jpg";
		document.getElementById('maintxt').firstChild.nodeValue = eval(ID + "txt");
		oldObj.style.borderColor = "#e0e0e0";
		OBJ.style.borderColor = "#fef852";
		oldId = ID;
	}
}

function flaOv(ID) {
	obj = document.getElementById(ID);

	if(nowId != ID){
		if(obj.style.borderColor == "#fef852" || obj.style.borderColor == "rgb(254, 248, 82)"){
			obj.style.borderColor = "#e0e0e0";
		}else{
			obj.style.borderColor = "#fef852";
		}
	}
}

//宿泊ガジェット　月
function stayMonth(){
	myDate = new Date();
	theDate = myDate.getDate();
	//myDate.setDate(theDate + 1);

	theYear = myDate.getFullYear();
	theMonth = myDate.getMonth() + 1;

	for(i=0; i<6; i++){

		if(theMonth > 12){
			theYear++;
			theMonth = 1;
		}

		if(theMonth < 10){
			MM = "0" + theMonth;
		}else{
			MM = theMonth;
		}

		document.write('<option value="' + theYear + '/' + MM + '/01">' + theYear + '年 ' + theMonth + '月</option>');
		theMonth++;
	}
}

//宿泊ガジェット　日
function stayDay(){
	myDate = new Date();
	theDate = myDate.getDate();
	//myDate.setDate(theDate + 1);

	theDate = myDate.getDate();

	for(i=1; i<=31; i++){
		if(i == theDate){
			document.write('<option value="' + i + '" selected>' + i + '日</option>');
		}else{
			document.write('<option value="' + i + '">' + i + '日</option>');
		}
	}
}

