function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function another_win(s_url)
{
	window.open(s_url,"windowa","width=800,height=640");
}
function send_imode(address)
{
	if(address=="")
	{
	 	alert("メールアドレスを入力してください");
	}
	else
	{
		window.open("","imode","width=250,height=180");
		document.mailaddress.email.value=address;
		document.mailaddress.method="post";
		document.mailaddress.action="/cgi-bin/i_mode.cgi";
		document.mailaddress.target="imode";
		document.mailaddress.submit();
	}
}
//詳細ページに進む
function jump_detail(itemno,type,def_year,def_month,area)
{
		
		document.page_data.dep_year.value=def_year;
		document.page_data.dep_month.value=def_month;
		document.page_data.item_no.value=itemno;
		//document.page_data.target="_blank";
		document.page_data.target="_self";
		if(type==1)
		{
		document.page_data.area.value=area;
			document.page_data.gocmd.value="detail2";
			url="/cgi-bin/awy_air.cgi";
		}
		else if(type==2)
		{
			document.page_data.gocmd.value="detail";
			document.page_data.tour_type.value="PKG";
			url="/cgi-bin/pkg_always.cgi";
		}
		else if (type==3)
		{
			document.page_data.gocmd.value="detail";
			document.page_data.tour_type.value="OPT";
			url="/cgi-bin/opt_always.cgi";
		}
		document.page_data.action=url;
        document.page_data.submit();
}
//トピックスのポップアップ表示
function pop_topics(no)
{
	sTop = (screen.height - 400) / 2;
	sLeft = (screen.width - 600) / 2;
	window.open("","TOPICS","scrollbars=1,resizable=yes,toolbar=0,location=0,directories=0,status=0,menubar=0,width=500,height=400,top=200,left=200");
	document.page_data.type.value="topics";
	document.page_data.item_no.value=no;
	document.page_data.gocmd.value="detail";
	document.page_data.target="TOPICS";
	document.page_data.action="/cgi-bin/awy_top.cgi";
    document.page_data.submit();
}

var newWindow = window;
function Gotr(){
     var Btn_n=document.form_n.Btn_n.value;
     var cmbTravel_n=document.form_n.cmbTravel_n.options[document.form_n.cmbTravel_n.selectedIndex].value;
     var cmbDate_n=document.form_n.cmbDate_n.options[document.form_n.cmbDate_n.selectedIndex].value;
        newWindow=window.open("https://eb01.sompo-japan.co.jp/xff/Trial/FCtrial.asp?btn="+Btn_n+"&cmbTravel="+cmbTravel_n+"&cmbDate="
+cmbDate_n,"CHECK","method=get,menubar=yes,toolbar=no,scrollbars=yes,resizable=yes,location=no,directories=no,status=yes,top=45,left=80,width=700,height=472");
        newWindow.focus();
}

