var airlines = [ 
'all' , '所有' , 
'CZ' , '中国南方航空公司' , 
'MU' , '中国东方航空公司' , 
'CA' , '中国国际航空公司' , 
'HU' , '海南航空公司' , 
'MF' , '厦门航空公司' , 
'FM' , '上海航空公司' , 
'ZH' , '深圳航空公司' , 
'SC' , '山东航空公司' , 
'3U' , '四川航空公司' , 
'EU' , '鹰联航空有限公司' , 
'BK' , '奥凯航空公司' , 
'KN' , '中国联合航空公司' ,
'8C' , '东星航空公司' ,
'HO' , '吉祥航空公司' ,
'G5' , '华夏航空公司' ,
'8L' , '祥鹏航空公司'
] ; 

function airline_cell ( code , value ) { 
	document.write ( "<tr><td style='font-size:9pt;'" + 
	" onmouseover=\"this.style.color='white';this.style.backgroundColor='navy';\" " +
	" onmouseout=\"this.style.color='black';this.style.backgroundColor='white';\" " + 
	" onclick='set_airline(\"" + code + "\" , \"" + value + "\");'>" +
	value + 
	"</td></tr>" ) ; 
}

function airline_panel_setup ( pos , left_pos , layer_id ) { 
	airline_field = 0 ; 
	airline_desc = 0 ; 
	document.write ( 
	"<div id='" + layer_id + 
	"' style='position: absolute; left:" + left_pos + 
	"; top: " + pos + 
	"; visibility: hidden; background-color:white; z-index:9999; '>" + 
	"<table width=120 style='border-style:solid; border-width:1; border-color:black'>" ) ; 
	var ai = 0 ; 
	for ( var ai=0; ai < airlines.length/2; ai++ ) { 
		airline_cell ( airlines[ai*2] , airlines[ai*2+1] ) ; 
	}
	document.write ( "</table></div>" ) ; 
}

function set_airline ( code , vl ) { 
	document.getElementById ( airline_field ) . value  = code ;  
	document.getElementById ( airline_desc ) . value  = vl ;  
}