var booking_cur = document.location.href;
var REG_ID = new Array("00","01","02","03","04","05","06","07");
var REG_NAME_KO = new Array("한국","일본","미국/캐나다","중국/몽골","동남아/괌","유럽/중동","호주/뉴질랜드/피지","인도/서남아시아");
var REG_NAME_GB = new Array("Korea","Japan","USA/Canada","China/Mongolia","Southeast Asia/Guam","Europe/Middle East","Oceania","India");
var REG_NAME_JP = new Array("韓国","日本","米国・カナダ","中国・モンゴル","東南亜・グアム","ヨーロッパ・中東","オセアニア","インド・西南亜");
var REG_NAME_CN = new Array("韩国","日本","美国/加拿大","中国/蒙古","东南亚/关岛","欧洲/中东","澳大利亚/新西兰/斐济","印度/西南亚");
var REG_NAME_TW = new Array("韓國","日本","美國/加拿大","中國/蒙古","東南亞/關島","歐洲/中東","澳洲/新西蘭/菲濟 ","印度/西南亞");
var REG_NAME_DE = new Array("Korea","Japan","USA/Kanada","China/Mongolei","Suedostasien/Guam","Europa/Mittlerer","Ozeanien","Indien");
var REG_NAME_FR = new Array("Coree Du Sud","Japon","Etats-Unis/Canada","Chine/Mongolie","Asie Du Sud Est/Guam","Europe/Moyen Orient","Océanie","Inde");

var AIRPORT_CODE_00 = new Array("ICN","GMP","PUS","CJU","KWJ","TAE","RSU","USN","KPO","HIN","KUV","CJJ","YNY","WJU");
var AIRPORT_NAME_00_KO = new Array("서울(인천)","서울(김포)","부산","제주","광주","대구","여수","울산","포항","진주","군산","청주","양양","원주");
var AIRPORT_NAME_00_GB = new Array("Seoul(Incheon)","Seoul(Gimpo)","Busan","Jeju","Gwangju","Daegu","Yeosu","Ulsan","Pohang","Jinju","Gunsan","Cheongju","Yangyang","Wonju");
var AIRPORT_NAME_00_JP = new Array("ソウル(仁川)","ソウル(金浦)","釜山","済州","光州","大邱","麗水","蔚山","浦項","晋州","郡山","清州","襄陽","原州");
var AIRPORT_NAME_00_CN = new Array("汉城(仁川)","汉城(金浦)","釜山","济洲","光州","大邱","丽水","蔚山","浦项","晋州","群山","清州","襄阳","原州");
var AIRPORT_NAME_00_TW = new Array("首爾(仁川)","首爾(金浦)","釜山","濟洲","光州","大邱","麗水","尉山","浦項","晉州","郡山","清州","襄陽","原州");
var AIRPORT_NAME_00_DE = new Array("Seoul(Incheon)","Seoul(Gimpo)","Busan","Jeju","Gwangju","Daegu","Yeosu","Ulsan","Pohang","Jinju","Gunsan","Cheongju","Yangyang","Wonju");
var AIRPORT_NAME_00_FR = new Array("Seoul(Incheon)","Seoul(Gimpo)","Busan","Jeju","Gwangju","Daegu","Yeosu","Ulsan","Pohang","Jinju","Gunsan","Cheongju","Yangyang","Wonju");

var AIRPORT_CODE_01 = new Array("NRT","HND","KIX","NGO","FUK","KOJ","KMQ","KIJ","CTS","OKJ","AOJ","OIT","NGS","AXT");
var AIRPORT_NAME_01_KO = new Array("도쿄(나리타)","도쿄(하네다)","오사카","나고야","후쿠오카","가고시마","고마츠","니가타","삿포로","오카야마","아오모리","오이타","나가사키","아키타");
var AIRPORT_NAME_01_GB = new Array("Tokyo(Narita)","Tokyo(Haneda)","Osaka","Nagoya","Fukuoka","Kagoshima","Komatsu","Niigata","Sapporo","Okayama","Aomori","Oita","Nagasaki","Akita");
var AIRPORT_NAME_01_JP = new Array("東京(成田)","東京(羽田)","大阪","名古屋","福岡","鹿児島","小松","新潟","札幌","岡山","青森","大分","長崎","秋田");
var AIRPORT_NAME_01_CN = new Array("东京(承田)","东京(羽田)","大阪","名古屋","福冈","鹿儿岛","小松","新泻","札幌","冈山","青森","大分","长崎","秋田");
var AIRPORT_NAME_01_TW = new Array("東京(成田)","東京(羽田)","大阪","名古屋","福崗","鹿兒島","小松","新瀉","札幌","岡山","青森","大分","長崎","秋田");
var AIRPORT_NAME_01_DE = new Array("Tokyo(Narita)","Tokyo(Haneda)","Osaka","Nagoya","Fukuoka","Kagoshima","Komatsu","Niigata","Sapporo","Okayama","Aomori","Oita","Nagasaki","Akita");
var AIRPORT_NAME_01_FR = new Array("Tokyo(Narita)","Tokyo(Haneda)","Osaka","Nagoya","Fukuoka","Kagoshima","Komatsu","Niigata","Sapporo","Okayama","Aomori","Oita","Nagasaki","Akita");

var AIRPORT_CODE_02 = new Array("LAX","JFK","HNL","ORD","ANC","SFO","ATL","DFW","IAD","YVR","YYZ","SEA");
var AIRPORT_NAME_02_KO = new Array("로스엔젤레스","뉴욕","호놀룰루","시카고","앵커리지","샌프란시스코","애틀랜타","댈러스","워싱턴D.C","밴쿠버","토론토","시애틀");
var AIRPORT_NAME_02_GB = new Array("Los Angeles","New York","Honolulu","Chicago","Anchorage","San Francisco","Atlanta","Dallas","Washington D.C.","Vancouver","Toronto","Seattle");
var AIRPORT_NAME_02_JP = new Array("ロサンゼルス","ニューヨーク","ホノルル","シカゴ","アンカレジ","サンフランシスコ","アトランタ","ダラス","ワシントンD.C.","バンクーバー","トロント","シアトル");
var AIRPORT_NAME_02_CN = new Array("洛杉矶","纽约","夏威夷","芝加哥","安克雷奇","旧金山","亚特兰大","达拉斯","华盛顿","温哥华","多伦多","西雅圖");
var AIRPORT_NAME_02_TW = new Array("洛杉磯","紐約","檀香山","芝加哥","安克雷奇","三藩市","亞達蘭大","達拉斯","華盛頓","溫哥華","多倫多","西雅圖");
var AIRPORT_NAME_02_DE = new Array("Los Angeles","New York","Honolulu","Chicago","Anchorage","San Francisco","Atlanta","Dallas","Washington D.C.","Vancouver","Toronto","Seattle");
var AIRPORT_NAME_02_FR = new Array("Los Angeles","New York","Honolulu","Chicago","Anchorage","San Francisco","Atlanta","Dallas","Washington D.C.","Vancouver","Toronto","Seattle");

