//机票单程flash控制下拉列表
//起飞机场列表
function changeSelect11(optionValue){
	if ( optionValue == "SSS" ) {
		optionValue = "PVG";
	}
    var fc = document.all.fromCityname;
    var attr = fc.getAttribute("mod_address_reference");
    document.getElementById(attr).value = optionValue;
    var cityList = $$.module.address.source.hotel.split("@");
    for ( var i = 0; i < cityList.length; i++ ) {
    	var city = cityList[i];
    	var cityAtrr = city.split("|");
		if ( cityAtrr[2] == optionValue ) {
			fc.value = cityAtrr[1];
		}
    }
}
//到达机场列表
function changeSelect21(optionValue){
	if ( optionValue == "SSS" ) {
		optionValue = "PVG";
	}
    var tc = document.all.toCityname;
    var attr = tc.getAttribute("mod_address_reference");
    document.getElementById(attr).value = optionValue;
    var cityList = $$.module.address.source.hotel.split("@");
    for ( var i = 0; i < cityList.length; i++ ) {
    	var city = cityList[i];
    	var cityAtrr = city.split("|");
		if ( cityAtrr[2] == optionValue ) {
			tc.value = cityAtrr[1];
		}
    }
}

//机票往返flash控制下拉列表
//起飞机场
function changeSelect12(optionValue){
    var i;
    var search = 'domAir0001Form';

    for (i = 0;i < document.forms[search].departure_Place.options.length; i ++){
        if (document.forms[search].departure_Place.options[i].value == optionValue){
            document.forms[search].departure_Place.selectedIndex = i;
            break;
        }
    }
}
//到达机场
function changeSelect22(optionValue){
    var i;
    var search = 'domAir0001Form';
	var ddlDesCity1 = document.getElementById("SearchFlight1_ddlDesCity1");
	
    for (i = 0;i < ddlDesCity1.options.length; i ++){
         
        if (ddlDesCity1.options[i].value == optionValue){
            ddlDesCity1.selectedIndex = i;
            break;
        }
    }
}

//机票联程flash控制下拉列表

//出发
function changeSelect13(optionValue){
    var i;
    var search = 'domAir0001Form';

    for (i = 0;i < document.forms[search].departure_Place.options.length; i ++){
        if (document.forms[search].departure_Place.options[i].value == optionValue){
            document.forms[search].departure_Place.selectedIndex = i;
            break;
        }
    }
}
//中转
function changeSelect23(optionValue){
    var i;
    var search = 'domAir0001Form';

    for (i = 0;i < document.forms[search].SearchFlight1_ddlDesCity2.options.length; i ++){
        if (document.forms[search].SearchFlight1_ddlDesCity2.options[i].value == optionValue){
            document.forms[search].SearchFlight1_ddlDesCity2.selectedIndex = i;
            break;
        }
    }
}
//到达
function changeSelect33(optionValue){
    var i;
    var search = 'domAir0001Form';

    for (i = 0;i < document.forms[search].first_destination.options.length; i ++){
        if (document.forms[search].first_destination.options[i].value == optionValue){
            document.forms[search].first_destination.selectedIndex = i;
            break;
        }
    }
}
