//---------------------- Global Variables ------------------------
var oct_Area = new Array();
var oct_Country = new Array();
var oct_Dest = new Array();
var oct_Lang = new Array();

//---------------------- Function Domain ------------------------
function oct_Init( area , country , dest ){
    var hotel, sightseeing, transfer, apartment;
    // サイド検索フォーム
	if (document.OctopusTravelSearchModule) {
        initLeftHotelForm(document.OctopusTravelSearchModule, area, country, dest);
        hotel = true;
	}
	// 拡張フォーム用：必要ファイル self/calendar.tpl
	if (document.Form_HotelSearch) {
	    // フォーム名定義
	    initCenterHotelForm(document.Form_HotelSearch, area, country, dest);
        hotel = true;
	}
    if (hotel) {
        return true;
    }

    // 定期観光のInit
    if (document.OctopusSightseeingSearchModule) {
        initLeftSightseeingForm(document.OctopusSightseeingSearchModule, area, country, dest);
        sightseeing = true;
    }
    if (sightseeing) {
        return true;
    }

    // 送迎のInit
    if (document.OctopusTransferSearchModule) {
        initLeftTransferForm(document.OctopusTransferSearchModule, area, country, dest);
        transfer = true;
    }
    if (transfer) {
        return true;
    }

    // アパートメントのInit
    if (document.OctopusApartmentSearchModule) {
        initLeftApartmentForm(document.OctopusApartmentSearchModule, area, country, dest);
        apartment = true;
    }
    if (apartment) {
        return true;
    }
    return false;
}

// 左カラム検索フォームInit
function initLeftHotelForm(form, area , country , dest)
{
    oct_SetArea( form , area , country , dest );
    oct_setCheckInOptions(form);
    if (document.getElementById('show_calendar_button_link')) {
        // カレンダーボタンセット
        initCalendar();
        yui.util.Event.addListener("show_calendar_button_link", "click", handlerClick_ShowCalendarButton);
        yui.util.Event.addListener("CheckInYM", "change",handlerChange_CheckIn_Duration);
        yui.util.Event.addListener("CheckInD", "change",handlerChange_CheckIn_Duration);
        yui.util.Event.addListener("Duration", "change",handlerChange_CheckIn_Duration);
    }
}

// 中央検索フォームInit
function initCenterHotelForm(form, area , country , dest)
{
    form = document.Form_HotelSearch;
    // エリアプルダウンセット
    oct_SetAreaExtended( form , area , country , dest );
    oct_setCheckInOptions(form);
    // ボタンがある場合
    if (document.getElementById('show_calendar_button_link')) {
        // カレンダーボタンセット
        initCalendar();
        yui.util.Event.addListener("show_calendar_button_link", "click",handlerClick_ShowCalendarButton);
        yui.util.Event.addListener("CheckInYM", "change",handlerChange_CheckIn_Duration);
        yui.util.Event.addListener("CheckInD", "change",handlerChange_CheckIn_Duration);
        yui.util.Event.addListener("Duration", "change",handlerChange_CheckIn_Duration);
        yui.util.Event.addListener("Rooms0Code", "change", handlerChange_RoomType_NumRooms, 0,true);
        yui.util.Event.addListener("Rooms0NumberOfRooms", "change", handlerChange_RoomType_NumRooms, 0,true);
    }
}

// 左カラム定期観光検索フォームInit
function initLeftSightseeingForm(form, area , country , dest)
{
    oct_SetArea( form , area , country , dest );
    oct_setCheckInOptions(form);
    if (document.getElementById('show_calendar_button_link')) {
        // カレンダーボタンセット
        initCalendar();
        yui.util.Event.addListener("show_calendar_button_link", "click", handlerClick_ShowCalendarButton);
        yui.util.Event.addListener("CheckInYM", "change", handlerChange_CheckIn);
        yui.util.Event.addListener("CheckInD", "change", handlerChange_CheckIn);
    }
}

// 左カラム送迎検索フォームInit
function initLeftTransferForm(form, area , country , dest)
{
    oct_SetArea( form , area , country , dest );
    oct_setCheckInOptions(form);
    // 使用言語リスト
    oct_setLanguage(form);
    if (document.getElementById('show_calendar_button_link')) {
        // カレンダーボタンセット
        initCalendar();
        yui.util.Event.addListener("show_calendar_button_link", "click", handlerClick_ShowCalendarButton);
        yui.util.Event.addListener("CheckInYM", "change", handlerChange_CheckIn);
        yui.util.Event.addListener("CheckInD", "change", handlerChange_CheckIn);
    }
}

// 左カラムアパートメント検索フォームInit
function initLeftApartmentForm(form, area , country , dest)
{
    oct_SetArea( form , area , country , dest );
    oct_setCheckInOptions(form);
    if (document.getElementById('show_calendar_button_link')) {
        // カレンダーボタンセット
        initCalendar();
        yui.util.Event.addListener("show_calendar_button_link", "click", handlerClick_ShowCalendarButton);
        yui.util.Event.addListener("CheckInYM", "change",handlerChange_CheckIn_Duration);
        yui.util.Event.addListener("CheckInD", "change",handlerChange_CheckIn_Duration);
        yui.util.Event.addListener("Duration", "change",handlerChange_CheckIn_Duration);
    }
}

//Initializing Options
function oct_ClearOptions( obj ){
	obj.options.length = 0;
	obj.options[0] = new Option('-----',0,true,false);
	return true;
}
//Setting Options
function oct_SetArea( FormObj , area , country , dest ){
	
    var i,data,splited;
	var hit = false;
	if(!FormObj.area){return false;}
	FormObj.area.options.length = 0;
	
	if(!area && !country && dest){
		var ret = oct_searchAreaCountry(dest);
		if(ret){
			area = ret[0];
			country = ret[1];
		}
	}
	
	if(!oct_Area){return false;}
	for(i=0;i<oct_Area.length;i++){
		data = oct_Area[i];
		splited = data.split('::');
		FormObj.area.options[i] = new Option(splited[1],splited[0],false,false);
		if(area != '' && (area == splited[0] || area == splited[1])){
			FormObj.area.options[i].selected = true;
			hit = true
		}
	}
	if(!hit){FormObj.area.options[0].selected = true;}
	oct_SetCountry(FormObj.area, area , country , dest );
	if(!area && !country && !dest){
		oct_ClearOptions(FormObj.destination);
	}
	return true;
}
// 拡張検索フォーム用
function oct_SetAreaExtended( FormObj , area , country , dest ){
	
    var i,data,splited;
	var hit = false;
	if(!FormObj.region_select){return false;}
	FormObj.region_select.options.length = 0;
	
	if(!area && !country && dest){
		var ret = oct_searchAreaCountry(dest);
		if(ret){
			area = ret[0];
			country = ret[1];
		}
	}
	
	if(!oct_Area){return false;}
	for(i=0;i<oct_Area.length;i++){
		data = oct_Area[i];
		splited = data.split('::');
		FormObj.region_select.options[i] = new Option(splited[1],splited[0],false,false);
		if(area != '' && (area == splited[0] || area == splited[1])){
			FormObj.region_select.options[i].selected = true;
			hit = true
		}
	}
	if(!hit){FormObj.region_select.options[0].selected = true;}
	oct_SetCountryExtended(FormObj.region_select, area , country , dest );
	if(!area && !country && !dest){
		oct_ClearOptions(FormObj.destination_select);
	}
	return true;
}
function oct_SetCountry( obj , area , country , dest ){
	var i,data,splited;
	oct_ClearOptions(obj.form.country);
	oct_ClearOptions(obj.form.destination);
	if(!oct_Country[obj.value]){return false;}
	for(i=0;i<oct_Country[obj.value].length;i++){
		data = oct_Country[obj.value][i];
		splited = data.split('::');
		obj.form.country.options[i+1] = new Option(splited[1],splited[0],false,false);
		if(country != '' && (country == splited[0] || country == splited[1])){
			obj.form.country.options[i+1].selected = true;
			break;
		}
	}
	oct_SetDestination(obj.form.country, area , country , dest );
	return true;
}
// 拡張検索フォーム用
function oct_SetCountryExtended( obj , area , country , dest ){
	var i,data,splited;
	oct_ClearOptions(obj.form.country_select);
	oct_ClearOptions(obj.form.destination_select);
	if(!oct_Country[obj.value]){return false;}
	for(i=0;i<oct_Country[obj.value].length;i++){
		data = oct_Country[obj.value][i];
		splited = data.split('::');
		obj.form.country_select.options[i+1] = new Option(splited[1],splited[0],false,false);
		if(country != '' && (country == splited[0] || country == splited[1])){
			obj.form.country_select.options[i+1].selected = true;
			break;
		}
	}
	oct_SetDestinationExtended(obj.form.country_select, area , country , dest );
	return true;
}
function oct_SetDestination( obj , area , country , dest ){
	var i,data,splited;
	oct_ClearOptions(obj.form.destination);
	if(!oct_Dest[obj.value]){return false;}
	for(i=0;i<oct_Dest[obj.value].length;i++){
		data = oct_Dest[obj.value][i];
		splited = data.split('::');
		obj.form.destination.options[i+1] = new Option(splited[1],splited[0],false,false);
		if(dest != '' && (dest == splited[0] || dest == splited[1])){
			obj.form.destination.options[i+1].selected = true;
		}
	}
	return true;
}
// 拡張フォーム用
function oct_SetDestinationExtended( obj , area , country , dest ){
	var i,data,splited;
	oct_ClearOptions(obj.form.destination_select);
	if(!oct_Dest[obj.value]){return false;}
	for(i=0;i<oct_Dest[obj.value].length;i++){
		data = oct_Dest[obj.value][i];
		splited = data.split('::');
		obj.form.destination_select.options[i+1] = new Option(splited[1],splited[0],false,false);
		if(dest != '' && (dest == splited[0] || dest == splited[1])){
			obj.form.destination_select.options[i+1].selected = true;
		}
	}
	return true;
}