var AIRPORT_CODE_03 = new Array("PEK","TSN","TAO","PVG","SHE","SYX","WUH","ULN","KMG","TNA","URC","WEH","YNT","XMN","YNJ","XIY","HKG");
var AIRPORT_NAME_03_KO = new Array("베이징","톈진","칭다오","상하이","선양","산야","우한","울란바토르","쿤밍","지난","우루무치","웨이하이","옌타이","샤먼","옌지","시안","홍콩");
var AIRPORT_NAME_03_GB = new Array("Beijing","Tianjin","Qingdao","Shanghai","Shenyang","Sanya","Wuhan","Ulaanbaatar","Kunming","Jinan","Urumuqi","Weihai","Yantai","Xiamen","Yanji","Xian","Hong Kong");
var AIRPORT_NAME_03_JP = new Array("北京","天津","青島","上海","瀋陽","三亜","武漢","ウランバートル","昆明","済南","烏魯木齊","威海","烟台","アモイ","延吉","西安","香港");
var AIRPORT_NAME_03_CN = new Array("北京","天津","青岛","上海","沈阳","三亚","武汉","乌兰巴托","昆明","济南","乌鲁木齐","威海","烟台","厦门","延吉","西安","香港");
var AIRPORT_NAME_03_TW = new Array("北京","天津","青島","上海","瀋陽","三亞","武漢","烏蘭巴托","昆明","濟南","烏魯木齊","威海","煙台","廈門","延吉","西安","香港");
var AIRPORT_NAME_03_DE = new Array("Peking","Tianjin","Qindao","Shanghai","Shenyang","Sanya","Wuhan","Ulaanbaatar","Kunming","Jinan","Urumuqi","Weihai","Yantai","Xiamen","Yanji","Xian","Hong Kong");
var AIRPORT_NAME_03_FR = new Array("Pekin","Tianjin","Qingdao","Shanghai","Shenyang","Sanya","Wuhan","Ulaanbaatar","Kunming","Jinan","Urumuqi","Weihai","Yantai","Xiamen","Yanji","Xian","Hong Kong");

var AIRPORT_CODE_04 = new Array("GUM","BKK","HKT","SIN","MNL","CGK","DPS","KUL","PEN","SGN","HAN","TPE");
var AIRPORT_NAME_04_KO = new Array("괌","방콕","푸켓","싱가포르","마닐라","자카르타","덴파사","콸라룸푸르","페낭","호치민","하노이","타이페이");
var AIRPORT_NAME_04_GB = new Array("Guam","Bangkok","Phuket","Singapore","Manila","Jakarta","Denparsar","Kuala Lumpur","Penang","Ho Chi Minh City","Hanoi","Taipei");
var AIRPORT_NAME_04_JP = new Array("グアム","バンコク","プーケット","シンガポール","マニラ","ジャカルタ","デンパサール","クアラルンプール","ペナン","ホーチミンシティ","ハノイ","台北");
var AIRPORT_NAME_04_CN = new Array("关岛","曼谷","普吉","新加坡","马尼拉","雅加达","巴里岛","吉隆坡","槟城","胡志明市","河内","台北");	
var AIRPORT_NAME_04_TW = new Array("關島","曼谷","布吉","新加坡","馬尼拉","雅加達","峇里島","吉隆坡","檳城","胡志明市","河內","台北");
var AIRPORT_NAME_04_DE = new Array("Guam","Bangkok","Phuket","Singapur","Manila","Jakarta","Denparsar","Kuala Lumpur","Penang","Ho Chi Minh Stadt","Hanoi","Taipei");
var AIRPORT_NAME_04_FR = new Array("Guam","Bangkok","Phuket","Singapore","Manila","Jakarta","Denparsar","Kuala Lumpur","Penang","Ho Chi Minh City","Hanoi","Taipei");

var AIRPORT_CODE_05 = new Array("CDG","FRA","LHR","ZRH","AMS","MAD","FCO","SVO","VVO","LED","CAI","DXB","PRG");
var AIRPORT_NAME_05_KO = new Array("파리","프랑크푸르트","런던","취리히","암스테르담","마드리드","로마","모스크바","블라디보스토크","상트페테르부르크","카이로","두바이","프라하");
var AIRPORT_NAME_05_GB = new Array("Paris","Frankfurt","London","Zurich","Amsterdam","Madrid","Rome","Moscow","Vladivostok","St. Petersburg","Cairo","Dubai","Prague");
var AIRPORT_NAME_05_JP = new Array("パリ","フランクフルト","ロンドン","チューリッヒ","アムステルダム","マドリッド","ローマ","モスクワ","ウラジオストック","サンクトペテルブルグ","カイロ","ドバイ","プラハ");
var AIRPORT_NAME_05_CN = new Array("巴黎","法兰克福","伦敦","苏黎世","达姆斯特丹","马德里","罗马","莫斯科","海参崴","圣彼得堡","开罗","迪拜","布拉格");
var AIRPORT_NAME_05_TW = new Array("巴黎","法蘭克福","倫敦","蘇黎世","阿姆斯特丹","馬德里","羅馬","莫斯科","海參威","聖坡德堡","開羅","杜拜","布拉格");
var AIRPORT_NAME_05_DE = new Array("Paris","Frankfurt","London","Zürich","Amsterdam","Madrid","Rom","Moskau","Vladivostok","St. Petersburg","Kairo","Dubai","Prag");
var AIRPORT_NAME_05_FR = new Array("Paris","Francfort","Londres","Zurich","Amsterdam","Madrid","Rome","Moscow","Vladivostok","St. Petersburg","Caire","Dubai","Prague");

var AIRPORT_CODE_06 = new Array("SYD","BNE","AKL","CHC","NAN");
var AIRPORT_NAME_06_KO = new Array("시드니","브리즈번","오클랜드","크라이스트처치","난디");
var AIRPORT_NAME_06_GB = new Array("Sydney","Brisbane","Auckland","Christchurch","Nadi");
var AIRPORT_NAME_06_JP = new Array("シドニー","ブリスベーン","オークランド","クライストチャーチ","ナンディ");
var AIRPORT_NAME_06_CN = new Array("悉尼","布里斯班","奥克兰","基督城","南迪");
var AIRPORT_NAME_06_TW = new Array("悉尼","布里斯班","奧克蘭","基督城","菲濟郡島");
var AIRPORT_NAME_06_DE = new Array("Sydney","Brisbane","Auckland","Christchurch","Nadi");
var AIRPORT_NAME_06_FR = new Array("Sydney","Brisbane","Auckland","Christchurch","Nadi");

