var ajax = new sack();

function getCityList(sel)
{
	var countryCode = sel.options[sel.selectedIndex].value;
	document.getElementById('dhtmlgoodies_city').options.length = 0;	// Empty city select box
	if(countryCode.length>0){
		ajax.requestFile = 'test1.php?countryCode='+countryCode;	// Specifying which file to get
		ajax.onCompletion = createCities;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
}

function createCities()
{
	var obj = document.getElementById('dhtmlgoodies_city');
	eval(ajax.response);	// Executing the response from Ajax as Javascript code	
}	

function getCityList2(sel)
{
	var countryCode = sel.options[sel.selectedIndex].value;
	document.getElementById('dhtmlgoodies_city2').options.length = 0;	// Empty city select box
	if(countryCode.length>0){
		ajax.requestFile = 'test2.php?countryCode='+countryCode;	// Specifying which file to get
		ajax.onCompletion = createCities2;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
}

function createCities2()
{
	var obj = document.getElementById('dhtmlgoodies_city2');
	eval(ajax.response);	// Executing the response from Ajax as Javascript code	
}		

function getCityList3(sel)
{
	var countryCode = sel.options[sel.selectedIndex].value;
	document.getElementById('dhtmlgoodies_city3').options.length = 0;	// Empty city select box
	if(countryCode.length>0){
		ajax.requestFile = 'test3.php?countryCode='+countryCode;	// Specifying which file to get
		ajax.onCompletion = createCities3;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
}

function createCities3()
{
	var obj = document.getElementById('dhtmlgoodies_city3');
	eval(ajax.response);	// Executing the response from Ajax as Javascript code	
}		


