<!--
//make object
function AreaObject( c, n ) {
	this.name = n;
	this.code = c;
}
function CountryObject( c, n, a ) {
	this.name = n;
	this.code = c;
	this.area = a;
}
function CityObject( cd, n, co ) {
	this.code = cd;
	this.name = n;
	this.contry = co;
}
function MilObject( cd, n) {
	this.code = cd;
	this.name = n;
}

function AirbrdObject( cd, n) {
	this.code = cd;
	this.name = n;
}

function Form_PlaseObject( a, co, ci, f, document, mark1, mark2, msg1, msg2, msg3, msg4, msg5, msg6 ) {

	//this.optioncnt = 6;
	this.optioncnt = 1;
	this.optionidx1 = "-1";
	this.optionidx2 = "-2";
	this.optionidx3 = "-3";

	this.areaName = a;
	this.contryName = co;
	this.cityName = ci;
	this.formName = f;
	this.document = document;

	//message(string)
	this.arrowdown = mark1;
	this.arrowleft = mark2;

	this.initareamsg = msg1;
	this.initcontrymsg = msg2;
	this.initcitymsg = msg3;
	this.etccontrymsg = msg4;
	this.etccitymsg = msg5;
	this.allcitymsg = msg6;

	//Method
	this.initDEST = initDEST;
	this.initialArea = initialArea;
	this.initialContry = initialContry;
	this.initialCity = initialCity;
	this.changeArea = changeArea;
	this.changeContry = changeContry;
	this.changeContry_NonNull = changeContry_NonNull;
}

//object method
function initDEST() {
	this.initialArea();
	this.initialContry();
	this.initialCity();
}

function initialArea() {
	var i;
	var f = this.document.forms[this.formName];
	f[this.areaName].options[0] = new Option( this.arrowdown + this.initareamsg, "",true,true );
	f[this.areaName].options[1] = new Option( "------------", "" );
	for( i=0 ; i<area.length ; i++ ) {
		f[this.areaName].options[i+2] = new Option( area[i].name, area[i].code );
	}
}
function initialContry() {
	var f = this.document.forms[this.formName];
	for( i=0 ; i<f[this.contryName].options.length ; i++ ) {
		f[this.contryName].options[i] = new Option( this.arrowleft + this.initareamsg, "",true,true );
	}
}
function initialCity() {
	var str;
	var f = this.document.forms[this.formName];
	str = (f[this.areaName].options[f[this.areaName].options.selectedIndex].value == "") ?
			this.initareamsg : this.initcontrymsg;
	for( i=0 ; i<f[this.cityName].options.length ; i++ ) {
		f[this.cityName].options[i] = new Option( (this.arrowleft + str), "", true, true);
	}
}


//on change
function changeArea( idx ) {
	var i,j;
	var f = this.document.forms[this.formName];
	f[this.contryName].options[0].selected = true;
	f[this.contryName].options.length = this.optioncnt;
	f[this.cityName].options.length = this.optioncnt;
	if( f[this.areaName].options[idx].value == "" ) {
		this.initialContry();
	}
	else {
		for( i=1 ; i<f[this.contryName].options.length ; i++ ) {
			f[this.contryName].options[i].value = "";
			f[this.contryName].options[i].text = "";
		}
		f[this.contryName].options[0].selected = true;
		f[this.contryName].options[0] = new Option( this.arrowdown + this.initcontrymsg, "", true, true );
		//for( i=0,j=1 ; i<contry.length ; i++ ) {
		f[this.contryName].options[1] = new Option( "------------------", "" );
		for( i=0,j=2 ; i<contry.length ; i++ ) {
			if( contry[i].area == f[this.areaName].options[idx].value ) {
				f[this.contryName].options[j] = new Option( contry[i].name, contry[i].code );
				j++;
			}
		}
	}
	this.initialCity();
}