var AIRPORT_CODE_07 = new Array("BOM");
var AIRPORT_NAME_07_KO = new Array("뭄바이");
var AIRPORT_NAME_07_GB = new Array("Mumbai");
var AIRPORT_NAME_07_JP = new Array("ムンバイ");
var AIRPORT_NAME_07_CN = new Array("孟买");
var AIRPORT_NAME_07_TW = new Array("孟買");
var AIRPORT_NAME_07_DE = new Array("Mumbai");
var AIRPORT_NAME_07_FR = new Array("Mumbai");

function showRegSelect(local,lang){
	var regSelect;
	
	if(local=="01")
		regSelect += "<option value='01' selected>"+eval("REG_NAME_"+lang)[1]+"</option>\n";
	else{
		for(var i=0; i<REG_ID.length; i++) {
			if(REG_ID[i]==local)
				regSelect += "<option value='"+REG_ID[i]+"' selected>"+eval("REG_NAME_"+lang)[i]+"</option>\n";
			else
				regSelect += "<option value='"+REG_ID[i]+"'>"+eval("REG_NAME_"+lang)[i]+"</option>\n";
		}
	}
	
	return regSelect;
}

function showRegSelect2(lang){
	var local = document.fareschedule.B_REG_ID.options[document.fareschedule.B_REG_ID.selectedIndex].value;
	var regSelect;
	
	for(var i=0; i<REG_ID.length; i++) {
		if(local=="00" || local=="01"){
			if(REG_ID[i] != local)
				regSelect += "<option value='"+REG_ID[i]+"'>"+eval("REG_NAME_"+lang)[i]+"</option>\n";
		}else if(local=="02" || local=="06"){
			if(REG_ID[i] != local && REG_ID[i] != "05" && REG_ID[i] != "07")
				regSelect += "<option value='"+REG_ID[i]+"'>"+eval("REG_NAME_"+lang)[i]+"</option>\n";
		}else if(local=="03"){
			if(REG_ID[i] != local && REG_ID[i] != "04" && REG_ID[i] != "06" && REG_ID[i] != "07")
				regSelect += "<option value='"+REG_ID[i]+"'>"+eval("REG_NAME_"+lang)[i]+"</option>\n";
		}else if(local=="04"){
			if(REG_ID[i] != local && REG_ID[i] != "03" && REG_ID[i] != "07")
				regSelect += "<option value='"+REG_ID[i]+"'>"+eval("REG_NAME_"+lang)[i]+"</option>\n";
		}else if(local=="05"){
			if(REG_ID[i] == "00" || REG_ID[i] == "01" || REG_ID[i] == "06")
				regSelect += "<option value='"+REG_ID[i]+"'>"+eval("REG_NAME_"+lang)[i]+"</option>\n";
		}else if(local=="07"){
			if(REG_ID[i] == "00" || REG_ID[i] == "01")
				regSelect += "<option value='"+REG_ID[i]+"'>"+eval("REG_NAME_"+lang)[i]+"</option>\n";
		}
	}
	
	return regSelect;
}

function showCitySelect(lang,site,flag){
	var citySelect;
	var local;
	
	if(flag=="A")
		local = document.fareschedule.B_REG_ID.options[document.fareschedule.B_REG_ID.selectedIndex].value;
	else
		local = document.fareschedule.E_REG_ID.options[document.fareschedule.E_REG_ID.selectedIndex].value;
	
	for(var i=0; i<eval("AIRPORT_CODE_"+local).length; i++) {
		if(site=="hk" && eval("AIRPORT_CODE_"+local)[i] == "HKG")
			citySelect += "<option value='"+eval("AIRPORT_CODE_"+local)[i]+"' selected>"+eval("AIRPORT_NAME_"+local+"_"+lang)[i]+"</option>\n";
		else if(site=="ca" && eval("AIRPORT_CODE_"+local)[i] == "YVR")
			citySelect += "<option value='"+eval("AIRPORT_CODE_"+local)[i]+"' selected>"+eval("AIRPORT_NAME_"+local+"_"+lang)[i]+"</option>\n";
		else if(site=="nz" && eval("AIRPORT_CODE_"+local)[i] == "AKL")
			citySelect += "<option value='"+eval("AIRPORT_CODE_"+local)[i]+"' selected>"+eval("AIRPORT_NAME_"+local+"_"+lang)[i]+"</option>\n";
		else if(site=="eu" && lang=="DE" && eval("AIRPORT_CODE_"+local)[i] == "FRA")
			citySelect += "<option value='"+eval("AIRPORT_CODE_"+local)[i]+"' selected>"+eval("AIRPORT_NAME_"+local+"_"+lang)[i]+"</option>\n";
		else if(site=="eu" && lang=="GB" && eval("AIRPORT_CODE_"+local)[i] == "LHR")
			citySelect += "<option value='"+eval("AIRPORT_CODE_"+local)[i]+"' selected>"+eval("AIRPORT_NAME_"+local+"_"+lang)[i]+"</option>\n";
		else if(site=="sg" && eval("AIRPORT_CODE_"+local)[i] == "SIN")
			citySelect += "<option value='"+eval("AIRPORT_CODE_"+local)[i]+"' selected>"+eval("AIRPORT_NAME_"+local+"_"+lang)[i]+"</option>\n";
		else
			citySelect += "<option value='"+eval("AIRPORT_CODE_"+local)[i]+"'>"+eval("AIRPORT_NAME_"+local+"_"+lang)[i]+"</option>\n";
	}
	
	return citySelect;
}