//Redirecting
function oct_Submit(FormObj,target){
	var i,p_obj;
	var host = location.host;
	if(FormObj.host && FormObj.host.value){
		host = FormObj.host.value;
	}
	var url = 'http://' + host + '/' + FormObj.siteid.value + '/hotel/search';
	var query_string = '?';
	var params = new Array('affiliateref','language','currency','country','destination','checkin','nights','location','starrating','location','hotelname','roomtype','rooms');
	if(FormObj.destination.value == 0){
		alert('都市を選択してください。');
		return false;
	}
	for(i=0;i<params.length;i++){
		if(params[i] == 'checkin'){
			query_string += params[i] + '=' + FormObj.CheckInYM.value + '-' + FormObj.CheckInD.value + '&';
		}else if(params[i] == 'country'){
			query_string += params[i] + '=JP&';
		}else if((p_obj = eval('FormObj.'+params[i])) && p_obj.value && p_obj.value != 0){
			query_string += params[i] + '=' + p_obj.value + '&';
		}
	}
	query_string = query_string.substr(0,query_string.length-1);
	if(target == '_self'){
		document.location.href = url + query_string;
	}else{
		window.open(url + query_string,'_blank');
	}
	return false;
}

// 定期観光チェック・リダイレクト
function oct_SightseeingSubmit(FormObj,target){
	var i,p_obj;
	var host = location.host;
	if(FormObj.host && FormObj.host.value){
		host = FormObj.host.value;
	}
	var url = 'http://' + host + '/' + FormObj.siteid.value + '/sightseeing/search';
	var query_string = '?';
	var params = new Array('affiliateref','language','currency','country','destination','date','adult','keyword');
    var err = '';
	if(FormObj.destination.value == 0){
		err += "都市を選択してください。\n";
	}
    if (FormObj.adult.value == 0 || !FormObj.adult.value) {
		err += "大人の人数を選択してください。\n";
	}
    if (err) {
        alert(err);
        return false;
    }
    
	for(i=0;i<params.length;i++){
		if(params[i] == 'date'){
			query_string += params[i] + '=' + FormObj.CheckInYM.value + '-' + FormObj.CheckInD.value + '&';
		} else if(params[i] == 'country'){
			query_string += params[i] + '=JP&';
		} else if((p_obj = eval('FormObj.'+params[i])) && p_obj.value && p_obj.value != 0){
			query_string += params[i] + '=' + p_obj.value + '&';
		}
	}
	query_string = query_string.substr(0,query_string.length-1);
    if(target == '_self'){
		document.location.href = url + query_string;
	}else{
		window.open(url + query_string,'_blank');
	}
	return false;
}

// 送迎チェック・リダイレクト
function oct_TransferSubmit(FormObj,target){
	var i,p_obj;
	var host = location.host;
	if(FormObj.host && FormObj.host.value){
		host = FormObj.host.value;
	}
	var url = 'http://' + host + '/' + FormObj.siteid.value + '/transfer/search';
	var query_string = '?';
	var params = new Array('affiliateref','language','currency','country','destination','date','adult','p_code','d_code','lang','keyword');
    var err = '';
	if(FormObj.destination.value == 0){
		err += "都市を選択してください。\n";
	}
    if (FormObj.adult.value == 0 || !FormObj.adult.value) {
		err += "大人の人数を選択してください。\n";
	}
    if (FormObj.p_code.value == 0 || !FormObj.p_code.value) {
		err += "開始場所を選択してください。\n";
	}
    if (FormObj.d_code.value == 0 || !FormObj.d_code.value) {
		err += "終了場所を選択してください。\n";
	}
    if (FormObj.lang.value == 0 || !FormObj.lang.value) {
		err += "使用言語を選択してください。\n";
	}
    if (err) {
        alert(err);
        return false;
    }

	for(i=0;i<params.length;i++){
		if(params[i] == 'date'){
			query_string += params[i] + '=' + FormObj.CheckInYM.value + '-' + FormObj.CheckInD.value + '&';
		} else if(params[i] == 'country'){
			query_string += params[i] + '=JP&';
        } else if((p_obj = eval('FormObj.'+params[i])) && p_obj.value && p_obj.value != 0){
			query_string += params[i] + '=' + p_obj.value + '&';
		}
	}
	query_string = query_string.substr(0,query_string.length-1);
    if(target == '_self'){
		document.location.href = url + query_string;
	}else{
		window.open(url + query_string,'_blank');
	}
	return false;
}

// アパートメントチェック・リダイレクト
function oct_ApartmentSubmit(FormObj,target){
	var i,p_obj;
	var host = location.host;
	if(FormObj.host && FormObj.host.value){
		host = FormObj.host.value;
	}
	var url = 'http://' + host + '/' + FormObj.siteid.value + '/apartment/search';
	var query_string = '?';
	var params = new Array('affiliateref','language','currency','country','destination','date','nights','location','starrating','location','itemname','adult');
    var err = '';
	if(FormObj.destination.value == 0){
		err += "都市を選択してください。\n";
	}
    if (FormObj.adult.value == 0 || !FormObj.adult.value) {
		err += "大人の人数を選択してください。\n";
	}
    if (err) {
        alert(err);
        return false;
    }

	for(i=0;i<params.length;i++){
		if(params[i] == 'date'){
			query_string += params[i] + '=' + FormObj.CheckInYM.value + '-' + FormObj.CheckInD.value + '&';
		} else if(params[i] == 'country'){
			query_string += params[i] + '=JP&';
		} else if((p_obj = eval('FormObj.'+params[i])) && p_obj.value && p_obj.value != 0){
			query_string += params[i] + '=' + p_obj.value + '&';
		}
	}
	query_string = query_string.substr(0,query_string.length-1);
    if(target == '_self'){
		document.location.href = url + query_string;
	}else{
		window.open(url + query_string,'_blank');
	}
	return false;
}

// 拡張フォーム用入力値チェックここから
//----------------------------------------
function handlerSubmit_FormExtended(form_obj, target)
{
    var obj;
	var keys = Array('destination_select:都市','CheckInD:チェックイン日','Duration:泊数');

	var err = '';
	for(var i=0;i<keys.length;i++)
	{
	    var t = keys[i].split(':');
		//obj = $(t[0]);
		obj = document.getElementById(t[0]);
		if(!obj.value)
		{
			err += t[1] + "を選んでください\n";
		}
	}

	var num_pax = getNumPaxAll();
	if(num_pax > 9)
	{
		err += "宿泊者数は、最大9人までです\n";
	}
	if(! checkChildAges())
	{
		err += "子供の年齢は、すべて入力してください。\n";
	}
	if(err)
	{
		alert(err);
		return false;
	}
	//obj = $("MoreDetail");
	obj = document.getElementById("MoreDetail");
	if(!obj.style.display || obj.style.display == 'none')
	{
		form_obj.StarRating[0].checked = true;
		form_obj.ItemName.value = '';
	}
	//storeHotelSearchForm();
	return oct_SubmitExtended(form_obj, target);
}
// 拡張フォーム用 : 遷移のみ
function oct_SubmitExtended(FormObj,target){
	var i,p_obj;
	var host = location.host;
	if(FormObj.host && FormObj.host.value){
		host = FormObj.host.value;
	}
	var url = 'http://' + host + '/' + FormObj.siteid.value + '/hotel/search';
	if(target == '_self'){
		FormObj.action = url;
		FormObj.submit();
	}else{
		FormObj.action = url;
		FormObj.target = target;
		FormObj.submit();
	}
	return false;
}