function changeContry( idx ) {
	var i,j;
	var f = this.document.forms[this.formName];
	f[this.cityName].options.length = this.optioncnt;
	f[this.cityName].options[0].selected = true;
	if( f[this.contryName].options[idx].value == "" ) {
		this.initialCity();
	}
	else
	if( f[this.contryName].options[idx].value == this.optionidx2 ) {
		for( i=0 ; i<f[this.cityName].options.length ; i++ ) {
			f[this.cityName].options[i] = new Option( "------------------", "-3" );
		}
		f[this.cityName].options[0].selected = true;
	}
	else {
		f[this.cityName].options[0] = new Option( this.arrowdown + this.initcitymsg, "",true,true );
		for( i=1 ; i<f[this.cityName].options.length ; i++ ) {
			f[this.cityName].options[i] = new Option( "", "" );
		}

//add:2008.01@allcitymsg‘S‚Ä‚Ì“sŽs@etccitymsg‚»‚Ì‘¼‚Ì“sŽs
	f[this.cityName].options[1] = new Option( "------------------", "" );
	//yŽå—v“sŽsz:%E3%80%90%E4%B8%BB%E8%A6%81%E9%83%BD%E5%B8%82%E3%80%91
	f[this.cityName].options[2] = new Option( decodeURI("%E3%80%90%E4%B8%BB%E8%A6%81%E9%83%BD%E5%B8%82%E3%80%91") , "" );
	//‚·‚×‚Ä:%E3%81%99%E3%81%B9%E3%81%A6
	f[this.cityName].options[3] = new Option(decodeURI("%e9%83%bd%e5%b8%82%e6%8c%87%e5%ae%9a%e3%81%aa%e3%81%97"), this.optionidx1);
	j=4;
	prtflg = 0;
		for( i=0 ; i<city.length ; i++ ) {
			if( city[i].contry == f[this.contryName].options[idx].value ) {
				//add:2008.01
				if(prtflg == 0){
					if(schflg_citycnt <= i){
						f[this.cityName].options[j] = new Option( "------------------", "" );
						j++;
						//y‘S“sŽsˆê——z:%E3%80%90%E5%85%A8%E9%83%BD%E5%B8%82%E4%B8%80%E8%A6%A7%E3%80%91
						f[this.cityName].options[j] = new Option( decodeURI("%E3%80%90%E5%85%A8%E9%83%BD%E5%B8%82%E4%B8%80%E8%A6%A7%E3%80%91"), "" );
						j++;
						prtflg=1;
					}
				}
				if(prtflg != 1){
					//œ:%E2%97%8F
					f[this.cityName].options[j] = new Option( (decodeURI("%E2%97%8F") + city[i].name), city[i].code );
					j++;
				}else{

					f[this.cityName].options[j] = new Option( city[i].name, city[i].code );
					j++;
				//add:2008.01
				}
			}
		}
	}
}

function changeContry_NonNull( idx ) {
	var		i,j;
	var		f = this.document.forms[this.formName];
	f[this.cityName].options.length = this.optioncnt;
	f[this.cityName].options[0].selected = true;
	if( f[this.contryName].options[idx].value == "" ) {
		this.initialCity();
	}
	else
	if( f[this.contryName].options[idx].value == this.optionidx2 ) {
		for( i=0 ; i<f[this.cityName].options.length ; i++ ) {
			f[this.cityName].options[i] = new Option( "------------------", this.optionidx3 );
		}
		f[this.cityName].options[0].selected = true;
	}
	else {
		f[this.cityName].options.length = 0;
		f[this.cityName].options[0] = new Option(this.allcitymsg, this.optionidx1,true,true);
		j = 1;
		for( i=0 ; i<city.length ; i++ ) {
			if( city[i].contry == f[this.contryName].options[idx].value ) {
				f[this.cityName].options[j] = new Option( city[i].name, city[i].code );
				j++;
			}
		}
		if( j > 1 ) {
			f[this.cityName].options[j] = new Option( this.etccitymsg, this.optionidx2 );
		}
	}
}

function call_changeArea( obj, idx ) {
	obj.changeArea(idx);
}
function call_changeContry( obj, idx ) {
	obj.changeContry(idx)
}

function call_changeContry_NonNull( obj, idx ) {
	obj.changeContry_NonNull(idx)
}
// -->