function chrArrAirport(formNm,lang){
	var local = formNm.B_REG_ID.options[formNm.B_REG_ID.selectedIndex].value;
	
	for(var i=0; i<eval("AIRPORT_CODE_"+local).length; i++) 
		formNm.B_LOCATION_1.options[i] = new Option(eval("AIRPORT_NAME_"+local+"_"+lang)[i], eval("AIRPORT_CODE_"+local)[i]);
	
	formNm.B_LOCATION_1.length = i;
	
	var idx = 0;
	for(i=0; i<REG_ID.length; i++) {
		if(local=="00" || local=="01"){
			if(REG_ID[i] != local){
				formNm.E_REG_ID.options[idx] = new Option(eval("REG_NAME_"+lang)[i], REG_ID[i]);
				idx++;
			}
		}else if(local=="02" || local=="06"){
			if(REG_ID[i] != local && REG_ID[i] != "05" && REG_ID[i] != "07"){
				formNm.E_REG_ID.options[idx] = new Option(eval("REG_NAME_"+lang)[i], REG_ID[i]);
				idx++;
			}
		}else if(local=="03"){
			if(REG_ID[i] != local && REG_ID[i] != "04" && REG_ID[i] != "06" && REG_ID[i] != "07"){
				formNm.E_REG_ID.options[idx] = new Option(eval("REG_NAME_"+lang)[i], REG_ID[i]);
				idx++;
			}
		}else if(local=="04"){
			if(REG_ID[i] != local && REG_ID[i] != "03" && REG_ID[i] != "07"){
				formNm.E_REG_ID.options[idx] = new Option(eval("REG_NAME_"+lang)[i], REG_ID[i]);
				idx++;
			}
		}else if(local=="05"){
			if(REG_ID[i] == "00" || REG_ID[i] == "01" || REG_ID[i] == "06"){
				formNm.E_REG_ID.options[idx] = new Option(eval("REG_NAME_"+lang)[i], REG_ID[i]);
				idx++;
			}
		}else if(local=="07"){
			if(REG_ID[i] == "00" || REG_ID[i] == "01"){
				formNm.E_REG_ID.options[idx] = new Option(eval("REG_NAME_"+lang)[i], REG_ID[i]);
				idx++;
			}
		}
	}
	
	formNm.E_REG_ID.length = idx;
	chrDesAirport(formNm,lang);
}

function chrDesAirport(formNm,lang){
	var local = formNm.E_REG_ID.options[formNm.E_REG_ID.selectedIndex].value;
	
	for(var i=0; i<eval("AIRPORT_CODE_"+local).length; i++) 
		formNm.E_LOCATION_1.options[i] = new Option(eval("AIRPORT_NAME_"+local+"_"+lang)[i], eval("AIRPORT_CODE_"+local)[i]);
	
	formNm.E_LOCATION_1.length = i;
}

function showDomCity(flag){
	var citySelect;
	if(flag=="A"){
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(AIRPORT_CODE_00[i] == "GMP")
				citySelect += "<option value='"+AIRPORT_CODE_00[i]+"' selected>"+AIRPORT_NAME_00_GB[i]+"</option>\n";
			else
				citySelect += "<option value='"+AIRPORT_CODE_00[i]+"'>"+AIRPORT_NAME_00_GB[i]+"</option>\n";
		}
	}else{
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(GMP_ST[i] != "")
				citySelect += "<option value='"+AIRPORT_CODE_00[i]+"'>"+AIRPORT_NAME_00_GB[i]+"</option>\n";
		}
	}
	
	return citySelect;
}

var ICN_ST = new Array("","","PUS","CJU","","TAE","","","","","","","","");
var GMP_ST = new Array("","","PUS","CJU","KWJ","TAE","RSU","USN","KPO","HIN","","","YNY","");
var PUS_ST = new Array("ICN","GMP","","CJU","","","","","","","","","YNY","");
var CJU_ST = new Array("ICN","GMP","PUS","","KWJ","TAE","RSU","USN","","HIN","KUV","CJJ","YNY","WJU");
var KWJ_ST = new Array("","GMP","","CJU","","","","","","","","","YNY","");
var TAE_ST = new Array("ICN","GMP","","CJU","","","","","","","","","YNY","");
var RSU_ST = new Array("","GMP","","CJU","","","","","","","","","YNY","");
var USN_ST = new Array("","GMP","","CJU","","","","","","","","","","");
var KPO_ST = new Array("","GMP","","","","","","","","","","","","");
var HIN_ST = new Array("","GMP","","CJU","","","","","","","","","YNY","");
var KUV_ST = new Array("","","","CJU","","","","","","","","","","");
var CJJ_ST = new Array("","","","CJU","","","","","","","","","","");
var YNY_ST = new Array("","GMP","PUS","CJU","KWJ","TAE","RSU","","","","","","","");
var WJU_ST = new Array("","","","CJU","","","","","","","","","","");

function chrDomCity(formNm){
	var selectedcity = formNm.orgCityCode.options[formNm.orgCityCode.selectedIndex].value;
	
	var idx = 0;
	if( selectedcity == 'GMP' ){
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(GMP_ST[i] != ""){
				formNm.destCityCode.options[idx] = new Option(AIRPORT_NAME_00_GB[i], AIRPORT_CODE_00[i]);
				idx++;
			}
		}
	} else if( selectedcity == 'ICN' ){
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(ICN_ST[i] != ""){
				formNm.destCityCode.options[idx] = new Option(AIRPORT_NAME_00_GB[i], AIRPORT_CODE_00[i]);
				idx++;
			}
		}
	} else if( selectedcity == 'KWJ' ){
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(KWJ_ST[i] != ""){
				formNm.destCityCode.options[idx] = new Option(AIRPORT_NAME_00_GB[i], AIRPORT_CODE_00[i]);
				idx++;
			}
		}       		
	} else if( selectedcity == 'KUV' ){
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(KUV_ST[i] != ""){
				formNm.destCityCode.options[idx] = new Option(AIRPORT_NAME_00_GB[i], AIRPORT_CODE_00[i]);
				idx++;
			}
		}
	} else if( selectedcity == 'TAE' ){
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(TAE_ST[i] != ""){
				formNm.destCityCode.options[idx] = new Option(AIRPORT_NAME_00_GB[i], AIRPORT_CODE_00[i]);
				idx++;
			}
		}
	} else if( selectedcity == 'PUS' ){
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(PUS_ST[i] != ""){
				formNm.destCityCode.options[idx] = new Option(AIRPORT_NAME_00_GB[i], AIRPORT_CODE_00[i]);
				idx++;
			}
		}
	} else if( selectedcity == 'YNY' ){
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(YNY_ST[i] != ""){
				formNm.destCityCode.options[idx] = new Option(AIRPORT_NAME_00_GB[i], AIRPORT_CODE_00[i]);
				idx++;
			}
		}
	} else if( selectedcity == 'RSU' ){
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(RSU_ST[i] != ""){
				formNm.destCityCode.options[idx] = new Option(AIRPORT_NAME_00_GB[i], AIRPORT_CODE_00[i]);
				idx++;
			}
		}
	} else if( selectedcity == 'USN' ){
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(USN_ST[i] != ""){
				formNm.destCityCode.options[idx] = new Option(AIRPORT_NAME_00_GB[i], AIRPORT_CODE_00[i]);
				idx++;
			}
		}
	} else if( selectedcity == 'WJU' ){
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(WJU_ST[i] != ""){
				formNm.destCityCode.options[idx] = new Option(AIRPORT_NAME_00_GB[i], AIRPORT_CODE_00[i]);
				idx++;
			}
		}
	} else if( selectedcity == 'CJU' ){
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(CJU_ST[i] != ""){
				formNm.destCityCode.options[idx] = new Option(AIRPORT_NAME_00_GB[i], AIRPORT_CODE_00[i]);
				idx++;
			}
		}
	} else if( selectedcity == 'HIN' ){
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(HIN_ST[i] != ""){
				formNm.destCityCode.options[idx] = new Option(AIRPORT_NAME_00_GB[i], AIRPORT_CODE_00[i]);
				idx++;
			}
		}
	} else if( selectedcity == 'CJJ' ){
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(CJJ_ST[i] != ""){
				formNm.destCityCode.options[idx] = new Option(AIRPORT_NAME_00_GB[i], AIRPORT_CODE_00[i]);
				idx++;
			}
		}
	} else {
		for(var i=0; i<AIRPORT_CODE_00.length; i++) {
			if(KPO_ST[i] != ""){
				formNm.destCityCode.options[idx] = new Option(AIRPORT_NAME_00_GB[i], AIRPORT_CODE_00[i]);
				idx++;
			}
		}
	}
	
	formNm.destCityCode.length = idx;
}

