var ajax = new Array();

function getCityList(sel)
{
	var departement_id = sel.options[sel.selectedIndex].value;
	document.getElementById('_REST_V_ID').options.length = 0;	// Empty city select box
	var index = ajax.length;
	ajax[index] = new sack();
	ajax[index].requestFile = '/select.php?D_NUM='+departement_id;	// Specifying which file to get
	ajax[index].onCompletion = function(){ createCities(index) };	// Specify function that will be executed after file has been found
	ajax[index].runAJAX();		// Execute AJAX function
}

function createCities(index)
{
	var obj = document.getElementById('_REST_V_ID');
	eval(ajax[index].response);	// Executing the response from Ajax as Javascript code	
}