
function setCountry(dc){	
	var dest = dc;
	var cnt =0;
	
	this.document.sForm.p_country.options.length = 1;
	if(dest != ""){
		for( i=0; i < countryList.length; i++){
			if (countryList[i].dest == dest){
				cnt = cnt +1;
				this.document.sForm.p_country.options[cnt] = new Option(countryList[i].name, countryList[i].code);
			}
		}
   	}
	   	
	this.document.sForm.p_country.options.length = cnt+1;
	this.document.sForm.p_country.selectedIndex = 0;
//	this.document.sForm.p_city.options.length = 1;
//	this.document.sForm.p_city.selectedIndex = 0;

}


//function setCity(cc ){
//	var country = cc;
//	var cnt =0;
//	
//	this.document.sForm.p_city.options.length = 1;
//	if(country != ""){
//		for(i=0; i< cityList.length; i++){
//			if (cityList[i].country == country ){
//				cnt = cnt +1;
//				this.document.sForm.p_city.options[cnt]=new Option(cityList[i].name, cityList[i].code);
//			}
//		}
//	}
//	this.document.sForm.p_city.options.length = cnt+1;
//	this.document.sForm.p_city.selectedIndex = 0;
//}
//
//function setCityV(){
//	var num = document.sForm.p_city.selectedIndex;
//	var city = document.sForm.p_city.options[num].value;
//}

function setGroup(gc){	
	var group = gc;
	var cnt =0;
	
	this.document.sForm.p_country.options.length = 1;
	if(group != ""){
		for( i=0; i < countryList.length; i++){
			if (countryList[i].group == group){
				cnt = cnt +1;
				this.document.sForm.p_country.options[cnt] = new Option(countryList[i].name, countryList[i].code);
			}
		}
   	}
	   	
	this.document.sForm.p_country.options.length = cnt+1;
	this.document.sForm.p_country.selectedIndex = 0;
//	this.document.sForm.p_city.options.length = 1;
//	this.document.sForm.p_city.selectedIndex = 0;

}


//list
function destRec(naigai, code, name){
	this.naigai = naigai;
	this.code = code;
	this.name = name;
	return
}

function makeArray(n){
	this.length=n;
	for(var i=1; i<=n; i++)
	this[i]=null;
	return this;
}

function countryRec(dest, code, name, group){
	this.dest = dest;
	this.code = code;
	this.name = name;
	this.group = group;
}

//function cityRec(country, code, name){
//	this.country = country;
//	this.code = code;
//	this.name = name;
//}

var i ;
var destList=new makeArray();
i = 0;
destList[i++] =new destRec('W','HWI','ハワイ');
destList[i++] =new destRec('W','MNA','ミクロネシア');
destList[i++] =new destRec('W','AAS','アジア');
destList[i++] =new destRec('W','BEU','ヨーロッパ');
destList[i++] =new destRec('W','DNU','北アメリカ');
destList[i++] =new destRec('W','ESU','南アメリカ');
destList[i++] =new destRec('W','FOC','オセアニア');
destList[i++] =new destRec('W','CAF','アフリカ');
destList[i++] =new destRec('W','CHT','中近東');
destList.length =9;

var countryList=new makeArray();
i = 0;
countryList[i++] =new countryRec('AAS','CN','中国');
countryList[i++] =new countryRec('AAS','HK','香港');
countryList[i++] =new countryRec('AAS','ID','インドネシア');
countryList[i++] =new countryRec('AAS','IN','インド');
countryList[i++] =new countryRec('AAS','KH','カンボジア');
countryList[i++] =new countryRec('AAS','KR','韓国');
countryList[i++] =new countryRec('AAS','LK','スリランカ');
countryList[i++] =new countryRec('AAS','MM','ミャンマー');
countryList[i++] =new countryRec('AAS','MN','モンゴル');
countryList[i++] =new countryRec('AAS','MO','マカオ');
countryList[i++] =new countryRec('AAS','MV','モルディブ');
countryList[i++] =new countryRec('AAS','MY','マレーシア');
countryList[i++] =new countryRec('AAS','NP','ネパール');
countryList[i++] =new countryRec('AAS','PH','フィリピン');
countryList[i++] =new countryRec('AAS','SG','シンガポール');
countryList[i++] =new countryRec('AAS','TH','タイ');
countryList[i++] =new countryRec('AAS','TW','台湾');
countryList[i++] =new countryRec('AAS','UZ','ウズベキスタン');
countryList[i++] =new countryRec('AAS','VN','ベトナム');