//Calendar
var now;
var firstyear; 
var lastyear;  

var n_day;
var n_month;
var n_year;
var s_day;
var s_month;
var s_year;
var daycell=new Array();
var cellyear=new Array();
var cellmonth=new Array();
var cellday=new Array();
var n;
var objMon;
var objDay;
var l_name;
var month_arr2 = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");

var lastDay = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
function getLastDay(month,year)
{
	if(year%4==0 && year%100!=0)//works until 2400-Y2.4K is another problem.
	{
		lastDay[1]=29;
	}
	else
	{
		lastDay[1]=28;
	}
	return lastDay[month];
}


function showweek(daychk)
{
alert(daychk);
	if(daychk == "B_DAY")
	{
			var dday=new Array('Sunday','Monday','Tuesday','Wednesday ','Thursday ','Friday','Saturday ');
			var b_year = parseInt((document.fareschedule.B_MONTH.value).substring(0,4));
			var b_month = (document.fareschedule.B_MONTH.value).substring(4,6);
			if(b_month.substring(0,1) == "0")
			{
			b_month = parseInt(b_month.substring(1,2));
			}
			var b_day = document.fareschedule.B_DAY.value;
			if(b_day.substring(0,1) == "0")
			{
			b_day = parseInt(b_day.substring(1,2));
			}													
			
			var b_date = new Date(b_year,b_month-1,b_day);
			var b_weekday = b_date.getDay();													
			
			b_weekshow.innerHTML = dday[b_weekday];
	}
	else
	{
		var dday1=new Array('Sunday','Monday','Tuesday','Wednesday ','Thursday ','Friday','Saturday ');
		var e_year = parseInt((document.fareschedule.E_MONTH.value).substring(0,4));
			var e_month = (document.fareschedule.E_MONTH.value).substring(4,6);
alert(dday1+", "+e_year+", "+e_month);
			if(e_month.substring(0,1) == "0")
			{
			e_month = parseInt(e_month.substring(1,2));
			}
			var e_day = document.fareschedule.E_DAY.value;
			if(e_day.substring(0,1) == "0")
			{
			e_day = parseInt(e_day.substring(1,2));
			}													
		
		var e_date = new Date(e_year,e_month-1,e_day);
		var e_weekday = e_date.getDay();													
		
		e_weekshow.innerHTML = dday1[e_weekday];	
	}
}
function setDay(mon)
{

	if(document.getElementById("fareschedule")==null)
	{
	var theForm = document.f1;
	}
	else
	{
	var theForm = document.fareschedule;
	}

	var objMonth;
	var objDay;
	if(objMon.name.indexOf("B_")!=-1)
	{
		objMonth = theForm.B_MONTH;
		objDay = theForm.B_DAY;
	}
	else
	{
		if(theForm.E_MONTH)
		{
			objMonth = theForm.E_MONTH;
		}
		else
		{
			objMonth = theForm.mon2;
		}
		objDay = theForm.E_DAY;
	}
	var mm = eval(mon.substring(4,6));
	var yy = objMonth.value.substring(0,4);
	var lastD = getLastDay(mm-1, yy);
	if(iMM>mm)
	{
		iYYYY = date.getFullYear()+1;
	}
	else
	{
		iYYYY = date.getFullYear();
	}
	if(theForm.selectedYYYY)
	{
		theForm.selectedYYYY.value = iYYYY;

	objDay.options.length = lastD;

	for(var i=0; i<lastD; i++)
	{
		if(i<9)
		{
			var tmp = i+1;
			objDay.options[i].text = "0"+tmp;
			objDay.options[i].value = "0"+tmp;
		}
		else
		{
			objDay.options[i].text = i+1;
			objDay.options[i].value = i+1;
		}
	}
	objDay.selectedIndex = 0;
	}
}

function message(cell)
{
	if(l_name=="usbank"){
		strmon=(cellmonth[cell]+1).toString();
		if (strmon.length==1){strmon="0"+strmon}
		strday=(cellday[cell]+1).toString();
		if (strday.length==1){strday="0"+strday}
		objMon.value = strmon+"/"+strday+"/"+cellyear[cell];
	}else{
		objMon.selectedIndex = cellmonth[cell];
		setDay(objMon.value);
		objDay.selectedIndex = cellday[cell];
		
		if(objDay.name!="E_DAY")
		{
			setReturnDay(document.fareschedule)
		}
	}
	nonDisplayLayer(l_name);
	if(objDay&&booking_cur.indexOf("tp_bo.")!=-1)
	{
//		showweek(objDay.name)
		showweek("B_DAY")
		showweek("E_DAY")
	}
}

