function Airport(obj){
 var ChkValue,sel,j = 0;
 if(arguments.length == 2)
	ChkValue = arguments[1];
 for(var i=0;i<NationPort.length;i++){
	obj.options[obj.length] = new Option(NationPort[i][2]+" - "+NationPort[i][4],NationPort[i][1]+","+NationPort[i][4]);
	if(NationPort[i][1] == ChkValue)
		sel = j;
	j++;}
 obj.selectedIndex = sel;
}

function Airport2(obj){
 var ChkValue,sel,j = 0;
 if(arguments.length == 2)
	ChkValue = arguments[1];
 obj.options[0] = new Option("-不限-","");
 for(var i=0;i<NationPort.length;i++){
	obj.options[obj.length] = new Option(NationPort[i][2].substr(0,1)+"-"+NationPort[i][0],NationPort[i][1]);
	if(NationPort[i][1] == ChkValue)
		sel = j;
	j++;}
 obj.selectedIndex = sel;
}

function Airport3(obj){
 var ChkValue,sel,j = 0;
 if(arguments.length == 2)
	ChkValue = arguments[1];
 for(var i=0;i<InternalPort.length;i++){
	obj.options[obj.length] = new Option(InternalPort[i][2].substr(0,1)+" - "+InternalPort[i][3],InternalPort[i][1]+","+InternalPort[i][3]);
	if(InternalPort[i][1] == ChkValue)
		sel = j;
	j++;}
 obj.selectedIndex = sel;
}

function AirportI(obj){
 var ChkValue,sel,j = 0;
 if(arguments.length == 2)
	ChkValue = arguments[1];
 for(var i=0;i<InterPort.length;i++){
	obj.options[obj.length] = new Option(InterPort[i][2].substr(0,1)+" - "+InterPort[i][0],InterPort[i][1]+","+InterPort[i][0]);
	if(InterPort[i][1] == ChkValue)
		sel = j;
	j++;}
 obj.selectedIndex = sel;
}

function HotelCity(obj){
 var ChkValue,sel,j = 0;
 if(arguments.length == 2)
	ChkValue = arguments[1];
 for(var i=0;i<Hotel.length;i++)
	if(Hotel[i][5] == 1){
		obj.options[obj.length] = new Option(Hotel[i][2].substr(0,1)+" - "+Hotel[i][0],Hotel[i][1]+","+Hotel[i][0]);
		if(Hotel[i][1] == ChkValue)
			sel = j;
		j++;}
 obj.selectedIndex = sel;
}

function HotelArea(obj,Flag,val){
 var ChkValue,sel,j = 0;
 if(arguments.length == 4)
	ChkValue = arguments[1];
 for(var i=0;i<Hotel.length;i++)
	if(Hotel[i][4] == 2 && Hotel[i][5] == Flag && Hotel[i][3] == val){
		obj.options[obj.length] = new Option(Hotel[i][0],Hotel[i][0]);
		if(Hotel[i][1] == ChkValue)
			sel = j;
		j++;}
 obj.selectedIndex = sel;
}

function AirWaysI(obj){
 var ChkValue,sel,j = 0;
 if(arguments.length == 2)
	ChkValue = arguments[1];
 for(var i=0;i<InterWays.length;i++){
	obj.options[obj.length] = new Option(InterWays[i][0]+" - "+InterWays[i][1],InterWays[i][0]+","+InterWays[i][1]);
	if(InterWays[i][0] == ChkValue)
		sel = j;
	j++;}
 obj.selectedIndex = sel;
}

function AirWays(obj){
 var ChkValue,sel,j = 0;
 if(arguments.length == 2)
	ChkValue = arguments[1];
 for(var i=0;i<NationWays.length;i++){
	obj.options[obj.length] = new Option(NationWays[i][0]+" - "+NationWays[i][1],NationWays[i][0]+","+NationWays[i][1]);
	if(NationWays[i][0] == ChkValue)
		sel = j;
	j++;}
 obj.selectedIndex = sel;
}

function AirWays2(obj){
 var ChkValue,sel,j = 0;
 if(arguments.length == 2)
	ChkValue = arguments[1];
 obj.options[0] = new Option("-选择航空公司-","");
 for(var i=0;i<NationWays.length;i++){
	obj.options[obj.length] = new Option(NationWays[i][1],NationWays[i][0]);
	if(NationWays[i][0] == ChkValue)
		sel = j;
	j++;}
 obj.selectedIndex = sel;
}

function GetNumber(obj,m){
 var StartNum,ChkValue,sel,n,j = 0;
 if(arguments.length > 2)
	StartNum = arguments[2];
 else
	StartNum = 0
 if(arguments.length == 4)
	ChkValue = arguments[3];
 for(var i=StartNum;i<=m;i++){
	n = i;
	if(n < 10)
		n = "0" + n;
	obj.options[obj.length] = new Option(n,n);
	if(i == ChkValue)
		sel = j;
	j++;}
 obj.selectedIndex = sel;
}
function SP(obj){
 var ChkValue,sel,j = 0;
 if(arguments.length == 2)
	ChkValue = arguments[1];
 obj.length = 0;
 obj.options[0] = new Option("--选择--","");
 for(var i=0;i<City.length;i++)
	if(City[i][3] == 1){
		j++;
		obj.options[obj.length] = new Option(City[i][0],City[i][0]);
		if(City[i][0] == ChkValue)
			sel = j;}
 obj.selectedIndex = sel;
}