countryList[i++] =new countryRec('BEU','UA','ウクライナ','b1');
countryList[i++] =new countryRec('BEU','SK','スロバキア','b1');
countryList[i++] =new countryRec('BEU','MT','マルタ','b1');
countryList[i++] =new countryRec('BEU','PL','ポーランド','b1');
countryList[i++] =new countryRec('BEU','PT','ポルトガル','b1');
countryList[i++] =new countryRec('BEU','RO','ルーマニア','b1');
countryList[i++] =new countryRec('BEU','RU','ロシア連邦','b1');
countryList[i++] =new countryRec('BEU','SE','スウェーデン','b3');
countryList[i++] =new countryRec('BEU','NL','オランダ','b3');
countryList[i++] =new countryRec('BEU','NO','ノルウェー','b3');
countryList[i++] =new countryRec('BEU','MC','モナコ','b3');
countryList[i++] =new countryRec('BEU','LT','リトアニア','b1');
countryList[i++] =new countryRec('BEU','LU','ルクセンブルグ','b3');
countryList[i++] =new countryRec('BEU','LV','ラトビア','b1');
countryList[i++] =new countryRec('BEU','LI','リヒテンシュタイン','b1');
countryList[i++] =new countryRec('BEU','IS','アイスランド','b3');
countryList[i++] =new countryRec('BEU','IT','イタリア','b2');
countryList[i++] =new countryRec('BEU','IE','アイルランド','b2');
countryList[i++] =new countryRec('BEU','HR','クロアチア','b1');
countryList[i++] =new countryRec('BEU','HU','ハンガリー','b1');
countryList[i++] =new countryRec('BEU','CH','スイス','b2');
countryList[i++] =new countryRec('BEU','AT','オーストリア','b1');
countryList[i++] =new countryRec('BEU','BE','ベルギー','b1');
countryList[i++] =new countryRec('BEU','BG','ブルガリア','b1');
countryList[i++] =new countryRec('BEU','CZ','チェコ','b1');
countryList[i++] =new countryRec('BEU','DE','ドイツ','b2');
countryList[i++] =new countryRec('BEU','DK','デンマーク','b3');
countryList[i++] =new countryRec('BEU','EE','エストニア','b1');
countryList[i++] =new countryRec('BEU','ES','スペイン','b3');
countryList[i++] =new countryRec('BEU','FI','フィンランド','b3');
countryList[i++] =new countryRec('BEU','FR','フランス','b2');
countryList[i++] =new countryRec('BEU','GB','イギリス','b2');
countryList[i++] =new countryRec('BEU','GR','ギリシャ','b3');

countryList[i++] =new countryRec('CAF','EG','エジプト');
countryList[i++] =new countryRec('CAF','BW','ボツワナ');
countryList[i++] =new countryRec('CAF','KE','ケニア');
countryList[i++] =new countryRec('CAF','MA','モロッコ');
countryList[i++] =new countryRec('CAF','NA','ナミビア');
countryList[i++] =new countryRec('CAF','TN','チュニジア');
countryList[i++] =new countryRec('CAF','ZA','南アフリカ');
countryList[i++] =new countryRec('CAF','ZW','ジンバブエ');
countryList[i++] =new countryRec('CAF','MU','モーリシャス');

countryList[i++] =new countryRec('CHT','TR','トルコ');
countryList[i++] =new countryRec('CHT','SY','シリア');
countryList[i++] =new countryRec('CHT','LY','リビア');
countryList[i++] =new countryRec('CHT','LB','レバノン');
countryList[i++] =new countryRec('CHT','JO','ヨルダン');
countryList[i++] =new countryRec('CHT','IR','イラン');
countryList[i++] =new countryRec('CHT','AE','アラブ首長国連邦');

countryList[i++] =new countryRec('DNU','CU','キューバ');
countryList[i++] =new countryRec('DNU','CA','カナダ');
countryList[i++] =new countryRec('DNU','AK','アラスカ');
countryList[i++] =new countryRec('DNU','GT','グァテマラ');
countryList[i++] =new countryRec('DNU','MX','メキシコ');
countryList[i++] =new countryRec('DNU','US','アメリカ合衆国');

countryList[i++] =new countryRec('ESU','PE','ペルー');
countryList[i++] =new countryRec('ESU','AR','アルゼンチン');
countryList[i++] =new countryRec('ESU','BR','ブラジル');

countryList[i++] =new countryRec('FOC','AU','オーストラリア');
countryList[i++] =new countryRec('FOC','PF','タヒチ');
countryList[i++] =new countryRec('FOC','PG','パプアニューギニア');
countryList[i++] =new countryRec('FOC','NZ','ニュージーランド');
countryList[i++] =new countryRec('FOC','NC','ニューカレドニア');

countryList[i++] =new countryRec('HWI','HA','ハワイ');

countryList[i++] =new countryRec('MNA','GU','グアム');
countryList[i++] =new countryRec('MNA','MP','北マリアナ連邦');
countryList[i++] =new countryRec('MNA','SP','サイパン');
countryList.length =86;