function calendar(obj_Mon,obj_Day,lname,lname2)
{
	nonDisplayLayer(lname2);

	now     = new Date();
	s_day   = now.getDate();
	s_month = now.getMonth();
	s_year  = now.getFullYear();
	n_day = now.getDate();
	n_month = now.getMonth();
	n_year = now.getFullYear();

	firstyear=now.getFullYear();
	lastyear=now.getFullYear()+2;


	objMon = obj_Mon;
	objDay = obj_Day;
	l_name = lname;

	var calobj = "";
	calobj+="<table border='0' cellspacing='0' cellpadding='0' bgcolor=#FFFFFF>";
	calobj+="<tr><td bgcolor=#E7E7E7>";
	calobj+="<table border='0' cellspacing='0' cellpadding='0' align='center'>";
	calobj+="<tr><td style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'>";
	calobj+="<a href='javascript:gobackmonth();updatecalendar()'><<</a></td>";
	calobj+="<td id='dateText' name='dateText' align='center' width=70% style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'></td>";
	calobj+="<td style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'><a href='javascript:goonmonth();updatecalendar()'>>></a></td></tr></table></td></tr><tr><td>";


	calobj+="<table border=1 cellpadding=1 cellspacing=0 bordercolor=#D7E3EE>";
	calobj+="<tr><td><table border=0 align=center cellpadding=1 cellspacing=0>";
	calobj+="<tr align='center'>";
	calobj+="<td width='14%' bgcolor=#F0F4FB style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'>S</td>";
	calobj+="<td width='14%' bgcolor=#F0F4FB style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'>M</td>";
	calobj+="<td width='14%' bgcolor=#F0F4FB style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'>T</td>";
	calobj+="<td width='14%' bgcolor=#F0F4FB style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'>W</td>";
	calobj+="<td width='14%' bgcolor=#F0F4FB style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'>T</td>";
	calobj+="<td width='14%' bgcolor=#F0F4FB style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'>F</td>";
	calobj+="<td width='14%' bgcolor=#F0F4FB style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'>S</td>";
	calobj+="</tr>";

	var calcell = "";
	for (calcell=0;calcell<6;calcell++)
	{ 
		calobj+="<tr align='center'>";
		calobj+="<td width='14%' id=cal"+(calcell*7)+" name=cal"+(calcell*7)+" style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'></td>";
		calobj+="<td width='14%' id=cal"+(calcell*7+1)+" id=cal"+(calcell*7+1)+" style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'></td>";
		calobj+="<td width='14%' id=cal"+(calcell*7+2)+" id=cal"+(calcell*7+2)+" style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'></td>";
		calobj+="<td width='14%' id=cal"+(calcell*7+3)+" id=cal"+(calcell*7+3)+" style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'></td>";
		calobj+="<td width='14%' id=cal"+(calcell*7+4)+" id=cal"+(calcell*7+4)+" style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'></td>";
		calobj+="<td width='14%' id=cal"+(calcell*7+5)+" id=cal"+(calcell*7+5)+" style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'></td>";
		calobj+="<td width='14%' id=cal"+(calcell*7+6)+" id=cal"+(calcell*7+6)+" style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'></td></tr>";                 
	}
	calobj+="</table></td></tr></table>";
	calobj+="<tr><td align='center' bgcolor=#E7E7E7 style='font-size: 10px;  font-family:  Verdana, Arial, Helvetica, sans-serif;  color: #939393;  line-height: 16px;'><a href=\\\"javascript:nonDisplayLayer('"+lname+"');\\\">Close</a>";
	calobj+="</td></tr></table>";

	showLayer(lname);
	if (document.all) 
		eval('document.getElementById("'+lname+'").innerHTML="'+calobj+'"'); 
	else	
		eval('document.getElementById("'+lname+'").innerHTML="'+calobj+'"'); 
	//document.write(calobj);

	daycell[0]=document.getElementById('cal0');
	daycell[1]=document.getElementById('cal1');
	daycell[2]=document.getElementById('cal2');
	daycell[3]=document.getElementById('cal3');
	daycell[4]=document.getElementById('cal4');
	daycell[5]=document.getElementById('cal5');
	daycell[6]=document.getElementById('cal6');
	daycell[7]=document.getElementById('cal7');
	daycell[8]=document.getElementById('cal8');
	daycell[9]=document.getElementById('cal9');
	daycell[10]=document.getElementById('cal10');
	daycell[11]=document.getElementById('cal11');
	daycell[12]=document.getElementById('cal12');
	daycell[13]=document.getElementById('cal13');
	daycell[14]=document.getElementById('cal14');
	daycell[15]=document.getElementById('cal15');
	daycell[16]=document.getElementById('cal16');
	daycell[17]=document.getElementById('cal17');
	daycell[18]=document.getElementById('cal18');
	daycell[19]=document.getElementById('cal19');
	daycell[20]=document.getElementById('cal20');
	daycell[21]=document.getElementById('cal21');
	daycell[22]=document.getElementById('cal22');
	daycell[23]=document.getElementById('cal23');
	daycell[24]=document.getElementById('cal24');
	daycell[25]=document.getElementById('cal25');
	daycell[26]=document.getElementById('cal26');
	daycell[27]=document.getElementById('cal27');
	daycell[28]=document.getElementById('cal28');
	daycell[29]=document.getElementById('cal29');
	daycell[30]=document.getElementById('cal30');
	daycell[31]=document.getElementById('cal31');
	daycell[32]=document.getElementById('cal32');
	daycell[33]=document.getElementById('cal33');
	daycell[34]=document.getElementById('cal34');
	daycell[35]=document.getElementById('cal35');
	daycell[36]=document.getElementById('cal36');
	daycell[37]=document.getElementById('cal37');
	daycell[38]=document.getElementById('cal38');
	daycell[39]=document.getElementById('cal39');
	daycell[40]=document.getElementById('cal40');
	daycell[41]=document.getElementById('cal41');

	updatecalendar();
	
}