//setting check in options
function oct_setCheckInOptions(form){
	var i,y,m,ms,d,ds,y2,m2,d2,dm;
	var today = new Date();
    
    // 検索当日を取得
    // 4桁の年
	y = today.getFullYear();
    // 0～11の値（実際の月-1）
    // プルダウン用に月は当日から生成
	m = today.getMonth() + 1;
	d = today.getDate();

    // デフォルト値：2週間後の設定
    d2 = today.getDate() + 14;
    
    // デフォルト値：設定日時を取得
    var theday = new Date(y, (m -1), d2);
    y2 = theday.getYear();
    m2 = theday.getMonth() + 1;
    d2 = theday.getDate();
	if(y<1900){y += 1900;}
	form.CheckInYM.options.length=0;
	form.CheckInD.options.length=0;
	// デフォルト値にあたるindexを検知
    //// 12月は＋1で確認できないため救済
    dm = 0;
    ms = m;
    if (ms == 12) { ms = 0; }
    for(i=0;i<12;i++){
        if (m2 == ms) {
            dm = i;
            break;
        }
		ms++;
	}
    for(i=0;i<12;i++){
		ms = m;
		if(m>12){m=1;y++;}
		if(m<10){ms = '0' + m;}
		form.CheckInYM.options[i] = new Option('' + y + '年' + ms + '月','' + y + '-' + ms,i==dm,i==dm);
		m++;
	}
	for(i=1;i<32;i++){
		ds = i;
		if(i<10){ds = '0' + i;}
		form.CheckInD.options[i-1] = new Option('' + ds + '日',ds,i==d2,i==d2);
	}
	return true;
}

//Data operation
function oct_newArea(code,name){
	oct_Area[oct_Area.length] = code + '::' + name;
	oct_Country[code] = new Array();
}
function oct_newCountry(area_code,code,name){
	oct_Country[area_code][oct_Country[area_code].length] = code + '::' + name;
	oct_Dest[code] = new Array();
}
function oct_newDest(country_code,code,name){
	oct_Dest[country_code][oct_Dest[country_code].length] = code + '::' + name;
}
function oct_searchAreaCountry(dest_code)
{
	var country_code = oct_searchCountryByDestination(dest_code);
	if(!country_code){return false;}
	var area_code = oct_searchAreaByCountry(country_code);
	if(country_code && area_code)
	{
		var ret = new Array(area_code,country_code);
		return ret;
	}
	return false;
}
function oct_searchCountryByDestination(dest_code)
{
	var data = '';
	if(!dest_code){return false;}
	dest_code = dest_code.replace('*','\\*');
	var reg = new RegExp('^' + dest_code + '::');
	for (var country_code in oct_Dest){
		for (var idx in oct_Dest[country_code]){
			data = oct_Dest[country_code][idx];
			if(data.match(reg)) {return country_code;}
		}
	}
	return false;
}
function oct_searchAreaByCountry(country_code)
{
	var data = '';
	if(!country_code){return false;}
	country_code = country_code.replace('*','\\*');
	var reg = new RegExp('^' + country_code + '::');
	for (var area_code in oct_Country){
		for (var idx in oct_Country[area_code]){
			data = oct_Country[area_code][idx];
			if(data.match(reg)) { return area_code; }
		}
	}
	return false;
}
// 拡張フォーム用その他関数
function checkChildAges()
{
    i = 0;
	var objCode = document.getElementById("Rooms" + i + "Code");
	if(objCode.value.indexOf('+') < 0)
	{
		return true;
	}
	var objNum = document.getElementById("Rooms" + i + "NumberOfRooms");
	for(var j=0;j<objNum.value;j++)
	{
		var objAge = document.getElementById("Rooms" + i + "ChildAge" + j);
		if(!objAge.value)
		{
			return false;
		}
	}
	return true;
}
function getNumPaxAll()
{
	var num_pax = 0;
	num_pax += getNumPax(0);
	return num_pax;
}
function getNumPax(RoomIdx)
{
	var objCode = document.getElementById("Rooms" + RoomIdx + "Code");
	var objNum = document.getElementById("Rooms" + RoomIdx + "NumberOfRooms");
	
	if(!objCode.value || !objNum.value)
	{
		return 0;
	}
	var num_pax = 2;
	if(objCode.value.indexOf('+') > -1)
	{
		num_pax = 3;
	}
	else if(objCode.value == 'SB' || objCode.value == 'TS')
	{
		num_pax = 1;
	}
	else if(objCode.value == 'TR')
	{
		num_pax = 3;
	}
	else if(objCode.value == 'Q')
	{
		num_pax = 4;
	}
	return num_pax * objNum.value;
}
function controlOption(option, trigger){
    if (option.is(":hidden")){
        trigger.removeClass("optionOn");
        trigger.addClass("optionOff");
        option.slideDown("slow");
    }
    else{
        trigger.removeClass("optionOff");
        trigger.addClass("optionOn");
        option.slideUp("slow");
    }
}
// 拡張フォーム用入力値チェックここまで

// 送迎用：言語リスト生成
// ###要確認：送迎ItemInformationを更新後、リスト抽出
function oct_setLanguage(FormObj){

    var i,data,splited;
    if (!FormObj.lang) { return false; }
	FormObj.lang.options.length = 0;

	if (!oct_Lang) { return false; }
	for (i = 0; i < oct_Lang.length; i++) {
		data = oct_Lang[i];
		splited = data.split('::');
		FormObj.lang.options[i] = new Option(splited[1], splited[0], false, false);
	}
    //oct_ClearOptions(FormObj.Lang);
	return true;
}

// 言語リスト生成
function oct_newLang(code,name){
	oct_Lang[oct_Lang.length] = code + '::' + name;
}


//---------------------- Data Domain ------------------------
//Area Definitions
oct_newArea('ASIA','アジア');
oct_newArea('USCA','アメリカ・カナダ');
oct_newArea('SOAM','中南米');
oct_newArea('HGS','ハワイ・グアム・サイパン');
oct_newArea('EURO','ヨーロッパ');
oct_newArea('MIEA','中東・アフリカ');
oct_newArea('OCEA','オセアニア・南太平洋');

