<!-- 

/* 
 * Airfare Search Javascript
 */
 
var element;
var ajax = new sack();

function getCityList(sel, element_id)
{	
	
	element = element_id;
	
	var country_id = sel.options[sel.selectedIndex].value;
	clearMenu(element_id, 1);
	
	if(country_id.length>0){
		ajax.requestFile = '/ajax/getCities.php?country_id='+country_id;	// Specifying which file to get
		ajax.onLoading = showLoading;
		ajax.onCompletion = createOutput;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
	
}

function clearMenu(element, clear) {
	var obj = document.getElementById(element);
	obj.options.length = 0;
	
	if(clear == 1) {
		obj.options[obj.options.length] = new Option('Any','*');
	} 
}

function showLoading()
{	
	var obj = document.getElementById(element);
	obj.options[obj.options.length] = new Option('LOADING...','*');
}

function createOutput()
{
	document.getElementById(element).options.length = 0;	// Empty city select box
	var obj = document.getElementById(element);
	obj.options[obj.options.length] = new Option('Any','*');
	eval(ajax.response);	// Executing the response from Ajax as Javascript code	
}

-->