// JavaScript Document

function listCountries()
{
	str="";
	str = str + '<select id="selectCountry" name="selectCountry" size="1" onchange=selectCountry_onchange()>';
	
	for(var i=0; i<countryArray.length; i++)
	{
		countryLabel = countryArray[i];
		str = str + '<option value=' + i + '>' + countryLabel;
	}

	str = str + '</select>';
//alert(str);
return str;
}

function listCities(countryIndex)
{
	str="";	
	str = str + '<select id="selectCity" name="selectCity" size="1" onchange=selectCity_onchange()>';														  
									  
	if(countryIndex=="0"){cityArray = new Array(countryIndex0.length);for(var i=0; i<countryIndex0.length; i++){cityArray[i]=countryIndex0[i].substring(0,(countryIndex0[i].length - 6));}}

	for(var i=0; i<cityArray.length; i++)
	{
		var cityLabel = cityArray[i];
		var staLabel = countryIndex0[i].substring(countryIndex0[i].length-4, countryIndex0[i].length)
		
		str = str + '<option value=' + staLabel + '>' + cityLabel;
	}
	str = str + '</select>';
//alert(str);
return str;
}

function createLocationArrays()
{
	
	countryArray = new Array(1);
	countryArray[0]="日本";

	countryIndex0 = new Array(39);
	
	countryIndex0[0] =  "秋田, RJSK";
	countryIndex0[1] =  "奄美, RJKA";
	countryIndex0[2] =  "青森空港, RJSA";
	countryIndex0[3] =  "旭川空港, RJEC";
	countryIndex0[4] =  "福岡, RJFF";
	countryIndex0[5] =  "函館, RJCH";	
	countryIndex0[6] =  "出雲空港, RJOC";	
	countryIndex0[7] =  "鹿児島, RJFK";
	countryIndex0[8] =  "関西空港, RJBB";
	countryIndex0[9] =  "北九州, RJFR";
	countryIndex0[10] =  "高知空港, RJOK";
	countryIndex0[11] =  "小松, RJNK";
	countryIndex0[12] =  "熊本, RJFT";
	countryIndex0[13] =  "釧路, RJCK";
	countryIndex0[14] =  "松山空港, RJOM";
	countryIndex0[15] =  "女満別, RJCM";
	countryIndex0[16] =  "美保, RJOH";
	countryIndex0[17] =  "三沢, RJSM";
	countryIndex0[18] =  "宮崎空港, RJFM";
	countryIndex0[19] =  "長崎, RJFU";
	countryIndex0[20] =  "那覇, ROAH";
	countryIndex0[21] =  "南紀, RJBD";
	countryIndex0[22] =  "新潟, RJSN";
	countryIndex0[23] =  "帯広, RJCB";
	countryIndex0[24] =  "大分空港, RJFO";
	countryIndex0[25] =  "岡山空港, RJOB";
	countryIndex0[26] =  "沖縄／嘉手納, RODN";	
	countryIndex0[27] =  "大阪, RJOO";
	countryIndex0[28] =  "佐賀空港, RJFS";
	countryIndex0[29] =  "札幌, RJCC";
	countryIndex0[30] =  "仙台, RJSS";
	countryIndex0[31] =  "高松, RJOT";
	countryIndex0[32] =  "東京, RJAA";
	countryIndex0[33] =  "鳥取空港, RJOR";
	countryIndex0[34] =  "富山空港, RJNT";
	countryIndex0[35] =  "対馬空港, RJDT";
	countryIndex0[36] =  "山形, RJSC";
	countryIndex0[37] =  "山口, RJDC";
	countryIndex0[38] =  "Y横田, RJTY";
	
	/*
	countryIndex0[0] =  "Akita";
	countryIndex0[1] =  "Amami";
	countryIndex0[2] =  "Aomori Airport";
	countryIndex0[3] =  "Asahikawa Airport";
	countryIndex0[4] =  "Fukuoka";
	countryIndex0[5] =  "Hakodate";	
	countryIndex0[6] =  "Iwojima";
	countryIndex0[7] =  "Izumo Airport";	
	countryIndex0[8] =  "Kagoshima";
	countryIndex0[9] =  "Kansai Intl Arpt";
	countryIndex0[10] =  "Kitakyushu";
	countryIndex0[11] =  "Kochi Airport";
	countryIndex0[12] =  "Komatsu";
	countryIndex0[13] =  "Kumamoto";
	countryIndex0[14] =  "Kushiro";
	countryIndex0[15] =  "Matsuyama Airport";
	countryIndex0[16] =  "Memanbetsu";
	countryIndex0[17] =  "Miho";
	countryIndex0[18] =  "Misawa";
	countryIndex0[19] =  "Miyazaki Airport";
	countryIndex0[20] =  "Nagasaki";
	countryIndex0[21] =  "Naha";
	countryIndex0[22] =  "Nanki";
	countryIndex0[23] =  "Niigata";
	countryIndex0[24] =  "Obihiro";
	countryIndex0[25] =  "Oita Airport";
	countryIndex0[26] =  "Okayama Airport";
	countryIndex0[27] =  "Okinawa/Kadena";	
	countryIndex0[28] =  "Osaka";
	countryIndex0[29] =  "Saga Airport";
	countryIndex0[30] =  "Sapporo";
	countryIndex0[31] =  "Sendai";
	countryIndex0[32] =  "Takamatsu";
	countryIndex0[33] =  "Tokyo";
	countryIndex0[34] =  "Tokyo old";
	countryIndex0[35] =  "Tottori Airport";
	countryIndex0[36] =  "Toyama Airport";
	countryIndex0[37] =  "Tsushima Airport";
	countryIndex0[38] =  "Yamagata";
	countryIndex0[39] =  "Yamaguchi";
	countryIndex0[40] =  "Yokota";	
	*/
}