function updatecalendar()
{
	var firstOfMonth = new Date (s_year, s_month, 1);
	var relDate  = new Date (n_year, n_month, 352+n_day);
	
	var startingPos = firstOfMonth.getDay();
	var curday=1;
	var days=monthdays(s_month,s_year);
	var prevdays=monthdays(s_month-1,s_year);
	var str;
	var p_year;
	if (s_month==n_month)
		p_year = s_year+1;
	else
		p_year = s_year

	for (n=0;n<42;n++)
	{
		if (startingPos==n)
		{
			if (s_month==n_month && curday==n_day)
			{
				str=curday;
				daycell[n].innerHTML="<font color='#8B1D20'><span onclick=message("+n+"); onMouseOver=\"this.style.background='#E4EDDF'\" onMouseOut=\"this.style.background='#FFFFFF'\">"+str.toString()+"</span></font>";
				daycell[n].style.cursor="pointer";
			}
			else
			{
				if((s_month==n_month && curday<n_day && curday+13-n_day>0) || (s_month!=n_month && s_month==relDate.getMonth() && curday>relDate.getDate())){
					daycell[n].innerHTML=curday;
					daycell[n].style.cursor="";
				}else{
					daycell[n].innerHTML="<span onclick=message("+n+"); onMouseOver=\"this.style.background='#E4EDDF'\" onMouseOut=\"this.style.background='#FFFFFF'\">"+curday+"</span>";
					daycell[n].style.cursor="pointer";
				}
			}
			setday(n,s_month,s_year,curday);
			startingPos++;
			curday++;
		}
		else
		{	
			if (startingPos==66)
			{
				setday(n,s_month+1,s_year,curday);
				str=curday;
				curday++;

				var t_month = s_month+1;
				if (t_month==12) t_month=0;
				
				if(n_month==t_month && str<n_day && curday+13-n_day>0){
					daycell[n].innerHTML="<font color='#cccccc'>"+str.toString()+"</font>";
					daycell[n].style.cursor="";
				}else{
					daycell[n].innerHTML="<font color='#cccccc'><span onclick=message("+n+"); onMouseOver=\"this.style.background='#E4EDDF'\" onMouseOut=\"this.style.background='#FFFFFF'\">"+str.toString()+"</span></font>";
					daycell[n].style.cursor="pointer";
				}
			}
			else
			{
				setday(n,s_month-1,p_year,prevdays-startingPos+n+1);
				str=prevdays-startingPos+n+1;
				
				var t_month = s_month-1;
				if (t_month==-1) t_month=11;

				if(t_month==relDate.getMonth() && str>relDate.getDate()){
					daycell[n].innerHTML="<font color='#cccccc'>"+str.toString()+"</font>";
					daycell[n].style.cursor="";
				}else{
					daycell[n].innerHTML="<font color='#cccccc'><span onclick=message("+n+"); onMouseOver=\"this.style.background='#E4EDDF'\" onMouseOut=\"this.style.background='#FFFFFF'\">"+str.toString()+"</span></font>";
					daycell[n].style.cursor="pointer";
				}
			}
		}

		if (curday>days){
			curday=1;
			startingPos=66;
		}
	}

	document.getElementById('dateText').innerHTML=month_arr2[s_month]+" "+s_year;
}

function setday(cell,s_month,s_year,s_day)
{

	s_month++;
	if (s_month==13){s_month=1;s_year++;}
	if (s_month==0){s_month=12;s_year--;}

	cellyear[cell]=s_year;
	cellmonth[cell]=s_month-1;
	cellday[cell]=s_day-1;
}

function monthdays(s_month,s_year)  {
	var days;
	if (s_month==0 || s_month==2 || s_month==4 || s_month==6 || s_month==7 || s_month==9 || s_month==11 || s_month==-1 || s_month==12)  days=31;
	else if (s_month==3 || s_month==5 || s_month==8 || s_month==10) days=30;
	else if (s_month==1)  {
		if (leapyear(s_year)) { days=29; }
		else { days=28; }
	}
	return (days);
}

function leapyear (Year) {
	if (((Year % 4)==0) && ((Year % 100)!=0) || ((Year % 400)==0)) {
		return (true);
	} else { return (false); }
}

function goonmonth()
{
	s_month++;
	if (s_month==12 && n_month !=0)
	{
		s_month=0;
		goonyear();
	}
	else if (s_month==12 && n_month ==0)
		s_month=0;
	else if(s_month==n_month)
		gobackyear();
}

function goonyear()
{
	s_year++;
	if (s_year==lastyear){s_year=firstyear;}
}

function gobackmonth()
{
	s_month--;
	if (s_month==-1 && n_month !=0)
	{
		s_month=11;
		gobackyear();
	}
	else if (s_month==-1 && n_month ==0)
		s_month=11;
	else if(n_month-s_month==1)
		goonyear();
}

function gobackyear()
{
	s_year--;
	if (s_year<firstyear){s_year=lastyear-1;}
}

