function imageOn1(imageName){
document[imageName].src=img1.src;
}
function imageOff1(imageName){
document[imageName].src=img2.src;
}
function imageOn2(imageName){
document[imageName].src=img3.src;
}
function imageOff2(imageName){
document[imageName].src=img4.src;
}


//検索フォーム　DESTINATIONの内容設定　　※基本的には触りません。
var prefs=["ASIA", "EUROPE", "AMERICA", "OCEANIA", "BEACH"];

//検索フォーム　CITYの内容設定　　※1行目がアジア、2行目がアメリカ、3行目がユーロ、4行目がオセ、5行目がビーチ。
//**********ここに都市名を入力する。**********//
var cities=[
["Shanghai 上海", "Beijing 北京", "Dalian 大連", "Harbin 哈爾濱", "Chongqing 重慶", "Guangzhou 広州", "Shenyang 瀋陽", "Seoul", "Pusan", "Hong kong", "Manila", "Bangkok", "Taipei", "Vietnam", "Singapore", "Denpasar-BALI", "Delhi"],

["London", "Paris", "Rome", "Major European Cities", "Lagos", "Dubai", "Cairo"],

["Los Angeles", "Las Vegas", "San Francisco", "West Coast in U.S.A.", "New York", "East Coast in U.S.A.", "Vancouver", "Toronto", "Sao Paulo-BRAZIL", "Lima-PERU", "Buenos Aires-ARGENTINA", "Bogota-COLOMBIA", "Santa Cruz-BOLIVIA"],

["Cairns", "Sydney", "Melbourne", "Auckland"],

["Honolulu", "Guam", "Saipan"],
];

//検索フォーム　CITYのリンク先設定　　※上のリストとこのリストは対応しています。
//**********ここに各都市のリンク先を入力する。**********//
var c=[
["asia/index.htm#sha","asia/index.htm#pek","asia/index.htm#dlc","asia/index.htm#hrb","asia/index.htm#ckg","asia/index.htm#can","asia/index.htm#she","asia/index.htm#sel","asia/index.htm#pus","asia/index.htm#hkg","asia/index.htm#mnl","asia/index.htm#bkk","asia/index.htm#tpe","asia/index.htm#sgn","asia/index.htm#sin","asia/index.htm#dps","asia/index.htm#del"],

["europe/index.htm#lon","europe/index.htm#par","europe/index.htm#rom","europe/index.htm#eur","europe/index.htm#los","europe/index.htm#dxb","europe/index.htm#cai"],

["america/index.htm#lax","america/index.htm#las","america/index.htm#sfo","america/index.htm#wst","america/index.htm#nyc","america/index.htm#est","america/index.htm#yvr","america/index.htm#yyz","america/index.htm#sao","america/index.htm#lim","america/index.htm#bue","america/index.htm#bog","america/index.htm#vvi"],

["oceania/index.htm#cns","oceania/index.htm#syd","oceania/index.htm#mel","oceania/index.htm#akl"],

["beach/index.htm#hnl","beach/index.htm#gum","beach/index.htm#spn"],
];


//*****以下プログラム（東京からもらったときのままです。）自信のない人は触らないように。*****//
function funcMain(ind)
{
	document.formMain.city.length = 1;
	document.formMain.city.selectedIndex = 0;
	document.formMain.price.value= "";
	if (ind==0) return;
	var city = cities[ind - 1];
	document.formMain.city.length = city.length + 1;
	for (var i = 0; i < city.length; i++) document.formMain.city.options[i + 1]=new Option(city[i],i);
}

function setPrice(ind)
{
	if (ind==0)
	{
		document.formMain.price.value="";
		return;
	}
	document.formMain.price.value=c[document.formMain.pref.selectedIndex-1][ind-1];
}


//リンク指定searchボタンを押したときの動作
function menulink(jump)
{
   var che=0;
   if (document.formMain.price.value != "")
     {
     che= document.formMain.price.value.indexOf('+');
     if (che==-1)
       {
       var url = jump;
 	   document.formMain.pref.selectedIndex = 0;
       document.formMain.city.selectedIndex = 0;
       document.formMain.price.value= "";
       location=url;		
	 }
     else
	     {
	     alert("Please select your departure MONTH. ")				
         }
     }
   else
       {
       alert("Please select your destination AREA and CITY.")
       }
}

function func(){

document.formMain.pref.selectedIndex = 0;
document.formMain.city.selectedIndex = 0;
document.formMain.price.value= "";
document.formMain.city.length = 1;

}

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 MM_findObj(n, d) { //v3.0
  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); 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];}
}

if(navigator.appVersion.charAt(0)>=3){
	movimg=new Array()
	movimg[0] = new Image();movimg[0].src='img/p2_sel01.jpg';	
	movimg[1] = new Image();movimg[1].src='img/p2_bkk01.jpg';	
	movimg[2] = new Image();movimg[2].src='img/p2_cns01.jpg';	
	movimg[3] = new Image();movimg[3].src='img/p2_yvr01.jpg';	
	movimg[4] = new Image();movimg[4].src='img/p2_lon01.jpg';	
	movimg[5] = new Image();movimg[5].src='img/p2_nyc01.jpg';
	movimg[6] = new Image();movimg[6].src='img/p2_sha01.jpg';	
}

function changImg(status){
	if(navigator.appVersion.charAt(0)>=3){
		document.images["image"].src=movimg[status].src;
	}
}
