function opmoreform()
{
	document.getElementById("ts12_fm_more").style.display = "";
	document.getElementById("ts12_fm_more_close").style.display = "none";
}
function formclose()
{
	document.getElementById("ts12_fm_more").style.display = "none";
	document.getElementById("ts12_fm_more_close").style.display = "";
}
/*function opmoreform()
{
	document.getElementById("ts12_fm_more").style.display = "";
	document.getElementById("ts12_fm_more_close").style.display = "none";
}
function formclose()
{
	document.getElementById("ts12_fm_more").style.display = "none";
	document.getElementById("ts12_fm_more_close").style.display = "";
}
*/
function chgDst(){
	//sel = document.ts_10.TS10_CITY.selectedIndex;
	//location.href="/toursearch/ts12?formname=ts_12&TS10_CITY=" + document.ts_10.TS10_CITY[sel].value;
	document.ts_10.submit();
}
function formsubmit(value){
	//検索条件を前回の値にリセット
	//次の20件、前の20件用
	document.ts_10["pageno"].value = value;
	document.ts_10["TS12_ICON_ACT"].value = 'Y';

	document.ts_10["TS10_HATSU_YEAR"].value = document.ts_10["BF_TS10_HATSU_YEAR"].value;
	document.ts_10["TS10_HATSU_MONTH"].value = document.ts_10["BF_TS10_HATSU_MONTH"].value;
	document.ts_10["TS10_HATSU_DAY"].value = document.ts_10["BF_TS10_HATSU_DAY"].value;
	document.ts_10["TS10_CITY"].value = document.ts_10["BF_TS10_CITY"].value;
	document.ts_10["TS10_HATSUCHI"].value = document.ts_10["BF_TS10_HATSUCHI"].value;
	document.ts_10["TS11_PRICE_FROM"].value = document.ts_10["BF_TS11_PRICE_FROM"].value;
	document.ts_10["TS11_PRICE_TO"].value = document.ts_10["BF_TS11_PRICE_TO"].value;
	document.ts_10["TS11_STAY"].value = document.ts_10["BF_TS11_STAY"].value;
	document.ts_10["TS11_CARRIRE"].value = document.ts_10["BF_TS11_CARRIRE"].value;
	document.ts_10["TS11_FLTFROM"].value = document.ts_10["BF_TS11_FLTFROM"].value;
	document.ts_10["TS11_FLTTO"].value = document.ts_10["BF_TS11_FLTTO"].value;
	document.ts_10["TS11_HOTEL"].value = document.ts_10["BF_TS11_HOTEL"].value;
	document.ts_10["TS11_BRAND"].value = document.ts_10["BF_TS11_BRAND"].value;
	document.ts_10["TS11_THEME_01"].value = document.ts_10["BF_TS11_THEME_01"].value;
	document.ts_10["TS11_THEME_22"].value = document.ts_10["BF_TS11_THEME_22"].value;
	document.ts_10["TS11_THEME_X1"].value = document.ts_10["BF_TS11_THEME_X1"].value;
	document.ts_10["TS11_THEME_18"].value = document.ts_10["BF_TS11_THEME_18"].value;
	document.ts_10["TS11_THEME_19"].value = document.ts_10["BF_TS11_THEME_19"].value;
	document.ts_10["TS11_THEME_20"].value = document.ts_10["BF_TS11_THEME_20"].value;
	document.ts_10["TS11_THEME_21"].value = document.ts_10["BF_TS11_THEME_21"].value;
	document.ts_10["TS11_THEME_23"].value = document.ts_10["BF_TS11_THEME_23"].value;
	document.ts_10["TS11_THEME_X2"].value = document.ts_10["BF_TS11_THEME_X2"].value;

	document.ts_10.submit();
}
function iconsubmit(kbn,value){
	//検索条件を前回の値にリセット
	document.ts_10["pageno"].value = value;
	document.ts_10["TS10_HATSU_YEAR"].value = document.ts_10["BF_TS10_HATSU_YEAR"].value;
	document.ts_10["TS10_HATSU_MONTH"].value = document.ts_10["BF_TS10_HATSU_MONTH"].value;
	document.ts_10["TS10_HATSU_DAY"].value = document.ts_10["BF_TS10_HATSU_DAY"].value;
	document.ts_10["TS10_CITY"].value = document.ts_10["BF_TS10_CITY"].value;
	document.ts_10["TS10_HATSUCHI"].value = document.ts_10["BF_TS10_HATSUCHI"].value;
	document.ts_10["TS11_PRICE_FROM"].value = document.ts_10["BF_TS11_PRICE_FROM"].value;
	document.ts_10["TS11_PRICE_TO"].value = document.ts_10["BF_TS11_PRICE_TO"].value;
	document.ts_10["TS11_STAY"].value = document.ts_10["BF_TS11_STAY"].value;
	document.ts_10["TS11_CARRIRE"].value = document.ts_10["BF_TS11_CARRIRE"].value;
	document.ts_10["TS11_FLTFROM"].value = document.ts_10["BF_TS11_FLTFROM"].value;
	document.ts_10["TS11_FLTTO"].value = document.ts_10["BF_TS11_FLTTO"].value;
	document.ts_10["TS11_HOTEL"].value = document.ts_10["BF_TS11_HOTEL"].value;
	document.ts_10["TS11_BRAND"].value = document.ts_10["BF_TS11_BRAND"].value;
	document.ts_10["TS11_THEME_01"].value = document.ts_10["BF_TS11_THEME_01"].value;
	document.ts_10["TS11_THEME_22"].value = document.ts_10["BF_TS11_THEME_22"].value;
	document.ts_10["TS11_THEME_X1"].value = document.ts_10["BF_TS11_THEME_X1"].value;
	document.ts_10["TS11_THEME_18"].value = document.ts_10["BF_TS11_THEME_18"].value;
	document.ts_10["TS11_THEME_19"].value = document.ts_10["BF_TS11_THEME_19"].value;
	document.ts_10["TS11_THEME_20"].value = document.ts_10["BF_TS11_THEME_20"].value;
	document.ts_10["TS11_THEME_21"].value = document.ts_10["BF_TS11_THEME_21"].value;
	document.ts_10["TS11_THEME_23"].value = document.ts_10["BF_TS11_THEME_23"].value;
	document.ts_10["TS11_THEME_X2"].value = document.ts_10["BF_TS11_THEME_X2"].value;

	if (kbn == 1) {
		document.ts_10["TS12_HAYA"].value = value;
	} else if (kbn == 2) {
		document.ts_10["TS12_KODOMO"].value = value;
	} else if (kbn == 3) {
		document.ts_10["TS12_ENPAKU"].value = value;
	} else if (kbn == 4) {
		document.ts_10["TS12_EAT"].value = value;
	} else if (kbn == 5) {
		document.ts_10["TS12_ZASEKI"].value = value;
	}
	document.ts_10["TS12_ICON_ACT"].value = 'Y';
	document.ts_10.submit();
} 
function doPopup()
{
	if (!document.getElementsByTagName) return false;
	var links = document.getElementsByTagName("a");
	for (var i=0; i < links.length; i++)
	{
		if (links[i].className.match("Popup"))
		{
			links[i].onclick = function()
			{
				newW = window.open(this.href,"Pup","toolbar=no,status=no,resizable=yes,scrollbars=yes");
				newW.focus();
				return false;
			}
		}
	}
}
window.onload = doPopup;
function loadHTMLFile(fName)
{
	new Ajax.Request(fName, { method: "get", onComplete: displayData });
}
function displayData(httpObj)
{
	$("pthtml").innerHTML = httpObj.responseText;
}
function OpenWinList(url) {
wx = 750;
wy = 600;
x = (screen.width  - wx) / 2;
y = (screen.height - wy) / 2;
var OP = window.open(url,"list","left="+x+",top="+y+",width="+wx+",height="+wy);
OP.focus();
return false;
}
function OpenWinHtl(url) {
var OP = window.open(url,"htl",'width=800,height=800,scrollbars=yes,screenX=0,screenY=0,left=0,top=0');
OP.focus();
return false;
}
function SetHtl() {
if (window.opener) {
if (window.opener.document.ts_10) {
  for (i = 0; i < document.FormList.chkHtl.length; i++) {
    flg  = document.FormList.chkHtl[i].value;
    if (document.FormList.chkHtl[i].checked) {
    status = 1;
          var Num =window.opener.document.ts_10.TS11_HOTEL.options.length;
	      for (i=0; i<Num; i++) {
	         if (window.opener.document.ts_10.TS11_HOTEL.options[i].value == flg){
	          window.opener.document.ts_10.TS11_HOTEL.selectedIndex = i;
	          }
	      }
       window.close();
    }
  }
  if(!status){
  alert("ホテルを選択してください。");
  return false;
  }
document.FormList.submit();
} else {
alert("検索フォームがありません。");
}
} else {
alert("検索フォームのページがありません。");
}
}