function nonDisplayLayer(lname) {
	var nowurl = document.URL.toString();
	
	if(nowurl.indexOf("_tp_sd")>-1)
	{
	document.all.f1.mon2.style.visibility = "visible"; 
	}
	if (document.all){
		eval('document.getElementById("'+lname+'").style.display="none"');
		eval('document.getElementById("'+lname+'").innerHTML=""');
	}else{
		eval('document.getElementById("'+lname+'").visibility="hide"');
		eval('document.getElementById("'+lname+'").innerHTML=""');
	}
}
function setDestCity_gweb(theForm){
	if(booking_cur.indexOf("/kr/")!=-1||booking_cur.indexOf("/index_kr_")!=-1)
	{
setRegion(theForm.E_REG_ID, 'KOR', theForm.destCityCode, 'PUS','RSV', '20090806', 'true',theForm.B_REG_ID[theForm.B_REG_ID.selectedIndex].value);

		if(theForm.orgCityCode.value == 'GMP')
		{
			for (i=theForm.destCityCode.length-1; i>=0;i--)
			{
				if(('/KWJ/PUS/RSU/USN/CJU/HIN/KPO/').indexOf("/"+theForm.destCityCode.options[i].value+"/")==-1) theForm.destCityCode.remove(i);			}
		}
		else if(theForm.orgCityCode.value == 'KWJ')
		{
			for (i=theForm.destCityCode.length-1; i>=0;i--)
			{
				if(('/GMP/CJU/').indexOf("/"+theForm.destCityCode.options[i].value+"/")==-1) theForm.destCityCode.remove(i);
			}
//			theForm.destCityCode[theForm.destCityCode.length] = new Option("Seoul/Incheon(ICN)","ICN");
		}
		else if(theForm.orgCityCode.value == 'KUV')
		{
			for (i=theForm.destCityCode.length-1; i>=0;i--)
			{
				if(('/CJU/').indexOf("/"+theForm.destCityCode.options[i].value+"/")==-1) theForm.destCityCode.remove(i);
			}
		}
		else if(theForm.orgCityCode.value == 'TAE')
		{
			for (i=theForm.destCityCode.length-1; i>=0;i--)
			{
				if(('/CJU/ICN/').indexOf("/"+theForm.destCityCode.options[i].value+"/")==-1) theForm.destCityCode.remove(i);
			}
		}
		else if(theForm.orgCityCode.value == 'PUS')
		{
			for (i=theForm.destCityCode.length-1; i>=0;i--)
			{
				if(('/GMP/ICN/CJU/').indexOf("/"+theForm.destCityCode.options[i].value+"/")==-1) theForm.destCityCode.remove(i);
			}
		}
		else if(theForm.orgCityCode.value == 'ICN')
		{
//			var icn_cnt;
			for (i=theForm.destCityCode.length-1; i>=0;i--)
			{
				if(('/TAE/PUS/').indexOf("/"+theForm.destCityCode.options[i].value+"/")==-1) theForm.destCityCode.remove(i);
			}
//			theForm.destCityCode[theForm.destCityCode.length] = new Option("Gwangju(KWJ)","KWJ");
//			theForm.destCityCode[theForm.destCityCode.length] = new Option("Yeosu(RSU)","RSU");
		}
		else if(theForm.orgCityCode.value == 'RSU')
		{
			for (i=theForm.destCityCode.length-1; i>=0;i--)
			{
				if(('/GMP/CJU/').indexOf("/"+theForm.destCityCode.options[i].value+"/")==-1) theForm.destCityCode.remove(i);
			}
//			theForm.destCityCode[theForm.destCityCode.length] = new Option("Seoul/Incheon(ICN)","ICN");
		}
		else if(theForm.orgCityCode.value == 'USN')
		{
			for (i=theForm.destCityCode.length-1; i>=0;i--)
			{
				if(('/GMP/CJU/').indexOf("/"+theForm.destCityCode.options[i].value+"/")==-1) theForm.destCityCode.remove(i);
			}
		}
		else if(theForm.orgCityCode.value == 'WJU')
		{
			for (i=theForm.destCityCode.length-1; i>=0;i--)
			{
				if(('/CJU/').indexOf("/"+theForm.destCityCode.options[i].value+"/")==-1) theForm.destCityCode.remove(i);
			}
		}
		else if(theForm.orgCityCode.value == 'CJU')
		{
			for (i=theForm.destCityCode.length-1; i>=0;i--)
			{
				if(('/KWJ/KUV/TAE/PUS/GMP/RSU/USN/WJU/HIN/CJJ/').indexOf("/"+theForm.destCityCode.options[i].value+"/")==-1) theForm.destCityCode.remove(i);			}
		}
		else if(theForm.orgCityCode.value == 'HIN')
		{
			for (i=theForm.destCityCode.length-1; i>=0;i--)
			{
				if(('/GMP/CJU/').indexOf("/"+theForm.destCityCode.options[i].value+"/")==-1) theForm.destCityCode.remove(i);
			}
		}
		else if(theForm.orgCityCode.value == 'CJJ')
		{
			for (i=theForm.destCityCode.length-1; i>=0;i--)
			{
				if(('/CJU/').indexOf("/"+theForm.destCityCode.options[i].value+"/")==-1) theForm.destCityCode.remove(i);
			}
		}
		else if(theForm.orgCityCode.value == 'KPO')
		{
			for (i=theForm.destCityCode.length-1; i>=0;i--)
			{
				if(('/GMP/').indexOf("/"+theForm.destCityCode.options[i].value+"/")==-1) theForm.destCityCode.remove(i);
			}
		}
	}
	else
	{
	if(theForm.B_LOCATION_1.value == 'LAX' &&theForm.E_REG_ID.value=='USA'){
	  for (i=theForm.E_LOCATION_1.length-1; i>=0;i--){
	    if(theForm.E_LOCATION_1.options[i].value != 'GRU') theForm.E_LOCATION_1.remove(i);
	  }
	}
	else if(theForm.B_LOCATION_1.value == 'GRU' &&theForm.E_REG_ID.value=='USA'){
	  for (i=theForm.E_LOCATION_1.length-1; i>=0;i--){
	    if(theForm.E_LOCATION_1.options[i].value != 'LAX') theForm.E_LOCATION_1.remove(i);
	  }
	}
	else if(theForm.B_LOCATION_1.value == 'AMS' &&theForm.E_REG_ID.value=='EUR'){
	  for (i=theForm.E_LOCATION_1.length-1; i>=0;i--){
	    if(theForm.E_LOCATION_1.options[i].value != 'MAD') theForm.E_LOCATION_1.remove(i);
	  }
	}
	else if(theForm.B_LOCATION_1.value == 'MAD' &&theForm.E_REG_ID.value=='EUR'){
	  for (i=theForm.E_LOCATION_1.length-1; i>=0;i--){
	    if(theForm.E_LOCATION_1.options[i].value != 'AMS') theForm.E_LOCATION_1.remove(i);
	  }
	}
	else if(theForm.B_LOCATION_1.value == 'VIE' &&theForm.E_REG_ID.value=='EUR'){
	  for (i=theForm.E_LOCATION_1.length-1; i>=0;i--){
	    if(theForm.E_LOCATION_1.options[i].value != 'ZRH') theForm.E_LOCATION_1.remove(i);
	  }
	}
	else if(theForm.B_LOCATION_1.value == 'ZRH' &&theForm.E_REG_ID.value=='EUR'){
	  for (i=theForm.E_LOCATION_1.length-1; i>=0;i--){
	    if(theForm.E_LOCATION_1.options[i].value != 'VIE') theForm.E_LOCATION_1.remove(i);
	  }
	}
	if(booking_cur.indexOf("/na/")==-1)
	{
		if(theForm.B_REG_ID.value=="USA"&&theForm.E_REG_ID.value=="OCE")
		{
			var i;
			for(i=theForm.E_LOCATION_1.length; i>0; i--)
			{
				if(theForm.E_LOCATION_1.options[i-1].value == 'GUM') theForm.E_LOCATION_1.remove(i-1);
			}
		}
	}
	}
}
function chkERegion(theForm, site, lang)
{
	if(booking_cur.indexOf("/na/")==-1)
	{
		if(theForm.B_LOCATION_1.value=="GUM")
		{
			var i;
			for(i=theForm.E_REG_ID.length; i>0; i--)
			{
				if(theForm.E_REG_ID.options[i-1].value == 'USA') theForm.E_REG_ID.remove(i-1);
			}
		}
		else
		{
			if(theForm.E_REG_ID.length<=6)
			{
				if(lang=='KO')
				{
					theForm.E_REG_ID.options[theForm.E_REG_ID.length] = new Option('미주', 'USA');
				}
				else if(lang=='EN')
				{
					theForm.E_REG_ID.options[theForm.E_REG_ID.length] = new Option('Americas', 'USA');
				}
				else if(lang=='JP')
				{
					theForm.E_REG_ID.options[theForm.E_REG_ID.length] = new Option('アメリカ大陸', 'USA');
				}
				else if(lang=='TW')
				{
					theForm.E_REG_ID.options[theForm.E_REG_ID.length] = new Option('美洲', 'USA');
				}
				else if(lang=='CN')
				{
					theForm.E_REG_ID.options[theForm.E_REG_ID.length] = new Option('美洲', 'USA');
				}
				else if(lang=='FR')
				{
					theForm.E_REG_ID.options[theForm.E_REG_ID.length] = new Option('Amérique', 'USA');
				}
				else if(lang=='DE')
				{
					theForm.E_REG_ID.options[theForm.E_REG_ID.length] = new Option('Amerika', 'USA');
				}
				else
				{
					theForm.E_REG_ID.options[theForm.E_REG_ID.length] = new Option('Americas', 'USA');
				}
			}
		}
	}
}