//Country Definitions
oct_newCountry('ASIA','K','韓国');
oct_newCountry('ASIA','TW','台湾');
oct_newCountry('ASIA','CN','中国');
oct_newCountry('ASIA','HX','香港');
oct_newCountry('ASIA','TH','タイ');
oct_newCountry('ASIA','RS','シンガポール');
oct_newCountry('ASIA','PH','フィリピン');
oct_newCountry('ASIA','','----');
oct_newCountry('ASIA','IN','インド');
oct_newCountry('ASIA','IA','インドネシア');
oct_newCountry('ASIA','KH','カンボジア');
oct_newCountry('ASIA','CE','スリランカ');
oct_newCountry('ASIA','NP','ネパール');
oct_newCountry('ASIA','BU','ブルネイ');
oct_newCountry('ASIA','VI','ベトナム');
oct_newCountry('ASIA','MO','マカオ');
oct_newCountry('ASIA','MA','マレーシア');
oct_newCountry('ASIA','MM','ミャンマー');
oct_newCountry('ASIA','LA','ラオス');
//oct_newCountry('ASIA','J','日本');
oct_newCountry('USCA','US','アメリカ');
oct_newCountry('USCA','CA','カナダ');
oct_newCountry('SOAM','AR','アルゼンチン');
oct_newCountry('SOAM','BR','ブラジル');
oct_newCountry('SOAM','ME','メキシコ');
oct_newCountry('SOAM','','----');
oct_newCountry('SOAM','UY','ウルグアイ');
oct_newCountry('SOAM','EC','エクアドル');
oct_newCountry('SOAM','CS','コスタリカ');
oct_newCountry('SOAM','JA','ジャマイカ');
oct_newCountry('SOAM','CL','チリ');
oct_newCountry('SOAM','DR','ドミニカ共和国');
oct_newCountry('SOAM','PG','パナマ');
oct_newCountry('SOAM','BS','バハマ');
oct_newCountry('SOAM','PY','パラグアイ');
oct_newCountry('SOAM','WB','バルバドス');
oct_newCountry('SOAM','PT','プエルトリコ');
oct_newCountry('SOAM','PE','ペルー');
oct_newCountry('SOAM','BO','ボリビア');
oct_newCountry('HGS','*US','ハワイ');
oct_newCountry('HGS','GU','グアム');
oct_newCountry('HGS','MP','サイパン（北マリアナ）');
oct_newCountry('HGS','PW','パラオ');
oct_newCountry('EURO','GB','イギリス');
oct_newCountry('EURO','I','イタリア');
oct_newCountry('EURO','A','オーストリア');
oct_newCountry('EURO','CH','スイス');
oct_newCountry('EURO','E','スペイン');
oct_newCountry('EURO','D','ドイツ');
oct_newCountry('EURO','F','フランス');
oct_newCountry('EURO','','----');
oct_newCountry('EURO','IS','アイスランド');
oct_newCountry('EURO','EI','アイルランド');
oct_newCountry('EURO','AD','アンドラ');
oct_newCountry('EURO','UK','ウクライナ');
oct_newCountry('EURO','ES','エストニア');
oct_newCountry('EURO','NL','オランダ');
oct_newCountry('EURO','CY','キプロス');
oct_newCountry('EURO','GR','ギリシャ');
oct_newCountry('EURO','CR','クロアチア');
oct_newCountry('EURO','SM','サンマリノ');
oct_newCountry('EURO','GK','英領ジブラルタル');
oct_newCountry('EURO','S','スウェーデン');
oct_newCountry('EURO','SR','スロバキア');
oct_newCountry('EURO','SL','スロベニア');
oct_newCountry('EURO','YU','セルビア・モンテネグロ');
oct_newCountry('EURO','C','チェコ');
oct_newCountry('EURO','DK','デンマーク');
oct_newCountry('EURO','TR','トルコ');
oct_newCountry('EURO','N','ノルウェー');
oct_newCountry('EURO','H','ハンガリー');
oct_newCountry('EURO','SF','フィンランド');
oct_newCountry('EURO','BG','ブルガリア');
oct_newCountry('EURO','BY','ベラルーシ');
oct_newCountry('EURO','B','ベルギー');
oct_newCountry('EURO','BH','ボスニア・ヘルツェゴビナ');
oct_newCountry('EURO','PL','ポーランド');
oct_newCountry('EURO','P','ポルトガル');
oct_newCountry('EURO','MW','マルタ');
oct_newCountry('EURO','MC','モナコ');
oct_newCountry('EURO','LV','ラトビア');
oct_newCountry('EURO','LI','リトアニア');
oct_newCountry('EURO','LU','ルクセンブルグ');
oct_newCountry('EURO','R','ルーマニア');
oct_newCountry('EURO','RU','ロシア');
oct_newCountry('MIEA','EM','アラブ首長国連邦');
oct_newCountry('MIEA','UN','エジプト');
oct_newCountry('MIEA','TN','チュニジア');
oct_newCountry('MIEA','SA','南アフリカ');
oct_newCountry('MIEA','M','モロッコ');
oct_newCountry('MIEA','JO','ヨルダン');
oct_newCountry('MIEA','','----');
oct_newCountry('MIEA','IL','イスラエル');
oct_newCountry('MIEA','OM','オマーン');
oct_newCountry('MIEA','DH','カタール');
oct_newCountry('MIEA','KT','クウェート');
oct_newCountry('MIEA','KE','ケニア');
oct_newCountry('MIEA','SJ','サウジアラビア');
oct_newCountry('MIEA','ZA','ザンビア');
oct_newCountry('MIEA','SY','シリア');
oct_newCountry('MIEA','FZ','セイシェル');
oct_newCountry('MIEA','TZ','タンザニア');
oct_newCountry('MIEA','NA','ナミビア');
oct_newCountry('MIEA','BN','バーレーン');
oct_newCountry('MIEA','IW','モーリシャス');
oct_newCountry('MIEA','LE','レバノン');
oct_newCountry('OCEA','AA','オーストラリア');
oct_newCountry('OCEA','NZ','ニュージーランド');
oct_newCountry('OCEA','','----');
oct_newCountry('OCEA','CK','クック諸島');
oct_newCountry('OCEA','PF','タヒチ（仏領ポリネシア）');
oct_newCountry('OCEA','NC','ニューカレドニア');
oct_newCountry('OCEA','VU','バヌアツ');
oct_newCountry('OCEA','FI','フィジー');

