var ajax = new Array();

function getAttractionList(regionSelId, attractionSelId, url){    
        var regionSel = document.getElementById(regionSelId);        
	var regionId = regionSel.options[regionSel.selectedIndex].value;                
        var attractionSel = document.getElementById(attractionSelId);
        attractionSel.options.length = 0;
        attractionSel.options[attractionSel.options.length] = new Option('Please Wait...', 0);
        var index = ajax.length;
        ajax[index] = new sack();
        ajax[index].requestFile = url + '?region.id='+regionId;	// Specifying which file to get
        ajax[index].onCompletion = function(){ createAttractions(index, attractionSelId) };	// Specify function that will be executed after file has been found
        ajax[index].runAJAX();		// Execute AJAX function	
}

function createAttractions(index, attractionSelId){
	var obj = document.getElementById(attractionSelId);
        obj.options.length = 0;	// Empty city select box
	eval(ajax[index].response);	// Executing the response from Ajax as Javascript code	
}