var ajax = new Array();

function getCityList_apa(sel){
	var countryCode = sel.options[sel.selectedIndex].value;
	document.getElementById('lokacije_apa').options.length = 0;
	if(countryCode.length>0){
		var index = ajax.length;
		ajax[index] = new sack();
		ajax[index].requestFile = '/getCities.php?countryCode='+countryCode;
		ajax[index].onCompletion = function(){ createCities_apa(index) };
		ajax[index].runAJAX();
	}
}

function createCities_apa(index){
	var obj = document.getElementById('lokacije_apa');
	eval(ajax[index].response);
}

function getCityList_vil(sel){
	var countryCode = sel.options[sel.selectedIndex].value;
	document.getElementById('lokacije_vil').options.length = 0;
	if(countryCode.length>0){
		var index = ajax.length;
		ajax[index] = new sack();
		ajax[index].requestFile = '/getCities.php?countryCode='+countryCode;
		ajax[index].onCompletion = function(){ createCities_vil(index) };
		ajax[index].runAJAX();
	}
}

function createCities_vil(index){
	var obj = document.getElementById('lokacije_vil');
	eval(ajax[index].response);
}

function getCityList_hot(sel){
	var countryCode = sel.options[sel.selectedIndex].value;
	document.getElementById('lokacije_hot').options.length = 0;
	if(countryCode.length>0){
		var index = ajax.length;
		ajax[index] = new sack();ajax[index].requestFile = '/getCities.php?countryCode='+countryCode;
		ajax[index].onCompletion = function(){ createCities_hot(index) };	
		ajax[index].runAJAX();	
	}
}

function createCities_hot(index){
	var obj = document.getElementById('lokacije_hot');
	eval(ajax[index].response);		
}

function getCityList_boa(sel){
	var countryCode = sel.options[sel.selectedIndex].value;
	document.getElementById('lokacije_boa').options.length = 0;
	if(countryCode.length>0){
		var index = ajax.length;
		ajax[index] = new sack();ajax[index].requestFile = '/getCities.php?countryCode='+countryCode;
		ajax[index].onCompletion = function(){ createCities_boa(index) };	
		ajax[index].runAJAX();	
	}
}

function createCities_boa(index){
	var obj = document.getElementById('lokacije_boa');
	eval(ajax[index].response);		
}

function getCityList_cam(sel){
	var countryCode = sel.options[sel.selectedIndex].value;
	document.getElementById('lokacije_cam').options.length = 0;
	if(countryCode.length>0){
		var index = ajax.length;
		ajax[index] = new sack();ajax[index].requestFile = '/getCities.php?countryCode='+countryCode;
		ajax[index].onCompletion = function(){ createCities_cam(index) };	
		ajax[index].runAJAX();	
	}
}

function createCities_cam(index){
	var obj = document.getElementById('lokacije_cam');
	eval(ajax[index].response);		
}

function getCityList_rur(sel){
	var countryCode = sel.options[sel.selectedIndex].value;
	document.getElementById('lokacije_rur').options.length = 0;
	if(countryCode.length>0){
		var index = ajax.length;
		ajax[index] = new sack();ajax[index].requestFile = '/getCities.php?countryCode='+countryCode;
		ajax[index].onCompletion = function(){ createCities_rur(index) };	
		ajax[index].runAJAX();	
	}
}

function createCities_rur(index){
	var obj = document.getElementById('lokacije_rur');
	eval(ajax[index].response);		
}

function getCityList_rob(sel){
	var countryCode = sel.options[sel.selectedIndex].value;
	document.getElementById('lokacije_rob').options.length = 0;
	if(countryCode.length>0){
		var index = ajax.length;
		ajax[index] = new sack();ajax[index].requestFile = '/getCities.php?countryCode='+countryCode;
		ajax[index].onCompletion = function(){ createCities_rob(index) };	
		ajax[index].runAJAX();	
	}
}

function createCities_rob(index){
	var obj = document.getElementById('lokacije_rob');
	eval(ajax[index].response);		
}