//Destination Definitions
oct_newDest('K','CSEL','ソウル');
oct_newDest('K','CICN','仁川空港(インチョン空港)');
oct_newDest('K','CPUS','釜山(プサン)');
oct_newDest('K','CCJU','済州島(チェジュ)');
oct_newDest('K','','----');
oct_newDest('K','CXNS','安山(アンサン)');
oct_newDest('K','CKYON','慶州(キョンジュ)');
oct_newDest('K','CSWU','水原(スウォン)');
oct_newDest('K','CDAEK','大邱(テグ)');
oct_newDest('K','CQTW','大田(テジョン)');
oct_newDest('TW','CTPE','台北(タイペイ)');
oct_newDest('TW','CKHH','高雄(カオシュン)');
oct_newDest('TW','','----');
oct_newDest('TW','CTXG','台中(タイチュウ)');
oct_newDest('TW','CTANN','台南(タイナン)');
oct_newDest('TW','CHUN','花蓮(カレン)');
oct_newDest('TW','CHSIN','新竹(シンチュー)');
oct_newDest('TW','CTAOY','桃園(トウエン)');
oct_newDest('TW','CSMT','日月潭(ニチゲッタン)');
oct_newDest('CN','CSHA','上海(シャンハイ)');
oct_newDest('CN','CPEK','北京(ペキン)');
oct_newDest('CN','CPEKA','北京(ペキン)/空港');
oct_newDest('CN','CCAN','広州(コウシュウ)');
oct_newDest('CN','CDALY','大連(ダイレン)');
oct_newDest('CN','CHGH','杭州(コウシュウ)');
oct_newDest('CN','CSIA','西安(シーアン)');
oct_newDest('CN','CSHEN','深セン(シンセン)');
oct_newDest('CN','','----');
oct_newDest('CN','CXMN','厦門(アモイ)');
oct_newDest('CN','CWUH','武漢(ウーハン)');
oct_newDest('CN','CURC','烏魯木斉(ウルムチ)');
oct_newDest('CN','CYNJ','延吉(エンキチ)');
oct_newDest('CN','CSYX','海南島/三亜(サンア)');
oct_newDest('CN','CJINH','金華(ジンホワ)');
oct_newDest('CN','CHAK','海南島/海口(カイコウ)');
oct_newDest('CN','CYIW','義烏(ギウ)');
oct_newDest('CN','CJIL','吉林(キツリン)');
oct_newDest('CN','CJIUZ','九塞溝(キュウサイコウ)');
oct_newDest('CN','CGUIY','貴陽(キヨウ)');
oct_newDest('CN','CJHG','景洪(ケイコウ)');
oct_newDest('CN','CKWL','桂林(ケイリン)');
oct_newDest('CN','CKUNM','昆明(コンメイ)');
oct_newDest('CN','CTNA','済南(サイナン)');
oct_newDest('CN','CCKG','重慶(ジュウケイ)');
oct_newDest('CN','CZUH','珠海(ジュカイ)');
oct_newDest('CN','CSHEY','瀋陽(シンヨウ)');
oct_newDest('CN','CCHEG','成都(セイト)');
oct_newDest('CN','CSUZH','蘇州(ソシュウ)');
oct_newDest('CN','CDLU','大理(ダリ)');
oct_newDest('CN','CCHNG','長春(チョウシュン)');
oct_newDest('CN','CTAO','青島(チンタオ)');
oct_newDest('CN','CTSN','天津(テンシン)');
oct_newDest('CN','CDNH','敦煌(トンコウ)');
oct_newDest('CN','CNKG','南京(ナンキン)');
oct_newDest('CN','CNING','寧波(ネイハ)');
oct_newDest('CN','CHAR3','哈爾濱(ハルピン)');
oct_newDest('CN','CFOC','福州(フクシュウ)');
oct_newDest('CN','CWUXI','無錫(ムシャク)');
oct_newDest('CN','CYANS','陽朔(ヨウサク)');
oct_newDest('CN','CLYA','洛陽(ラクヨウ)');
oct_newDest('HX','AHKG','香港/全域');
oct_newDest('HX','CKOWL','香港/九龍(クーロン)');
oct_newDest('HX','CHKG','香港/香港島(ホンコントウ)');
oct_newDest('HX','CHKGA','香港空港');
oct_newDest('HX','','----');
oct_newDest('HX','CTSUE','茎湾(チェンワン)');
oct_newDest('HX','CTSYI','青衣(ツィンイー)');
oct_newDest('HX','CTINS','天水圍(ティンシュイワイ)');
oct_newDest('HX','CLAIL','大嶼山(ランタオ島)');
oct_newDest('TH','CBKK','バンコク');
oct_newDest('TH','CBKKB','バンコク/スワンナプーム国際空港');
oct_newDest('TH','CCNX','チェンマイ');
oct_newDest('TH','CPATT','パタヤビーチ');
oct_newDest('TH','AHKT','プーケット全域');
oct_newDest('TH','','----');
oct_newDest('TH','CAYUT','アユタヤ');
oct_newDest('TH','AKRAB','クラビ全域');
oct_newDest('TH','AKOSA','サムイ島全域');
oct_newDest('TH','CSUKH','スコータイ');
oct_newDest('TH','CCEI','チェンライ');
oct_newDest('TH','CPHIT','ピサヌローク');
oct_newDest('TH','CPEEP','ピピ島');
oct_newDest('TH','CHUAH','ホアヒン');
oct_newDest('TH','CHGN','メーホンソン');
oct_newDest('TH','CRAYN','ラーヨン/サメット島');
oct_newDest('RS','CSIN','シンガポール');
oct_newDest('RS','CSENY','シンガポール/セントーサ');
oct_newDest('PH','CMNL','マニラ');
oct_newDest('PH','ACEB','セブ全域');
oct_newDest('PH','CDVO','ダバオ');
oct_newDest('PH','CBORC','ボラカイ');
oct_newDest('IN','CDEL','ニューデリー');
oct_newDest('IN','CBOM','ムンバイ（ボンベイ）');
oct_newDest('IN','','----');
oct_newDest('IN','CIXU','アウランガバード');
oct_newDest('IN','CAGR','アグラ');
oct_newDest('IN','CGOI','ゴア');
oct_newDest('IN','CCCU','コルカタ(カルカッタ)');
oct_newDest('IN','CJAI','ジャイプール');
oct_newDest('IN','CMAA','チェンナイ(マドラス)');
oct_newDest('IN','CVNS','ベレナス');
oct_newDest('IN','CBLR','バンガロール');
oct_newDest('IA','ABALI','バリ島全域');
oct_newDest('IA','CUBUD','バリ島/ウブド');
oct_newDest('IA','CJKT','ジャカルタ');
oct_newDest('IA','CYOGY','ジョグジャカルタ');
oct_newDest('IA','','----');
oct_newDest('IA','CKUTB','バリ島/クタ');
oct_newDest('IA','CLEGI','バリ島/レギャン');
oct_newDest('IA','CSANH','バリ島/サヌール');
oct_newDest('IA','CNUSA','バリ島/ヌサドゥア');
oct_newDest('IA','CTUBA','バリ島/トゥバン');
oct_newDest('IA','CJIMB','バリ島/ジンバランベイ');
oct_newDest('IA','CSUB','スラバヤ');
oct_newDest('IA','CBDO','バンドゥン');
oct_newDest('IA','CBINN','ビンタン島');
oct_newDest('IA','CMNAD','マナド');
oct_newDest('IA','ALOM','ロンボク島全域');
oct_newDest('KH','CPNH','プノンペン');
oct_newDest('KH','CSIEM','シェムリアップ');
oct_newDest('CE','CCMB','コロンボ');
oct_newDest('CE','','----');
oct_newDest('CE','CKNDY','キャンディー');
oct_newDest('CE','CGLLE','ゴール');
oct_newDest('CE','CNEGO','ニゴンボ');
oct_newDest('CE','CNUWA','ヌワラエリア');
oct_newDest('CE','CBNTO','ベントータ');
oct_newDest('NP','CKTM','カトマンズ');
oct_newDest('BU','CBWN','バンダルスリブガワン');
oct_newDest('VI','CHAN','ハノイ');
oct_newDest('VI','CSGN','ホーチミンシティ');
oct_newDest('VI','','----');
oct_newDest('VI','CDANN','ダナン');
oct_newDest('VI','CNHAT','ニャチャン');
oct_newDest('VI','CHALO','ハロン湾');
oct_newDest('VI','CHUEZ','フエ');
oct_newDest('VI','CHOIA','ホイアン');
oct_newDest('MO','CMFM','マカオ');
oct_newDest('MA','AKUL','クアラルンプール全域');
oct_newDest('MA','APEN','ペナン全域');
oct_newDest('MA','CCAMR','キャメロンハイランド');
oct_newDest('MA','ABKI','コタキナバル全域');
oct_newDest('MA','ALANK','ランカウイ島全域');
oct_newDest('MA','','----');
oct_newDest('MA','CKCH','クチン');
oct_newDest('MA','CKBR','コタバル');
oct_newDest('MA','CSHAA','シャアラム');
oct_newDest('MA','CJHB','ジョホールバル');
oct_newDest('MA','CTIOM','ティオマン島');
oct_newDest('MA','CPETL','ペタリンジャヤ');
oct_newDest('MA','CMKZ','マラッカ');
oct_newDest('MA','CREBA','レバックブサール島');
oct_newDest('MM','CRGN','ヤンゴン');
oct_newDest('MM','CINLE','インレー');
oct_newDest('MM','CPAGA','バガン');
oct_newDest('MM','CMANP','マンダレー');
oct_newDest('LA','CVTE','ビエンチャン');
oct_newDest('LA','CLPQ','ルアンプラバン');
oct_newDest('US','CNYC','ニューヨーク');
oct_newDest('US','ASFO','サンフランシスコ全域');
oct_newDest('US','ALAX','ロサンゼルス全域');
oct_newDest('US','CLAS','ラスベガス');
oct_newDest('US','CSEA','シアトル');
oct_newDest('US','ACHI','シカゴ全域');
oct_newDest('US','ABOS','ボストン全域');
oct_newDest('US','CWAS','ワシントンＤＣ');
oct_newDest('US','AORL','オーランド全域');
oct_newDest('US','','----');
oct_newDest('US','CATL','アトランタ');
oct_newDest('US','CANA','アナハイム');
oct_newDest('US','CABQ','アルバカーキ');
oct_newDest('US','CWILL','ウィリアムズバーグ');
oct_newDest('US','CEYW','キーウェスト');
oct_newDest('US','CGCN','グランドキャニオン/サウス');
oct_newDest('US','CSKF','サンアントニオ');
oct_newDest('US','CSAF','サンタフェ');
oct_newDest('US','CSAN','サンディエゴ');
oct_newDest('US','CSJC','サンノゼ');
oct_newDest('US','CCVG','シンシナティ');
oct_newDest('US','CSLC','ソルトレイクシティ');
oct_newDest('US','CDFW','ダラス');
oct_newDest('US','CTPA','タンパ');
oct_newDest('US','CDTT','デトロイト');
oct_newDest('US','CDEN','デンバー');
oct_newDest('US','CBNA','ナッシュビル');
oct_newDest('US','CNAPA','ナパ');
oct_newDest('US','CMSY','ニューオリンズ');
oct_newDest('US','CPSP','パームスプリングス');
oct_newDest('US','CBUF','バッファロー(NY)');
oct_newDest('US','CPIT','ピッツバーグ');
oct_newDest('US','CHOU','ヒューストン');
oct_newDest('US','CPHL','フィラデルフィア');
oct_newDest('US','CPHX','フェニックス');
oct_newDest('US','CFLL','フォートローダーデール');
oct_newDest('US','CFAT','フレズノ');
oct_newDest('US','CPDX','ポートランド(OR)');
oct_newDest('US','CBWI','ボルチモア');
oct_newDest('US','AMIA','マイアミ全域');
oct_newDest('US','CMSP','ミネアポリス');
oct_newDest('US','CMEM','メンフィス');
oct_newDest('US','CMONW','モニュメントバレー');
oct_newDest('US','CMRY','モントレー');
oct_newDest('US','AOYS','ヨセミテ国立公園全域');
oct_newDest('CA','CYVR','バンクーバー');
oct_newDest('CA','CYTO','トロント');
oct_newDest('CA','CYYZ','トロント/ピアソン国際空港');
oct_newDest('CA','CYMQ','モントリオール');
oct_newDest('CA','','----');
oct_newDest('CA','CWHIS','ウィスラー');
oct_newDest('CA','CYEA','エドモントン');
oct_newDest('CA','CYOW','オタワ');
oct_newDest('CA','CYYC','カルガリー');
oct_newDest('CA','CYQB','ケベック');
oct_newDest('CA','CYJA','ジャスパー');
oct_newDest('CA','CNIAA','ナイアガラフォールズ');
oct_newDest('CA','CYBA','バンフ');
oct_newDest('CA','CYYJ','ビクトリア');
oct_newDest('CA','CLAKL','レイクルイーズ');
oct_newDest('AR','CBUE','ブエノスアイレス');
oct_newDest('AR','','----');
oct_newDest('AR','CIGR','イグアスフォールズ(AR)');
oct_newDest('AR','CCOR','コルドバ');
oct_newDest('AR','CMDZ','メンドーザ');
oct_newDest('AR','CUSH','ウシュアイア');
oct_newDest('AR','CBRC','サンカルロスデバリローチェ');
oct_newDest('BR','CSAO','サンパウロ');
oct_newDest('BR','CRIO','リオデジャネイロ');
oct_newDest('BR','','----');
oct_newDest('BR','CIGU','イグアスフォールズ(BR)');
oct_newDest('BR','CSSA','サルバドール');
oct_newDest('BR','CBSB','ブラジリア');
oct_newDest('BR','CMAO','マナウス');
oct_newDest('BR','CREC','レシフェ');
oct_newDest('ME','CMEX','メキシコシティ');
oct_newDest('ME','CCUN','カンクン');
oct_newDest('ME','','----');
oct_newDest('ME','COAX','オアハカ');
oct_newDest('ME','CACA','アカプルコ');
oct_newDest('ME','CCZM','コスメル');
oct_newDest('ME','CCZA','チチェンイッツァ');
oct_newDest('ME','CMID','メリダ');
oct_newDest('UY','CMVD','モンテヴィデオ');
oct_newDest('UY','CDCOL','コロニアデルサクラメント');
oct_newDest('UY','CPDP','プンタデルエステ');
oct_newDest('EC','CUIO','キト');
oct_newDest('EC','CGUAY','グアヤキル');
oct_newDest('EC','CCUE','クエンカ');
oct_newDest('CS','CSJO','サンホセ');
oct_newDest('CS','CPNTA','プンタレナス');
oct_newDest('JA','AJAM','ジャマイカ全域');
oct_newDest('CL','CSCL','サンティアゴ');
oct_newDest('CL','','----');
oct_newDest('CL','CEASA','イースター島');
oct_newDest('CL','CSPAC','サンペドロデアタカマ');
oct_newDest('CL','CPVAR','プエルトバラス');
oct_newDest('CL','CPMOT','プエルトモン');
oct_newDest('CL','CPUAR','プンタアレーナス');
oct_newDest('DR','ACAR6','ドミニカ全域');
oct_newDest('PG','CPTY','パナマシティー');
oct_newDest('BS','ABAHM','バハマ全域');
oct_newDest('PY','CASU','アスンシオン');
oct_newDest('WB','ABARD','バルバドス全域');
oct_newDest('PT','CSJU','サンフアン');
oct_newDest('PE','CLIM','リマ');
oct_newDest('PE','','----');
oct_newDest('PE','CAQP','アレキパ');
oct_newDest('PE','CCUSC','クスコ');
oct_newDest('PE','CNASC','ナスカ');
oct_newDest('PE','CPUNO','プーノ');
oct_newDest('PE','CMATC','マチュピチュ');
oct_newDest('BO','CLPB','ラパス');
oct_newDest('BO','','----');
oct_newDest('BO','CSRZ','サンタクルス(BO)');
oct_newDest('BO','CSRE','スクレ');
oct_newDest('BO','APELT','チチカカ湖');
oct_newDest('*US','CHNL','ホノルル');
oct_newDest('*US','AHAW4','マウイ島全域');
oct_newDest('*US','AHAW1','ハワイ島全域');
oct_newDest('*US','AHAW2','カウアイ島全域');
oct_newDest('*US','CMOLO','モロカイ島');
oct_newDest('GU','CGUM','グアム');
oct_newDest('MP','CSPN','サイパン');
oct_newDest('PW','AZPAL','パラオ全域');
oct_newDest('GB','CLON','ロンドン');
oct_newDest('GB','CLHR','ロンドン/ヒースロー空港');
oct_newDest('GB','ALAK2','湖水地方');
oct_newDest('GB','AEDI','エジンバラ全域');
oct_newDest('GB','CMAN','マンチェスター');
oct_newDest('GB','CLPL','リバプール');
oct_newDest('GB','ACOTS','コッツウォルズ');
oct_newDest('GB','','----');
oct_newDest('GB','CINV','インバネス');
oct_newDest('GB','COXFO','オックスフォード');
oct_newDest('GB','CCWL','カーディフ');
oct_newDest('GB','AGLS','グラスゴー全域');
oct_newDest('GB','ANCL1','ニューカッスル全域');
oct_newDest('GB','CBHX','バーミンガム');
oct_newDest('GB','CBSH','ブライトン');
oct_newDest('GB','CBRS','ブリストル');
oct_newDest('GB','CBEL','ベルファスト');
oct_newDest('GB','CYORK','ヨーク');
oct_newDest('GB','CLBA','リーズ');
oct_newDest('I','AROM1','ローマ全域');
oct_newDest('I','AMIL','ミラノ全域');
oct_newDest('I','AFLR1','フィレンツェ全域');
oct_newDest('I','AVCE2','ベニス（ヴェニス）');
oct_newDest('I','CNAP','ナポリ');
oct_newDest('I','','----');
oct_newDest('I','CASSI','アッシジ');
oct_newDest('I','CAMAL','アマルフィ');
oct_newDest('I','CALBE','アルベロベッロ');
oct_newDest('I','CCTA','カターニア');
oct_newDest('I','CPRJ','カプリ');
oct_newDest('I','CQCM','コモ');
oct_newDest('I','AAHO1','サルディーニャ島全域');
oct_newDest('I','CSIEN','シエナ');
oct_newDest('I','CGOA','ジェノバ');
oct_newDest('I','CSTRE','ストレーザ');
oct_newDest('I','CSORR','ソレント');
oct_newDest('I','ATAOR','タオルミーナ全域');
oct_newDest('I','CTRS','トリエステ');
oct_newDest('I','CTRN','トリノ');
oct_newDest('I','CBRI','バーリ');
oct_newDest('I','CPMO','パレルモ');
oct_newDest('I','CPSA','ピサ');
oct_newDest('I','CPEG','ペルージャ');
oct_newDest('I','CVRN','ベローナ');
oct_newDest('I','CBLQ','ボローニャ');
oct_newDest('A','AVIE','ウィーン全域');
oct_newDest('A','CSZG','ザルツブルグ');
oct_newDest('A','CINN','インスブルック');
oct_newDest('A','','----');
oct_newDest('A','CKLU','クラーゲンフルト');
oct_newDest('A','CGRZ','グラーツ');
oct_newDest('A','CSTWO','ザンクトヴォルフガンク');
oct_newDest('A','CZELA','ツェルアムゼー');
oct_newDest('A','CBADE','バーデン');
oct_newDest('A','CBADC','バートイシュル');
oct_newDest('A','CLNZ','リンツ');
oct_newDest('CH','CZRH','チューリッヒ');
oct_newDest('CH','CZRHA','チューリッヒ/空港');
oct_newDest('CH','CGVA','ジュネーブ');
oct_newDest('CH','CGRIN','グリンデルワルド');
oct_newDest('CH','CZERM','ツェルマット');
oct_newDest('CH','','----');
oct_newDest('CH','CINTE','インターラーケン');
oct_newDest('CH','CSMV','サンモリッツ');
oct_newDest('CH','CBSL','バーゼル');
oct_newDest('CH','CBRN','ベルン');
oct_newDest('CH','CMONE','モントルー');
oct_newDest('CH','CLUG','ルガーノ');
oct_newDest('CH','CLUCE','ルツェルン');
oct_newDest('CH','CQLS','ローザンヌ');
oct_newDest('E','AMAD1','マドリッド全域');
oct_newDest('E','ABCN1','バルセロナ全域');
oct_newDest('E','AGRX','グラナダ全域');
oct_newDest('E','CSVQ','セビリア');
oct_newDest('E','CAGP','マラガ');
oct_newDest('E','','----');
oct_newDest('E','AIBI','イビザ島全域');
oct_newDest('E','ACANA','カナリア諸島全域');
oct_newDest('E','CODB','コルドバ');
oct_newDest('E','CZAZ','サラゴサ');
oct_newDest('E','CEAS','サンセバスチャン');
oct_newDest('E','CSCQ','サンティアゴデコンポステーラ');
oct_newDest('E','CSEGO','セゴビア');
oct_newDest('E','CTOLE','トレド');
oct_newDest('E','CUTL','トレモリノス');
oct_newDest('E','CVLC','バレンシア');
oct_newDest('E','CBIO','ビルバオ');
oct_newDest('E','APMI','マジョルカ（マヨルカ）島/全域');
oct_newDest('E','CQRL','マルベージャ');
oct_newDest('E','CMIJA','ミハス');
oct_newDest('E','CROND','ロンダ');
oct_newDest('D','AFRA','フランクフルト全域');
oct_newDest('D','ADUS','デュッセルドルフ全域');
oct_newDest('D','AMUC','ミュンヘン全域');
oct_newDest('D','ABER','ベルリン全域');
oct_newDest('D','','----');
oct_newDest('D','CQWU','ヴュルツブルク');
oct_newDest('D','CESS','エッセン');
oct_newDest('D','CGARI','ガルミッシュパルテンキルヒェン');
oct_newDest('D','CCGN','ケルン');
oct_newDest('D','CKOBL','コブレンツ');
oct_newDest('D','CSTR','シュツットガルト');
oct_newDest('D','CDRS','ドレスデン');
oct_newDest('D','CNUE','ニュルンベルク');
oct_newDest('D','CQHD','ハイデルベルク');
oct_newDest('D','CBADD','バーデンバーデン');
oct_newDest('D','CHAJ','ハノーバー');
oct_newDest('D','CHAM','ハンブルク');
oct_newDest('D','CFUSS','フュッセン');
oct_newDest('D','CBRE','ブレーメン');
oct_newDest('D','CBNJ','ボン');
oct_newDest('D','CLEJ','ライプチヒ');
oct_newDest('D','CRUDE','リューデスハイム');
oct_newDest('D','CLBC','リューベック');
oct_newDest('D','CROTE','ローテンブルク');
oct_newDest('F','CPAR','パリ');
oct_newDest('F','CCDG','パリ/シャルルドゴール空港');
oct_newDest('F','CMONT','モンサンミッシェル');
oct_newDest('F','CNCE','ニース');
oct_newDest('F','CMRS','マルセイユ');
oct_newDest('F','CLYN','リヨン');
oct_newDest('F','','----');
oct_newDest('F','CAVN','アヴィニヨン');
oct_newDest('F','CARLE','アルル');
oct_newDest('F','CAIXE','エクサンプロヴァンス');
oct_newDest('F','CCEQ','カンヌ');
oct_newDest('F','CCMR','コールマール');
oct_newDest('F','CSTMA','サンマロ');
oct_newDest('F','CCHAM','シャモニーモンブラン');
oct_newDest('F','CSXB','ストラスブール');
oct_newDest('F','CDIJ','ディジョン');
oct_newDest('F','CTUF','トゥール');
oct_newDest('F','CTLS','トゥールーズ');
oct_newDest('F','CDISN','パリ/ディズニーランド');
oct_newDest('F','CBEAU','ボーヌ');
oct_newDest('F','CBOD','ボルドー');
oct_newDest('F','CMLH','ミュールーズ');
oct_newDest('F','CLDE','ルルド');
oct_newDest('F','CRNS','レンヌ');
oct_newDest('IS','CREK','レイキャビク');
oct_newDest('EI','CDUB','ダブリン');
oct_newDest('EI','','----');
oct_newDest('EI','CKIR','キラーニー');
oct_newDest('EI','CORK','コーク');
oct_newDest('EI','CGWY','ゴールウェイ');
oct_newDest('EI','CSNN','シャノン');
oct_newDest('AD','CALV','アンドラ・ラ・ベリャ');
oct_newDest('UK','CIEV','キエフ');
oct_newDest('UK','CODS','オデッサ');
oct_newDest('ES','CTLL','タリン');
oct_newDest('NL','CAMS','アムステルダム');
oct_newDest('NL','CAMSB','アムステルダム/スキポール空港');
oct_newDest('NL','CRTM','ロッテルダム');
oct_newDest('NL','','----');
oct_newDest('NL','CEIN','アイントホーフェン');
oct_newDest('NL','CHAG','ハーグ');
oct_newDest('NL','CMST','マーストリヒト');
oct_newDest('NL','CUTRE','ユトレヒト');
oct_newDest('NL','CLEID','ライデン');
oct_newDest('CY','ACYP','キプロス全域');
oct_newDest('CY','','----');
oct_newDest('CY','CAYIP','アヤナパ');
oct_newDest('CY','CNICO','ニコシア');
oct_newDest('CY','CPAPH','パフォス');
oct_newDest('CY','CLCA','ラルナカ');
oct_newDest('CY','CQLI','リマソール');
oct_newDest('GR','CATH','アテネ');
oct_newDest('GR','CSKG','テッサロニキ');
oct_newDest('GR','','----');
oct_newDest('GR','CKALA','カランバカ');
oct_newDest('GR','ACRT','クレタ島全域');
oct_newDest('GR','ASANO','サントリーニ島全域');
oct_newDest('GR','AJMK','ミコノス島全域');
oct_newDest('GR','ARHO','ロドス島全域');
oct_newDest('CR','CZAG','ザグレブ');
oct_newDest('CR','CSPU','スプリット');
oct_newDest('CR','CDBV','ドブロヴニク');
oct_newDest('SM','CQSAI','サンマリノ');
oct_newDest('GK','CGIB','ジブラルタル');
oct_newDest('S','ASTO','ストックホルム全域');
oct_newDest('S','','----');
oct_newDest('S','CKLR','カルマル');
oct_newDest('S','CFALU','ファールン');
oct_newDest('S','CMMA','マルメ');
oct_newDest('S','CGOT','ヨーテボリ');
oct_newDest('SR','CBTS','ブラティスラバ');
oct_newDest('SL','CLJU','リュブリヤナ');
oct_newDest('YU','CBEG','ベオグラード');
oct_newDest('C','CPRG','プラハ');
oct_newDest('C','','----');
oct_newDest('C','CKLV','カルロヴィヴァリ');
oct_newDest('C','CCESY','チェスキークルムロフ');
oct_newDest('C','CBRQ','ブルノ');
oct_newDest('DK','CCPH','コペンハーゲン');
oct_newDest('DK','CCPHA','コペンハーゲン空港');
oct_newDest('DK','','----');
oct_newDest('DK','CODE','オーデンセ');
oct_newDest('DK','CAAR','オーフス');
oct_newDest('DK','CAAL','オールボー');
oct_newDest('DK','CFDH','フレデリクスハウン');
oct_newDest('DK','CRIBE','リーベ');
oct_newDest('TR','AIST','イスタンブール全域');
oct_newDest('TR','CANK','アンカラ');
oct_newDest('TR','CIZM','イズミール');
oct_newDest('TR','','----');
oct_newDest('TR','CANTA','アンタルヤ');
oct_newDest('TR','ACAPP','カッパドキア');
oct_newDest('TR','CKUSA','クシャダス');
oct_newDest('TR','CCANA','チャナッカレ');
oct_newDest('TR','CPAMU','パムッカレ');
oct_newDest('N','AOSL','オスロ全域');
oct_newDest('N','CSVG','スタヴァンゲル');
oct_newDest('N','CFLAM','フロム');
oct_newDest('N','ABGO','ベルゲン全域');
oct_newDest('N','','----');
oct_newDest('N','CVOSS','ヴォス');
oct_newDest('N','CALEU','オーレスン');
oct_newDest('N','CGEIR','ガイランゲル');
oct_newDest('N','CKRS','クリスチャンサン');
oct_newDest('N','CTOS','トロムソ');
oct_newDest('N','CTRD','トロンハイム');
oct_newDest('N','CBOO','ボードー');
oct_newDest('N','CLILL','リレハンメル');
oct_newDest('H','CBUD','ブダペスト');
oct_newDest('SF','AHEL','ヘルシンキ全域');
oct_newDest('SF','CRVN','ロバニエミ');
oct_newDest('SF','CSAAR','サーリセルカ');
oct_newDest('SF','','----');
oct_newDest('SF','CIVL','イヴァロ');
oct_newDest('SF','CNAAN','ナーンタリ');
oct_newDest('SF','COUL','オウル');
oct_newDest('SF','CTKU','トゥルク');
oct_newDest('SF','CTMP','タンペレ');
oct_newDest('SF','CKUO','クオピオ');
oct_newDest('SF','CHAMN','ハーメンリンナ');
oct_newDest('SF','CJYV','ユバスキュラ');
oct_newDest('SF','CLPP','ラッペーンランタ');
oct_newDest('BG','CSOF','ソフィア');
oct_newDest('BY','CMSQ','ミンスク');
oct_newDest('B','ABRU3','ブリュッセル全域');
oct_newDest('B','CBRUG','ブルージュ');
oct_newDest('B','','----');
oct_newDest('B','CANR','アントワープ');
oct_newDest('B','CGNE','ゲント');
oct_newDest('B','CCRL','シャルルロア');
oct_newDest('B','CQNM','ナミュール');
oct_newDest('BH','CSJJ','サラエボ');
oct_newDest('PL','AWAW','ワルシャワ全域');
oct_newDest('PL','','----');
oct_newDest('PL','CKRK','クラクフ');
oct_newDest('PL','CGDN','グダニスク');
oct_newDest('P','ALIS','リスボン全域');
oct_newDest('P','COPO','ポルト');
oct_newDest('P','CCOIM','コインブラ');
oct_newDest('P','AMADE','マデイラ島全域');
oct_newDest('P','','----');
oct_newDest('P','AAZO','アソーレス諸島全域');
oct_newDest('P','CEVOR','エヴォラ');
oct_newDest('P','CESTO','エストリル');
oct_newDest('P','COBID','オビドス');
oct_newDest('P','CCASC','カスカイス');
oct_newDest('P','CSINT','シントラ');
oct_newDest('P','CNAZA','ナザレ');
oct_newDest('P','CFAO','ファーロ');
oct_newDest('P','CFATI','ファティマ');
oct_newDest('P','CBUCA','ブサコ');
oct_newDest('MW','AMW2','マルタ全域');
oct_newDest('MC','CQMCM','モンテカルロ');
oct_newDest('LV','CRIX','リガ');
oct_newDest('LI','CVNO','ビリニュス');
oct_newDest('LU','CLUX','ルクセンブルグ');
oct_newDest('R','ABUH','ブカレスト全域');
oct_newDest('RU','CMOW','モスクワ');
oct_newDest('RU','CLED','サンクトぺテルブルグ');
oct_newDest('EM','CDXB','ドバイ/シティー');
oct_newDest('EM','CJUME','ドバイ/ジュメイラ');
oct_newDest('EM','CDESR','ドバイ/砂漠エリア');
oct_newDest('EM','AAUH1','アブダビ全域');
oct_newDest('UN','ACAI','カイロ全域');
oct_newDest('UN','','----');
oct_newDest('UN','CASW','アスワン');
oct_newDest('UN','CABS','アブシンベル');
oct_newDest('UN','CALY','アレキサンドリア');
oct_newDest('UN','CSSH','シャルムエルシェイク');
oct_newDest('UN','CLXR','ルクソール');
oct_newDest('TN','CTUN','チュニス');
oct_newDest('TN','','----');
oct_newDest('TN','CGAMH','ガマール');
oct_newDest('TN','CDJER','ジェルバ');
oct_newDest('TN','CQSO','スース');
oct_newDest('TN','CHAMM','ハマメット');
oct_newDest('TN','CPORK','ポートエルカンタウィ');
oct_newDest('TN','CMAHD','マディア');
oct_newDest('SA','AJNB','ヨハネスブルグ全域');
oct_newDest('SA','ACPT','ケープタウン全域');
oct_newDest('SA','','----');
oct_newDest('SA','CGRJ','ジョージ');
oct_newDest('SA','CDUR','ダーバン');
oct_newDest('SA','CPLZ','ポートエリザベス');
oct_newDest('SA','CPRY','プレトリア');
oct_newDest('M','CCAS','カサブランカ');
oct_newDest('M','CFEZ','フェズ');
oct_newDest('M','CRAK','マラケシュ');
oct_newDest('M','','----');
oct_newDest('M','CAGA','アガディール');
oct_newDest('M','CERFO','エルフード');
oct_newDest('M','CZAGO','ザゴラ');
oct_newDest('M','CTNG','タンジール');
oct_newDest('M','CRBA','ラバト');
oct_newDest('M','COZZ','ワルザザード');
oct_newDest('JO','CAMM','アンマン');
oct_newDest('JO','','----');
oct_newDest('JO','CAQAB','アカバ');
oct_newDest('JO','CDEAS','死海');
oct_newDest('JO','CPETB','ペトラ');
oct_newDest('IL','CTLV','テルアビブ');
oct_newDest('IL','','----');
oct_newDest('IL','CETH','エイラート');
oct_newDest('IL','CJRS','エルサレム');
oct_newDest('IL','CDEAD','死海/エンボケック');
oct_newDest('IL','CNETA','ナタニア');
oct_newDest('IL','CHFA','ハイファ');
oct_newDest('OM','CMCT','マスカット');
oct_newDest('DH','CDOH','ドーハ');
oct_newDest('KT','CKWI','クウェート');
oct_newDest('KE','CNBO','ナイロビ');
oct_newDest('KE','AMBA','モンバサ全域');
oct_newDest('SJ','CJED','ジェッダ');
oct_newDest('SJ','CRUH','リヤド');
oct_newDest('ZA','CLVI','リビングストン');
oct_newDest('ZA','CLUN','ルサカ');
oct_newDest('SY','CDAM','ダマスカス');
oct_newDest('SY','','----');
oct_newDest('SY','CALP','アレッポ');
oct_newDest('SY','CPALY','パルミラ');
oct_newDest('FZ','ASEY','セイシェル全域');
oct_newDest('TZ','CDAR','ダルエスサラーム');
oct_newDest('NA','CSWP','スワコップムント');
oct_newDest('NA','CWDH','ヴィントフック');
oct_newDest('BN','CBAH','バーレーン');
oct_newDest('IW','AMAUR','モーリシャス全域');
oct_newDest('LE','CBEY','ベイルート');
oct_newDest('AA','ASYDN','シドニー全域');
oct_newDest('AA','ACNS','ケアンズ全域');
oct_newDest('AA','AGOLD','ゴールドコースト全域');
oct_newDest('AA','APER','パース全域');
oct_newDest('AA','ABNE','ブリスベン全域');
oct_newDest('AA','AMEL','メルボルン全域');
oct_newDest('AA','','----');
oct_newDest('AA','AADL','アデレード全域');
oct_newDest('AA','CASP','アリススプリングス');
oct_newDest('AA','CAYQ','エアーズロック');
oct_newDest('AA','CKANY','カンガルー島');
oct_newDest('AA','CCBR','キャンベラ');
oct_newDest('AA','CDRW','ダーウィン');
oct_newDest('AA','CFRAQ','フレーザー島');
oct_newDest('AA','CHIS','ヘイマン島');
oct_newDest('AA','CPOWZ','ポートダグラス');
oct_newDest('AA','CHBA','ホバート');
oct_newDest('NZ','AAKL','オークランド全域');
oct_newDest('NZ','CZQN','クイーンズタウン');
oct_newDest('NZ','CCHC','クライストチャーチ');
oct_newDest('NZ','','----');
oct_newDest('NZ','CWLG','ウェリントン');
oct_newDest('NZ','CTUO','タウポ');
oct_newDest('NZ','CTEU','テアナウ');
oct_newDest('NZ','CLAKT','テカポ');
oct_newDest('NZ','CNEWL','ニュープリモス');
oct_newDest('NZ','CHLZ','ハミルトン');
oct_newDest('NZ','CMON','マウントクック');
oct_newDest('NZ','CROT','ロトルア');
oct_newDest('NZ','CWKA','ワナカ');
oct_newDest('CK','CAIT','アイツタキ島（クック諸島）');
oct_newDest('CK','CRAR','ラロトンガ島（クック諸島）');
oct_newDest('PF','APFI','仏領ポリネシア全域');
oct_newDest('NC','ANEWC','ニューカレドニア全域');
oct_newDest('VU','AVUI','バヌアツ全域');
oct_newDest('FI','AFIJI','フィジー全域');