//class名：imgover//
/*
	Standards Compliant Rollover Script
	Author : Daniel Nolan
	http://www.bleedingego.co.uk/webdev.php
*/
function initRollovers() {
	if (!document.getElementById) return
	
	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) {		
		if (aImages[i].className == 'imgover') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_over'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);
			
			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;
			
			aImages[i].onmouseover = function() {
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
			}	
			
			aImages[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_over'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}
}
window.onload = initRollovers;

function changeListBG(){
	i=0;
	ListNum = document.getElementsByName('chkHtl');
	for( i = 0; i < ListNum.length; i++ ){
		InputID = 'input' + i;
		InputBoxID = 'inputbox' + i;
		HtlBoxID = 'htlbox' + i;
		if( document.getElementById(InputID).checked == true ){
			if( document.getElementById(InputBoxID).className != 'disabled' ){
				document.getElementById(InputBoxID).className = 'act';
				document.getElementById(HtlBoxID).className = 'act';
			}
		} else {
			if( document.getElementById(InputBoxID).className != 'disabled' ){
				document.getElementById(InputBoxID).className = 'non-act';
				document.getElementById(HtlBoxID).className = 'non-act';
			}
		}
	}
}
function DayAfter(Hinichi){
    objDate=new Date();
    objDate.setTime(objDate.getTime() + (Hinichi*24*60*60*1000));
    theDays = new Array('日','月','火','水','木','金','土');
    theMonths = new Array('1','2','3','4','5','6','7','8','9','10','11','12');
    today = objDate.getDate();
    day = objDate.getDay();
    month = objDate.getMonth();
    year = objDate.getFullYear();
    dayName = theDays[day];
    monthName = theMonths[month];
    fulldate = " <span class=s-12><strong class=red-none>" + year + "年 " + monthName  + "月 " + today + "日（" + dayName+ "）</strong></span>";
//    fulldate = year + "年 " + monthName  + "月 " + today + " 日（" + dayName+ "）";
    document.write(fulldate);
}


function ts10submit(value){
	document.ts_10["submittype"].value = value;
	document.ts_10.submit();
} 

// JavaScript Document
